diff --git a/ChangeLog b/ChangeLog index 145feb1245..ee06466c09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-03-17 Andy Wingo + + * ext/ffmpeg/Makefile.am (libgstffmpeg_la_LIBADD): Re-add -lz + explicitly here. + + * configure.ac: Remove -lz from FFMPEG_LIBS, because FFMPEG_LIBS + are used in the Makefile.am as a DEPENDENCIES target, and -lz is + not a target. Also in a blahriffic turn of events, MMX and Altivec + code on MacOS 10.5 produces non-PIC code. Turn them off on macos. + 2008-03-11 Wim Taymans * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_sink_event): diff --git a/configure.ac b/configure.ac index e92499bbbb..8a7c26622f 100644 --- a/configure.ac +++ b/configure.ac @@ -259,8 +259,7 @@ else dnl libgstffmpeg.la: libs to statically link to FFMPEG_LIBS="\$(top_builddir)/gst-libs/ext/ffmpeg/libavformat/libavformat.a \ \$(top_builddir)/gst-libs/ext/ffmpeg/libavcodec/libavcodec.a \ - \$(top_builddir)/gst-libs/ext/ffmpeg/libavutil/libavutil.a \ - -lz" + \$(top_builddir)/gst-libs/ext/ffmpeg/libavutil/libavutil.a" dnl POSTPROC_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/ffmpeg/libpostproc \ -I \$(top_srcdir)/gst-libs/ext/ffmpeg/libavutil \ @@ -274,7 +273,21 @@ else FFMPEG_SUBDIRS=gst-libs AC_DEFINE(HAVE_AVI_H) AC_DEFINE([FFMPEG_SOURCE], ["local snapshot"], [Describes where the FFmpeg libraries come from.]) - ac_configure_args="$ac_configure_args --disable-vhook --disable-ffserver --disable-ffplay --enable-pp --enable-gpl --enable-static --disable-shared --disable-encoder=flac --disable-decoder=cavs --extra-cflags=-fPIC" + ac_configure_args="$ac_configure_args --disable-vhook --disable-ffserver --disable-ffplay --enable-pp --enable-gpl --enable-static --disable-encoder=flac --disable-decoder=cavs --extra-cflags=-fPIC" + case $host_os in + # Unfortunately, in Mac OS 10.5 the current rev of ffmpeg builds + # some non-PIC code into the .a file. See + # http://trac.macosforge.org/projects/macports/ticket/13725 for more + # info. + darwin*) + ac_configure_args="$ac_configure_args --disable-mmx --disable-altivec" + ;; + *) + # --disable-shared on macos turns on -mdynamic-no-pic, which we + # can't have + ac_configure_args="$ac_configure_args --disable-shared" + ;; + esac AC_SUBST(FFMPEG_CO_DIR) AC_SUBST(FFMPEG_SVN) AC_SUBST(FFMPEG_REVISION) diff --git a/ext/ffmpeg/Makefile.am b/ext/ffmpeg/Makefile.am index 5ee00cf88b..cbf98d44e7 100644 --- a/ext/ffmpeg/Makefile.am +++ b/ext/ffmpeg/Makefile.am @@ -15,7 +15,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) $(LIBM) +libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(LIBM) -lz libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS) if HAVE_FFMPEG_UNINSTALLED