diff --git a/configure.in b/configure.in index c88cb088e..8d5bc666f 100644 --- a/configure.in +++ b/configure.in @@ -225,6 +225,49 @@ if test "$with_ffmpeg" != "no"; then fi fi + +if test "$with_ffmpeg" = "yes"; then + +AC_ARG_ENABLE(broken-mp3, [--enable-broken-mp3 Enable the use of FFMPEG w/out LAME compiled in.]) + AC_MSG_CHECKING([whether ffmpeg has LAME compiled in]) + aegisub_save_LDFLAGS="$LDFLAGS" + AC_LANG(C) + LDFLAGS="$LDFLAGS $AVCODEC_LDFLAGS" + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([#include ], + [ + avcodec_register_all(); + if (avcodec_find_encoder_by_name("libmp3lame")) + return 1; + ]) + ], + ffmpeg_mp3_broken="yes", + ffmpeg_mp3_broken="no") + + LDFLAGS="$aegisub_save_LDFLAGS" + AC_LANG(C++) +fi + +if test $ffmpeg_mp3_broken = "yes"; then + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([ +*********************************************************************** +* Your installation of FFMPEG does not have LAME support compiled in. +* This will result in _broken_ mp3 decoding, either recompile FFMPEG +* with LAME support, or supply --with-broken-mp3 (With this you will have +* to demux the audio, convert to wav and load the audio/wav seperately.) +* * LAME can be found at: http://lame.sourceforge.net/index.php +*********************************************************************** + ]) +echo "enable_broken_mp3: $enable_broken_mp3" + if test "$enable_broken_mp3" != "yes"; then + AC_MSG_FAILURE([Please read.]) + fi +else + AC_MSG_RESULT([yes]) +fi + + AC_SUBST(SWSCALE_LDFLAGS) AC_SUBST(AVCODEC_LDFLAGS) AC_SUBST(AVFORMAT_LDFLAGS)