1
1

* acinclude.m4 (AC_NCURSES): Remove.

* configure.in: Use AC_CHECK_HEADERS to find ncurses headers and
AC_CHECK_LIB to check existance of ncurses library.  Eliminate
variables force_ncurses and search_ncurses.
Этот коммит содержится в:
Pavel Roskin 2002-07-13 05:10:41 +00:00
родитель da27ec10cd
Коммит 05364f344b
3 изменённых файлов: 24 добавлений и 55 удалений

Просмотреть файл

@ -1,3 +1,10 @@
2002-07-13 Pavel Roskin <proski@gnu.org>
* acinclude.m4 (AC_NCURSES): Remove.
* configure.in: Use AC_CHECK_HEADERS to find ncurses headers and
AC_CHECK_LIB to check existance of ncurses library. Eliminate
variables force_ncurses and search_ncurses.
2002-07-10 Pavel Roskin <proski@gnu.org>
* configure.in: Remove --with-netrc, it is now default and can

Просмотреть файл

@ -714,7 +714,6 @@ AC_DEFUN([AC_USE_TERMCAP], [
AC_DEFUN([AC_WITH_SLANG], [
AC_DEFINE(HAVE_SLANG, 1,
[Define to use S-Lang library for screen management])
search_ncurses=false
screen_type="slang"
if $slang_use_system_installed_lib
then
@ -780,22 +779,3 @@ AC_DEFUN([AC_EXT2_UNDEL], [
fi
])
dnl
dnl Parameters: directory filename LIBS_append CPPFLAGS_append nicename
dnl
AC_DEFUN([AC_NCURSES], [
if $search_ncurses
then
if test -f $1/$2
then
AC_MSG_NOTICE([found ncurses header $1/$2])
MCLIBS="$MCLIBS $3"
CPPFLAGS="$CPPFLAGS $4"
search_ncurses=false
screen_type="ncurses"
screen_manager="$5"
AC_DEFINE(USE_NCURSES, 1,
[Define to use ncurses for screen management])
fi
fi
])

Просмотреть файл

@ -302,8 +302,6 @@ screen_type=""
dnl Screen manager name (for the output only)
screen_manager=unknown
search_ncurses=false
mouse_lib="xterm only"
case $host_os in
linux*)
@ -333,18 +331,24 @@ esac
AC_ARG_WITH(ncurses,
[--with-ncurses[=base-dir] Compile with ncurses/locate base dir],
[force_ncurses=true
if test x$withval = xyes
then
search_ncurses=true
else
MCLIBS="$MCLIBS -L$withval/lib -lncurses"
[if test x$withval != xyes; then
MCLIBS="$MCLIBS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
search_ncurses=false
screen_type="ncurses"
screen_manager="ncurses"
AC_DEFINE(USE_NCURSES)
fi
AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h], [break],
[AC_MSG_ERROR([Could not find ncurses header])])
dnl -lncurses should not go to LIBS, hence [:]
dnl curses_version is specific to ncurses, it's not in old curses
AC_CHECK_LIB(ncurses, curses_version, [:],
[AC_MSG_ERROR([Could not find ncurses library])])
MCLIBS="$MCLIBS -lncurses"
screen_type="ncurses"
screen_manager="ncurses"
AC_DEFINE(USE_NCURSES, 1,
[Define to use ncurses for screen management])
])
AC_ARG_WITH(hsc,
@ -518,7 +522,7 @@ AC_ARG_WITH(efence,
mem_debug="Electric Fence"
fi])
if test -z "$force_ncurses"; then
if test "x$screen_type" != xncurses; then
slang_check_lib=true
slang_term=""
slang_use_system_installed_lib=false
@ -612,28 +616,6 @@ fi
AC_SUBST(undelfs_o)
if $search_ncurses
then
AC_MSG_NOTICE([checking location of ncurses.h file])
AC_NCURSES(/usr/include, ncurses.h, -lncurses,,
[ncurses in /usr/include])
AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses,
[ncurses in /usr/include/ncurses])
AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include,
[ncurses in /usr/local])
AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses,
[ncurses in /usr/local/include/ncurses])
AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES,
[renamed ncurses in /usr/local/include/ncurses])
AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES,
[renamed ncurses in /usr/include/ncurses])
fi
if test "x$screen_type" != xncurses && test -n "$force_ncurses"; then
AC_MSG_ERROR([Could not find ncurses])
fi
dnl Ncurses specific checks
dnl