# 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'
changequote([, ])
RELEASE="$LVERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
-moduledir='$(libdir)/modules/'$RELEASE
+moduledir='$(libdir)/modules/'$RELEASE/kernel
AC_SUBST(moduledir)
AC_SUBST(EXTRAVERSION)
demodir='$(docdir)/demo'
AC_SUBST(demodir)
-AC_OUTPUT(Makefile lib/Makefile ldlm/Makefile obdecho/Makefile rpc/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 filterobd/Makefile class/Makefile ext2obd/Makefile \
- llight/Makefile obdfs/Makefile obdtrace/Makefile demos/Makefile \
- snap/Makefile doc/Makefile scripts/Makefile scripts/lustre.spec \
+ tests/Makefile obdfilter/Makefile obdclass/Makefile \
+ llite/Makefile obdfs/Makefile demos/Makefile \
+ doc/Makefile scripts/Makefile scripts/lustre.spec \
extN/Makefile)