]> git.proxmox.com Git - mirror_spl.git/commitdiff
Fix the configure CONFIG_* option detection
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 22 Jul 2011 21:23:12 +0000 (14:23 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 22 Jul 2011 22:07:03 +0000 (15:07 -0700)
The latest kernels no longer define AUTOCONF_INCLUDED which was
being used to detect the new style autoconf.h kernel configure
options.  This results in the CONFIG_* checks always failing
incorrectly for newer kernels.

The fix for this is a simplification of the testing method.
Rather than attempting to explicitly include to renamed config
header.  It is simpler to unconditionally include <linux/module.h>
which must pick up the correctly named header.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #320

config/spl-build.m4
configure

index ea50785071212adb9d6e88a3b15ef80301753a4e..f4652bce12f55af374437dbc9af4110254c67051 100644 (file)
@@ -540,9 +540,7 @@ dnl #
 AC_DEFUN([SPL_LINUX_CONFIG],
        [AC_MSG_CHECKING([whether Linux was built with CONFIG_$1])
        SPL_LINUX_TRY_COMPILE([
-               #ifndef AUTOCONF_INCLUDED
-               #include <linux/config.h>
-               #endif
+               #include <linux/module.h>
        ],[
                #ifndef CONFIG_$1
                #error CONFIG_$1 not #defined
index cf396e484803ce8db102ed0113f51c965c710907..72bef74a38e3d1e248b8350fb4036b3539339cf6 100755 (executable)
--- a/configure
+++ b/configure
@@ -11819,9 +11819,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #ifndef AUTOCONF_INCLUDED
-               #include <linux/config.h>
-               #endif
+               #include <linux/module.h>
 
 int
 main (void)
@@ -16019,9 +16017,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #ifndef AUTOCONF_INCLUDED
-               #include <linux/config.h>
-               #endif
+               #include <linux/module.h>
 
 int
 main (void)