From 05800a5d532ca4c1dc11d518bbbc4ca1506c4f85 Mon Sep 17 00:00:00 2001 From: rread Date: Tue, 30 Jul 2002 07:39:47 +0000 Subject: [PATCH] - change auto detect for readline to explicit args --- lustre/configure.in | 16 +++++++++++++++- lustre/utils/Makefile.am | 8 ++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lustre/configure.in b/lustre/configure.in index d5ff2b1..453465a 100644 --- a/lustre/configure.in +++ b/lustre/configure.in @@ -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= diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index d0a182b..0320ff2 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -4,10 +4,10 @@ DEFS= CFLAGS:=-g -O2 -I. -I/usr/include/libxml2 -I/usr/include/glib-1.2 -I$(PORTALS)/include \ -I/usr/lib/glib/include -I$(srcdir)/../include -Wall KFLAGS:= -CPPFLAGS = -obdctl_LDADD := -lncurses -lxml2 # -lefence -lctl_LDADD := -lncurses -sbin_PROGRAMS = obdctl lctl +CPPFLAGS = $(HAVE_LIBREADLINE) +obdctl_LDADD := $(LIBREADLINE) -lxml2 # -lefence +lctl_LDADD := $(LIBREADLINE) +sbin_PROGRAMS = lctl obdctl obdctl_SOURCES = parser.c obdctl.c parser.h lctl_SOURCES = parser.c network.c device.c debug.c lctl.c lctl.h parser.h -- 1.8.3.1