diff --git a/ChangeLog b/ChangeLog index b49ac01fc..73657afcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Feb 10 02:48:51 1999 Timur Bakeyev + + * configure.in: Add check, which, in case of system-installed SLang + library tries to run a test program, which determines, does we need + linking with libtermcap.a. Also, set of if's for finding terminfo + dir changed do for cycle - a bit nicer :) + Tue Feb 9 20:52:19 1999 Norbert Warmuth * README.QNX: Deleted documention about mc.menu.qnx.diff. diff --git a/configure.in b/configure.in index af8ba971d..3c39e1be8 100644 --- a/configure.in +++ b/configure.in @@ -818,9 +818,25 @@ AC_DEFUN(AC_WITH_SLANG, then AC_DEFINE(HAVE_SYSTEM_SLANG) LSLANG="-lslang" - screen_manager="SLang (using system-installed library)" + screen_manager="SLang (system-installed library)" AC_MSG_RESULT(Using system installed SLang library) rm slang/slang.h + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LSLANG" + AC_TRY_RUN( + [ + #ifdef SLANG_H_INSIDE_SLANG_DIR + #include + #else + #include + #endif + int main(void){ + SLtt_initialize(""); + SLtt_tgetflag(""); + return 0; + } ], + [LIBS="$ac_save_LIBS"; AC_USE_TERMINFO], + [LIBS="$ac_save_LIBS"; AC_USE_TERMCAP]) else MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)" LIBSLANG="libmcslang.a" @@ -834,24 +850,14 @@ AC_DEFUN(AC_WITH_SLANG, if $slang_check_lib then use_terminfo=false - if test -d /usr/lib/terminfo; then - use_terminfo=true; - fi - if test -d /usr/share/lib/terminfo; then - use_terminfo=true; - fi - if test -d /usr/local/lib/terminfo; then - use_terminfo=true; - fi - if test -d /lib/terminfo; then - use_terminfo=true; - fi - if test -d /usr/local/share/terminfo; then - use_terminfo=true; - fi - if test -d /usr/share/terminfo; then - use_terminfo=true; - fi + for dir in /usr/lib /usr/share/lib /usr/local/lib /lib \ + /usr/local/share /usr/share + do + if test -d $dir/terminfo; then + use_terminfo=true; + break + fi + done if $use_terminfo; then AC_USE_TERMINFO else @@ -1262,7 +1268,7 @@ if test x$srcdir != x; then fi fi -if test "x$screen_manager" = xSLang; then +if echo "$screen_manager" | grep -q "SLang" ; then screen_manager="${screen_manager}${slang_term}" fi