aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 12 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index c4f55ac..ad4d805 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,20 +246,16 @@ case $INTERFACE in
*curses*)
case $INTERFACE in
ncurses | netbsd-curses)
- # The widechar version of ncurses is necessary for Unicode
- # support even when not using widechar APIs.
- PKG_CHECK_MODULES(NCURSES, [ncursesw], [
- CFLAGS="$CFLAGS $NCURSES_CFLAGS"
- CXXFLAGS="$CXXFLAGS $NCURSES_CFLAGS"
- LIBS="$LIBS $NCURSES_LIBS"
- ], [
- # This should be sufficient to detect non-widechar
- # ncurses versions as well, although we could also check
- # for an "ncurses" package.
- AC_CHECK_LIB(ncurses, initscr, , [
- AC_MSG_ERROR([libncurses missing!])
- ])
- ])
+ # This gives precendence to the widechar version of ncurses,
+ # which is necessary for Unicode support even when not using widechar APIs.
+ AX_WITH_CURSES
+ if [[ x$ax_cv_curses_enhanced != xyes -o x$ax_cv_curses_color != xyes ]]; then
+ AC_MSG_ERROR([X/Open curses compatible library not found!])
+ fi
+ CFLAGS="$CFLAGS $CURSES_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS"
+ LIBS="$LIBS $CURSES_LIBS"
+
AC_CHECK_FUNCS([tigetstr])
if [[ x$INTERFACE = xnetbsd-curses ]]; then
@@ -348,6 +344,8 @@ case $INTERFACE in
;;
esac
+ # AX_WITH_CURSES defines per-header symbols, but we currently
+ # demand that CPPFLAGS are set up such, that we can find curses.h anyway.
AC_CHECK_HEADERS([curses.h], , [
AC_MSG_ERROR([Curses header missing!])
])