configure: add better check for ffmpeg n1.2+ and libav v10+ version

This commit is contained in:
Jaroslav Kysela 2014-10-14 18:55:30 +02:00
parent c0c797d4f8
commit 419f69df53

76
configure vendored
View file

@ -307,30 +307,78 @@ else
if enabled_or_auto libav; then
has_libav=true
if $has_libav && ! check_pkg libavcodec ">=52.96.0"; then
has_libav=false
ffmpeg=$(pkg-config --modversion libavcodec | cut -d '.' -f 3)
printf "$TAB" "checking for ffmpeg libraries ..."
if test $ffmpeg -lt 100; then
ffmpeg=
echo "fail"
else
ffmpeg=yes
echo "ok"
fi
if $has_libav && ! check_pkg libavutil ">=50.43.0"; then
has_libav=false
fi
if test "$ffmpeg" == "yes"; then
if $has_libav && ! check_pkg libavformat ">=53.10.0"; then
has_libav=false
fi
#
# check for version n1.2+
#
if $has_libav && ! check_pkg libavcodec ">=55.18.102"; then
has_libav=false
fi
if $has_libav && ! check_pkg libswscale ">=0.13.0"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavutil ">=52.38.100"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavformat ">=55.12.100"; then
has_libav=false
fi
if $has_libav && ! check_pkg libswscale ">=2.3.100"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavresample ">=1.1.0"; then
has_libav=false
fi
else
#
# check for version v10+
#
if $has_libav && ! check_pkg libavcodec ">=55.34.1"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavutil ">=53.3.0"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavformat ">=55.12.0"; then
has_libav=false
fi
if $has_libav && ! check_pkg libswscale ">=2.1.2"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavresample ">=1.1.0"; then
has_libav=false
fi
if $has_libav && ! check_pkg libavresample ">=1.1.0"; then
has_libav=false
fi
if $has_libav; then
enable libav
elif enabled libav; then
die "libav development support not found (use --disable-libav)"
die "libav development support not found
(use --disable-libav or --enable-libffmpeg_static)
((supported ffmpeg libs n1.2+))
((supported libav libs v10+))"
fi
fi