[vlc-devel] [PATCH 4/9] configure: add avcodec check for ffmpeg/libav versions
ileoo at videolan.org
ileoo at videolan.org
Sun Sep 4 14:34:04 CEST 2016
From: Ilkka Ollakka <ileoo at videolan.org>
---
configure.ac | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/configure.ac b/configure.ac
index 178b724..f92bbc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2320,6 +2320,20 @@ AS_IF([test "${enable_avcodec}" != "no"], [
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h)
+ dnl We need >=57.16.0 from libav or >=57.37.100 from ffmpeg
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <libavcodec/avcodec.h>
+ #define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \
+ ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
+ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) )
+ #if !LIBAVCODEC_VERSION_CHECK( 57, 16, 0, 37, 100)
+ #error libav or ffmpeg not new enough
+ #endif
+ ]],
+ [[
+ ]])],[have_avcodec="yes"],[
+ AC_MSG_ERROR([Not new enough libav/ffmpeg. Pass --disable-avcodec to ignore this error.])
+ ])
VLC_RESTORE_FLAGS
have_avcodec="yes"
],[
--
2.6.6
More information about the vlc-devel
mailing list