])
dnl #
+dnl # Certain kernel build options are not supported. These must be
+dnl # detected at configure time and cause a build failure. Otherwise
+dnl # modules may be successfully built that behave incorrectly.
+dnl #
+dnl # CONFIG_PREEMPT - Preempt kernels require special handling.
+dnl #
dnl # There are certain kernel build options which when enabled are
dnl # completely incompatible with non GPL kernel modules. It is best
dnl # to detect these at configure time and fail with a clear error
dnl #
AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
+ ZFS_LINUX_CONFIG([PREEMPT],
+ AC_MSG_ERROR([
+ *** Kernel built with CONFIG_PREEMPT which is not supported.
+ ** You must rebuild your kernel without this option.]), [])
+
if test "$ZFS_META_LICENSE" = CDDL; then
ZFS_LINUX_CONFIG([DEBUG_LOCK_ALLOC],
AC_MSG_ERROR([