Whamcloud - gitweb
b=5278
[fs/lustre-release.git] / build / autoconf / lustre-build.m4
index 5b59a20..1851e95 100644 (file)
@@ -42,8 +42,10 @@ case x$with_sysio in
                with_sysio="yes"
                ;;
 esac
-AC_SUBST(LIBSYSIO_SUBDIR)
-AC_SUBST(SYSIO)
+
+# We have to configure even if we don't build here for make dist to
+# work
+AC_CONFIG_SUBDIRS(libsysio)
 ])
 
 #
@@ -321,6 +323,7 @@ CFLAGS_save="$CFLAGS"
 CFLAGS="-m64 $CFLAGS"
 AC_TRY_COMPILE([],[],[
        AC_MSG_RESULT([yes])
+       EXTRA_KCFLAGS="-m64 $EXTRA_KCFLAGS"
 ],[
        AC_MSG_RESULT([no])
        CFLAGS="$CFLAGS_save"
@@ -335,7 +338,7 @@ LLCFLAGS="-g -Wall -fPIC"
 AC_SUBST(LLCFLAGS)
 
 # everyone builds against portals and lustre
-EXTRA_KCFLAGS="-g -I$PWD/portals/include -I$PWD/lustre/include"
+EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/portals/include -I$PWD/lustre/include"
 AC_SUBST(EXTRA_KCFLAGS)
 ])
 
@@ -352,6 +355,17 @@ AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
 AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno)
 AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
 
+# this lets lustre cancel libsysio, per-branch or if liblustre is
+# disabled
+if test "x$LIBSYSIO_SUBDIR" = xlibsysio ; then
+       if test "x$with_sysio" != xyes ; then
+               SYSIO=""
+               LIBSYSIO_SUBDIR=""
+       fi
+fi
+AC_SUBST(LIBSYSIO_SUBDIR)
+AC_SUBST(SYSIO)
+
 LB_LINUX_CONDITIONALS
 LB_DARWIN_CONDITIONALS
 
@@ -382,16 +396,6 @@ LB_CONFIG_MODULES
 
 LC_CONFIG_LIBLUSTRE
 
-# this lets lustre cancel libsysio, per-branch or if liblustre is
-# disabled
-if text x$LIBSYSIO_SUBDIR = xlibsysio ; then
-       if test x$with_sysio = xyes ; then
-               AC_CONFIG_SUBDIRS(libsysio)
-       else
-               LIBSYSIO_SUBDIR=
-       fi
-fi
-
 LP_CONFIGURE
 LC_CONFIGURE