# not desired here
AC_CHECK_DECLS_ONCE([[strndupa], [basename]], [], [], [[#include <string.h>]])
-# Check kernel headers
-AC_CHECK_HEADERS_ONCE([linux/module.h])
-
AC_MSG_CHECKING([whether _Static_assert() is supported])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[_Static_assert(1, "Test");]])],
#include <unistd.h>
#include <sys/syscall.h>
-#ifdef HAVE_LINUX_MODULE_H
-#include <linux/module.h>
-#endif
-
-#ifndef MODULE_INIT_IGNORE_MODVERSIONS
-# define MODULE_INIT_IGNORE_MODVERSIONS 1
-#endif
-
-#ifndef MODULE_INIT_IGNORE_VERMAGIC
-# define MODULE_INIT_IGNORE_VERMAGIC 2
-#endif
-
-#ifndef MODULE_INIT_COMPRESSED_FILE
-# define MODULE_INIT_COMPRESSED_FILE 4
-#endif
+/*
+ * Macros pulled from linux/module.h, to avoid pulling the header.
+ *
+ * In practise very few people have it installed and distros do not install the
+ * relevant package during their build.
+ *
+ * Values are UAPI, so they cannot change.
+ */
+#define MODULE_INIT_IGNORE_MODVERSIONS 1
+#define MODULE_INIT_IGNORE_VERMAGIC 2
+#define MODULE_INIT_COMPRESSED_FILE 4
#ifndef __NR_finit_module
# warning __NR_finit_module missing - kmod might not work correctly