summaryrefslogtreecommitdiffstats
path: root/config/kernel-zlib.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-zlib.m4')
-rw-r--r--config/kernel-zlib.m457
1 files changed, 10 insertions, 47 deletions
diff --git a/config/kernel-zlib.m4 b/config/kernel-zlib.m4
index 3ca7cf682..d554d1168 100644
--- a/config/kernel-zlib.m4
+++ b/config/kernel-zlib.m4
@@ -1,62 +1,25 @@
dnl #
-dnl # zlib inflate compat,
-dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_INFLATE], [
- AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined])
- ZFS_LINUX_TRY_COMPILE([
- #if !defined(CONFIG_ZLIB_INFLATE) && \
- !defined(CONFIG_ZLIB_INFLATE_MODULE)
- #error CONFIG_ZLIB_INFLATE not defined
- #endif
- ],[ ],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([
- *** This kernel does not include the required zlib inflate support.
- *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.])
- ])
-])
-
-dnl #
-dnl # zlib deflate compat,
-dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_DEFLATE], [
- AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined])
- ZFS_LINUX_TRY_COMPILE([
- #if !defined(CONFIG_ZLIB_DEFLATE) && \
- !defined(CONFIG_ZLIB_DEFLATE_MODULE)
- #error CONFIG_ZLIB_DEFLATE not defined
- #endif
- ],[ ],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([
- *** This kernel does not include the required zlib deflate support.
- *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.])
- ])
-])
-
-dnl #
dnl # 2.6.39 API compat,
+dnl
dnl # The function zlib_deflate_workspacesize() now take 2 arguments.
dnl # This was done to avoid always having to allocate the maximum size
dnl # workspace (268K). The caller can now specific the windowBits and
dnl # memLevel compression parameters to get a smaller workspace.
dnl #
-AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE],
- [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
- ZFS_LINUX_TRY_COMPILE([
+AC_DEFUN([ZFS_AC_KERNEL_SRC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
+ ZFS_LINUX_TEST_SRC([2args_zlib_deflate_workspacesize], [
#include <linux/zlib.h>
],[
return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
- ],[
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
+ AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
+ ZFS_LINUX_TEST_RESULT([2args_zlib_deflate_workspacesize], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1,
- [zlib_deflate_workspacesize() wants 2 args])
+ [zlib_deflate_workspacesize() wants 2 args])
],[
AC_MSG_RESULT(no)
])