X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fconfigure.in;h=482ecf32da99f29d66001cef0c393b536889a262;hb=cdf5b847902c1318d467c8dd78b0bb62a6ccdb31;hp=01366dcee442cb0474c89911330a346749683240;hpb=bccba5d4611ed852efc645007bcfa3989d8b08a2;p=fs%2Flustre-release.git diff --git a/lustre/configure.in b/lustre/configure.in index 01366dc..482ecf3 100644 --- a/lustre/configure.in +++ b/lustre/configure.in @@ -15,14 +15,21 @@ AC_PROG_RANLIB # # Check for required packages -AC_PATH_PROG([XML2_CONFIG], [xml2-config], [],) -if test -z "$XML2_CONFIG"; then - AC_MSG_ERROR([xml2-config not found; libxml2-dev libraries must be installed.]) +# 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 -XML2_CFLAGS=$($XML2_CONFIG --cflags) -XML2_LIBS=$($XML2_CONFIG --libs) -AC_SUBST(XML2_CFLAGS) -AC_SUBST(XML2_LIBS) +AC_SUBST(LIBREADLINE) +AC_SUBST(HAVE_LIBREADLINE) # Kernel build environment. ac_default_prefix= @@ -30,7 +37,8 @@ bindir='${exec_prefix}/usr/bin' sbindir='${exec_prefix}/usr/sbin' linuxdir_def=/usr/src/linux -AC_ARG_ENABLE(linuxdir, [ --enable-linuxdir=[path] set path to Linux source (default=/usr/src/linux)],, enable_linuxdir=$linuxdir_def) +AC_ARG_WITH(linux, [ --with-linux=[path] set path to Linux source (default=/usr/src/linux)], enable_linuxdir=$withval) +AC_ARG_ENABLE(linuxdir, [ --enable-linuxdir=[path] (deprecated) set path to Linux source (default=/usr/src/linux)],, enable_linuxdir=$linuxdir_def) LINUX=$enable_linuxdir AC_SUBST(LINUX) @@ -64,18 +72,14 @@ AC_MSG_CHECKING(for Linux release) dnl We need to rid ourselves of the nasty [ ] quotes. changequote(, ) -LVERSION="`sed -ne 's/^VERSION[ ]*=[ ]*//gp' $LINUX/Makefile`" -PATCHLEVEL="`sed -ne 's/^PATCHLEVEL[ ]*=[ ]*//gp' $LINUX/Makefile`" -SUBLEVEL="`sed -ne 's/^SUBLEVEL[ ]*=[ ]*//gp' $LINUX/Makefile`" -EXTRAVERSION="`sed -ne 's/^EXTRAVERSION[ ]*=[ ]*//gp' $LINUX/Makefile`" +dnl Get release from version.h +RELEASE="`sed -ne 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z-]*\).*/\1/p' $LINUX/include/linux/version.h`" changequote([, ]) -RELEASE="$LVERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" moduledir='$(libdir)/modules/'$RELEASE/kernel AC_SUBST(moduledir) -AC_SUBST(EXTRAVERSION) -modulefsdir='$(moduledir)/fs' +modulefsdir='$(moduledir)/fs/$(PACKAGE)' AC_SUBST(modulefsdir) AC_MSG_RESULT($RELEASE) @@ -88,10 +92,11 @@ AC_SUBST(docdir) demodir='$(docdir)/demo' AC_SUBST(demodir) -AC_OUTPUT(Makefile lov/Makefile lib/Makefile ldlm/Makefile \ - obdecho/Makefile ptlrpc/Makefile \ - osc/Makefile mdc/Makefile mds/Makefile ost/Makefile utils/Makefile \ - tests/Makefile obdfilter/Makefile obdclass/Makefile \ - llite/Makefile obdfs/Makefile demos/Makefile \ - doc/Makefile scripts/Makefile scripts/lustre.spec \ - extN/Makefile) +# not needed until the AC_CHECK_LIB(readline) above works +# AM_CONFIG_HEADER(include/config.h) + +AC_OUTPUT(Makefile lib/Makefile ldlm/Makefile obdecho/Makefile ptlrpc/Makefile \ + lov/Makefile osc/Makefile mdc/Makefile mds/Makefile ost/Makefile \ + utils/Makefile tests/Makefile obdfilter/Makefile obdclass/Makefile \ + llite/Makefile demos/Makefile doc/Makefile scripts/Makefile \ + scripts/lustre.spec extN/Makefile)