aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-10-03 10:58:47 -0700
committerBrian Behlendorf <[email protected]>2014-10-17 14:58:38 -0700
commite33045ee98611b30bbe2f174a709f470f9201171 (patch)
tree822ab75d5c02024e5c69038882338134a23cb06f /config
parente82cdc3acc4afe52c3ddc3fe9e4f456fdef80f41 (diff)
Make license compatibility checks consistent
Apply the license specified in the META file to ensure the compatibility checks are all performed consistently. Signed-off-by: Brian Behlendorf <[email protected]> Issue #2757
Diffstat (limited to 'config')
-rw-r--r--config/kernel-acl.m46
-rw-r--r--config/kernel-blk-end-request.m42
-rw-r--r--config/kernel-blk-queue-flush.m42
-rw-r--r--config/kernel-blk-rq-bytes.m42
-rw-r--r--config/kernel.m418
5 files changed, 18 insertions, 12 deletions
diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4
index a03ee5bff..1cb28b25a 100644
--- a/config/kernel-acl.m4
+++ b/config/kernel-acl.m4
@@ -1,6 +1,6 @@
dnl #
-dnl # Check if posix_acl_release can be used from a CDDL module,
-dnl # The is_owner_or_cap macro was replaced by
+dnl # Check if posix_acl_release can be used from a ZFS_META_LICENSED
+dnl # module. The is_owner_or_cap macro was replaced by
dnl # inode_owner_or_capable
dnl #
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [
@@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [
#include <linux/fs.h>
#include <linux/posix_acl.h>
- MODULE_LICENSE("CDDL");
+ MODULE_LICENSE("$ZFS_META_LICENSE");
],[
struct posix_acl* tmp = posix_acl_alloc(1, 0);
posix_acl_release(tmp);
diff --git a/config/kernel-blk-end-request.m4 b/config/kernel-blk-end-request.m4
index ca0a04284..c2980e593 100644
--- a/config/kernel-blk-end-request.m4
+++ b/config/kernel-blk-end-request.m4
@@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
#include <linux/module.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("CDDL");
+ MODULE_LICENSE("$ZFS_META_LICENSE");
],[
struct request *req = NULL;
(void) blk_end_request(req, 0, 0);
diff --git a/config/kernel-blk-queue-flush.m4 b/config/kernel-blk-queue-flush.m4
index 261174735..bb74ea1c5 100644
--- a/config/kernel-blk-queue-flush.m4
+++ b/config/kernel-blk-queue-flush.m4
@@ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLUSH], [
#include <linux/module.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("CDDL");
+ MODULE_LICENSE("$ZFS_META_LICENSE");
],[
struct request_queue *q = NULL;
(void) blk_queue_flush(q, REQ_FLUSH);
diff --git a/config/kernel-blk-rq-bytes.m4 b/config/kernel-blk-rq-bytes.m4
index a95f8a8ea..bedbcc6e3 100644
--- a/config/kernel-blk-rq-bytes.m4
+++ b/config/kernel-blk-rq-bytes.m4
@@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_BYTES], [
#include <linux/module.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("CDDL");
+ MODULE_LICENSE("$ZFS_META_LICENSE");
],[
struct request *req = NULL;
(void) blk_rq_bytes(req);
diff --git a/config/kernel.m4 b/config/kernel.m4
index 67a4ef6d2..909415fd3 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -420,8 +420,8 @@ AC_DEFUN([ZFS_AC_SPL], [
dnl #
dnl # Basic toolchain sanity check.
dnl #
-AC_DEFUN([ZFS_AC_TEST_MODULE],
- [AC_MSG_CHECKING([whether modules can be built])
+AC_DEFUN([ZFS_AC_TEST_MODULE], [
+ AC_MSG_CHECKING([whether modules can be built])
ZFS_LINUX_TRY_COMPILE([],[],[
AC_MSG_RESULT([yes])
],[
@@ -442,10 +442,16 @@ 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], [
-
- AS_IF([test "$ZFS_META_LICENSE" = GPL], [
- AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
- [Define to 1 if licensed under the GPL])
+ 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])
+ ], [
])
ZFS_AC_KERNEL_CONFIG_DEBUG_LOCK_ALLOC