adjust hints/{linux,macOS}.370 for absence of pkg-config

This commit is contained in:
nhmall
2023-07-05 09:07:13 -04:00
parent c360822c89
commit 7c26410daf
2 changed files with 21 additions and 7 deletions

View File

@@ -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))

View File

@@ -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
#