Whamcloud - gitweb
get rid of --smfs-enable options after merge in HEAD
[fs/lustre-release.git] / lustre / configure.in
index 79484ec..3373fd0 100644 (file)
-AC_INIT
-AC_CANONICAL_SYSTEM
-
-# Copyright (C) 2001  Cluster File Systems, Inc.
+# Copyright (C) 2001-2003 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(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
-
-# 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=
-bindir='${exec_prefix}/usr/bin'
-sbindir='${exec_prefix}/usr/sbin'
-
-linuxdir_def=/usr/src/linux
-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)
-
-sinclude(archdep.m4)
-
-AC_MSG_CHECKING(if you are running linux 2.5...)
-if test -e $LINUX/include/linux/namei.h ; then
-       linux25=yes
-       AC_MSG_RESULT(yes)
-else
-       linux25=no
-       AC_MSG_RESULT(no)
-fi
-AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
-
-KINCFLAGS='-I. -I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
-CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
-
-portalsdir_def='$(top_srcdir)/../portals'
-AC_ARG_WITH(portals, [  --with-portals=[path] set path to Portals source (default=../portals)], enable_portalsdir=$withval)
-AC_ARG_ENABLE(portalsdir, [  --enable-portalsdir=[path] (deprecated) set path to Portals source (default=$(top_srcdir)/../portals)],, enable_portalsdir=$portalsdir_def)
-PORTALS=$enable_portalsdir
-AC_SUBST(PORTALS)
-
-portalslib_def=$enable_portalsdir
-AC_ARG_WITH(portalslib, [  --with-portalslib=[path] set path to Portals library (default=../portals/linux/utils)], enable_portalslib=$withval)
-AC_ARG_ENABLE(portalslib, [  --enable-portalslib=[path] (deprecated) set path to Portals lib (default=../portals/linux/utils)],, enable_portalslib=$portalslib_def)
-
-
-if test -z "$enable_portalslib"; then
-       PORTALSLIB=$enable_portalslib/linux/utils
-else
-       PORTALSLIB=${enable_portalslib}
-fi
-
-
-AC_SUBST(PORTALSLIB)
-
-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.)
+AC_INIT
+AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE(lustre, HEAD)
+# AM_MAINTAINER_MODE
+
+# Four main targets: lustre kernel modules, utilities, tests, and liblustre
+AC_MSG_CHECKING([whether to build kernel modules])
+AC_ARG_ENABLE([modules],
+       AC_HELP_STRING([--disable-modules],
+                       [disable building of Lustre kernel modules]),
+       [],[enable_modules='yes'])
+AC_MSG_RESULT([$enable_modules])
+AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
+
+AC_MSG_CHECKING([whether to build Lustre library])
+AC_ARG_ENABLE([liblustre],
+       AC_HELP_STRING([--disable-liblustre],
+                       [disable building of Lustre library]),
+       [],[enable_liblustre='yes'])
+AC_MSG_RESULT([$enable_liblustre])
+AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
+
+AC_MSG_CHECKING([whether to build utilities])
+AC_ARG_ENABLE([utils],
+       AC_HELP_STRING([--disable-utils],
+                       [disable building of Lustre utility programs]),
+       [],[enable_utils='yes'])
+AC_MSG_RESULT([$enable_utils])
+
+AC_MSG_CHECKING([whether to build Lustre tests])
+AC_ARG_ENABLE([tests],
+       AC_HELP_STRING([--disable-tests],
+                       [disable building of Lustre tests]),
+       [],[enable_tests='yes'])
+AC_MSG_RESULT([$enable_tests])
+
+# specify wether to build doc or not
+AC_MSG_CHECKING([whether to build docs])
+AC_ARG_ENABLE(doc,
+       AC_HELP_STRING([--disable-doc],
+                       [skip creation of pdf documentation]),
+       [
+               if test x$enable_doc = xyes ; then
+                   ENABLE_DOC=1           
+               else
+                   ENABLE_DOC=0
+               fi
+       ],[
+               ENABLE_DOC=0
+               enable_doc='no'
+       ])
+AC_MSG_RESULT([$enable_doc])
+AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
+AC_SUBST(ENABLE_DOC)
+
+# default backing fs is ext3
+BACKINGFS='ext3'
+
+# LLNL patches their ext3 and calls it extN
+AC_MSG_CHECKING([whether to use extN])
+AC_ARG_ENABLE([extN],
+       AC_HELP_STRING([--enable-extN],
+                       [use extN instead of ext3 for lustre backend]),
+       [BACKINGFS='extN'],[enable_extN='no'])
+AC_MSG_RESULT([$enable_extN])
+AM_CONDITIONAL(EXTN, test x$enable_extN = xyes)
+
+# SuSE gets ldiskfs
+AC_MSG_CHECKING([whether to enable ldiskfs])
+AC_ARG_ENABLE([ldiskfs],
+       AC_HELP_STRING([--enable-ldiskfs],
+                       [use ldiskfs for the Lustre backing FS]),
+       [BACKINGFS='ldiskfs'],[enable_ldiskfs='no'])
+AC_MSG_RESULT([$enable_ldiskfs])
+AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
+
+AC_MSG_CHECKING([which backing filesystem to use])
+AC_MSG_RESULT([$BACKINGFS])
+AC_SUBST(BACKINGFS)
+
+# the pinger is temporary, until we have the recovery node in place
+AC_MSG_CHECKING([whether to enable pinger support])
+AC_ARG_ENABLE([pinger],
+       AC_HELP_STRING([--disable-pinger],
+                       [disable recovery pinger support]),
+       [],[enable_pinger='yes'])
+AC_MSG_RESULT([$enable_pinger])
+if test x$enable_pinger != xno ; then
+  AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
 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.)
+AC_MSG_CHECKING([maximum OBD ioctl size])
+AC_ARG_WITH([obd-buffer-size],
+       AC_HELP_STRING([--with-obd-buffer-size=[size]],
+                       [set lctl ioctl maximum bytes (default=8192)]),
+       [
+               OBD_BUFFER_SIZE=$with_obd_buffer_size
+       ],[
+               OBD_BUFFER_SIZE=8192
+       ])
+AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
+AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
+
+# specify location of libsysio tree
+AC_MSG_CHECKING([location of libsysio])
+AC_ARG_WITH([sysio],
+       AC_HELP_STRING([--with-sysio=[path]],
+                       [set path to libsysio source (default=../libsysio)]),
+       [
+               SYSIO=$with_sysio
+               SYSIO_PATH=$SYSIO
+       ],[
+               SYSIO='$(top_srcdir)/../libsysio'
+               SYSIO_PATH='../libsysio'
+       ])
+AC_MSG_RESULT([$SYSIO_PATH])
+
+AC_CHECK_FILE([$SYSIO_PATH/src/libsysio.a],[],
+       [
+               if test x$enable_liblustre = xyes ; then
+                  AC_MSG_ERROR([A built libsysio tree is required for building liblustre.])
+               fi
+       ])
+AC_SUBST(SYSIO)
+
+#build mpi-tests 
+AC_MSG_CHECKING([whether to build mpitests])
+AC_ARG_ENABLE([mpitests],
+       AC_HELP_STRING([--enable-mpitests],
+                       [build liblustre mpi tests]),
+       [],[enable_mpitests=no])
+AC_MSG_RESULT([$enable_mpitests])
+AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
+
+# snap compilation
+AC_MSG_CHECKING([whether to enable snapfs support])
+AC_ARG_ENABLE([snapfs],
+       AC_HELP_STRING([--enable-snapfs],
+                       [build snapfs]),
+       [],[enable_snapfs='no'])
+AC_MSG_RESULT([$enable_snapfs])
+AM_CONDITIONAL(SNAPFS, test x$enable_snapfs = xyes)
+
+sinclude(portals/build.m4)
+sinclude(portals/archdep.m4)
+
+if test x$enable_inkernel = xyes ; then
+       find . -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \
+               sh -e -x -c '(cp -f $0.mk $0.in)'
 fi
 
+# we need to pass a full path here for kernel makefiles
+INCLUDE_RULES="include $PWD/Rules"
+AC_SUBST(INCLUDE_RULES)
 
-AC_MSG_CHECKING(for Linux release)
-
-dnl We need to rid ourselves of the nasty [ ] quotes.
-changequote(, )
-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([, ])
-
-moduledir='$(libdir)/modules/'$RELEASE/kernel
-AC_SUBST(moduledir)
+# ptlrpc kernel build requires this
+LUSTRE="$PWD"
+AC_SUBST(LUSTRE)
 
-modulefsdir='$(moduledir)/fs/$(PACKAGE)'
-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)
-
-# 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 doc/Makefile scripts/Makefile \
-       scripts/lustre.spec extN/Makefile)
+#
+AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
+AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
+
+AM_CONFIG_HEADER(include/config.h)
+
+AC_OUTPUT([
+Makefile
+Rules
+autoMakefile
+cobd/Makefile
+cobd/autoMakefile
+conf/Makefile
+doc/Makefile
+include/Makefile
+include/linux/Makefile
+include/lustre/Makefile
+ldiskfs/Makefile
+ldiskfs/autoMakefile
+ldlm/Makefile
+liblustre/Makefile
+liblustre/tests/Makefile
+llite/Makefile
+llite/autoMakefile
+lov/Makefile
+lov/autoMakefile
+lmv/Makefile
+lmv/autoMakefile
+lvfs/Makefile
+lvfs/autoMakefile
+mdc/Makefile
+mdc/autoMakefile
+mds/Makefile
+mds/autoMakefile
+obdclass/Makefile
+obdclass/autoMakefile
+obdecho/Makefile
+obdecho/autoMakefile
+obdfilter/Makefile
+obdfilter/autoMakefile
+osc/Makefile
+osc/autoMakefile
+ost/Makefile
+ost/autoMakefile
+portals/Kernelenv
+portals/Makefile
+portals/autoMakefile
+portals/doc/Makefile
+portals/knals/Makefile
+portals/knals/autoMakefile
+portals/knals/gmnal/Makefile
+portals/knals/gmnal/autoMakefile
+portals/knals/ibnal/Makefile
+portals/knals/ibnal/autoMakefile
+portals/knals/qswnal/Makefile
+portals/knals/qswnal/autoMakefile
+portals/knals/socknal/Makefile
+portals/knals/socknal/autoMakefile
+portals/libcfs/Makefile
+portals/libcfs/autoMakefile
+portals/portals/Makefile
+portals/portals/autoMakefile
+portals/router/Makefile
+portals/router/autoMakefile
+portals/tests/Makefile
+portals/tests/autoMakefile
+portals/unals/Makefile
+portals/utils/Makefile
+ptlbd/Makefile
+ptlbd/autoMakefile
+ptlrpc/Makefile
+ptlrpc/autoMakefile
+scripts/Makefile
+scripts/lustre.spec
+scripts/version_tag.pl
+smfs/Makefile
+smfs/autoMakefile
+snapfs/Makefile
+snapfs/autoMakefile
+snapfs/utils/Makefile
+cmobd/Makefile
+cmobd/autoMakefile
+tests/Makefile
+utils/Lustre/Makefile
+utils/Makefile
+])