configure.ac: fail when ffmpeg is enabled, but not found

This commit is contained in:
Max Kellermann 2009-07-14 14:23:49 +02:00
parent 58dd6eee5d
commit 0c1c753e23

View File

@ -397,9 +397,9 @@ AC_ARG_ENABLE(audiofile,
enable_audiofile=yes) enable_audiofile=yes)
AC_ARG_ENABLE(ffmpeg, AC_ARG_ENABLE(ffmpeg,
AS_HELP_STRING([--disable-ffmpeg], AS_HELP_STRING([--enable-ffmpeg],
[disable FFMPEG support (default: enable)]),, [enable FFMPEG support]),,
enable_ffmpeg=yes) enable_ffmpeg=auto)
AC_ARG_ENABLE(flac, AC_ARG_ENABLE(flac,
AS_HELP_STRING([--disable-flac], AS_HELP_STRING([--disable-flac],
@ -914,10 +914,8 @@ fi
AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes) AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
if test x$enable_ffmpeg = xyes; then MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil],
PKG_CHECK_MODULES(FFMPEG, [libavformat libavcodec libavutil],, [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
enable_ffmpeg=no)
fi
if test x$enable_ffmpeg = xyes; then if test x$enable_ffmpeg = xyes; then
old_LIBS=$LIBS old_LIBS=$LIBS