aboutsummaryrefslogtreecommitdiffstats
path: root/config/user-zlib.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:22:58 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:41:27 -0700
commitc9c0d073da561bcbefbdf09c87fc75b227415619 (patch)
tree7daee55ae61526107f421de48171573fa5a15d28 /config/user-zlib.m4
parent40b84e7aec6392187722e61e5a4a853b530bf60f (diff)
Add build system
Add autoconf style build infrastructure to the ZFS tree. This includes autogen.sh, configure.ac, m4 macros, some scripts/*, and makefiles for all the core ZFS components.
Diffstat (limited to 'config/user-zlib.m4')
-rw-r--r--config/user-zlib.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/config/user-zlib.m4 b/config/user-zlib.m4
new file mode 100644
index 000000000..a48361662
--- /dev/null
+++ b/config/user-zlib.m4
@@ -0,0 +1,21 @@
+dnl #
+dnl # Check for zlib
+dnl #
+AC_DEFUN([ZFS_AC_CONFIG_USER_ZLIB], [
+ ZLIB=
+
+ AC_CHECK_HEADER([zlib.h], [], [AC_MSG_FAILURE([
+ *** zlib.h missing, zlib-devel package required])])
+
+ AC_CHECK_LIB([z], [compress2], [], [AC_MSG_FAILURE([
+ *** compress2() missing, zlib-devel package required])])
+
+ AC_CHECK_LIB([z], [uncompress], [], [AC_MSG_FAILURE([
+ *** uncompress() missing, zlib-devel package required])])
+
+ AC_CHECK_LIB([z], [crc32], [], [AC_MSG_FAILURE([
+ *** crc32() missing, zlib-devel package required])])
+
+ AC_SUBST([ZLIB], ["-lz"])
+ AC_DEFINE([HAVE_ZLIB], 1, [Define if you have zlib])
+])