windowscodecs: Handle old libpng.so using distros (as SLE 10).
diff --git a/configure b/configure
index 5ecb68f..6d98218 100755
--- a/configure
+++ b/configure
@@ -11060,6 +11060,49 @@
 
 
 fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_set_expand_gray_1_2_4_to_8 in -lpng" >&5
+$as_echo_n "checking for png_set_expand_gray_1_2_4_to_8 in -lpng... " >&6; }
+if test "${ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpng -lm -lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char png_set_expand_gray_1_2_4_to_8 ();
+int
+main ()
+{
+return png_set_expand_gray_1_2_4_to_8 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=yes
+else
+  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&5
+$as_echo "$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&6; }
+if test "x$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" = x""yes; then :
+
+$as_echo "#define HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8 1" >>confdefs.h
+
+
+fi
+
 elif test -n "$X_CFLAGS" -a "x$with_png" != "xno"
 then
         ac_save_CPPFLAGS="$CPPFLAGS"
@@ -11132,6 +11175,47 @@
 
 
 fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_set_expand_gray_1_2_4_to_8 in -lpng" >&5
+$as_echo_n "checking for png_set_expand_gray_1_2_4_to_8 in -lpng... " >&6; }
+if test "${ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpng $X_LIBS -lm -lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char png_set_expand_gray_1_2_4_to_8 ();
+int
+main ()
+{
+return png_set_expand_gray_1_2_4_to_8 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=yes
+else
+  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&5
+$as_echo "$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&6; }
+if test "x$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" = x""yes; then :
+  $as_echo "#define HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8 1" >>confdefs.h
+
+fi
+
     fi
 fi
 if test "x$ac_cv_lib_soname_png" = "x"; then :