Whamcloud - gitweb
Fix problem with multiple connections to the same local device.
[fs/lustre-release.git] / lustre / configure.in
index 1a6a722..2efaae8 100644 (file)
@@ -7,11 +7,23 @@ AC_CANONICAL_SYSTEM
 # See the file COPYING in this distribution
 
 # Automake variables.  Steal the version number from lustre.spec.in.
-AM_INIT_AUTOMAKE(obd, builtin([esyscmd], [sed -ne '/^%define version /{ s/.*version //; p; q; }' scripts/lustre.spec.in]))
+AM_INIT_AUTOMAKE(lustre, builtin([esyscmd], [sed -ne '/^%define version /{ s/.*version //; p; q; }' scripts/lustre.spec.in]))
 #AM_MAINTAINER_MODE
 AC_PROG_CC
 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.])
+fi
+XML2_CFLAGS=$($XML2_CONFIG --cflags)
+XML2_LIBS=$($XML2_CONFIG --libs)
+AC_SUBST(XML2_CFLAGS)
+AC_SUBST(XML2_LIBS)
+
 # Kernel build environment.
 ac_default_prefix=
 bindir='${exec_prefix}/usr/bin'
@@ -52,14 +64,16 @@ 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 LVERSION="`sed -ne 's/^VERSION[    ]*=[    ]*//gp' $LINUX/Makefile`"
+dnl PATCHLEVEL="`sed -ne 's/^PATCHLEVEL[       ]*=[    ]*//gp' $LINUX/Makefile`"
+dnl SUBLEVEL="`sed -ne 's/^SUBLEVEL[   ]*=[    ]*//gp' $LINUX/Makefile`"
+dnl 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
+dnl RELEASE="$LVERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+moduledir='$(libdir)/modules/'$RELEASE/kernel
 AC_SUBST(moduledir)
 AC_SUBST(EXTRAVERSION)
 
@@ -76,9 +90,11 @@ AC_SUBST(docdir)
 demodir='$(docdir)/demo'
 AC_SUBST(demodir)
 
-AC_OUTPUT(Makefile lib/Makefile ldlm/Makefile obdecho/Makefile ptlrpc/Makefile \
+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 obdext2/Makefile \
-       llite/Makefile obdfs/Makefile demos/Makefile \
+       tests/Makefile obdfilter/Makefile obdclass/Makefile \
+       llite/Makefile demos/Makefile \
        doc/Makefile scripts/Makefile scripts/lustre.spec \
        extN/Makefile)
+# obdfs/Makefile 
\ No newline at end of file