Whamcloud - gitweb
land b1_4_bgl on HEAD (20050404_1913)
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
index 0768673..8a937e3 100644 (file)
@@ -367,6 +367,36 @@ else
        ])
        EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
 fi
+if test -n "$VIBNAL"; then
+       AC_MSG_CHECKING([if Voltaire still uses void * sg addresses])
+       EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/list.h>
+               #include <asm/byteorder.h>
+               #ifdef __BIG_ENDIAN
+               # define CPU_BE 1
+                # define CPU_LE 0
+               #endif
+               #ifdef __LITTLE_ENDIAN
+               # define CPU_BE 0
+               # define CPU_LE 1
+               #endif
+               #include <vverbs.h>
+               #include <ib-cm.h>
+               #include <ibat.h>
+       ],[
+               vv_scatgat_t  sg;
+
+               return &sg.v_address[3] == NULL;
+       ],[
+               AC_MSG_RESULT([yes])
+               VIBCPPFLAGS="$VIBCPPFLAGS -DIBNAL_VOIDSTAR_SGADDR=1"
+       ],[
+               AC_MSG_RESULT([no])
+       ])
+       EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
+fi
 AC_SUBST(VIBCPPFLAGS)
 AC_SUBST(VIBNAL)
 ])
@@ -556,7 +586,7 @@ AC_DEFUN([LP_PATH_DEFAULTS],
 #
 AC_DEFUN([LP_CONFIGURE],
 [# portals/utils/portals.c
-AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h])
+AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h sys/ioctl.h])
 AC_CHECK_FUNCS([gethostbyname socket connect])
 
 # portals/utils/debug.c