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
Этот коммит содержится в:
родитель
5780b24759
Коммит
a870ca2d72
@ -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)
|
||||
|
@ -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.
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user