summaryrefslogtreecommitdiffstats
path: root/source4/lib/zlib.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-09-06 12:04:00 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-06 16:16:41 +0200
commit95df0fddf66a2e85b166d7dc6678ed53adbf4c66 (patch)
tree530d997d61b1704a058df56404fcf0910993d446 /source4/lib/zlib.m4
parent5631a1b9bc03d6cf31af66b13872255f18979fe8 (diff)
downloadsamba-95df0fddf66a2e85b166d7dc6678ed53adbf4c66.tar.gz
samba-95df0fddf66a2e85b166d7dc6678ed53adbf4c66.tar.xz
samba-95df0fddf66a2e85b166d7dc6678ed53adbf4c66.zip
zlib: we require zlib-1.2.3 or higher
metze (This used to be commit 3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6)
Diffstat (limited to 'source4/lib/zlib.m4')
-rw-r--r--source4/lib/zlib.m421
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/lib/zlib.m4 b/source4/lib/zlib.m4
index 7b967fc8d2f..9ee7b8e49e8 100644
--- a/source4/lib/zlib.m4
+++ b/source4/lib/zlib.m4
@@ -1,11 +1,26 @@
AC_CHECK_HEADERS(zlib.h)
-# we require this new function...
-AC_CHECK_LIB_EXT(z, ZLIB_LIBS, inflateReset2)
+AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion)
+
+AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [
+ AC_TRY_COMPILE([
+ #include <zlib.h>
+ ],[
+ #if (ZLIB_VERNUM >= 0x1230)
+ #else
+ #error "ZLIB_VERNUM < 0x1230"
+ #endif
+ ],[
+ samba_cv_zlib_1_2_3=yes
+ ],[
+ samba_cv_zlib_1_2_3=no
+ ])
+])
if test x"$ac_cv_header_zlib_h" = x"yes" -a \
- x"$ac_cv_lib_ext_z_inflateReset2" = x"yes"; then
+ x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
+ x"$samba_cv_zlib_1_2_3" = x"yes"; then
SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
else
SMB_INCLUDE_MK(lib/zlib.mk)