Skip to content
Snippets Groups Projects
Commit 9ed2d506 authored by Alexey Lyashkov's avatar Alexey Lyashkov
Browse files

use right detect for RHEL/SLES kernels.

b=15511
i=Yang Sheng
parent 83f75568
No related branches found
No related tags found
No related merge requests found
......@@ -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])
])
])
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment