Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / configure.in
index 5c5f438..0850115 100644 (file)
-AC_INIT
-AC_CANONICAL_SYSTEM
-
 # 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
 
+AC_INIT
+AC_CANONICAL_SYSTEM
+
 # 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_MSG_CHECKING(for buggy compiler)
-CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
-bad_cc() {
-       echo
-       echo "   '$CC_VERSION'"
-       echo "  has been known to generate bad code, "
-       echo "  please get an updated compiler."
-       AC_MSG_ERROR(sorry)
-}
-TMP_VERSION=`echo $CC_VERSION | cut -c 1-16`
-if test "$TMP_VERSION" = "gcc version 2.95"; then
-        bad_cc
-fi
-case "$CC_VERSION" in 
-       # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
-       # without "sub    $0xc,%esp" to protect the stack from being
-       # stomped on by interrupts (bug 606)
-       "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
-               bad_cc
-               ;;
-       *)
-               AC_MSG_RESULT(no known problems)
-               ;;
-esac
-
-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)
-
-AC_ARG_ENABLE(efence,  [  --enable-efence  use efence library],,
-                       enable_efence="no")
-if test "$enable_efence" = "yes" ; then
-   LIBEFENCE="-lefence"
-   HAVE_LIBEFENCE="-DHAVE_LIBEFENCE=1"
-else 
-   LIBEFENCE=""
-   HAVE_LIBEFENCE=""
-fi
-AC_SUBST(LIBEFENCE)
-AC_SUBST(HAVE_LIBEFENCE)
-
-# XXX this should be a runtime option
-AC_MSG_CHECKING(if you are enabling OST recovery...)
-AC_ARG_ENABLE(ost_recovery, [  --enable-ost-recovery: enable support for ost recovery],,
-             enable_ost_recovery="no")
-if test "$enable_ost_recovery" = "yes" ; then
-   ENABLE_OST_RECOVERY="-DOST_RECOVERY=1"
-   AC_MSG_RESULT(yes)
-else 
-   ENABLE_OST_RECOVERY=""
-   AC_MSG_RESULT(no)
-fi
-AC_SUBST(ENABLE_OST_RECOVERY)
-
-
-# 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)
-
-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)
-
-sinclude(archdep.m4)
-
-
-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=$portalsdir_def],, enable_portalsdir=$portalsdir_def)
-PORTALS=$enable_portalsdir
-
-if test $PORTALS = $portalsdir_def; then
-       PORTALSLOC='../portals'
-else
-       PORTALSLOC=$PORTALS
-fi
-
-AC_SUBST(PORTALS)
-AC_SUBST(PORTALSLOC)
-
-portalslib_def=$enable_portalsdir/linux/utils
-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}
-fi
-AC_SUBST(PORTALSLIB)
-
-AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
-AC_MSG_CHECKING(if you are building lib lustre)
-if test "$host_cpu" = "lib"; then
-   AC_MSG_RESULT(yes)
-   libdir='${exec_prefix}/lib/lustre'
-else
-   AC_MSG_RESULT(no)
-fi
-
-if test $host_cpu != "lib" ; then 
-KINCFLAGS='-I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
-else
-KINCFLAGS='-I$(top_srcdir)/include -I$(PORTALS)/include'
-fi
-CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS $ENABLE_OST_RECOVERY"
-
-if test $host_cpu != "lib" ; then 
-AC_MSG_CHECKING(if make dep has been run in kernel source (host $host_cpu) )
-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(, )
-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)
-
-modulefsdir='$(moduledir)/fs/$(PACKAGE)'
-AC_SUBST(modulefsdir)
-
-AC_MSG_RESULT($RELEASE)
-AC_SUBST(RELEASE)
-
-fi
-# 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 \
-       liblustre/Makefile \
-       lov/Makefile osc/Makefile mdc/Makefile mds/Makefile ost/Makefile \
-       cobd/Makefile ptlbd/Makefile conf/Makefile \
-       utils/Makefile utils/lconf tests/Makefile obdfilter/Makefile \
-        obdclass/Makefile llite/Makefile doc/Makefile scripts/Makefile \
-       scripts/lustre.spec extN/Makefile, chmod +x utils/lconf)
+# LLNL patches their ext3 and calls it extN
+AC_ARG_ENABLE(extN, [  --enable-extN use extN instead of ext3 for lustre backend])
+AM_CONDITIONAL(EXTN, test x$enable_extN = xyes)
+
+AC_ARG_WITH(obd-buffer-size, [  --with-obd-buffer-size=[size] set lctl ioctl maximum (default=8K)],OBD_BUFFER_SIZE=$with_obd_buffer_size,OBD_BUFFER_SIZE=8192)
+AC_SUBST(OBD_BUFFER_SIZE)
+
+sinclude(portals/build.m4)
+sinclude(portals/archdep.m4)
+
+if test x$enable_inkernel = xyes ; then
+cp Makefile.mk Makefile.in
+cp mds/Makefile.mk mds/Makefile.in
+cp portals/Kernelenv.mk portals/Kernelenv.in
+cp portals/Makefile.mk portals/Makefile.in
+cp portals/libcfs/Makefile.mk portals/libcfs/Makefile.in
+cp portals/portals/Makefile.mk portals/portals/Makefile.in
+cp portals/knals/Makefile.mk portals/knals/Makefile.in
+cp portals/knals/socknal/Makefile.mk portals/knals/socknal/Makefile.in
+cp portals/router/Makefile.mk portals/router/Makefile.in
+fi
+
+AM_CONFIG_HEADER(portals/include/config.h)
+
+AC_OUTPUT([Makefile portals/Makefile portals/Kernelenv \
+          portals/libcfs/Makefile portals/portals/Makefile \
+          portals/unals/Makefile portals/knals/Makefile \
+          portals/router/Makefile portals/knals/socknal/Makefile \
+          portals/knals/gmnal/Makefile portals/knals/qswnal/Makefile \
+         portals/knals/scimacnal/Makefile portals/knals/toenal/Makefile \
+          portals/utils/Makefile portals/tests/Makefile portals/doc/Makefile \
+          ldlm/Makefile obdecho/Makefile ptlrpc/Makefile liblustre/Makefile \
+         lov/Makefile osc/Makefile mdc/Makefile mds/Makefile ost/Makefile \
+         cobd/Makefile ptlbd/Makefile conf/Makefile  tests/Makefile \
+         utils/Makefile utils/Lustre/Makefile obdfilter/Makefile \
+          obdclass/Makefile llite/Makefile doc/Makefile scripts/Makefile \
+         scripts/lustre.spec])