3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AC_INIT(GStreamer Bad Plug-ins, 0.10.5.1,
7 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
12 dnl initialize automake
15 dnl define PACKAGE_VERSION_* variables
18 dnl check if this is a release version
19 AS_NANO(GST_CVS="no", GST_CVS="yes")
21 dnl can autoconf find the source ?
22 AC_CONFIG_SRCDIR([docs/plugins/gst-plugins-bad-plugins-docs.sgml])
24 dnl define the output header for config
25 AM_CONFIG_HEADER([config.h])
27 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
30 dnl sets host_* variables
33 dnl our libraries and install dirs use major.minor as a version
34 GST_MAJORMINOR=$GST_PLUGINS_BAD_VERSION_MAJOR.$GST_PLUGINS_BAD_VERSION_MINOR
35 dnl we override it here if we need to for the release candidate of new series
37 AC_SUBST(GST_MAJORMINOR)
39 dnl FIXME: this macro doesn't actually work;
40 dnl the generated libtool script has no support for the listed tags.
41 dnl So this needs to be fixed first if we want to use this
42 dnl AS_LIBTOOL_TAGS([CXX])
46 dnl *** required versions of GStreamer stuff ***
47 dnl *** remove rtpmanager/equalizer stuff below when this is updated
51 dnl *** autotools stuff ****
53 dnl allow for different autotools
54 AS_AUTOTOOLS_ALTERNATE
56 dnl Add parameters for aclocal
57 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
60 dnl the version check needs to stay here because autopoint greps for it
61 AM_GNU_GETTEXT_VERSION([0.11.5])
62 AM_GNU_GETTEXT([external])
63 AG_GST_GETTEXT([gst-plugins-bad-$GST_MAJORMINOR])
65 dnl *** check for arguments to configure ***
74 AG_GST_ARG_WITH_PKG_CONFIG_PATH
75 AG_GST_ARG_WITH_PACKAGE_NAME
76 AG_GST_ARG_WITH_PACKAGE_ORIGIN
80 dnl these are all the gst plug-ins, compilable without additional libs
119 AC_SUBST(GST_PLUGINS_ALL)
121 AG_GST_ARG_WITH_PLUGINS
123 AG_GST_ARG_ENABLE_EXTERNAL
125 AG_GST_ARG_ENABLE_EXPERIMENTAL
127 dnl *** checks for platform ***
129 dnl * hardware/architecture *
131 dnl common/m4/gst-arch.m4
135 dnl Determine endianness
138 dnl *** checks for programs ***
143 dnl determine c++ compiler
145 dnl determine if c++ is available on this system
146 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
150 dnl check if the compiler supports '-c' and '-o' options
153 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
154 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
156 dnl check for documentation tools
158 AS_PATH_PYTHON([2.1])
159 AG_GST_PLUGIN_DOCS([1.3],[2.1])
161 dnl *** checks for libraries ***
163 dnl check for libm, for sin() etc.
167 dnl *** checks for header files ***
169 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
170 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
172 if test "x$HAVE_UNISTD_H" != "xyes"; then
173 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
179 dnl *** checks for types/defines ***
181 dnl *** checks for structures ***
183 dnl *** checks for compiler characteristics ***
185 dnl *** checks for library functions ***
187 dnl *** checks for dependency libraries ***
190 AG_GST_GLIB_CHECK([2.6])
192 dnl liboil is required
193 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
194 if test "x${HAVE_LIBOIL}" != xyes ; then
195 AC_ERROR([liboil-0.3.8 or later is required])
198 dnl checks for gstreamer
199 dnl uninstalled is selected preferentially -- see pkg-config(1)
200 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
201 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
202 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
203 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
204 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
205 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
206 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
208 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
209 AC_SUBST(GSTPB_PLUGINS_DIR)
210 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
212 dnl Check for documentation xrefs
213 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
214 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
215 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
216 AC_SUBST(GLIB_PREFIX)
218 AC_SUBST(GSTPB_PREFIX)
220 dnl GTK is optional and used in examples
222 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
223 if test "x$HAVE_GTK_22" = "xyes"; then
225 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
226 AC_SUBST(GTK_VERSION)
227 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
228 AC_SUBST(GTK_BASE_DIR)
229 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
230 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
231 AC_SUBST(GTK_BASE_DIR)
233 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
235 if test "x$HAVE_GTK_20" = "xyes"; then
238 GTK_CFLAGS=$GTK2_CFLAGS
243 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
245 dnl libglade is optional and only used in examples
247 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
249 AC_SUBST(GLADE_CFLAGS)
251 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
253 dnl set license and copyright notice
255 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
256 AC_SUBST(GST_LICENSE)
258 dnl set location of plugin directory
261 dnl define an ERROR_CFLAGS Makefile variable
262 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
264 dnl define correct level for debugging messages
265 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
267 dnl *** plug-ins to exclude ***
269 dnl see if we can build C++ plug-ins
270 if test "x$HAVE_CXX" != "xyes"; then
271 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
272 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/modplug//g'`
275 dnl real plugin only works on i386 and x86_64 for the time being.
276 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
277 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
278 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/real//g'`
281 dnl disable gst plugins we might not be able to build on this
282 dnl platform: librfb (ugly but minimally invasive)
283 dnl FIXME: maybe move to sys, or make work with winsock2
284 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
285 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
287 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
288 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/librfb//`
291 AC_SUBST(GST_PLUGINS_SELECTED)
293 dnl *** sys plug-ins ***
296 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENGL, true)
297 AG_GST_CHECK_FEATURE(OPENGL, [Open GL], glsink, [
298 PKG_CHECK_MODULES(GL, gl >= 7.1.0, [
308 dnl check for QuickTime
309 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
310 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
311 AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
314 dnl check for Video CD
315 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
316 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
317 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
320 dnl *** ext plug-ins ***
321 dnl keep this list sorted alphabetically !
323 if test "x$BUILD_EXTERNAL" = "xyes"; then
326 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
327 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
328 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
330 AC_SUBST(ALSA_CFLAGS)
333 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
338 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
339 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
340 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
344 AC_SUBST(AMRWB_LIBS))
348 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
349 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
350 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
355 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
356 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
357 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
361 # AC_SUBST(CAIRO_CFLAGS)
362 # AC_SUBST(CAIRO_LIBS)
366 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
367 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
368 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
369 AC_SUBST(CDAUDIO_CFLAGS)
370 AC_SUBST(CDAUDIO_LIBS)
375 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
376 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
377 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 == 2.0.0-rc5, HAVE_DC1394="yes", [
381 AC_SUBST(LIBDC1394_CFLAGS)
382 AC_SUBST(LIBDC1394_LIBS)
386 dnl **** DirectFB ****
387 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
388 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
389 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
396 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
397 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
399 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
400 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
401 if test $HAVE_DTS = "no"; then
402 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
403 DTS_LIBS="-ldca -lm")
409 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
410 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
412 AC_CHECK_HEADER(encore2.h, , [
413 AC_MSG_WARN([Divx4linux encore headers not found])
416 if [ test x$HAVE_DIVX = xyes ]; then
417 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
420 #if ENCORE_VERSION != 20021024
421 #error Wrong version of divx encore libraries
431 AC_MSG_WARN([Wrong version of divx4linux installed])
434 if [ test x$HAVE_DIVX = xyes ]; then
435 AC_CHECK_HEADER(decore.h, , [
436 AC_MSG_WARN([Divx4linux decoder headers not found])
440 if [ test x$HAVE_DIVX = xyes ]; then
441 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
444 #if DECORE_VERSION != 20021112
445 #error Wrong version of divx decore libraries
455 AC_MSG_WARN([Wrong version of divx4linux installed])
459 if test x$HAVE_DIVX = xyes; then
460 AC_CHECK_LIB(divxencore, encore, , [
461 AC_MSG_WARN([Divx4linux encore libs not found])
465 if test x$HAVE_DIVX = xyes; then
466 AC_CHECK_LIB(divxdecore, decore, , [
467 AC_MSG_WARN([Divx4linux decore libs not found])
471 if test x$HAVE_DIVX = xyes; then
472 DIVXENC_LIBS="-ldivxencore -lm"
473 DIVXDEC_LIBS="-ldivxdecore -lm"
474 AC_SUBST(DIVXENC_LIBS)
475 AC_SUBST(DIVXDEC_LIBS)
480 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
481 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
483 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
486 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
489 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
492 PKG_CHECK_MODULES(XMP_1_99_5, exempi-2.0 >= 1.99.5, XMP_CFLAGS="-DXMP_1_99_5 $XMP_CFLAGS", AC_MSG_RESULT(no))
493 if test x$HAVE_EXIF = xyes; then
494 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
495 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
498 if test x$HAVE_IPTC = xyes; then
499 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
500 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
503 if test x$HAVE_XMP = xyes; then
504 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
505 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
508 if test x$HAVE_METADATA = xno; then
509 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
511 dnl metadata plugin will parse whole chunks anyway
513 AC_SUBST(METADATA_CFLAGS)
514 AC_SUBST(METADATA_LIBS)
517 dnl **** Free AAC Encoder (FAAC) ****
518 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
519 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
520 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
521 FAAC_LIBS="-lfaac -lm")
522 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
526 dnl **** Free AAC Decoder (FAAD) ****
527 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
528 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
530 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
531 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
532 if test $HAVE_FAAD = "no"; then
533 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
534 [ FAAD_LIBS="-lfaad -lm"
535 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
539 if test $HAVE_FAAD = "yes"; then
540 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
541 AC_TRY_COMPILE([#include <faad.h>], [
542 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
545 /* Release candidate of 2.0 is not good enough for us. This field
546 * was added only in 2.0 final and does not exist in 2.0-RC3 */
547 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
557 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
559 AC_SUBST(FAAD_IS_NEAAC)
563 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
564 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
565 if test "x$HAVE_FBDEV" != "xyes"; then
566 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
571 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
572 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
573 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
574 if test $HAVE_GSM != "yes"; then
575 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
576 if test $HAVE_GSM = "yes"; then
577 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
584 dnl AM_PATH_IVORBIS only takes two options
585 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
586 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
589 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
590 [IVORBIS_LIBS=-lvorbisidec
594 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
598 AC_SUBST(IVORBIS_LIBS)
599 AC_SUBST(IVORBIS_CFLAGS)
603 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
604 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
605 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
606 AC_SUBST(JACK_CFLAGS)
611 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
612 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
613 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
617 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
618 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
619 dnl check with pkg-config first
620 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
625 AC_SUBST(LIBMMS_LIBS)
627 dnl *** mjpegtools version info ***
628 dnl some may prefer older version (given quirks above)
629 dnl hm, no version info seems available within mjpegtools headers
631 PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
632 AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
633 have_mpjegtools_19x=yes
635 have_mpjegtools_19x=no])
637 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
638 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
639 have_mpjegtools_18x=yes
641 have_mpjegtools_18x=no])
644 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
645 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
647 dnl we require a c++ compiler for this one
648 if [ test x$HAVE_CXX = xyes ]; then
649 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
650 dnl since many distros include mjpegtools specifically without mplex
651 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
652 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
653 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
655 dnl switch over to c++ to test things
657 OLD_CPPFLAGS="$CPPFLAGS"
659 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
660 CPPFLAGS="$CPPFLAGS_GOOD -I."
662 mpeg2enc_headers_ok=no
663 AC_CHECK_HEADER([mpeg2encoder.hh], [
664 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
666 LIBS="$LIBS $MPEG2ENC_LIBS"
667 AC_MSG_CHECKING([for valid mpeg2enc objects])
669 #include <mpeg2encoder.hh>
670 #include <mpeg2encoptions.hh>
676 MPEG2EncOptions *options = new MPEG2EncOptions ();
677 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
682 dnl so far so good, let's check more things:
683 dnl mjpegtools-1.8.0 does not install the required
684 dnl mpeg2syntaxcodes.h header by default, and a new release
685 dnl is not in sight, so check for this oversight in case
686 dnl distros or folks have fixed this themselves
687 if test "x$have_mpjegtools_18x" = "xyes"; then
688 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
689 mpeg2enc_headers_ok=yes
691 mpeg2enc_headers_ok=no
694 mpeg2enc_headers_ok=yes
697 if test "x$mpeg2enc_headers_ok" = "xyes"; then
700 CPP_FLAGS="$CPPFLAGS_GOOD"
701 AC_SUBST(MPEG2ENC_CFLAGS)
702 AC_SUBST(MPEG2ENC_LIBS)
709 CPPFLAGS="$OLD_CPPFLAGS"
718 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
719 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
721 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
723 MUSEPACK_LIBS="-lmpcdec"
724 AC_SUBST(MUSEPACK_LIBS)
725 ], [HAVE_MUSEPACK="no"])
729 dnl *** musicbrainz ***
730 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
731 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
732 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
733 AC_SUBST(MUSICBRAINZ_CFLAGS)
734 AC_SUBST(MUSICBRAINZ_LIBS)
738 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
739 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
740 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
744 AC_SUBST(GMYTH_CFLAGS)
749 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
750 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
752 if test "x$HAVE_X" = "xyes"; then
753 save_cppflags=$CFLAGS
754 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
755 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
756 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
757 CPPFLAGS="$save_cppflags"
764 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
765 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
766 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
770 AC_SUBST(NEON_CFLAGS)
775 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
776 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
777 PKG_CHECK_MODULES(SOUP, libsoup-2.4, HAVE_SOUP="yes", [
781 AC_SUBST(SOUP_CFLAGS)
786 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
787 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
788 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
790 AC_MSG_CHECKING([for timidity.cfg])
792 if test -r /etc/timidity.cfg; then
793 timidity_cfg=/etc/timidity.cfg
794 elif test -r /etc/timidity/timidity.cfg; then
795 timidity_cfg=/etc/timidity/timidity.cfg
796 elif test -r /usr/share/timidity/timidity.cfg; then
797 timidity_cfg=/usr/share/timidity/timidity.cfg
798 elif test -r /usr/local/share/timidity/timidity.cfg; then
799 timidity_cfg=/usr/local/share/timidity/timidity.cfg
801 if test "x$timidity_cfg" != "x"; then
802 AC_MSG_RESULT($timidity_cfg)
803 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
805 AC_MSG_RESULT([not found])
811 AC_SUBST(TIMIDITY_CFLAGS)
812 AC_SUBST(TIMIDITY_LIBS)
816 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
817 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
818 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
819 if test "x$HAVE_WILDMIDI" = "xyes"; then
821 WILDMIDI_LIBS=-lWildMidi
822 AC_MSG_NOTICE(compiling gstWildMidi)
826 AC_MSG_WARN(no WildMidi library found (libWildMidi))
828 AC_SUBST(WILDMIDI_CFLAGS)
829 AC_SUBST(WILDMIDI_LIBS)
833 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
834 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
835 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
839 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
840 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
841 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
842 AC_SUBST(SNDFILE_CFLAGS)
843 AC_SUBST(SNDFILE_LIBS)
846 dnl *** soundtouch ***
847 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
848 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
849 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
851 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
853 HAVE_SOUNDTOUCH=no)])
854 AC_SUBST(SOUNDTOUCH_CFLAGS)
855 AC_SUBST(SOUNDTOUCH_LIBS)
856 if test "x$HAVE_CXX" != "xyes"; then
858 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
863 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
864 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
865 AC_CHECK_HEADER(openspc.h, [
866 AC_CHECK_LIB(openspc, OSPC_Init, [
879 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
880 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
881 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
885 AC_SUBST(SWFDEC_CFLAGS)
886 AC_SUBST(SWFDEC_LIBS)
890 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
891 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
892 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
896 AC_SUBST(THEORADEC_LIBS)
897 AC_SUBST(THEORADEC_CFLAGS)
900 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
901 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
902 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
903 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
904 X264_LIBS="$LDFLAGS -lx264 -lm"
905 X264_CFLAGS="$CFLAGS"
907 AC_SUBST(X264_CFLAGS))
911 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
912 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
914 AC_CHECK_HEADER(xvid.h, [
917 AC_CHECK_LIB(xvidcore, xvid_encore, [
918 AC_CHECK_LIB(xvidcore, xvid_decore, [
919 AC_CHECK_LIB(xvidcore, xvid_global, [
920 AC_MSG_CHECKING([for uptodate XviD API version])
921 AC_TRY_COMPILE([#include <xvid.h>], [
922 #if XVID_API_MAJOR(XVID_API) != 4
923 #error "Incompatible XviD API version"
925 ],[ AC_MSG_RESULT(yes)
926 XVID_LIBS="-lxvidcore -lm"
929 ], AC_MSG_RESULT(no) )
938 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
939 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
940 AC_MSG_CHECKING([Checking for up to date dvb installation])
941 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
946 dnl not building plugins with external dependencies,
947 dnl but we still need to set the conditionals
949 AM_CONDITIONAL(USE_OPENGL, false)
950 AM_CONDITIONAL(USE_QUICKTIME, false)
951 AM_CONDITIONAL(USE_VCD, false)
952 AM_CONDITIONAL(USE_ALSA, false)
953 AM_CONDITIONAL(USE_AMRWB, false)
954 AM_CONDITIONAL(USE_BZ2, false)
955 AM_CONDITIONAL(USE_CDAUDIO, false)
956 AM_CONDITIONAL(USE_DIRECTFB, false)
957 AM_CONDITIONAL(USE_DTS, false)
958 AM_CONDITIONAL(USE_DIVX, false)
959 AM_CONDITIONAL(USE_FAAC, false)
960 AM_CONDITIONAL(USE_FAAD, false)
961 AM_CONDITIONAL(USE_FBDEV, false)
962 AM_CONDITIONAL(USE_GSM, false)
963 AM_CONDITIONAL(USE_IVORBIS, false)
964 AM_CONDITIONAL(USE_JACK, false)
965 AM_CONDITIONAL(USE_LADSPA, false)
966 AM_CONDITIONAL(USE_LIBMMS, false)
967 AM_CONDITIONAL(USE_MPEG2ENC, false)
968 AM_CONDITIONAL(USE_MUSEPACK, false)
969 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
970 AM_CONDITIONAL(USE_MYTHTV, false)
971 AM_CONDITIONAL(USE_NAS, false)
972 AM_CONDITIONAL(USE_NEON, false)
973 AM_CONDITIONAL(USE_SOUP, false)
974 AM_CONDITIONAL(USE_SDL, false)
975 AM_CONDITIONAL(USE_SNDFILE, false)
976 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
977 AM_CONDITIONAL(USE_SPC, false)
978 AM_CONDITIONAL(USE_SWFDEC, false)
979 AM_CONDITIONAL(USE_THEORADEC, false)
980 AM_CONDITIONAL(USE_TIMIDITY, false)
981 AM_CONDITIONAL(USE_X264, false)
982 AM_CONDITIONAL(USE_XVID, false)
983 AM_CONDITIONAL(USE_WILDMIDI, false)
984 AM_CONDITIONAL(USE_DVB, false)
986 fi dnl of EXT plugins
988 dnl *** finalize CFLAGS, LDFLAGS, LIBS
991 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
992 dnl GST_*: flags shared by built objects to link against GStreamer
993 dnl GST_ALL_LDFLAGS: linker flags shared by all
994 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
995 dnl GST_LT_LDFLAGS: library versioning of our libraries
996 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
998 dnl GST_OPTION_CFLAGS
999 if test "x$USE_DEBUG" = xyes; then
1002 AC_SUBST(PROFILE_CFLAGS)
1004 if test "x$GST_CVS" = "xyes"; then
1005 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1007 DEPRECATED_CFLAGS=""
1009 AC_SUBST(DEPRECATED_CFLAGS)
1011 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
1012 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1013 AC_SUBST(GST_OPTION_CFLAGS)
1015 dnl FIXME: do we want to rename to GST_ALL_* ?
1016 dnl prefer internal headers to already installed ones
1017 dnl also add builddir include for enumtypes and marshal
1018 dnl add GST_OPTION_CFLAGS, but overridable
1019 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1020 AC_SUBST(GST_CFLAGS)
1023 dnl LDFLAGS really should only contain flags, not libs - they get added before
1024 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1025 GST_ALL_LDFLAGS="-no-undefined"
1026 AC_SUBST(GST_ALL_LDFLAGS)
1028 dnl this really should only contain flags, not libs - they get added before
1029 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1030 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1031 AC_SUBST(GST_PLUGIN_LDFLAGS)
1033 dnl *** output files ***
1040 gst-plugins-bad.spec
1044 gst/cdxaparse/Makefile
1045 gst/deinterlace/Makefile
1047 gst/equalizer/Makefile
1048 gst/festival/Makefile
1052 gst/h264parse/Makefile
1053 gst/interleave/Makefile
1055 gst/modplug/Makefile
1056 gst/modplug/libmodplug/Makefile
1057 gst/mpegtsparse/Makefile
1058 gst/mpeg4videoparse/Makefile
1059 gst/mpegvideoparse/Makefile
1060 gst/multifile/Makefile
1063 gst/nuvdemux/Makefile
1064 gst/rawparse/Makefile
1065 gst/replaygain/Makefile
1066 gst/rtpmanager/Makefile
1068 gst/selector/Makefile
1069 gst/spectrum/Makefile
1071 gst/speexresample/Makefile
1074 gst/videosignal/Makefile
1079 gst-libs/gst/Makefile
1080 gst-libs/gst/app/Makefile
1085 sys/qtwrapper/Makefile
1088 examples/app/Makefile
1089 examples/directfb/Makefile
1090 examples/switch/Makefile
1092 ext/alsaspdif/Makefile
1094 ext/cdaudio/Makefile
1096 ext/directfb/Makefile
1099 ext/metadata/Makefile
1103 ext/ivorbis/Makefile
1109 ext/mpeg2enc/Makefile
1110 ext/musepack/Makefile
1111 ext/musicbrainz/Makefile
1116 ext/sndfile/Makefile
1117 ext/soundtouch/Makefile
1121 ext/timidity/Makefile
1126 docs/plugins/Makefile
1127 docs/version.entities
1132 tests/check/Makefile
1133 tests/icles/Makefile
1134 win32/common/config.h
1138 AG_GST_OUTPUT_PLUGINS