From: Vadim Zeitlin Date: Tue, 12 Jan 2010 15:47:16 +0000 (+0000) Subject: Check for a function existing in all libpng releases in configure. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4cdbd8f357d8c70649baa5cc6dea7afca8f7e3cf Check for a function existing in all libpng releases in configure. We tested for png_check_sig() which was deprecated and is not available in the latest libpng 1.4 any more. Just use another, not deprecated and not new, function for the test. See #11625. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index da4cf6b282..dd303cc125 100755 --- a/configure +++ b/configure @@ -27128,9 +27128,9 @@ echo "${ECHO_T}$ac_cv_header_png_h" >&6; } if test "$ac_cv_header_png_h" = "yes"; then - { echo "$as_me:$LINENO: checking for png_check_sig in -lpng" >&5 -echo $ECHO_N "checking for png_check_sig in -lpng... $ECHO_C" >&6; } -if test "${ac_cv_lib_png_png_check_sig+set}" = set; then + { echo "$as_me:$LINENO: checking for png_sig_cmp in -lpng" >&5 +echo $ECHO_N "checking for png_sig_cmp in -lpng... $ECHO_C" >&6; } +if test "${ac_cv_lib_png_png_sig_cmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27148,11 +27148,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char png_check_sig (); +char png_sig_cmp (); int main () { -return png_check_sig (); +return png_sig_cmp (); ; return 0; } @@ -27175,21 +27175,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_png_png_check_sig=yes + ac_cv_lib_png_png_sig_cmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_png_png_check_sig=no + ac_cv_lib_png_png_sig_cmp=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_check_sig" >&5 -echo "${ECHO_T}$ac_cv_lib_png_png_check_sig" >&6; } -if test $ac_cv_lib_png_png_check_sig = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_sig_cmp" >&5 +echo "${ECHO_T}$ac_cv_lib_png_png_sig_cmp" >&6; } +if test $ac_cv_lib_png_png_sig_cmp = yes; then PNG_LINK=" -lpng -lz" fi diff --git a/configure.in b/configure.in index 4c93b62d69..bec42d48ff 100644 --- a/configure.in +++ b/configure.in @@ -2519,7 +2519,7 @@ if test "$wxUSE_LIBPNG" != "no" ; then AC_CHECK_HEADER(png.h,,, [ ]) if test "$ac_cv_header_png_h" = "yes"; then - AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng -lz", , [-lz -lm]) + AC_CHECK_LIB(png, png_sig_cmp, PNG_LINK=" -lpng -lz", , [-lz -lm]) fi if test "x$PNG_LINK" = "x" ; then diff --git a/docs/changes.txt b/docs/changes.txt index 6099ceade0..e99cbdf2f3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -489,6 +489,7 @@ All (GUI): - wxRTC: corrected centring and right-justification spacing. - Added wxBORDER_THEME to XRC. - wxGraphicsContext is now enabled by default if supported by the platform. +- Fix building with using system libpng 1.4 (Volker Grabsch). GTK: