2009-05-07 16:38:06 +04:00
|
|
|
dnl
|
|
|
|
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 library with termcap])
|
|
|
|
AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database])
|
|
|
|
AC_CHECK_LIB(termcap, tgoto, [MCLIBS="$MCLIBS -ltermcap"], , [$LIBS])
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check if the installed S-Lang library uses termcap
|
|
|
|
dnl
|
|
|
|
AC_DEFUN([MC_SLANG_TERMCAP], [
|
2009-07-28 16:05:43 +04:00
|
|
|
unset ac_cv_lib_termcap_tgoto
|
|
|
|
|
2009-05-07 16:38:06 +04:00
|
|
|
AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -lslang"
|
|
|
|
AC_TRY_LINK([
|
2009-07-28 16:05:43 +04:00
|
|
|
#ifdef HAVE_SLANG_SLANG_H
|
|
|
|
#include <slang/slang.h>
|
|
|
|
#else
|
|
|
|
#include <slang.h>
|
|
|
|
#endif
|
2009-05-07 16:38:06 +04:00
|
|
|
],
|
|
|
|
[SLtt_get_terminfo(); SLtt_tgetflag("");],
|
|
|
|
[mc_cv_slang_termcap=no],
|
|
|
|
[mc_cv_slang_termcap=yes])
|
|
|
|
LIBS="$ac_save_LIBS"
|
|
|
|
])
|
|
|
|
|
2009-07-26 17:11:53 +04:00
|
|
|
if test x"$mc_cv_slang_termcap" = xyes; then
|
2009-05-07 16:38:06 +04:00
|
|
|
MC_USE_TERMCAP
|
|
|
|
fi
|
|
|
|
])
|