Whamcloud - gitweb
- change auto detect for readline to explicit args
[fs/lustre-release.git] / lustre / configure.in
index d5ff2b1..453465a 100644 (file)
@@ -24,7 +24,21 @@ XML2_LIBS=$($XML2_CONFIG --libs)
 AC_SUBST(XML2_CFLAGS)
 AC_SUBST(XML2_LIBS)
 
-AC_CHECK_LIB(readline, readline,,-lncurses)
+# this doesn't seem to work on older autoconf
+# AC_CHECK_LIB(readline, readline,,)
+
+AC_ARG_ENABLE(readline,        [  --enable-readline  use readline library],,
+                       enable_readline="yes")
+if test "$enable_readline" = "yes" ; then
+   LIBREADLINE="-lreadline -lncurses"
+   HAVE_LIBREADLINE="-DHAVE_LIBREADLINE=1"
+else 
+   LIBREADLINE=""
+   HAVE_LIBREADLINE=""
+fi
+AC_SUBST(LIBREADLINE)
+AC_SUBST(HAVE_LIBREADLINE)
 
 # Kernel build environment.
 ac_default_prefix=