From 0f1012be0aeb6f5f27966c80321db79a9b1aaec3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 9 Jun 2009 16:09:17 -0700 Subject: [PATCH] Add basic zlib autoconf check for user space build. --- config/user-zlib.m4 | 11 +++++++++++ config/user.m4 | 1 + 2 files changed, 12 insertions(+) create mode 100644 config/user-zlib.m4 diff --git a/config/user-zlib.m4 b/config/user-zlib.m4 new file mode 100644 index 0000000000..999c409eda --- /dev/null +++ b/config/user-zlib.m4 @@ -0,0 +1,11 @@ +dnl # +dnl # Check for zlib +dnl # +AC_DEFUN([ZFS_AC_CONFIG_USER_ZLIB], [ + AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([ + *** zlib.h missing, the zlib-devel package is required])]) + AC_CHECK_LIB([z], [compress2], [], [AC_MSG_ERROR([ + *** compress2() missing, the zlib-devel package is required])]) + AC_CHECK_LIB([z], [uncompress], [], [AC_MSG_ERROR([ + *** uncompress() missing, the zlib-devel package is required])]) +]) diff --git a/config/user.m4 b/config/user.m4 index 063d582bbd..febc2941d8 100644 --- a/config/user.m4 +++ b/config/user.m4 @@ -7,4 +7,5 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [ ZFS_AC_CONFIG_USER_LIBDISKMGT ZFS_AC_CONFIG_USER_LIBSHARE ZFS_AC_CONFIG_USER_IOCTL + ZFS_AC_CONFIG_USER_ZLIB ])