Make bz2 requirement optional. Fixes #564867

This commit is contained in:
Damien Lespiau 2009-03-05 09:10:37 +01:00 committed by Edward Hervey
parent c7458545f3
commit ac82da060a
2 changed files with 12 additions and 2 deletions

View file

@ -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 ***

View file

@ -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