diff aclocal.m4 @ 3822:1a809dae77db

[project @ 2001-04-26 16:07:17 by jwe]
author jwe
date Thu, 26 Apr 2001 16:07:18 +0000
parents 7c8e3c42ed04
children 0ee55719541a
line wrap: on
line diff
--- a/aclocal.m4	Wed Apr 25 19:01:35 2001 +0000
+++ b/aclocal.m4	Thu Apr 26 16:07:18 2001 +0000
@@ -968,3 +968,26 @@
     AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY)
   fi
 ])
+dnl
+dnl Allow the user disable support for command line editing using GNU
+dnl readline.
+dnl
+dnl OCTAVE_ENABLE_READLINE
+AC_DEFUN(OCTAVE_ENABLE_READLINE, [
+  USE_READLINE=true
+  AC_ARG_ENABLE(readline,
+    [  --enable-readline       use readline library (default is yes)],
+    [if test "$enableval" = no; then
+       USE_READLINE=false;
+     fi], [])
+  if $USE_READLINE; then
+    AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [
+      LIBS="-lreadline $LIBS"
+      AC_DEFINE(USE_READLINE, 1)
+    ], [
+      USE_READLINE=false
+      warn_readline="To use GNU Readline, I need version 4.2 or later"
+      AC_MSG_WARN($warn_readline)
+    ])
+  fi
+])