Skip GPL-only symbols test when cross-compiling

Signed-off-by: Kamil Domański <kamil@domanski.co>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/spl#507
Closes zfsonlinux/zfs#4075
This commit is contained in:
Kamil Domanski 2015-12-12 13:35:49 +01:00 committed by Brian Behlendorf
parent cb877e0ff2
commit e0ed96fa43

View File

@ -673,16 +673,19 @@ AC_DEFUN([SPL_AC_TEST_MODULE],
fi
])
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(
"$SPL_META_LICENSE");
])
], [
AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
[Define to 1 if GPL-only symbols can be used])
], [
return !license_is_gpl_compatible("$SPL_META_LICENSE");
])
], [
AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
[Define to 1 if GPL-only symbols can be used])
], [
])
])