[Swfdec] 2 commits - configure.ac

Benjamin Otte company at kemper.freedesktop.org
Mon Mar 19 01:14:18 PDT 2007


 configure.ac |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

New commits:
diff-tree 4b27c650286f819714b1fd9048385796037a516a (from parents)
Merge: deb389f11445d7d935e05ef44590507f0e64db84 00252e7f75acd6466c2ae7c6fc446f4741dab7a1
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Mar 19 09:14:48 2007 +0100

    Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec

diff-tree deb389f11445d7d935e05ef44590507f0e64db84 (from 154596318676ff838f8acc47d3bc62bf3967868b)
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Mar 19 09:13:52 2007 +0100

    allow --disable-ffmpeg and --disable-mad configure options (#10333, Mikel Olasagasti)

diff --git a/configure.ac b/configure.ac
index 7f41b65..6ea8b8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,10 +135,22 @@ if test "$HAVE_CAIRO" = "no"; then
   AC_MSG_ERROR([cannot find cairo, which is required for build])
 fi
 
-AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad", HAVE_MAD="no")
-AC_SUBST(MAD_LIBS)
-if test "x$HAVE_MAD" = xyes; then
-  AC_DEFINE(HAVE_MAD, 1, [Define if mad is enabled])
+AC_ARG_ENABLE(mad,
+	AS_HELP_STRING([--enable-mad],
+			[enable mad audio (default=yes)])],
+	enable_mad=$enableval,
+	enable_mad="yes")
+
+if test "$enable_mad" = "yes"; then
+	AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad", HAVE_MAD="no")
+	AC_SUBST(MAD_LIBS)
+	if test "x$HAVE_MAD" = xyes; then
+	  AC_DEFINE(HAVE_MAD, 1, [Define if mad is enabled])
+	else
+	  AC_MSG_ERROR([Couldn't find mad.])
+	fi
+else
+	AC_MSG_WARN([*** mad audio support was not enabled. ***])
 fi
 AM_CONDITIONAL(HAVE_MAD, [test "x$HAVE_MAD" = xyes])
 
@@ -146,11 +158,23 @@ dnl  I'd put a required version in here 
 dnl  to detect ffmpeg. But as it stands even pkg-config versions are weird.
 dnl  So you'll have to update your ffmpeg checkout if compilation fails.
 dnl  Or you submit a patch that detects ffmpeg reliably on the distros.
-PKG_CHECK_MODULES(FFMPEG, libavcodec, 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])
+AC_ARG_ENABLE(ffmpeg,
+	AS_HELP_STRING([--enable-ffmpeg],
+			[enable ffmpeg support (default=yes)])],
+	enable_ffmpeg=$enableval,
+	enable_ffmpeg="yes")
+
+if test "$enable_ffmpeg" = "yes"; then
+	PKG_CHECK_MODULES(FFMPEG, libavcodec, 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.])
+	fi
+else
+	AC_MSG_WARN([*** ffmpeg support was not enabled. ***])
 fi
 AM_CONDITIONAL(HAVE_FFMPEG, [test "x$HAVE_FFMPEG" = xyes])
 


More information about the Swfdec mailing list