]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - config/kernel.m4
Imported Upstream version 0.6.5.4
[mirror_zfs-debian.git] / config / kernel.m4
index 0a65f39ef21b4d66efd0066f19bc956358c4a56b..c655a9a1ddd0670a9ba29fa579f3c8638416e037 100644 (file)
@@ -448,16 +448,18 @@ dnl # detected at configure time and cause a build failure.  Otherwise
 dnl # modules may be successfully built that behave incorrectly.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
-       AC_RUN_IFELSE([
-               AC_LANG_PROGRAM([
-                       #include "$LINUX/include/linux/license.h"
+       AS_IF([test "x$cross_compiling" != xyes], [
+               AC_RUN_IFELSE([
+                       AC_LANG_PROGRAM([
+                               #include "$LINUX/include/linux/license.h"
+                       ], [
+                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
+                       ])
+               ], [
+                       AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1],
+                           [Define to 1 if GPL-only symbols can be used])
                ], [
-                       return !license_is_gpl_compatible("$ZFS_META_LICENSE");
                ])
-       ], [
-               AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1],
-                   [Define to 1 if GPL-only symbols can be used])
-       ], [
        ])
 
        ZFS_AC_KERNEL_CONFIG_DEBUG_LOCK_ALLOC