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