X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build-linux.m4;h=fb58fce0f6a7f42afaddb001d74cbf1354952a26;hp=e2bbfeb1d86c762dea3fd6fb21af7b80ebdff3c9;hb=96786e021765b93b3d9607d8e771319dfb2bd675;hpb=0352c34385896230c26c1c727844384c7d3ad3a8 diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index e2bbfeb..fb58fce 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -94,22 +94,19 @@ AC_MSG_RESULT($RELEASE) AC_SUBST(RELEASE) # check is redhat/suse kernels -AC_MSG_CHECKING([that RedHat kernel]) -LB_LINUX_TRY_COMPILE([ - #include <$VERSION_HDIR/version.h> - ],[ - #ifndef RHEL_RELEASE_CODE - #error "not redhat kernel" - #endif - ],[ +AC_MSG_CHECKING([for RedHat kernel version]) + AS_IF([fgrep -q RHEL_RELEASE ${LINUX_OBJ}/include/linux/version.h], [ RHEL_KERNEL="yes" - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) -]) - -LB_LINUX_CONFIG([SUSE_KERNEL],[SUSE_KERNEL="yes"],[]) - + RHEL_RELEASE=$(expr 0$(awk -F \" '/ RHEL_RELEASE / { print [$]2 }' \ + ${LINUX_OBJ}/include/linux/version.h) + 1) + KERNEL_VERSION=$(sed -e 's/\(@<:@23@:>@\.@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/' <<< ${LINUXRELEASE}) + RHEL_KERNEL_VERSION=${KERNEL_VERSION}-${RHEL_RELEASE} + AC_SUBST(RHEL_KERNEL_VERSION) + AC_MSG_RESULT([${RHEL_KERNEL_VERSION}]) + ], [ + AC_MSG_RESULT([not found]) + LB_LINUX_CONFIG([SUSE_KERNEL],[SUSE_KERNEL="yes"],[]) + ]) ]) # LB_ARG_REPLACE_PATH(PACKAGE, PATH) @@ -518,11 +515,16 @@ else esac else if ! $compatrdma_found; then - if test -f $O2IBPATH/config.mk; then + if test -f $O2IBPATH/config.mk; then . $O2IBPATH/config.mk elif test -f $O2IBPATH/ofed_patch.mk; then . $O2IBPATH/ofed_patch.mk fi + else + case $RHEL_KERNEL_VERSION in + 2.6.32-358*) + EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE -DCONFIG_COMPAT_RHEL_6_4";; + esac fi if test -n "$BACKPORT_INCLUDES"; then OFED_BACKPORT_PATH="$O2IBPATH/${BACKPORT_INCLUDES/*\/kernel_addons/kernel_addons}/"