1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-15 11:25:10 +00:00

Merge static and shared libavformat checks.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23124 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-04-26 12:20:36 +00:00
parent db124c90a3
commit 4dbffcb962

49
configure vendored
View File

@ -6235,16 +6235,35 @@ _libavcodec=no
test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes
echores "$_libavcodec"
echocheck "FFmpeg libavformat (static)"
echocheck "FFmpeg libavformat"
if test "$_libavformat_a" = auto ; then
# Note: static linking is preferred to dynamic linking
_libavformat_a=no
if test -d libavformat && test -f libavformat/utils.c ; then
_libavformat=yes
_libavformat_a=yes
_res_comment="static"
fi
elif test "$_libavformat_so" = auto ; then
_libavformat_so=no
cat > $TMPC <<EOF
#include <ffmpeg/avformat.h>
#include <ffmpeg/opt.h>
int main(void) { av_alloc_format_context(); return 0; }
EOF
if $_pkg_config --exists libavformat ; then
_inc_libavformat=`$_pkg_config --cflags libavformat`
_ld_tmp=`$_pkg_config --libs libavformat`
cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
&& _libavformat_so=yes
elif cc_check $_ld_lm -lavformat ; then
_ld_extra="$_ld_extra -lavformat"
_libavformat_so=yes
_res_comment="using libavformat.so, but static libavformat is recommended"
fi
fi
echores "$_libavformat_a"
_libavformat=no
test "$_libavformat_a" = yes || test "$_libavformat_so" = yes && _libavformat=yes
echores "$_libavformat"
echocheck "FFmpeg libpostproc (static)"
if test "$_libpostproc_a" = auto ; then
@ -6257,30 +6276,6 @@ fi
echores "$_libpostproc_a"
if test "$_libavformat_a" != yes ; then
echocheck "FFmpeg libavformat (dynamic)"
if test "$_libavformat_so" = auto ; then
_libavformat_so=no
cat > $TMPC <<EOF
#include <ffmpeg/avformat.h>
#include <ffmpeg/opt.h>
int main(void) { av_alloc_format_context(); return 0; }
EOF
if $_pkg_config --exists libavformat ; then
_inc_libavformat=`$_pkg_config --cflags libavformat`
_ld_tmp=`$_pkg_config --libs libavformat`
cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
&& _libavformat=yes && _libavformat_so=yes
elif cc_check $_ld_lm -lavformat ; then
_ld_extra="$_ld_extra -lavformat"
_libavformat=yes
_libavformat_so=yes
_res_comment="using libavformat.so, but static libavformat is recommended"
fi
fi
echores "$_libavformat_so"
fi #if test "$_libavformat" != yes ; then
if test "$_libpostproc_a" != yes ; then
echocheck "FFmpeg libpostproc (dynamic)"
if test "$_libpostproc_so" = auto ; then