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
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-11-23 23:45:38 -08:00
parent 3641ca0563
commit d9dec6893a

View file

@ -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 <libavcodec/avcodec.h>
]],[[
#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])