summaryrefslogtreecommitdiffstats
path: root/source4/lib/zlib.m4
diff options
context:
space:
mode:
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)