Properly detect and set HAVE_GPL_ONLY_SYMBOLS based on license

This commit is contained in:
Brian Behlendorf 2009-02-03 09:59:54 -08:00
parent 442ffc3574
commit 4365c44425
3 changed files with 9 additions and 6 deletions

View File

@ -2,7 +2,7 @@ dnl #
dnl # Check for ioctl()
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_IOCTL], [
AC_MSG_CHECKING(checking for ioctl())
AC_MSG_CHECKING(for ioctl())
AC_EGREP_HEADER(ioctl, unistd.h, is_unistd=yes, is_unistd=no)
AC_EGREP_HEADER(ioctl, sys/ioctl.h, is_sys_ioctl=yes, is_sys_ioctl=no)
AC_EGREP_HEADER(ioctl, stropts.h, is_stropts=yes, is_stropts=no)

View File

@ -168,10 +168,13 @@ AC_DEFUN([ZFS_AC_SPL], [
])
AC_DEFUN([ZFS_AC_LICENSE], [
AC_MSG_CHECKING([license])
AC_MSG_RESULT([CDDL])
dnl # AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
dnl # [Define to 1 if module is licensed under the GPL])
AC_MSG_CHECKING([zfs license])
license=`grep MODULE_LICENSE module/zfs/zfs_ioctl.c | cut -f2 -d'"'`
AC_MSG_RESULT([$license])
if test "$license" = GPL; then
AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
[Define to 1 if module is licensed under the GPL])
fi
])
AC_DEFUN([ZFS_AC_DEBUG], [

View File

@ -52,8 +52,8 @@ splbuild=
ZFS_AC_KERNEL
ZFS_AC_SPL
ZFS_AC_CONFIG
ZFS_AC_LICENSE
ZFS_AC_CONFIG
ZFS_AC_DEBUG
AC_CONFIG_FILES([