summaryrefslogtreecommitdiff
path: root/sysutils/dvtm/files/patch-config.mk
blob: 190f14bc51715a2cbdb662fdddd8d4352df452dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- config.mk.orig	2016-01-09 11:40:56 UTC
+++ config.mk
@@ -10,8 +10,13 @@ INCS = -I.
 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
+.if exists(/usr/lib/libncursesw.so)
+LIBS += -lncursesw
+.else
+LIBS += -lncurses
+.endif
+CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE
 CFLAGS += -std=c99 ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG ${CPPFLAGS}
 LDFLAGS += ${LIBS}