Whamcloud - gitweb
b=1414
[fs/lustre-release.git] / lustre / portals / archdep.m4
index 65cfaff..aec9e82 100644 (file)
@@ -4,6 +4,16 @@ AC_ARG_ENABLE(inkernel, [  --enable-inkernel set up 2.5 kernel makefiles])
 AM_CONDITIONAL(INKERNEL, test x$enable_inkernel = xyes)
 echo "Makefile for in kernel build: $INKERNEL"
 
+# -------- are we building against an external portals? -------
+# haha, I wonder how one is really supposed to do this
+# automake seems to have a DEFS variable which looks good
+AC_ARG_WITH(cray-portals, [  --with-cray-portals=[path] path to cray portals],
+       CRAY_PORTALS_INCLUDE="-I$with_cray_portals"
+       CC="$CC -DCRAY_PORTALS=1"
+       )
+AC_SUBST(CRAY_PORTALS_INCLUDE)
+AM_CONDITIONAL(CRAY_PORTALS, test ! "x$with_cray_portals" = x)
+
 # -------- liblustre compilation --------------
 AC_ARG_WITH(lib, [  --with-lib compile lustre library], host_cpu="lib")
 
@@ -156,10 +166,13 @@ fi
 
 # ------------ include paths ------------------
 
+KINCFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE \
+       -I\$(top_srcdir)/include \
+       -I\$(top_srcdir)/portals/include"
 if test $host_cpu != "lib" ; then 
-    KINCFLAGS="-I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include -I$LINUX/include"
+    KINCFLAGS="$KINCFLAGS -I$LINUX/include -I$LINUX/include"
 else
-    KINCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/portals/include'
+    KINCFLAGS="$KINCFLAGS -I\$(top_srcdir)/utils -I\$(top_srcdir)/portals/unals"
 fi
 CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
 
@@ -331,6 +344,9 @@ AC_SUBST(SCIMACNAL)
 
 CFLAGS="$KCFLAGS"
 CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac $with_ib"
+if test $host_cpu == "lib" ; then 
+CPPFLAGS="$CPPFLAGS -fPIC -D_LARGEFILE64_SOURCE=1 -g"
+fi
 
 AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 AC_SUBST(MOD_LINK)
@@ -386,3 +402,39 @@ if test "$HAVE_DIO_FILE" != 0 ; then
 else
   AC_MSG_RESULT(no)
 fi
+
+# --- Check that ext3 and ext3 xattr are enabled in the kernel
+if test "$host_cpu" != "lib" ; then 
+       AC_MSG_CHECKING([that ext3 is enabled in the kernel])
+       AC_TRY_COMPILE([
+#define __KERNEL__
+#include <linux/config.h>
+               ],
+               [
+#ifdef CONFIG_EXT3_FS
+       return 0;
+#else
+#error CONFIG_EXT3_FS not #defined
+#endif
+               ],[AC_MSG_RESULT([yes])],
+               [AC_MSG_RESULT([no])
+               AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
+               ])
+# disable this check until our xattr patches define it!
+#      AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
+#      AC_TRY_COMPILE([
+##define __KERNEL__
+##include <linux/config.h>
+#              ],
+#              [
+##ifdef CONFIG_EXT3_FS_XATTR
+#      return 0;
+##else
+##error CONFIG_EXT3_FS_XATTR not #defined
+##endif
+#              ],[AC_MSG_RESULT([yes])],
+#              [AC_MSG_RESULT([no])
+#              AC_MSG_ERROR([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR)])
+#              ])
+fi
+