changeset 1573:1d4de024f7cb

(cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
author corvid <corvid@lavabit.com>
date Fri, 19 Feb 2010 21:31:12 +0000
parents 2307d3f8e41b
children bb02b0e5110b
files ChangeLog configure.in
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 17 23:10:05 2010 +0000
+++ b/ChangeLog	Fri Feb 19 21:31:12 2010 +0000
@@ -6,7 +6,7 @@
 +- Configurable User-Agent HTTP header.
    Patch: Alexander Voigt, corvid
 +- Include Accept header in HTTP queries.
- - Don't use obsolete png_check_sig().
+ - Work with libpng-1.4.
  - Handle zero-width space.
  - Fix segfault closing window from WM.
    Patches: corvid
--- a/configure.in	Wed Feb 17 23:10:05 2010 +0000
+++ b/configure.in	Fri Feb 19 21:31:12 2010 +0000
@@ -213,7 +213,10 @@
 
 dnl Check if the user hasn't set the variable $PNG_CONFIG
   if test -z "$PNG_CONFIG"; then
-    PNG_CONFIG=`which libpng12-config`
+    PNG_CONFIG=`which libpng14-config`
+    if test -z "$PNG_CONFIG"; then
+      PNG_CONFIG=`which libpng12-config`
+    fi
     if test -z "$PNG_CONFIG"; then
       PNG_CONFIG=`which libpng-config`
     fi
@@ -236,6 +239,7 @@
     AC_MSG_CHECKING([for libpng version])
     png_version=`$PNG_CONFIG --version`
     case $png_version in
+      1.4.*) AC_MSG_RESULT([$png_version (newer version)]) ;;
       1.2.*) AC_MSG_RESULT([$png_version (newer version)]) ;;
       1.0.*) AC_MSG_RESULT([$png_version (older version)]) ;;
           *) AC_MSG_RESULT([ERROR]) ;;
@@ -253,7 +257,7 @@
 
     if test "x$png_ok" = "xyes"; then
       old_libs="$LIBS"
-      AC_CHECK_LIB(png, png_check_sig, png_ok=yes, png_ok=no, $LIBZ_LIBS -lm)
+      AC_CHECK_LIB(png, png_sig_cmp, png_ok=yes, png_ok=no, $LIBZ_LIBS -lm)
       LIBS="$old_libs"
 
       if test "x$png_ok" = "xyes"; then