X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build-linux.m4;h=e1b46a374080a2c1b37d62246dc74f697c884470;hp=a1b51553c8a51467cd49c0fd329e8858a991db38;hb=5c033757a9a36b83bf891715e683ed06a4bded8e;hpb=baf83c76f11a28a105e92e59b178a7ca2fb66156 diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index a1b5155..e1b46a3 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -79,6 +79,7 @@ AC_DEFUN([LB_LINUX_RELEASE], [ RHEL_KERNEL="no" SUSE_KERNEL="no" UBUNTU_KERNEL="no" + DEBIAN_KERNEL="no" # And if any of the above kernels has been detected yet KERNEL_FOUND="no" @@ -120,9 +121,23 @@ AC_DEFUN([LB_LINUX_RELEASE], [ ]) ]) + # Check for Debian + AS_IF([test "x$KERNEL_FOUND" = "xno"], [ + AC_CACHE_CHECK([for Debian kernel signature], lb_cv_debian_kernel_sig, [ + lb_cv_debian_kernel_sig="no" + AS_IF([grep -q "LINUX_PACKAGE_ID\s*\"\s*Debian" $LINUX_OBJ/include/generated/package.h], [ + lb_cv_debian_kernel_sig="yes" + ]) + ]) + AS_IF([test "x$lb_cv_debian_kernel_sig" = "xyes"], [ + DEBIAN_KERNEL="yes" + KERNEL_FOUND="yes" + ]) + ]) + # If still no kernel was found, a warning is issued AS_IF([test "x$KERNEL_FOUND" = "xno"], [ - AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE nor Ubuntu]) + AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, Ubuntu nor Debian]) ]) AC_MSG_CHECKING([for Linux kernel module package directory]) @@ -134,7 +149,8 @@ AC_DEFUN([LB_LINUX_RELEASE], [ AS_IF([test x$RHEL_KERNEL = xyes], [KMP_MODDIR="extra/kernel"], [test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], [test x$UBUNTU_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], - [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE nor Ubuntu])] + [test x$DEBIAN_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], + [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, Ubuntu nor Debian])] ) IN_KERNEL="${PACKAGE}"]) AC_MSG_RESULT($KMP_MODDIR) @@ -259,8 +275,6 @@ LB_CHECK_FILE([$LINUX_CONFIG], [], [AC_MSG_ERROR([ Kernel config could not be found. - -If you are building from a kernel-source rpm consult build/README.kernel-source ]) ]) AC_SUBST(LINUX_CONFIG) @@ -272,7 +286,7 @@ LB_CHECK_FILE([/boot/kernel.h], AC_ARG_WITH([kernel-source-header], AC_HELP_STRING([--with-kernel-source-header=path], - [Use a different kernel version header. Consult build/README.kernel-source for details.]), + [Use a different kernel version header.]), [LB_ARG_CANON_PATH([kernel-source-header], [KERNEL_SOURCE_HEADER])]) # ----------- make dep run? ------------------ @@ -412,6 +426,19 @@ LC_MODULE_LOADING ]) # +# LB_USES_DPKG +# +# Determine if the target is a dpkg system or rpm +# +AC_DEFUN([LB_USES_DPKG], [ +AC_CACHE_CHECK([if this distro uses dpkg], lb_cv_uses_dpkg, [ +lb_cv_uses_dpkg="no" +AS_CASE([$(which dpkg 2>/dev/null)],[*/dpkg], [lb_cv_uses_dpkg="yes"]) +]) +uses_dpkg=$lb_cv_uses_dpkg +]) + +# # LB_CHECK_EXPORT # # check symbol exported or not