X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fautoconf%2Flustre-lnet.m4;h=06bdf39db34a95a2df6741d01c850cba53132526;hb=4ab1d51e7bbd98006a21a1655f7e5bffec3cf0d4;hp=e9c466a3b17160fc71b07943aef63deef3679838;hpb=58d1cdf3151cf64a6f1dfef6635295a9d0ad5242;p=fs%2Flustre-release.git diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index e9c466a..06bdf39 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -131,34 +131,56 @@ AC_SUBST(GMNAL) AC_DEFUN([LP_CONFIG_OPENIB],[ AC_MSG_CHECKING([whether to enable OpenIB support]) # set default -DFLTOPENIBCPPFLAGS="-I$LINUX/drivers/infiniband/include -DIN_TREE_BUILD" +OPENIBPATH="$LINUX/drivers/infiniband" AC_ARG_WITH([openib], AC_HELP_STRING([--with-openib=path], [build openibnal against path]), [ case $with_openib in - yes) OPENIBCPPFLAGS="$DFLTOPENIBCPPFLAGS" - ENABLEOPENIB=2 + yes) ENABLEOPENIB=2 ;; no) ENABLEOPENIB=0 ;; - *) OPENIBCPPFLAGS="-I$with_openib/include" + *) OPENIBPATH="$with_openib" ENABLEOPENIB=3 ;; esac ],[ - OPENIBCPPFLAGS="$DFLTOPENIBCPPFLAGS" ENABLEOPENIB=1 ]) if test $ENABLEOPENIB -eq 0; then AC_MSG_RESULT([disabled]) +elif test ! \( -f ${OPENIBPATH}/include/ts_ib_core.h -a \ + -f ${OPENIBPATH}/include/ts_ib_cm.h -a\ + -f ${OPENIBPATH}/include/ts_ib_sa_client.h \); then + AC_MSG_RESULT([no]) + case $ENABLEOPENIB in + 1) ;; + 2) AC_MSG_ERROR([kernel OpenIB headers not present]);; + 3) AC_MSG_ERROR([bad --with-openib path]);; + *) AC_MSG_ERROR([internal error]);; + esac else + case $ENABLEOPENIB in + 1|2) OPENIBCPPFLAGS="-I$OPENIBPATH/include -DIN_TREE_BUILD";; + 3) OPENIBCPPFLAGS="-I$OPENIBPATH/include";; + *) AC_MSG_RESULT([no]) + AC_MSG_ERROR([internal error]);; + esac EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS" LB_LINUX_TRY_COMPILE([ #include + #include + #include ],[ - struct ib_device_properties props; + struct ib_device_properties dev_props; + struct ib_cm_active_param cm_active_params; + tTS_IB_CLIENT_QUERY_TID tid; + int enum1 = IB_QP_ATTRIBUTE_STATE; + int enum2 = IB_ACCESS_LOCAL_WRITE; + int enum3 = IB_CQ_CALLBACK_INTERRUPT; + int enum4 = IB_CQ_PROVIDER_REARM; return 0; ],[ AC_MSG_RESULT([yes]) @@ -167,8 +189,8 @@ else AC_MSG_RESULT([no]) case $ENABLEOPENIB in 1) ;; - 2) AC_MSG_ERROR([default openib headers not present]);; - 3) AC_MSG_ERROR([bad --with-openib path]);; + 2) AC_MSG_ERROR([can't compile with kernel OpenIB headers]);; + 3) AC_MSG_ERROR([can't compile with OpenIB headers under $OPENIBPATH]);; *) AC_MSG_ERROR([internal error]);; esac OPENIBNAL="" @@ -256,7 +278,7 @@ AC_DEFUN([LP_CONFIG_RANAL], [#### Rapid Array AC_MSG_CHECKING([if RapidArray kernel headers are present]) # placeholder -RACPPFLAGS="-I/tmp" +RACPPFLAGS="-I${LINUX}/drivers/xd1/include" EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="$EXTRA_KCFLAGS $RACPPFLAGS" LB_LINUX_TRY_COMPILE([ @@ -393,9 +415,7 @@ AC_DEFUN([LP_PROG_LINUX], LP_CONFIG_AFFINITY LP_CONFIG_QUADRICS LP_CONFIG_GM -if test $linux25 = 'no' ; then - LP_CONFIG_OPENIB -fi +LP_CONFIG_OPENIB LP_CONFIG_IIB LP_CONFIG_VIB LP_CONFIG_RANAL