summaryrefslogtreecommitdiffstats
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
commit3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6 (patch)
tree28333d61074cb242d27209672883cdaed00bd046
parentac43081b93966b545928230f7af8654b942432da (diff)
downloadsamba-3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6.tar.gz
samba-3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6.tar.xz
samba-3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6.zip
zlib: we require zlib-1.2.3 or higher
metze
-rw-r--r--source/lib/zlib.m421
1 files changed, 18 insertions, 3 deletions
diff --git a/source/lib/zlib.m4 b/source/lib/zlib.m4
index 7b967fc8d2f..9ee7b8e49e8 100644
--- a/source/lib/zlib.m4
+++ b/source/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)