aboutsummaryrefslogtreecommitdiff
path: root/mk/termcap.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/termcap.mk')
-rw-r--r--mk/termcap.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/termcap.mk b/mk/termcap.mk
index b716276b..6f590da6 100644
--- a/mk/termcap.mk
+++ b/mk/termcap.mk
@@ -1,5 +1,10 @@
ifeq (${MKTERMCAP},ncurses)
+ LTERMCAP:= $(shell pkg-config ncurses --libs 2> /dev/null)
+ifeq ($(LTERMCAP),)
LIBTERMCAP?= -lncurses
+else
+LIBTERMCAP?= $(LTERMCAP)
+endif
CPPFLAGS+= -DHAVE_TERMCAP
LDADD+= ${LIBTERMCAP}
else ifeq (${MKTERMCAP},termcap)