From 529cba289f437e60231f6bbd11ea95004a49f4f4 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 5 Sep 2002 05:43:10 +0000 Subject: [PATCH] * acinclude.m4 (AC_USE_TERMCAP): Add -ltermcap to MCLIBS, not LIBS. * configure.in: Eliminate MCCFLAGS, use CPPFLAGS instead. Add "-L" options to LDFLAGS, not to LIBS or MCLIBS - this should fix test for ncurses in non-standard directories. --- ChangeLog | 8 ++++++++ acinclude.m4 | 3 +-- configure.in | 17 +++++++---------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7870a160..3a46731df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-09-05 Pavel Roskin + + * acinclude.m4 (AC_USE_TERMCAP): Add -ltermcap to MCLIBS, not + LIBS. + * configure.in: Eliminate MCCFLAGS, use CPPFLAGS instead. Add + "-L" options to LDFLAGS, not to LIBS or MCLIBS - this should fix + test for ncurses in non-standard directories. + 2002-09-04 Pavel Roskin * lib/mc.ext.in: Remove edit rules for compressed files that diff --git a/acinclude.m4 b/acinclude.m4 index ea782e4c6..777f8848b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -643,8 +643,7 @@ AC_DEFUN([AC_USE_TERMINFO], [ AC_DEFUN([AC_USE_TERMCAP], [ AC_MSG_NOTICE([using S-Lang screen manager/termcap]) AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap library]) - dnl Check with $LIBS at the end so that it works with ELF libs. - AC_CHECK_LIB(termcap, tgoto, [LIBS="$LIBS -ltermcap"], , [$LIBS]) + AC_CHECK_LIB(termcap, tgoto, [MCLIBS="$MCLIBS -ltermcap"], , [$LIBS]) slang_term=" with termcap" ]) diff --git a/configure.in b/configure.in index 7fae18c7e..f445da3eb 100644 --- a/configure.in +++ b/configure.in @@ -211,18 +211,12 @@ dnl dnl X11 support. dnl -dnl These variables are only used when building the MC binary -MCCFLAGS="" -MCLIBS="" -AC_SUBST(MCCFLAGS) -AC_SUBST(MCLIBS) - textmode_x11_support="no" AC_ARG_WITH(tm-x-support, [--with-tm-x-support Try getting events from X Window System], [if test x$withval = xyes; then AC_PATH_XTRA - MCCFLAGS="$X_CFLAGS" + CPPFLAGS="$CPPFLAGS $X_CFLAGS" MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT, 1, [Define to enable getting events from X Window System]) @@ -307,7 +301,7 @@ linux*) then if test x$withval != xyes then - LIBS="$LIBS -L$withval/lib" + LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" fi AC_DEFINE(HAVE_LIBGPM, 1, @@ -329,7 +323,7 @@ AC_ARG_WITH(ncurses, [--with-ncurses[[=base-dir]] Compile with ncurses/locate base dir], [if test x$withval != xno; then if test x$withval != xyes; then - MCLIBS="$MCLIBS -L$withval/lib" + LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" fi @@ -566,7 +560,7 @@ if test $use_vfs = yes; then then if test x$withval != xyes then - LIBS="$LIBS -L$withval/lib" + LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" fi AC_EXT2_UNDEL @@ -692,6 +686,9 @@ AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) +dnl Libraries used only when building the mc binary +AC_SUBST(MCLIBS) + dnl Version for the RedHat package, without dashes RH_VERSION=`echo $VERSION | sed 's/-//'` AC_SUBST(RH_VERSION)