Fix the configure CONFIG_* option detection
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
This commit is contained in:
parent
e80cd06b8e
commit
c064bdee95
|
@ -540,9 +540,7 @@ dnl #
|
||||||
AC_DEFUN([SPL_LINUX_CONFIG],
|
AC_DEFUN([SPL_LINUX_CONFIG],
|
||||||
[AC_MSG_CHECKING([whether Linux was built with CONFIG_$1])
|
[AC_MSG_CHECKING([whether Linux was built with CONFIG_$1])
|
||||||
SPL_LINUX_TRY_COMPILE([
|
SPL_LINUX_TRY_COMPILE([
|
||||||
#ifndef AUTOCONF_INCLUDED
|
#include <linux/module.h>
|
||||||
#include <linux/config.h>
|
|
||||||
#endif
|
|
||||||
],[
|
],[
|
||||||
#ifndef CONFIG_$1
|
#ifndef CONFIG_$1
|
||||||
#error CONFIG_$1 not #defined
|
#error CONFIG_$1 not #defined
|
||||||
|
|
|
@ -11819,9 +11819,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
|
||||||
#ifndef AUTOCONF_INCLUDED
|
#include <linux/module.h>
|
||||||
#include <linux/config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
@ -16019,9 +16017,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
|
||||||
#ifndef AUTOCONF_INCLUDED
|
#include <linux/module.h>
|
||||||
#include <linux/config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
|
Loading…
Reference in New Issue