If neither --enable-ffmpeg nor --disable-ffmpeg was given, try to find ffmpeg. If it wasn't found, print the warning, but don't fail. If --enable-ffmpeg was given, fail if ffmpeg is not found. If --disable-ffmpeg was given, don't print the warning, as the user already knows that ffmpeg won't be enabled. It's important that ffmpeg is not viewed as a hard requirement, as it's absent in most distros due to patent problems. Signed-off-by: Pavel Roskin <proski at gnu.org> --- configure.ac | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 97d474b..918de8f 100644 --- a/configure.ac +++ b/configure.ac @@ -212,20 +212,20 @@ dnl Or you submit a patch that detects ffmpeg reliably on the distros. AC_ARG_ENABLE(ffmpeg, AS_HELP_STRING([--enable-ffmpeg], [enable ffmpeg support (default=yes)])], - enable_ffmpeg=$enableval, - enable_ffmpeg="yes") + enable_ffmpeg=$enableval) -if test "$enable_ffmpeg" = "yes"; then +if test "$enable_ffmpeg" != "no"; then PKG_CHECK_MODULES(FFMPEG, libavcodec libswscale, HAVE_FFMPEG=yes, HAVE_FFMPEG=no) AC_SUBST(FFMPEG_CFLAGS) AC_SUBST(FFMPEG_LIBS) if test "x$HAVE_FFMPEG" = xyes; then AC_DEFINE(HAVE_FFMPEG, 1, [Define if ffmpeg is enabled]) else - AC_MSG_ERROR([Couldn't find ffmpeg. You might need to install the libavcodec-dev and libswscale-dev packages.]) + AC_MSG_WARN([Couldn't find ffmpeg. You might need to install the libavcodec-dev and libswscale-dev packages.]) + if test "$enable_ffmpeg" = "yes"; then + AC_MSG_ERROR([Cannot enable ffmpeg support, aborting.]) + fi fi -else - AC_MSG_WARN([*** ffmpeg support was not enabled. ***]) fi AM_CONDITIONAL(HAVE_FFMPEG, [test "x$HAVE_FFMPEG" = xyes]) AC_ARG_ENABLE(gstreamer,
Hi, On 10/25/07, Pavel Roskin <proski at gnu.org> wrote:> If neither --enable-ffmpeg nor --disable-ffmpeg was given, try to find > ffmpeg. If it wasn't found, print the warning, but don't fail. >I've had had some discussions about automagic dependencies back in the days with Mikel, and came to the conclusion that automagic is not a good thing to do. A part of that (I think the non-relevant part) is in bug 10333, I'll try to remember the important part: The problem is that when you forget to install a dependency that you would want to have, you will not notice (configure output is way too noisy) unless configure aborts. This is why I decided to provide default settings and enforce them unless they were overwritten via configure. To be more exact, configure uses the suggested settings for distributors while autogen.sh uses the suggested settings for developers or people running through git. So that's why I don't think that we should use automagic when detecting audio backends. I'll also disable it for audio, when I switch over to something more portable than alsa, like pulse. It's set to automagic currently only to not annoy non-linux users.> If --enable-ffmpeg was given, fail if ffmpeg is not found. If > --disable-ffmpeg was given, don't print the warning, as the user already > knows that ffmpeg won't be enabled. >That probably makes sense.> It's important that ffmpeg is not viewed as a hard requirement, as it's > absent in most distros due to patent problems. >Yeah, we should disable mad and ffmpeg by default. They provide advantages to developers when debugging (like not spawning multiple threads), but users shouldn't have to care. Currently I would not want to do that, because mad and ffmpeg work better than GStreamer. This might change in the near future though. Still, GStreamer would definitely not be better technically, as it'd pretty much just be a layer between mad and ffmpeg. A thing I'm wondering about is who views ffmpeg as a hard requirement by looking at our configure.ac. And we've been very careful to mark them as optional. The only hard dependencies of swfdec are cairo and glib after all. Could you elaborate on that point? Cheers, Benjamin
Possibly Parallel Threads
- 2 commits - configure.ac
- 9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
- ffmpeg and zoneminder install problems
- configure.ac
- Error when compiling FFmpeg with speex-git.