From: Stelian Pop Date: Mon, 23 May 2011 08:32:23 +0000 (+0000) Subject: Better zlib test. X-Git-Tag: release_0_4b44~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7c89ba30ee95a59c694c6542b535b4d29cce8fdd;p=dump.git Better zlib test. --- diff --git a/CHANGES b/CHANGES index 3f13a49..51de2fe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.323 2011/05/23 08:17:47 stelian Exp $ +$Id: CHANGES,v 1.324 2011/05/23 08:32:23 stelian Exp $ Changes between versions 0.4b43 and 0.4b44 (released ?????????????) @@ -26,9 +26,12 @@ Changes between versions 0.4b43 and 0.4b44 (released ?????????????) bug #3303235). Thanks to Adam Tkac for reporting the bug. -6. Fix static builds. Thanks Peter Volkov +6. Fix static builds. Thanks to Peter Volkov for the patches. +7. Fix false negatives in configure zlib test. Thanks to + Bear Giles for the patch. + Changes between versions 0.4b42 and 0.4b43 (released June 11, 2010) =================================================================== diff --git a/configure b/configure index 67a2948..1dbba1b 100755 --- a/configure +++ b/configure @@ -5107,9 +5107,9 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if test "${ac_cv_lib_z_compress2+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 +$as_echo_n "checking for zlibVersion in -lz... " >&6; } +if test "${ac_cv_lib_z_zlibVersion+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5123,27 +5123,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char compress2 (); +char zlibVersion (); int main () { -return compress2 (); +return zlibVersion (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_compress2=yes + ac_cv_lib_z_zlibVersion=yes else - ac_cv_lib_z_compress2=no + ac_cv_lib_z_zlibVersion=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 -$as_echo "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = x""yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 +$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } +if test "x$ac_cv_lib_z_zlibVersion" = x""yes; then : zlib_lib=yes else zlib_lib=no diff --git a/configure.in b/configure.in index 62ec978..2d69157 100644 --- a/configure.in +++ b/configure.in @@ -532,7 +532,7 @@ dnl dnl Check for zlib headers and libraries dnl AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no], [-]) -AC_CHECK_LIB(z, compress2, [zlib_lib=yes], [zlib_lib=no]) +AC_CHECK_LIB(z, zlibVersion, [zlib_lib=yes], [zlib_lib=no]) if test "$zlib_h" = yes -a "$zlib_lib" = yes; then if test "$STATICZ" = yes; then ZLIB="-Wl,-Bstatic -lz -Wl,-Bdynamic"