|
@@ -1,50 +1,34 @@
|
|
|
#! /bin/sh
|
|
|
|
|
|
-if which ncursesw5-config >/dev/null
|
|
|
+if which ncurses5-config >/dev/null
|
|
|
then
|
|
|
-
|
|
|
-echo "# automatically generated build configuration
|
|
|
-
|
|
|
-NCURSES_FLAGS = $(ncursesw5-config --cflags)
|
|
|
-NCURSES_LIBS = $(ncursesw5-config --libs)
|
|
|
-
|
|
|
-CPPFLAGS += \$(NCURSES_FLAGS)
|
|
|
-LDFLAGS += \$(NCURSES_LIBS)
|
|
|
-
|
|
|
-CC ?= cc" > config.mk
|
|
|
-
|
|
|
+ echo 'using ncurses autoconfiguration script.'
|
|
|
+ NCURSES_FLAGS=$(ncurses5-config --cflags)
|
|
|
+ NCURSES_LIBS=$(ncurses5-config --libs)
|
|
|
elif which pkg-config >/dev/null
|
|
|
then
|
|
|
-
|
|
|
-echo 'ncurses autoconfiguration script not found!
|
|
|
-trying pkg-config…'
|
|
|
-
|
|
|
-echo "# automatically generated build configuration
|
|
|
-
|
|
|
-NCURSES_FLAGS = $(pkg-config ncursesw --cflags)
|
|
|
-NCURSES_LIBS = $(pkg-config ncursesw --libs)
|
|
|
-
|
|
|
-CPPFLAGS += \$(NCURSES_FLAGS)
|
|
|
-LDFLAGS += \$(NCURSES_LIBS)
|
|
|
-
|
|
|
-CC ?= cc" > config.mk
|
|
|
-
|
|
|
+ echo 'ncurses autoconfiguration script not found! trying pkg-config…'
|
|
|
+ NCURSES_FLAGS=$(pkg-config ncurses --cflags)
|
|
|
+ NCURSES_LIBS=$(pkg-config ncurses --libs)
|
|
|
else
|
|
|
+ echo 'can not configure! you will have to manually specify flags.'
|
|
|
+ NCURSES_FLAGS='# manual configuration required'
|
|
|
+ NCURSES_LIBS='# manual configuration required'
|
|
|
+fi
|
|
|
|
|
|
-echo 'ncurses configuration failed!
|
|
|
-manual configuration will be required.'
|
|
|
+if [ $(uname -s) == 'FreeBSD' ]
|
|
|
+then
|
|
|
+ NCURSES_FLAGS="-I/usr/local/include $NCURSES_FLAGS"
|
|
|
+fi
|
|
|
|
|
|
echo "# automatically generated build configuration
|
|
|
|
|
|
-NCURSES_FLAGS = $(pkg-config ncursesw --cflags)
|
|
|
-NCURSES_LIBS = $(pkg-config ncursesw --libs)
|
|
|
+NCURSES_FLAGS = $NCURSES_FLAGS
|
|
|
+NCURSES_LIBS = $NCURSES_LIBS
|
|
|
|
|
|
-CPPFLAGS += \$(NCURSES_FLAGS)
|
|
|
+CPPFLAGS += -Iincs \$(NCURSES_FLAGS)
|
|
|
LDFLAGS += \$(NCURSES_LIBS)
|
|
|
|
|
|
CC ?= cc" > config.mk
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-echo 'wrote config.mk'
|
|
|
+echo 'wrote config.mk.'
|
|
|
|