]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-zlib.m4
Improve error message for zfs create with @ or # in name
[mirror_zfs.git] / config / kernel-zlib.m4
CommitLineData
48ef8ba0
BB
1dnl #
2dnl # zlib inflate compat,
3dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
4dnl #
93ce2b4c 5AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_INFLATE], [
48ef8ba0 6 AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined])
93ce2b4c 7 ZFS_LINUX_TRY_COMPILE([
48ef8ba0
BB
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
22dnl #
23dnl # zlib deflate compat,
24dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled.
25dnl #
93ce2b4c 26AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_DEFLATE], [
48ef8ba0 27 AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined])
93ce2b4c 28 ZFS_LINUX_TRY_COMPILE([
48ef8ba0
BB
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
43dnl #
44dnl # 2.6.39 API compat,
45dnl # The function zlib_deflate_workspacesize() now take 2 arguments.
46dnl # This was done to avoid always having to allocate the maximum size
47dnl # workspace (268K). The caller can now specific the windowBits and
48dnl # memLevel compression parameters to get a smaller workspace.
49dnl #
93ce2b4c 50AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE],
48ef8ba0 51 [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
93ce2b4c 52 ZFS_LINUX_TRY_COMPILE([
48ef8ba0
BB
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])