commit a870ca2d72e64ecc755c0fcc9676022c06257b6e
parent 5780b24759aa5a1747f1d2140b317871d6673854
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 14 Oct 2004 21:59:00 +0000
simplify the curses library tests in configure.ac by checking for
initscr() instead of tgetent() where possible
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1988 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git 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
@@ -315,17 +315,11 @@ 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])
fi
@@ -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.