1 AC_DEFUN([MOONLIGHT_CHECK_FFMPEG],
3 AC_ARG_WITH(ffmpeg, AC_HELP_STRING([--with-ffmpeg=yes|no],
4 [If you want to enable support for ffmpeg]),
7 if test x$with_ffmpeg = xyes; then
8 if pkg-config --exists libavutil libavcodec; then
9 AC_DEFINE([INCLUDE_FFMPEG], [1], [Include support for ffmpeg])
10 PKG_CHECK_MODULES(FFMPEG, [libavutil libavcodec])
12 CFLAGS="$FFMPEG_CFLAGS $CFLAGS"
13 AC_CHECK_HEADERS([libavcodec/avcodec.h])
17 ffmpeg_reason="(reason: could not find libavutil and libavcodec packages)"
21 AM_CONDITIONAL(INCLUDE_FFMPEG, test x$with_ffmpeg = xyes)
23 if test x$with_ffmpeg = no; then
24 media_warning="WARNING: No media decoding backends configured. AUDIO AND VIDEO WON'T WORK"