diff --git a/ChangeLog b/ChangeLog index 5e0ff29c95d456479b1a6798cc7ff06f74434994..977ec9498650d3f399794304ab085f719382c263 100644 --- a/ChangeLog +++ b/ChangeLog @@ -242,6 +242,10 @@ CVS code - 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) diff --git a/configure.ac b/configure.ac index a91ec5854763a3ab1c036318e144242c234257ca..b62382c80027435856733aaafd895a27dc3f34dd 100644 --- a/configure.ac +++ b/configure.ac @@ -315,15 +315,9 @@ dnl Checks for libraries. 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]) @@ -344,7 +338,6 @@ else 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.