AC_INIT AC_CANONICAL_SYSTEM # Copyright (C) 2001 Cluster File Systems, Inc. # # This code is issued under the GNU General Public License. # 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_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' 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) LINUX=$enable_linuxdir AC_SUBST(LINUX) sinclude(archdep.m4) KINCFLAGS='-I. -I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include' CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS" portalsdir_def='$(top_srcdir)/../portals' AC_ARG_ENABLE(portalsdir, [ --enable-portalsdir=[path] set path to Portals source (default=../portals)],, enable_portalsdir=$portalsdir_def) PORTALS=$enable_portalsdir AC_SUBST(PORTALS) AC_MSG_CHECKING(if make dep has been run in kernel source) if test -f $LINUX/include/linux/config.h ; then AC_MSG_RESULT(yes) else AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.) fi AC_MSG_CHECKING(if autoconf.h is in kernel source) if test -f $LINUX/include/linux/autoconf.h ; then AC_MSG_RESULT(yes) else AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.) fi 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`" changequote([, ]) RELEASE="$LVERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" moduledir='$(libdir)/modules/'$RELEASE AC_SUBST(moduledir) AC_SUBST(EXTRAVERSION) modulefsdir='$(moduledir)/fs' AC_SUBST(modulefsdir) AC_MSG_RESULT($RELEASE) AC_SUBST(RELEASE) # Directories for documentation and demos. docdir='${prefix}/usr/share/doc/$(PACKAGE)' 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)