[MPlayer-dev-eng] [PATCH]configure: Support libpng16

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Jan 5 10:31:23 CET 2016


Hi!

Attached patch intends to fix Debian issue 809955.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809955

I only did basic testing (linking and playback with png16) but since this 
seems to work if old libpng is installed (as here), I will probably apply if 
nobody objects, should be backported afaict.

Please test, Carl Eugen
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 37587)
+++ configure	(working copy)
@@ -5193,13 +5193,15 @@
   return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
 }
 EOF
-    cc_check -lpng -lz && _png=yes
+    for ld_tmp in "-lpng -lz" "-lpng16 -lz" ; do
+        cc_check $ld_tmp && _png=yes && break
+    done
   fi
 fi
 echores "$_png"
 if test "$_png" = yes ; then
   def_png='#define CONFIG_PNG 1'
-  extra_ldflags="$extra_ldflags -lpng -lz"
+  extra_ldflags="$extra_ldflags $ld_tmp"
 else
   def_png='#undef CONFIG_PNG'
 fi


More information about the MPlayer-dev-eng mailing list