--- configure.orig 2008-05-13 03:22:43.000000000 +1000 +++ configure 2013-12-31 21:36:49.000000000 +1100 @@ -5818,9 +5818,9 @@ if test "x$support_png" = "xyes"; 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 @@ -5839,11 +5839,11 @@ #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; } @@ -5866,21 +5866,21 @@ 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 cat >>confdefs.h <<_ACEOF #define HAVE_LIBPNG 1 _ACEOF --- src/mpng.c.orig 2008-02-18 09:04:50.000000000 +1100 +++ src/mpng.c 2013-12-31 21:47:40.000000000 +1100 @@ -83,7 +83,7 @@ png_uint_32 png_row_bytes; display_depth = XDefaultDepth(display,XDefaultScreen(display)); fread(sig, 1, 8, ifile); - if (!png_check_sig(sig, 8)){ + if (png_sig_cmp(sig, 0, 8)){ fclose(ifile); return -1; } @@ -113,7 +113,7 @@ png_uint_32 png_row_bytes; if (png_depth < 8){ if (png_color_type == PNG_COLOR_TYPE_GRAY ){ - png_set_gray_1_2_4_to_8(png_ptr); + png_set_expand_gray_1_2_4_to_8(png_ptr); png_row_bytes = png_width; }else{ png_set_expand(png_ptr);