Whamcloud - gitweb
fix lmake to link to correct ia64 kernels
[fs/lustre-release.git] / lnet / archdep.m4
index e955c33..7801957 100644 (file)
@@ -1,6 +1,6 @@
 
 # -------- in kernel compilation? (2.5 only) -------------
-AC_ARG_ENABLE(inkernel, [ --enable-inkernel set up 2.5 kernel makefiles])
+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"
 
@@ -133,8 +133,8 @@ case ${host_cpu} in
 
        powerpc )
        AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
-        KCPPFLAGS='-D__KERNEL__'
+        KCFLAGS='-O2 -g -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
+        KCPPFLAGS='-D__KERNEL__ -DMODULE'
         MOD_LINK=elf32ppclinux
 ;;
 
@@ -293,7 +293,7 @@ AC_SUBST(GMNAL)
 default_ib_include_dir=/usr/local/ib/include
 an_ib_include_file=vapi.h
 
-AC_ARG_WITH(ib, [ --with-ib=[yes/no/path] Path to IB includes], with_ib=$withval, with_ib=$default_ib)
+AC_ARG_WITH(ib, [  --with-ib=[yes/no/path] Path to IB includes], with_ib=$withval, with_ib=$default_ib)
 AC_MSG_CHECKING(if IB headers are present)
 if test "$with_ib" = yes; then
     with_ib=$default_ib_include_dir
@@ -333,10 +333,23 @@ AC_SUBST(SCIMACNAL)
 CFLAGS="$KCFLAGS"
 CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac $with_ib"
 
+AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 AC_SUBST(MOD_LINK)
 AC_SUBST(LINUX25)
 AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 
+# ---------- Red Hat 2.4.18 has iobuf->dovary --------------
+# But other kernels don't
+
+AC_MSG_CHECKING([if struct kiobuf has a dovary field])
+AC_TRY_COMPILE([#define __KERNEL__
+               #include <linux/iobuf.h>],
+              [struct kiobuf iobuf;
+               iobuf.dovary = 1;],
+              [AC_MSG_RESULT([yes])
+                CPPFLAGS="$CPPFLAGS -DHAVE_KIOBUF_DOVARY"],
+              [AC_MSG_RESULT([no])])
+
 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
 # This needs to run after we've defined the KCPPFLAGS