mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Linux compat: fix DECLARE_EVENT_CLASS() test when ZFS is built-in
ZFS_LINUX_TRY_COMPILE_HEADER macro doesn't take CONFIG_ZFS=y into account. As a result, on several latest Linux versions, configure script marks DECLARE_EVENT_CLASS() available for non-GPL when ZFS is being built as a module, but marks it unavailable when ZFS is built-in. Follow the logic of the neighbor macros and adjust ZFS_LINUX_TRY_COMPILE_HEADER accordingly, so that it doesn't try to look for a .ko when ZFS is built-in. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Alexander Lobakin <alobakin@pm.me> Closes #14006
This commit is contained in:
parent
0aae8a449b
commit
ab49df487b
@ -940,8 +940,15 @@ dnl # like ZFS_LINUX_TRY_COMPILE, except the contents conftest.h are
|
||||
dnl # provided via the fifth parameter
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_TRY_COMPILE_HEADER], [
|
||||
ZFS_LINUX_COMPILE_IFELSE(
|
||||
[ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]], [[ZFS_META_LICENSE]])],
|
||||
[test -f build/conftest/conftest.ko],
|
||||
[$3], [$4], [$5])
|
||||
AS_IF([test "x$enable_linux_builtin" = "xyes"], [
|
||||
ZFS_LINUX_COMPILE_IFELSE(
|
||||
[ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]],
|
||||
[[ZFS_META_LICENSE]])],
|
||||
[test -f build/conftest/conftest.o], [$3], [$4], [$5])
|
||||
], [
|
||||
ZFS_LINUX_COMPILE_IFELSE(
|
||||
[ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]],
|
||||
[[ZFS_META_LICENSE]])],
|
||||
[test -f build/conftest/conftest.ko], [$3], [$4], [$5])
|
||||
])
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user