From 7c26410dafcdb904fd3d59c5a39685dce0430ca7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 5 Jul 2023 09:07:13 -0400 Subject: [PATCH] adjust hints/{linux,macOS}.370 for absence of pkg-config --- sys/unix/hints/linux.370 | 13 ++++++++++--- sys/unix/hints/macOS.370 | 15 +++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index 2cdfdf0de..4c2fd4258 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -70,10 +70,17 @@ CURSESLIB = -lncurses -ltinfo ifdef MAKEFILE_SRC comma:=, NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs) -ifneq (,$(findstring ncursesw, $(NCURSES_LFLAGS))) -HAVE_NCURSESW=1 -else +ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS))) +ifeq (,$(findstring ncurses, $(NCURSES_LFLAGS))) +#this indicates that pkg-config itself was unavailable +NCURSES_LFLAGS = -lncursesw -ltinfo +endif +endif +#$(info $(NCURSES_LFLAGS)) +ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS))) HAVE_NCURSESW=0 +else +HAVE_NCURSESW=1 endif #$(info $(NCURSES_LFLAGS)) #$(info HAVE_NCURSESW=$(HAVE_NCURSESW)) diff --git a/sys/unix/hints/macOS.370 b/sys/unix/hints/macOS.370 index e77aaf8c2..81d07000b 100755 --- a/sys/unix/hints/macOS.370 +++ b/sys/unix/hints/macOS.370 @@ -116,10 +116,18 @@ else # CURSESLIB = -lncurses -ltinfo comma:=, NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs) -ifneq (,$(findstring ncurses, $(NCURSES_LFLAGS))) -HAVE_NCURSESW=1 -else +ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS))) +ifeq (,$(findstring ncurses, $(NCURSES_LFLAGS))) +#this indicates that pkg-config itself was unavailable +CURSESLIB = $(NCURSES_LFLAGS) +NHCFLAGS+=-DCURSES_UNICODE +endif +endif +#$(info $(NCURSES_LFLAGS)) +ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS))) HAVE_NCURSESW=0 +else +HAVE_NCURSESW=1 endif ifeq "$(HAVE_NCURSESW)" "1" CURSESLIB = $(NCURSES_LFLAGS) @@ -787,4 +795,3 @@ endif # end of build_qt_pkg endif # WANT_WIN_QT for packaging endif # MAKEFILE_TOP # -