* acinclude.m4 (MC_WITH_MCSLANG): Check for terminfo and use

termcap if terminfo is missing in the known locations.
* configure.in: Remove --with-termcap processing, it is now in
acinclude.m4.
This commit is contained in:
Pavel Roskin 2002-10-08 04:42:10 +00:00
parent a7dd92996c
commit d570124a7a
3 changed files with 36 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2002-10-08 Pavel Roskin <proski@gnu.org>
* acinclude.m4 (MC_WITH_MCSLANG): Check for terminfo and use
termcap if terminfo is missing in the known locations.
* configure.in: Remove --with-termcap processing, it is now in
acinclude.m4.
2002-10-02 Pavel Roskin <proski@gnu.org>
* syntax/syntax.syntax: Fix highlighting for "gray".

View File

@ -610,7 +610,7 @@ dnl Try using termcap database and link with libtermcap if possible.
dnl
AC_DEFUN([MC_USE_TERMCAP], [
screen_msg="$screen_msg with termcap database"
AC_MSG_NOTICE([using S-Lang screen manager with termcap])
AC_MSG_NOTICE([using S-Lang screen library with termcap])
AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database])
AC_CHECK_LIB(termcap, tgoto, [MCLIBS="$MCLIBS -ltermcap"], , [$LIBS])
])
@ -704,6 +704,30 @@ dnl
AC_DEFUN([MC_WITH_MCSLANG], [
screen_type=slang
screen_msg="Included S-Lang library (mcslang)"
# Search for terminfo database.
use_terminfo=
if test x"$with_termcap" != xyes; then
if test x"$with_termcap" = xno; then
use_terminfo=yes
fi
if test -n "$TERMINFO" && test -r "$TERMINFO/v/vt100"; then
use_terminfo=yes
fi
for dir in "/usr/share/terminfo" "/usr/lib/terminfo" \
"/usr/share/lib/terminfo" "/etc/terminfo" \
"/usr/local/lib/terminfo" "$HOME/.terminfo"; do
if test -r "$dir/v/vt100"; then
use_terminfo=yes
fi
done
fi
# If there is no terminfo, use termcap
if test -z "$use_terminfo"; then
MC_USE_TERMCAP
fi
_MC_WITH_XSLANG
])

View File

@ -441,13 +441,12 @@ esac
dnl
dnl Force using termcap
dnl Force using termcap. This option is processed in MC_WITH_MCSLANG.
dnl Report an error if this option is not applicable.
dnl
AC_ARG_WITH(termcap,
[ --with-termcap Try using termcap database [[no]]],
[if test x$with_screen = xmcslang; then
MC_USE_TERMCAP
else
[ --with-termcap Try using termcap database [[only if no terminfo]]],
[if test x$with_screen != xmcslang; then
AC_MSG_ERROR([Option `--with-termcap' only works with `--with-screen=mcslang'])
fi
])