Mercurial > mplayer.hg
changeset 23102:cad9ebe1516c
Merge checks for static and shared libavutil.
author | diego |
---|---|
date | Thu, 26 Apr 2007 11:37:24 +0000 |
parents | 253a6da2be20 |
children | 257e7eabe459 |
files | configure |
diffstat | 1 files changed, 26 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Thu Apr 26 11:22:22 2007 +0000 +++ b/configure Thu Apr 26 11:37:24 2007 +0000 @@ -6149,16 +6149,38 @@ echores "$_live" -echocheck "FFmpeg libavutil (static)" +echocheck "FFmpeg libavutil" if test "$_libavutil_a" = auto ; then if test -d libavutil ; then - _libavutil=yes _libavutil_a=yes + _res_comment="static" else die "MPlayer will not compile without libavutil in the source tree." fi -fi -echores "$_libavutil_a" +elif test "$_libavutil_so" = auto + _libavutil_so=no + cat > $TMPC << EOF +#include <ffmpeg/common.h> +int main(void) { ff_gcd(1,1); return 0; } +EOF + if $_pkg_config --exists libavutil ; then + _inc_libavutil=`$_pkg_config --cflags libavutil` + _ld_tmp=`$_pkg_config --libs libavutil` + cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ + && _libavutil_so=yes + elif cc_check -lavutil $_ld_lm ; then + _ld_extra="$_ld_extra -lavutil" + _libavutil_so=yes + _res_comment="using libavutil.so, but static libavutil is recommended" + fi +fi +_libavutil=no +test "$_libavutil_a" = yes || test "$_libavutil_so" = yes && _libavutil=yes +# neither static nor shared libavutil is available, but it is mandatory ... +if test "$_libavutil" = no ; then + die "You need static or shared libavutil, MPlayer will not compile without!" +fi +echores "$_libavutil" echocheck "FFmpeg libavcodec (static)" if test "$_libavcodec_a" = auto ; then @@ -6215,33 +6237,6 @@ echores "$_libpostproc_a" -if test "$_libavutil_a" != yes ; then -echocheck "FFmpeg libavutil (dynamic)" -if test "$_libavutil_so" = auto ; then - _libavutil_so=no - cat > $TMPC << EOF -#include <ffmpeg/common.h> -int main(void) { ff_gcd(1,1); return 0; } -EOF - if $_pkg_config --exists libavutil ; then - _inc_libavutil=`$_pkg_config --cflags libavutil` - _ld_tmp=`$_pkg_config --libs libavutil` - cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ - && _libavutil=yes && _libavutil_so=yes - elif cc_check -lavutil $_ld_lm ; then - _ld_extra="$_ld_extra -lavutil" - _libavutil=yes - _libavutil_so=yes - _res_comment="using libavutil.so, but static libavutil is recommended" - fi -fi -# neither static nor shared libavutil is available, but it is mandatory ... -if test "$_libavutil_so" = no ; then - die "You need static or shared libavutil, MPlayer will not compile without!" -fi -echores "$_libavutil_so" -fi #if test "$_libavutil" != yes ; then - if test "$_libavcodec_a" != yes ; then echocheck "FFmpeg libavcodec (dynamic)" if test "$_libavcodec_so" = auto ; then