diff --git a/configure.ac b/configure.ac index aedfd43fc3..4fab590917 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 622fe71c7a..fb81b15e0d 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