# -------- 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"
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
;;
with_quadrics="-I$LINUX/drivers/net/qsnet/include"
fi
:
-elif test -d $LINUX/drivers/qsnet1 ; then
- AC_MSG_RESULT(yes)
- QSWNAL="qswnal"
- with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
- :
-elif test -d $LINUX/drivers/quadrics ; then
- AC_MSG_RESULT(yes)
- QSWNAL="qswnal"
- with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
- :
-#elif test -d /usr/include/elan3 ; then
-# AC_MSG_RESULT(yes)
-# QSWNAL="qswnal"
-# with_quadrics=""
-# :
else
AC_MSG_RESULT(no)
QSWNAL=""
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
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
else
AC_MSG_RESULT($LINUXRELEASE)
fi
+
+# ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
+
+AC_MSG_CHECKING(if kernel defines PDE)
+HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
+if test "$HAVE_PDE" != 0 ; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_PDE"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if kernel passes struct file to direct_IO)
+HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
+if test "$HAVE_DIO_FILE" != 0 ; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_DIO_FILE"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi