From 95df0fddf66a2e85b166d7dc6678ed53adbf4c66 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 6 Sep 2008 12:04:00 +0200 Subject: zlib: we require zlib-1.2.3 or higher metze (This used to be commit 3f4eb091f0dcc53acbfdc63a8d82a5a0f28954a6) --- source4/lib/zlib.m4 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/zlib.m4 b/source4/lib/zlib.m4 index 7b967fc8d2..9ee7b8e49e 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 + ],[ + #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) -- cgit