X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fconfigure.in;h=6384d308f0dce7d1557331ee1b93193503d5cf7e;hb=040033cef24c5aca2967daf2da7a862abcd074cf;hp=c172cd2d7aeb7eee4ddf798d53ab46728e07554e;hpb=ccb42f2458669aaac84a661091b05a59bb781197;p=fs%2Flustre-release.git diff --git a/lustre/configure.in b/lustre/configure.in index c172cd2..6384d30 100644 --- a/lustre/configure.in +++ b/lustre/configure.in @@ -1,7 +1,7 @@ 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 @@ -9,7 +9,33 @@ 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 # @@ -31,6 +57,17 @@ fi AC_SUBST(LIBREADLINE) AC_SUBST(HAVE_LIBREADLINE) +# XXX this should be a runtime option +AC_ARG_ENABLE(ost_recovery, [ --enable-ost-recovery: enable support for ost recovery],, + enable_ost_recovery="yes") +if test "$enable_ost_recovery" = "yes" ; then + ENABLE_OST_RECOVERY="-DOST_RECOVERY=1" +else + HAVE_LIBREADLINE="" +fi +AC_SUBST(ENABLE_OST_RECOVERY) + + # Kernel build environment. ac_default_prefix= bindir='${exec_prefix}/usr/bin' @@ -43,20 +80,18 @@ AC_ARG_ENABLE(linuxdir, [ --enable-linuxdir=[path] (deprecated) set path to Lin 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 + linux25="yes" AC_MSG_RESULT(yes) else - linux25=no + 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" +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) @@ -80,12 +115,27 @@ AC_ARG_ENABLE(portalslib, [ --enable-portalslib=[path] (deprecated) set path to 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 -AC_SUBST(PORTALSLIB) +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" -AC_MSG_CHECKING(if make dep has been run in kernel source) -if test -f $LINUX/include/linux/config.h ; then +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.) @@ -98,7 +148,6 @@ 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. @@ -116,6 +165,7 @@ 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) @@ -127,6 +177,7 @@ AC_SUBST(demodir) # 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 \