2004-02-13 13:00:18 +00:00
|
|
|
dnl autoconf configuration file for gst-ffmpeg
|
2003-12-09 15:59:48 +00:00
|
|
|
AC_INIT
|
|
|
|
AC_CANONICAL_TARGET([])
|
|
|
|
|
|
|
|
dnl We disable static building for development, for time savings
|
|
|
|
dnl this goes before AS_LIBTOOL to appease autoconf
|
|
|
|
dnl *NOTE*: dnl this line before release, so release does static too
|
|
|
|
AM_DISABLE_STATIC
|
|
|
|
|
|
|
|
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
dnl when going to/from release please set the nano (fourth number) right !
|
|
|
|
dnl releases only do Wall, cvs and prerelease does Werror too
|
2004-03-03 01:54:18 +00:00
|
|
|
AS_VERSION(gst-ffmpeg, GST_FFMPEG_VERSION, 0, 7, 1, 1, GST_CVS="no", GST_CVS="yes")
|
2003-12-09 17:29:20 +00:00
|
|
|
dnl we cheat here so we don't have to change the actual configure code bit
|
|
|
|
GST_PLUGINS_VERSION_NANO=$GST_FFMPEG_VERSION_NANO
|
2003-12-09 15:59:48 +00:00
|
|
|
|
2004-02-26 18:21:44 +00:00
|
|
|
dnl required GStreamer version
|
|
|
|
GST_REQ=0.7.5
|
|
|
|
|
2003-12-09 15:59:48 +00:00
|
|
|
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
|
|
|
|
|
|
|
|
dnl our libraries and install dirs use major.minor as a version
|
2004-03-10 18:52:29 +00:00
|
|
|
#GST_MAJORMINOR=$GST_FFMPEG_VERSION_MAJOR.$GST_FFMPEG_VERSION_MINOR
|
|
|
|
dnl hack while GST_MAJORMINOR doesn't match the release
|
|
|
|
GST_MAJORMINOR=0.8
|
2003-12-09 15:59:48 +00:00
|
|
|
AC_SUBST(GST_MAJORMINOR)
|
|
|
|
|
|
|
|
dnl CURRENT, REVISION, AGE
|
|
|
|
dnl - library source changed -> increment REVISION
|
|
|
|
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
|
|
|
|
dnl - interfaces added -> increment AGE
|
|
|
|
dnl - interfaces removed -> AGE = 0
|
|
|
|
AS_LIBTOOL(GST_FFMPEG, 1, 0, 0)
|
2004-02-13 13:00:18 +00:00
|
|
|
AM_PROG_LIBTOOL()
|
2003-12-09 15:59:48 +00:00
|
|
|
|
|
|
|
AC_CONFIG_SRCDIR(configure.ac)
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl Add parameters for aclocal
|
|
|
|
dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
|
|
|
|
ACLOCAL_FLAGS="-I m4 -I common/m4"
|
|
|
|
AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_STDC
|
|
|
|
AS="${CC}"
|
|
|
|
|
|
|
|
dnl decide on error flags
|
|
|
|
AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
|
|
|
|
|
|
|
|
if test "x$GST_WALL" = "xyes"; then
|
|
|
|
GST_ERROR="$GST_ERROR -Wall"
|
|
|
|
|
|
|
|
if test "x$GST_CVS" = "xyes"; then
|
|
|
|
AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
|
|
|
|
GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_HEADER_STDC([])
|
|
|
|
|
|
|
|
|
|
|
|
dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
|
2004-02-26 18:21:44 +00:00
|
|
|
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
|
2003-12-09 15:59:48 +00:00
|
|
|
HAVE_GST="yes", HAVE_GST="no")
|
|
|
|
|
|
|
|
if test "x$HAVE_GST" = "xno"; then
|
|
|
|
AC_MSG_ERROR(no GStreamer found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ============================= gst plug-ins ================================
|
|
|
|
|
|
|
|
plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
|
|
|
|
AC_SUBST(plugindir)
|
|
|
|
|
|
|
|
GST_PLUGIN_LDFLAGS='-module -avoid-version'
|
|
|
|
AC_SUBST(GST_PLUGIN_LDFLAGS)
|
|
|
|
|
|
|
|
dnl *** FFMPEG ***
|
|
|
|
translit(dnm, m, l) AM_CONDITIONAL(USE_FFMPEG, true)
|
|
|
|
GST_CHECK_FEATURE(FFMPEG, [ffmpeg plug-ins], ffmpeg, [
|
|
|
|
# only slurp in the case where we are in CVS mode;
|
|
|
|
# prerelease and release should get it disted
|
|
|
|
if test "x$GST_PLUGINS_VERSION_NANO" = x1; then
|
|
|
|
AC_MSG_NOTICE(slurping FFmpeg CVS source)
|
2004-03-03 01:54:18 +00:00
|
|
|
dnl until someone fixes this... I guess this should be in ./autogen.sh
|
2004-03-09 06:15:35 +00:00
|
|
|
AS_SLURP_FFMPEG(gst-libs/ext/ffmpeg, 2004-03-09 06:00 GMT,
|
2004-03-03 01:54:18 +00:00
|
|
|
if ! test -f gst-libs/ext/ffmpeg/ffmpeg/configure.ac; then
|
|
|
|
AC_MSG_NOTICE(setting up ffmpeg build system and applying patches)
|
|
|
|
CURDIR=`pwd`
|
|
|
|
cd gst-libs/ext/ffmpeg
|
2004-03-09 06:15:35 +00:00
|
|
|
for PATCH in matroska autotools disablemmx disableinstalllibs functions; do
|
|
|
|
patch -p0 -N -r rejects < patch/${PATCH}.diff > /dev/null || true
|
2004-03-03 01:54:18 +00:00
|
|
|
done
|
|
|
|
cd ffmpeg
|
|
|
|
chmod a+x ./autogen.sh
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
cd $CURDIR
|
|
|
|
fi
|
2004-03-04 13:21:53 +00:00
|
|
|
HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
|
2003-12-09 15:59:48 +00:00
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(FFmpeg CVS code should be included already)
|
|
|
|
HAVE_FFMPEG=yes
|
|
|
|
fi
|
|
|
|
# we only bother with uninstalled (included) ffmpeg for now
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
|
|
|
|
[defined if we use uninstalled ffmpeg])
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Determine CPU
|
2004-02-13 13:00:18 +00:00
|
|
|
GST_ARCH()
|
2003-12-09 15:59:48 +00:00
|
|
|
|
|
|
|
dnl ###########################
|
|
|
|
dnl # Configure external libs #
|
|
|
|
dnl ###########################
|
HACKING: Add some basic documentation on how our wrapping works.
Original commit message from CVS:
* HACKING:
Add some basic documentation on how our wrapping works.
* TODO:
Add a list of things that could be worked on or that need doing.
* configure.ac:
Update snapshot.
* ext/ffmpeg/Makefile.am:
Changne .la links. See below (autotools patch).
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable demuxers. See below (gstffmpegdemux.c).
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps):
Realmedia caused a crash - fix that.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_averror),
(gst_ffmpegdemux_base_init), (gst_ffmpegdemux_init),
(gst_ffmpegdemux_close), (gst_ffmpegdemux_dispose),
(gst_ffmpegdemux_stream_from_pad),
(gst_ffmpegdemux_src_event_mask), (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list),
(gst_ffmpegdemux_src_query_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_open), (gst_ffmpegdemux_loop),
(gst_ffmpegdemux_change_state), (gst_ffmpegdemux_register):
Right. OK, so I fixed up the demuxing and have it basically-working,
and the best way to get some more people to test it is to actually
enable it. I'm not sure if we want this for 0.8.0, but we can at
least give it a try. I've tested avi, matroska and mpeg, all appear
to work. The cool thing is that this gives us instant support for
several exotic formats that we'd never care about ourselves. Again,
this needs more testing for it to still be enabled in 0.8.0, but I
want to give it a try...
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
Add some fixups that I use locally. Make it work in the case of
MPEG encoding, but the muxer is still not in shape to be enabled.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_read), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Some small fixups that crept into it while it was disabled for the
last few years. Basically works.
* gst-libs/ext/ffmpeg/Makefile.am:
Instead of having our local-autotoolized version, I patch the ffmpeg
source to be fully autotoolized. That means a simple SUBDIRS here
is now enough.
* gst-libs/ext/ffmpeg/Tag:
Version update.
* gst-libs/ext/ffmpeg/patch/autotools.diff:
Autotoolize ffmpeg. Needs to be sent to ffmpeg-devel@...
* gst-libs/ext/ffmpeg/patch/disableinstalllibs.diff:
Don't install their libs.
* gst-libs/ext/ffmpeg/patch/disablemmx.diff:
Don't use MMX. It cannot ocmpile using PIC.
* gst-libs/ext/ffmpeg/patch/disabletools.diff:
Don't compile/install their tools, we don't use them.
* gst-libs/ext/ffmpeg/patch/functions.diff:
Prevent symbol conflicts.
* gst-libs/ext/ffmpeg/patch/matroska.diff:
Add a matroska demuxer. Needs to be sent to ffmpeg-devel@...
2004-03-01 04:59:17 +00:00
|
|
|
if test "x$HAVE_FFMPEG" = "xyes"; then
|
2004-03-09 06:15:35 +00:00
|
|
|
ac_configure_args="$ac_configure_args --disable-v4l --disable-audio-oss --disable-dv1394 --disable-vhook --disable-ffmpeg --disable-ffplay --disable-ffserver"
|
2003-12-09 15:59:48 +00:00
|
|
|
AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg/ffmpeg)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CONFIG_FILES(
|
|
|
|
Makefile
|
2004-02-14 11:46:48 +00:00
|
|
|
gst-ffmpeg.spec
|
2003-12-09 15:59:48 +00:00
|
|
|
ext/Makefile
|
|
|
|
ext/ffmpeg/Makefile
|
|
|
|
gst-libs/Makefile
|
|
|
|
gst-libs/ext/Makefile
|
|
|
|
gst-libs/ext/ffmpeg/Makefile
|
|
|
|
)
|
|
|
|
AC_OUTPUT
|