From: nhmall Date: Thu, 2 Jun 2022 18:43:46 +0000 (-0400) Subject: use ncursesw on linux for curses support of enhanced1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62014be6f8cef20285ddfb519228747454349b45;p=nethack use ncursesw on linux for curses support of enhanced1 --- diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index e24878163..16b4099bf 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -125,16 +125,27 @@ CURSESLIB = #endif # WANT_WIN_CHAIN ifdef WANT_WIN_TTY -CURSESLIB = -lncurses -ltinfo +USE_CURSESLIB=1 endif ifdef WANT_WIN_CURSES -CURSESLIB = -lncurses -ltinfo +ifneq "$(USE_CURSESLIB)" "1" +USE_CURSESLIB=1 +endif endif -ifdef CURSESLIB +ifeq "$(USE_CURSESLIB)" "1" +ifndef MAKEFILE_DAT +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) +CURSESLIB += -ltinfo +endif #not MAKEFILE_UTL +endif #not MAKEFILE_DAT WINLIB += $(CURSESLIB) -endif +endif #USE_CURSESLIB ifdef WANT_WIN_X11 USE_XPM=1