[gst-cvs] gst-ffmpeg: Make bz2 requirement optional. Fixes #564867

Edward Hervey bilboed at kemper.freedesktop.org
Thu Mar 5 00:10:59 PST 2009


Module: gst-ffmpeg
Branch: master
Commit: ac82da060acb9f6d42deba15191efbd692662a75
URL:    http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=ac82da060acb9f6d42deba15191efbd692662a75

Author: Damien Lespiau <damien.lespiau at gmail.com>
Date:   Thu Mar  5 09:10:37 2009 +0100

Make bz2 requirement optional. Fixes #564867

---

 configure.ac           |    6 +++++-
 ext/ffmpeg/Makefile.am |    8 +++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index aedfd43..4fab590 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,7 +200,11 @@ esac
 AC_SUBST(DARWIN_LDFLAGS)
 
 dnl *** Check for bz2
-AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzlibVersion, , bzlib.h,, AC_ERROR([libbz2 is required]))
+AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzlibVersion, , bzlib.h, have_bz2=yes, have_bz2=no)
+AM_CONDITIONAL(HAVE_BZ2, test "x$have_bz2" = "xyes")
+if test "x$have_bz2" = "xno"; then
+  AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks])
+fi
 
 dnl *** configure external libs ***
 
diff --git a/ext/ffmpeg/Makefile.am b/ext/ffmpeg/Makefile.am
index 622fe71..fb81b15 100644
--- a/ext/ffmpeg/Makefile.am
+++ b/ext/ffmpeg/Makefile.am
@@ -1,5 +1,11 @@
 plugin_LTLIBRARIES = libgstffmpeg.la
 
+if HAVE_BZ2
+    BZ2_LIBS = -lbz2
+else
+    BZ2_LIBS =
+endif
+
 libgstffmpeg_la_SOURCES = gstffmpeg.c	\
 			  gstffmpegprotocol.c	\
 			  gstffmpegcodecmap.c	\
@@ -15,7 +21,7 @@ libgstffmpeg_la_SOURCES = gstffmpeg.c	\
 
 libgstffmpeg_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
 	$(FFMPEG_CFLAGS)
-libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LIBM) $(WIN32_LIBS) -lz -lbz2
+libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS)
 libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
 libgstffmpeg_la_LIBTOOLFLAGS = --tag=disable-static
 





More information about the Gstreamer-commits mailing list