X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=build%2Fautoconf%2Flustre-build-linux.m4;h=e47efd85c78a0e4dd36df5288e09705cfae9e328;hb=0c5dd2c53ed8d6c85d176a6ac8fc24e29f92d428;hp=f26375d1a3ecd800bef2826c8570098012880be4;hpb=99293c489dc2330bbb8ce3734f575003d4812811;p=fs%2Flustre-release.git diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index f26375d..e47efd8 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -98,6 +98,36 @@ AC_MSG_CHECKING([for Lustre release]) RELEASE="`echo ${LINUXRELEASE} | tr '-' '_'`_`date +%Y%m%d%H%M`" AC_MSG_RESULT($RELEASE) AC_SUBST(RELEASE) + +# check is redhat/suse kernels +AC_MSG_CHECKING([that RedHat kernel]) +LB_LINUX_TRY_COMPILE([ + #include + ],[ + #ifndef RHEL_MAJOR + #error "not redhat kernel" + #endif + ],[ + RHEL_KENEL="yes" + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) +]) + +AC_MSG_CHECKING([that SuSe kernel]) +LB_LINUX_TRY_COMPILE([ + #include + ],[ + #ifndef SLE_VERSION_CODE + #error "not sles kernel" + #endif + ],[ + SUSE_KERNEL="yes" + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) +]) + ]) # @@ -209,9 +239,9 @@ LB_LINUX_RELEASE AC_DEFUN([LB_LINUX_MODPOST], [ # Find the modpost utility -AC_CHECK_FILE([$LINUX_OBJ/scripts/mod/modpost], +LB_CHECK_FILE([$LINUX_OBJ/scripts/mod/modpost], [MODPOST=$LINUX_OBJ/scripts/mod/modpost], - [AC_CHECK_FILE([$LINUX_OBJ/scripts/modpost], + [LB_CHECK_FILE([$LINUX_OBJ/scripts/modpost], [MODPOST=$LINUX_OBJ/scripts/modpost], AC_MSG_ERROR([modpost not found.]) )] @@ -415,6 +445,11 @@ fi # AC_DEFUN([LB_PROG_LINUX], [LB_LINUX_PATH +LB_LINUX_ARCH + +if test $LINUX_ARCH == "powerpc64"; then + CFLAGS="$CFLAGS -m64" +fi LB_LINUX_CONFIG([MODULES],[],[ AC_MSG_ERROR([module support is required to build Lustre kernel modules.])