aboutsummaryrefslogtreecommitdiffstats
path: root/config/user-zlib.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/user-zlib.m4')
-rw-r--r--config/user-zlib.m419
1 files changed, 3 insertions, 16 deletions
diff --git a/config/user-zlib.m4 b/config/user-zlib.m4
index 82c0962e4..d30fde288 100644
--- a/config/user-zlib.m4
+++ b/config/user-zlib.m4
@@ -2,20 +2,7 @@ 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_SEARCH_LIBS([compress2], [z], [], [AC_MSG_FAILURE([
- *** compress2() missing, zlib-devel package required])])
-
- AC_SEARCH_LIBS([uncompress], [z], [], [AC_MSG_FAILURE([
- *** uncompress() missing, zlib-devel package required])])
-
- AC_SEARCH_LIBS([crc32], [z], [], [AC_MSG_FAILURE([
- *** crc32() missing, zlib-devel package required])])
-
- AC_SUBST([ZLIB], ["-lz"])
- AC_DEFINE([HAVE_ZLIB], 1, [Define if you have zlib])
+ FIND_SYSTEM_LIBRARY(ZLIB, [zlib], [zlib.h], [], [z], [compress2, uncompress, crc32], [], [
+ AC_MSG_FAILURE([*** zlib-devel package required])
+ ])
])