summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-12-23 10:16:20 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-12-23 11:40:46 +0100
commit361a58ae43f970afe54c9857536c8339f800672c (patch)
tree553a5cb0df6ac85e35ad11cb897b6d11716cbbf7 /configure.ac
parent183b9c24b896f26af1f9c363ae73d5528640c200 (diff)
downloadptxdist-361a58ae43f970afe54c9857536c8339f800672c.tar.gz
ptxdist-361a58ae43f970afe54c9857536c8339f800672c.tar.xz
[autoconf] be stricter when looking for ncurses
Some distributions seem to have /usr/include/ncurses.h but the other headers are in /usr/include/ncurses/. This makes sure that menu.h is found as well and adds an option to configure with --with-ncurses=/usr/include/ncurses/. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 162fdbb47..7a34e7a8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,27 @@ else
fi
AC_SUBST(CURSES_LOC)
-AM_CONDITIONAL(BUILD_NCONF, test "x$CURSES_LOC" = "x<ncurses.h>")
+AC_ARG_WITH(ncurses, AS_HELP_STRING([--with-ncurses],[Include path to the ncurses headers]),
+ [
+ if test "x$withval" != "xyes"; then
+ CPPFLAGS="-I$withval"
+ AC_SUBST(CPPFLAGS)
+ fi
+ with_ncurses=yes
+ ],[
+ with_ncurses=auto
+])
+
+AC_CHECK_HEADER(
+ [menu.h],
+ [NCURSES_FOUND=yes],[
+ if test "$with_ncurses" = "yes"; then
+ AC_MSG_ERROR([Cannot find menu.h (ncurses).])
+ else
+ AC_MSG_WARN([Cannot find menu.h (ncurses). Not building nconf.])
+ fi
+])
+AM_CONDITIONAL(BUILD_NCONF, test "x$NCURSES_FOUND" = "xyes")
AC_SYS_INTERPRETER