summaryrefslogtreecommitdiff
path: root/adk
diff options
context:
space:
mode:
authormirabilos <tg@mirbsd.org>2015-07-22 14:40:27 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-07-25 16:19:38 +0200
commit2c9f60e5770c4e243531df52b2fc6abf4cf04981 (patch)
treee63930c4faf1024a15f1cc34345a2f413506a303 /adk
parent903927dfd3dcebfbae7b1085004a973d71cb2f2f (diff)
fix ncursesw library detection
Diffstat (limited to 'adk')
-rw-r--r--adk/config/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/adk/config/Makefile b/adk/config/Makefile
index 336b1f179..8481e3bff 100644
--- a/adk/config/Makefile
+++ b/adk/config/Makefile
@@ -12,36 +12,42 @@ HOST_CFLAGS+=-DKBUILD_NO_NLS -w
all: ncurses conf mconf
-LIBS= -lncurses
+LIBS=
ifeq (/usr/lib/libtinfo.so, $(wildcard /usr/lib/libtinfo.so))
-LIBS+= -ltinfo
+LIBS= -ltinfo
endif
ifeq (/usr/include/ncursesw/curses.h, $(wildcard /usr/include/ncursesw/curses.h))
HOST_CFLAGS+= -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"
+LIBS+= -lncursesw
else
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
HOST_CFLAGS+= -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
+LIBS+= -lncurses
else
ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
HOST_CFLAGS+= -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+LIBS+= -lncurses
else
ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h))
HOST_CFLAGS+= -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>"
+LIBS+= -lncurses
else
ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h))
HOST_CFLAGS+= -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+LIBS+= -lncurses
else
ifeq (/usr/local/opt/ncurses/include/ncursesw/ncurses.h, $(wildcard /usr/local/opt/ncurses/include/ncursesw/ncurses.h))
HOST_CFLAGS+= -I/usr/local/opt/ncurses/include -DCURSES_LOC="<ncursesw/ncurses.h>"
-LIBS+= -L/usr/local/opt/ncurses/lib -Wl,-rpath -Wl,/usr/local/opt/ncurses/lib
+LIBS+= -L/usr/local/opt/ncurses/lib -Wl,-rpath -Wl,/usr/local/opt/ncurses/lib -lncursesw
else
ifeq (/usr/pkg/include/ncurses.h, $(wildcard /usr/pkg/include/ncurses.h))
HOST_CFLAGS+= -I/usr/pkg/include -DCURSES_LOC="<ncurses.h>"
-LIBS+= -L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib
+LIBS+= -L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib -lncurses
else
ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
HOST_CFLAGS+= -DCURSES_LOC="<ncurses.h>"
+LIBS+= -lncurses
else
HOST_CFLAGS+= -DCURSES_LOC="<curses.h>"
LIBS= -lcurses