Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
configure: add better check for ffmpeg n1.2+ and libav v10+ version
  • Loading branch information
perexg committed Oct 14, 2014
1 parent c0c797d commit 419f69d
Showing 1 changed file with 62 additions and 14 deletions.
76 changes: 62 additions & 14 deletions configure
Expand Up @@ -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

Expand Down

0 comments on commit 419f69d

Please sign in to comment.