X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fcf%2Flinux-test3.m4;h=8c3b296f98aba910127c57a24c23ef929ef10f5c;hp=2c9ea990364e01bbf4bc314ebf6dbd001670115a;hb=ee8ae61a4d9610fea16473d87b471cd4fc128804;hpb=6975fcb202f2a599814ce9f26cda1999163050f8 diff --git a/src/cf/linux-test3.m4 b/src/cf/linux-test3.m4 index 2c9ea99..8c3b296 100644 --- a/src/cf/linux-test3.m4 +++ b/src/cf/linux-test3.m4 @@ -33,6 +33,9 @@ AC_SUBST(RHCONFIG_SP) AC_SUBST(RHCONFIG_MP) ]) + +dnl This depends on LINUX_CONFIG_H_EXISTS running first! + AC_DEFUN([LINUX_WHICH_MODULES],[ if test "x$enable_redhat_buildsys" = "xyes"; then MPS=Default @@ -40,12 +43,17 @@ else save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS" AC_MSG_CHECKING(which kernel modules to build) + if test "x$ac_cv_linux_config_h_exists" = "xyes"; then + CPPFLAGS="-DCONFIG_H_EXISTS $CPPFLAGS" + fi if test "x$ac_linux_rhconfig" = "xyes"; then MPS="MP SP" else AC_CACHE_VAL(ac_cv_linux_config_smp, [ - AC_TRY_COMPILE( -[#include + AC_TRY_KBUILD( +[#ifdef CONFIG_H_EXISTS +#include +#endif ], [#ifndef CONFIG_SMP lose;