function, set the fourth parameter to default to "no" (since
it apparently only occurs on glibc 2.2.3-based systems) so
that cross-compiling will work. (DLR, found by Mike Frysinger)
+ - Simplify the curses library tests by only checking for
+ initscr(), which ncurses, curses, and pdcurses should all
+ have, and not tgetent(), which is a termcap-specific function.
+ (DLR)
- nanorc.sample:
- Remove specific references to control key shortcuts other than
XON and XOFF. (DLR)
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_HEADERS(curses.h ncurses.h)
- AC_CHECK_LIB(ncurses, tgetent, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
+ AC_CHECK_LIB(ncurses, initscr, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
fi
-if eval "test x$CURSES_LIB_NAME = x"
-then
- AC_CHECK_LIB(curses, tgetent, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
-fi
-
-# Fallback for PDCurses and less useful curses libs...
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
AC_MSG_RESULT([Using $CURSES_LIB_NAME as the termcap library])
fi
-
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors command.]))
dnl Parse any configure options.