# HG changeset patch # User reimar # Date 1279738145 0 # Node ID f1d69b6081488b00b1b72d1ece533ddf54fb0c95 # Parent 8d65df40de826b1b5ddda0b8840bc73f270b70d8 Add support for libavcore. diff -r 8d65df40de82 -r f1d69b608148 Makefile --- a/Makefile Wed Jul 21 18:48:13 2010 +0000 +++ b/Makefile Wed Jul 21 18:49:05 2010 +0000 @@ -716,6 +716,7 @@ COMMON_LIBS-$(LIBAVFORMAT_A) += libavformat/libavformat.a COMMON_LIBS-$(LIBAVCODEC_A) += libavcodec/libavcodec.a +COMMON_LIBS-$(LIBAVCORE_A) += libavcore/libavcore.a COMMON_LIBS-$(LIBAVUTIL_A) += libavutil/libavutil.a COMMON_LIBS-$(LIBPOSTPROC_A) += libpostproc/libpostproc.a COMMON_LIBS-$(LIBSWSCALE_A) += libswscale/libswscale.a @@ -758,6 +759,7 @@ libavcodec/sh4 \ libavcodec/sparc \ libavcodec/x86 \ + libavcore \ libavformat \ libavutil \ libavutil/arm \ @@ -805,6 +807,7 @@ ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1)) FFMPEGPARTS = libavcodec \ + libavcore \ libavformat \ libavutil \ libpostproc \ diff -r 8d65df40de82 -r f1d69b608148 configure --- a/configure Wed Jul 21 18:48:13 2010 +0000 +++ b/configure Wed Jul 21 18:49:05 2010 +0000 @@ -570,6 +570,7 @@ _libavutil_a=auto _libavutil_so=auto _libavcodec_a=auto +_libavcore_a=auto _libopencore_amrnb=auto _libopencore_amrwb=auto libopenjpeg=auto @@ -7280,6 +7281,43 @@ fi echores "$_libavutil" +echocheck "FFmpeg libavcore" +if test "$_libavcore_a" = auto ; then + if test -d libavcore ; then + _libavcore_a=yes + res_comment="static" + fi +elif test "$_libavcore_so" = auto ; then + _libavcore_so=no + cat > $TMPC << EOF +#include +int main(void) { return 0; } +EOF + if $_pkg_config --exists libavcore ; then + _inc_libavcore=$($_pkg_config --cflags libavcore) + _ld_tmp=$($_pkg_config --libs libavcore) + cc_check $_inc_libavcore $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \ + && _libavcore_so=yes + elif cc_check -lavcore $_ld_lm ; then + extra_ldflags="$extra_ldflags -lavcore" + _libavcore_so=yes + res_comment="using libavcore.so, but static libavcore is recommended" + fi +fi +_libavcore=no +def_libavcore='#undef CONFIG_LIBAVCORE' +def_libavcore_a='#undef CONFIG_LIBAVCORE_A' +def_libavcore_so='#undef CONFIG_LIBAVCORE_SO' +test "$_libavcore_a" = yes || test "$_libavcore_so" = yes && _libavcore=yes +test "$_libavcore" = yes && def_libavcore='#define CONFIG_LIBAVCORE 1' +test "$_libavcore_a" = yes && def_libavcore_a='#define CONFIG_LIBAVCORE_A 1' +test "$_libavcore_so" = yes && def_libavcore_so='#define CONFIG_LIBAVCORE_SO 1' +# neither static nor shared libavcore is available, but it is mandatory ... +if test "$_libavcore" = no ; then + die "You need static or shared libavcore, MPlayer will not compile without!" +fi +echores "$_libavcore" + echocheck "FFmpeg libavcodec" if test "$_libavcodec_a" = auto ; then _libavcodec_a=no @@ -8748,6 +8786,9 @@ LIBAVCODEC = $_libavcodec LIBAVCODEC_A = $_libavcodec_a LIBAVCODEC_SO = $_libavcodec_so +LIBAVCORE = $_libavcore +LIBAVCORE_A = $_libavcore_a +LIBAVCORE_SO = $_libavcore_so LIBAVFORMAT = $_libavformat LIBAVFORMAT_A = $_libavformat_a LIBAVFORMAT_SO = $_libavformat_so @@ -9217,6 +9258,9 @@ $def_libavcodec $def_libavcodec_a $def_libavcodec_so +$def_libavcore +$def_libavcore_a +$def_libavcore_so $def_libavformat $def_libavformat_a $def_libavformat_so