2 dnl # zlib inflate compat,
3 dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
5 AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_INFLATE], [
6 AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined])
7 ZFS_LINUX_TRY_COMPILE([
8 #if !defined(CONFIG_ZLIB_INFLATE) && \
9 !defined(CONFIG_ZLIB_INFLATE_MODULE)
10 #error CONFIG_ZLIB_INFLATE not defined
17 *** This kernel does not include the required zlib inflate support.
18 *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.])
23 dnl # zlib deflate compat,
24 dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled.
26 AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_DEFLATE], [
27 AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined])
28 ZFS_LINUX_TRY_COMPILE([
29 #if !defined(CONFIG_ZLIB_DEFLATE) && \
30 !defined(CONFIG_ZLIB_DEFLATE_MODULE)
31 #error CONFIG_ZLIB_DEFLATE not defined
38 *** This kernel does not include the required zlib deflate support.
39 *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.])
44 dnl # 2.6.39 API compat,
45 dnl # The function zlib_deflate_workspacesize() now take 2 arguments.
46 dnl # This was done to avoid always having to allocate the maximum size
47 dnl # workspace (268K). The caller can now specific the windowBits and
48 dnl # memLevel compression parameters to get a smaller workspace.
50 AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE],
51 [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
52 ZFS_LINUX_TRY_COMPILE([
53 #include <linux/zlib.h>
55 return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
58 AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1,
59 [zlib_deflate_workspacesize() wants 2 args])