summaryrefslogtreecommitdiff
blob: 8e74b7cb079cede83e0c96b32b395ef292229b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/config.mk
+++ b/config.mk
@@ -7,8 +7,9 @@ MANPREFIX = ${PREFIX}/share/man
 TERMINFO := ${DESTDIR}${PREFIX}/share/terminfo
 
 INCS = -I.
-LIBS = -lc -lutil -lncursesw
-CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED
+LIBS = -lc -lutil $(shell $(PKG_CONFIG) --libs ncursesw)
+CPPFLAGS += -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED
+CPPFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
 CFLAGS += -std=c99 ${INCS} -DNDEBUG ${CPPFLAGS}
 
 CC ?= cc