blob: 230c70732966f7bd32b3141ca536f42ed571abe9 [file] [log] [blame] [edit]
diff -ur -EbwB libwmf-0.2.8.4/configure.ac libwmf-0.2.8.4/configure.ac
--- libwmf-0.2.8.4/configure.ac 2005-07-27 22:48:39.000000000 +0200
+++ libwmf-0.2.8.4/configure.ac 2010-02-09 17:09:57.000000000 +0100
@@ -519,6 +519,20 @@
dnl "png.h" includes "zlib.h"
CPPFLAGS="$CPPFLAGS $WMF_Z_CFLAGS"
+for l in libpng libpng14 libpng12; do
+ AC_MSG_CHECKING(for $l)
+ if `$PKG_CONFIG --exists $l` ; then
+ AC_MSG_RESULT(yes)
+ PNG='png'
+ WMF_PNG_CFLAGS=`$PKG_CONFIG --cflags $l`
+ WMF_PNG_LDFLAGS=`$PKG_CONFIG --libs $l`
+ break
+ else
+ AC_MSG_RESULT(no)
+ fi
+done
+if test x$PNG != xpng; then
+ AC_MSG_RESULT(no)
AC_CHECK_HEADER(png.h,[
AC_CHECK_LIB(png,png_write_image,[
if [ test "x$PNG_DIR" != "x" ]; then
@@ -531,6 +545,7 @@
],-lz -lm)
],[ AC_MSG_ERROR(* * * unable to find "png.h" which is required by libwmf * * *)
])
+fi
AC_DEFINE(HAVE_LIBPNG,1,[define if you have libpng])
GD_DEFS="$GD_DEFS -DHAVE_LIBPNG"
diff -ur -EbwB libwmf-0.2.8.4/src/extra/gd/gd_png.c libwmf-0.2.8.4/src/extra/gd/gd_png.c
--- libwmf-0.2.8.4/src/extra/gd/gd_png.c 2005-07-27 22:35:06.000000000 +0200
+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2010-02-09 17:21:40.000000000 +0100
@@ -136,7 +136,7 @@
/* first do a quick check that the file really is a PNG image; could
* have used slightly more general png_sig_cmp() function instead */
gdGetBuf (sig, 8, infile);
- if (!png_check_sig (sig, 8))
+ if (png_sig_cmp (sig, 0, 8))
return NULL; /* bad signature */
#ifndef PNG_SETJMP_NOT_SUPPORTED