From: nhmall Date: Thu, 2 Jun 2022 19:10:15 +0000 (-0400) Subject: follow-up on linux.370 ncursesw X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae1f5b8d2a99c4e4a1eb7cc9f848fcb4faadd954;p=nethack follow-up on linux.370 ncursesw --- diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index 16b4099bf..5e077007f 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -140,7 +140,12 @@ ifndef MAKEFILE_UTL # If CURSES_UNICODE is defined, we need ncursesw. # Without CURSES_UNICODE the following simpler setting works. # CURSESLIB = -lncurses -ltinfo -CURSESLIB = $(shell pkg-config ncursesw --libs || echo -lncursesw) +HAVE_NCURSESW = $(shell expr `pkg-config ncursesw --libs >/dev/null; echo $$?` = 0) +ifeq "$(HAVE_NCURSESW)" "1" +CURSESLIB = -lncursesw +else +CURSESLIB = -lncurses +endif #HAVE_NCURSESW CURSESLIB += -ltinfo endif #not MAKEFILE_UTL endif #not MAKEFILE_DAT