diff aclocal.m4 @ 9515:eee9b3150446

more configure tweaks
author John W. Eaton <jwe@octave.org>
date Tue, 11 Aug 2009 19:30:37 -0400
parents 4af6e29449c1
children ee99f9f37505
line wrap: on
line diff
--- a/aclocal.m4	Tue Aug 11 16:06:01 2009 -0400
+++ b/aclocal.m4	Tue Aug 11 19:30:37 2009 -0400
@@ -641,7 +641,7 @@
 dnl OCTAVE_ENABLE_READLINE
 AC_DEFUN(OCTAVE_ENABLE_READLINE, [
   USE_READLINE=true
-  LIBREADLINE=
+  READLINE_LIBS=
   AC_ARG_ENABLE(readline,
     [  --enable-readline       use readline library (default is yes)],
     [if test "$enableval" = no; then
@@ -649,16 +649,18 @@
        warn_readline="command editing and history features require GNU Readline"
      fi])
   if $USE_READLINE; then
+    save_LIBS="$LIBS"
+    LIBS="$TERM_LIBS"
     AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [
-      LIBREADLINE="-lreadline"
-      LIBS="$LIBREADLINE $LIBS"
+      READLINE_LIBS="-lreadline"
       AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.])
     ], [
       AC_MSG_WARN([I need GNU Readline 4.2 or later])
       AC_MSG_ERROR([this is fatal unless you specify --disable-readline])
     ])
+    LIBS="$save_LIBS"
   fi
-  AC_SUBST(LIBREADLINE)
+  AC_SUBST(READLINE_LIBS)
 ])
 dnl
 dnl Check to see if C++ reintrepret cast works for function pointers.