]> granicus.if.org Git - zfs/blob - config/kernel-zlib.m4
Stack overflow in recursive bpobj_iterate_impl
[zfs] / config / kernel-zlib.m4
1 dnl #
2 dnl # zlib inflate compat,
3 dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
4 dnl #
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
11                 #endif
12         ],[ ],[
13                 AC_MSG_RESULT([yes])
14         ],[
15                 AC_MSG_RESULT([no])
16                 AC_MSG_ERROR([
17         *** This kernel does not include the required zlib inflate support.
18         *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set.])
19         ])
20 ])
21
22 dnl #
23 dnl # zlib deflate compat,
24 dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled.
25 dnl #
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
32                 #endif
33         ],[ ],[
34                 AC_MSG_RESULT([yes])
35         ],[
36                 AC_MSG_RESULT([no])
37                 AC_MSG_ERROR([
38         *** This kernel does not include the required zlib deflate support.
39         *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set.])
40         ])
41 ])
42
43 dnl #
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.
49 dnl #
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>
54         ],[
55                 return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
56         ],[
57                 AC_MSG_RESULT(yes)
58                 AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1,
59                           [zlib_deflate_workspacesize() wants 2 args])
60         ],[
61                 AC_MSG_RESULT(no)
62         ])
63 ])