From 9ed2d5069fe52ed630bfec21ad81dafd5f3ee1cc Mon Sep 17 00:00:00 2001 From: shadow <shadow> Date: Thu, 24 Apr 2008 08:18:23 +0000 Subject: [PATCH] use right detect for RHEL/SLES kernels. b=15511 i=Yang Sheng --- build/autoconf/lustre-build-linux.m4 | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index 83b3a1e753..58af79c72f 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 <linux/version.h> + ],[ + #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 <linux/version.h> + ],[ + #ifndef SLE_VERSION_CODE + #error "not redhat kernel" + #endif + ],[ + SUSE_KERNEL="yes" + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) +]) + ]) # -- GitLab