mplayer: enable apng and tdsc only if zlib is available
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>
Wed, 14 Oct 2015 14:15:24 +0000 (15:15 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 15 Oct 2015 11:28:11 +0000 (13:28 +0200)
apng and tdsc are enabled by default, but they need zlib, otherwise the
compilation will fail with an error like this one:

libavcodec/pngdec.c:35:18: fatal error: zlib.h: No such file or
directory
 #include <zlib.h>
                  ^
compilation terminated.

So add an autodep on BR2_PACKAGE_ZLIB to enable or disable support for
apng and tdsc accordingly.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mplayer/mplayer.mk

index d896b350c1b9019262a826fe54ce7ea52ab0b250..2f588643d55fd2dc56668a37cbefd72527982a78 100644 (file)
@@ -27,6 +27,19 @@ else
 MPLAYER_CONF_OPTS += --disable-big-endian
 endif
 
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+MPLAYER_DEPENDENCIES += zlib
+MPLAYER_CONF_OPTS += \
+       --enable-decoder=apng \
+       --enable-encoder=apng \
+       --enable-decoder=tdsc
+else
+MPLAYER_CONF_OPTS += \
+       --disable-decoder=apng \
+       --disable-encoder=apng \
+       --disable-decoder=tdsc
+endif
+
 ifeq ($(BR2_PACKAGE_SDL),y)
 MPLAYER_CONF_OPTS += \
        --enable-sdl \