From 62014be6f8cef20285ddfb519228747454349b45 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 2 Jun 2022 14:43:46 -0400 Subject: [PATCH] use ncursesw on linux for curses support of enhanced1 --- sys/unix/hints/linux.370 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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