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
This commit is contained in:
Vadim Zeitlin
2010-01-12 15:47:16 +00:00
parent a7bb4dcb49
commit 4cdbd8f357
3 changed files with 12 additions and 11 deletions

20
configure vendored
View File

@@ -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

View File

@@ -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

View File

@@ -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: