]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: add better check for ffmpeg n1.2+ and libav v10+ version
authorJaroslav Kysela <perex@perex.cz>
Tue, 14 Oct 2014 16:55:30 +0000 (18:55 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 14 Oct 2014 16:55:30 +0000 (18:55 +0200)
configure

index 405ad6d0c5e24fee4e2d5a0032c37fed505dc02b..f176724fa9f6f2a7557d46e0b2096481b53095e2 100755 (executable)
--- a/configure
+++ b/configure
@@ -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