From d9dec6893a0c66870d08bdfbee5b0ad9fcb66674 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Mon, 23 Nov 2015 23:45:38 -0800 Subject: [PATCH] Require libav provided by FFmpeg at build-time Libav-incompatible changes were introduced to support FFmpeg and we can no longer properly support Libav. FFmpeg micro versions for libav* start at 100 (this was done to differentiate from Libav builds). We use this to bail at configure time if the system libav* libraries are not provided by FFmpeg. https://bugzilla.gnome.org/show_bug.cgi?id=758183 --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 89a3318..84cf31a 100644 --- a/configure.ac +++ b/configure.ac @@ -271,6 +271,20 @@ if test "x$with_system_libav" = "xyes"; then AC_DEFINE([LIBAV_SOURCE], ["system install"], [Describes where the Libav libraries come from.]) HAVE_LIBAV_UNINSTALLED=0 AC_MSG_NOTICE([Using system-installed libav code]) + AC_MSG_CHECKING([whether libav is provided by FFmpeg]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + ]],[[ + #if LIBAVCODEC_VERSION_MICRO >= 100 + /* FFmpeg uses 100+ as its micro version */ + #else + #error libav provider should be FFmpeg + #endif + ]])], [is_ffmpeg=yes], [is_ffmpeg=no]) + AC_MSG_RESULT([$is_ffmpeg]) + if test "$is_ffmpeg" = no; then + AC_MSG_ERROR([Uncompatible libavcodec found]) + fi else AC_MSG_NOTICE([Using local Libav snapshot]) -- 2.7.4