[vlc-devel] [PATCH 4/9] configure: add avcodec check for ffmpeg/libav versions

Rémi Denis-Courmont remi at remlab.net
Sun Sep 4 16:30:17 CEST 2016


Le dimanche 4 septembre 2016, 15:34:04 ileoo at videolan.org a écrit :
> 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"
>    ],[

Err, we already have $avfork for this - much simpler.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list