Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / configure.in
index d51fb40..6384d30 100644 (file)
@@ -20,6 +20,10 @@ bad_cc() {
        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
@@ -53,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'
@@ -65,22 +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)
 
-# Changed by Amrut Joshi on 01/13/2003
-#KINCFLAGS='-I. -I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
-KINCFLAGS='-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)
@@ -104,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.)
@@ -122,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.
@@ -140,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)
@@ -151,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 \