Whamcloud - gitweb
LU-6179 llite: Implement ladvise lockahead
[fs/lustre-release.git] / config / lustre-build-linux.m4
index 4351c9f..260047c 100644 (file)
@@ -75,16 +75,6 @@ AC_SUBST(LINUXRELEASE)
 AC_DEFUN([LB_LINUX_RELEASE], [
 LB_LINUX_UTSRELEASE
 
-# ------------ RELEASE --------------------------------
-AC_MSG_CHECKING([for Lustre release])
-AC_ARG_WITH([release],
-       AC_HELP_STRING([--with-release=string],
-               [set the release string (default=$kvers_YYYYMMDDhhmm)]),
-       [RELEASE=$withval], [
-       RELEASE="$(echo $LINUXRELEASE | tr '-' '_')"])
-AC_MSG_RESULT($RELEASE)
-AC_SUBST(RELEASE)
-
 # check if the kernel is one from RHEL or SUSE
 AC_CACHE_CHECK([for RedHat kernel release number], lb_cv_rhel_kernel_version, [
 lb_cv_rhel_kernel_version=""
@@ -121,6 +111,8 @@ AC_SUBST(modulefsdir)
 
 modulenetdir="${moduledir}/net/${IN_KERNEL}"
 AC_SUBST(modulenetdir)
+
+AC_SUBST(KMP_MODDIR)
 ])
 
 #
@@ -183,7 +175,7 @@ AC_DEFUN([LB_ARG_CANON_PATH], [
 # Find paths for linux, handling kernel-source rpms
 #
 AC_DEFUN([LB_LINUX_PATH], [
-for DEFAULT_LINUX in /lib/modules/$(uname -r)/{source,build} /usr/src/linux; do
+for DEFAULT_LINUX in /lib/modules/$(uname -r)/{source,build} /usr/src/linux $(find /usr/src/kernels/ -maxdepth 1 -name @<:@0-9@:>@\* | xargs -r ls -d | tail -n 1); do
        AS_IF([readlink -q -e $DEFAULT_LINUX >/dev/null], [break])
 done
 if test "$DEFAULT_LINUX" = "/lib/modules/$(uname -r)/source"; then