Commit b706c481 authored by Damien Lespiau's avatar Damien Lespiau Committed by Sebastian Dröge

Fix cross compilation and add support for compilation with mingw32.

Original commit message from CVS:
Patch by: Damien Lespiau <damien dot lespiau at gmail dot com>
* configure.ac:
* ext/ffmpeg/Makefile.am:
Fix cross compilation and add support for compilation with mingw32.
Fixes bug #542216.
parent 24bb88b8
2008-10-08 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Damien Lespiau <damien dot lespiau at gmail dot com>
* configure.ac:
* ext/ffmpeg/Makefile.am:
Fix cross compilation and add support for compilation with mingw32.
Fixes bug #542216.
2008-09-06 Stefan Kost <ensonic@users.sf.net>
* configure.ac:
......
common @ 46eefd2f
Subproject commit 1ff63d8f92c36bf207434436f4ce75f2a4ea11a4
Subproject commit 46eefd2f8474ee748864c59635be87b5a29317d1
......@@ -281,8 +281,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_ARG_WITH(ffmpeg-extra-configure,
AC_HELP_STRING([--with-ffmpeg-extra-configure="xxx"],
[extra configure options for internal ffmpeg ./configure script]),,
with_ffmpeg_extra_configure=no)
# Enable shared and static so that we get .a files, but with PIC code.
ac_configure_args="$ac_configure_args --disable-vhook --disable-ffserver --disable-ffplay --enable-postproc --enable-gpl --enable-static --enable-shared --disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices --disable-network"
# if we are cross-compiling, tell ffmpeg so
if test "x$cross_compiling" = xyes; then
ac_configure_args="$ac_configure_args --enable-cross-compile \
--target-os=$host_os --arch=$host_cpu --cross-prefix=$host_alias-"
fi
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
......@@ -291,9 +304,20 @@ else
darwin*)
ac_configure_args="$ac_configure_args --disable-mmx --disable-altivec"
;;
mingw32*)
ac_configure_args="$ac_configure_args --enable-memalign-hack"
WIN32_LIBS="-lws2_32"
;;
*)
WIN32_LIBS=
;;
esac
# append extra configure options to ac_configure_args if needed
if test "x$with_ffmpeg_extra_configure" != no; then
ac_configure_args="$ac_configure_args $with_ffmpeg_extra_configure"
fi
AC_SUBST(FFMPEG_CO_DIR)
AC_SUBST(FFMPEG_SVN)
AC_SUBST(FFMPEG_REVISION)
......@@ -306,6 +330,7 @@ AC_SUBST(FFMPEG_LIBS)
AC_SUBST(FFMPEG_SUBDIRS)
AC_SUBST(POSTPROC_CFLAGS)
AC_SUBST(POSTPROC_LIBS)
AC_SUBST(WIN32_LIBS)
if test x$HAVE_FFMPEG_UNINSTALLED = x1; then
AC_DEFINE(HAVE_FFMPEG_UNINSTALLED, [], [Defined if building against uninstalled FFmpeg source])
......
......@@ -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) -lz -lbz2
libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(LIBM) $(WIN32_LIBS) -lz -lbz2
libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
if HAVE_FFMPEG_UNINSTALLED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment