2 dnl # cpu_has_feature() may referencing GPL-only cpu_feature_keys on powerpc
6 dnl # Checking if cpu_has_feature is exported GPL-only
8 AC_DEFUN([ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE], [
9 ZFS_LINUX_TEST_SRC([cpu_has_feature], [
10 #include <linux/version.h>
11 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
12 #include <asm/cpu_has_feature.h>
14 #include <asm/cputable.h>
17 return cpu_has_feature(CPU_FTR_ALTIVEC) ? 0 : 1;
18 ], [], [ZFS_META_LICENSE])
20 AC_DEFUN([ZFS_AC_KERNEL_CPU_HAS_FEATURE], [
21 AC_MSG_CHECKING([whether cpu_has_feature() is GPL-only])
22 ZFS_LINUX_TEST_RESULT([cpu_has_feature_license], [
26 AC_DEFINE(HAVE_CPU_HAS_FEATURE_GPL_ONLY, 1,
27 [cpu_has_feature() is GPL-only])