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 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
118 AC_SUBST(GST_PLUGINS_ALL)
120 AG_GST_ARG_WITH_PLUGINS
122 AG_GST_ARG_ENABLE_EXTERNAL
124 AG_GST_ARG_ENABLE_EXPERIMENTAL
126 dnl *** checks for platform ***
128 dnl * hardware/architecture *
130 dnl common/m4/gst-arch.m4
134 dnl Determine endianness
137 dnl *** checks for programs ***
142 dnl determine c++ compiler
144 dnl determine if c++ is available on this system
145 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
149 dnl check if the compiler supports '-c' and '-o' options
152 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
153 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
155 dnl check for documentation tools
157 AS_PATH_PYTHON([2.1])
158 AG_GST_PLUGIN_DOCS([1.3],[2.1])
160 dnl *** checks for libraries ***
162 dnl check for libm, for sin() etc.
166 dnl *** checks for header files ***
168 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
169 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
171 if test "x$HAVE_UNISTD_H" != "xyes"; then
172 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
178 dnl *** checks for types/defines ***
180 dnl *** checks for structures ***
182 dnl *** checks for compiler characteristics ***
184 dnl *** checks for library functions ***
186 dnl *** checks for dependency libraries ***
189 AG_GST_GLIB_CHECK([2.6])
191 dnl liboil is required
192 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
193 if test "x${HAVE_LIBOIL}" != xyes ; then
194 AC_ERROR([liboil-0.3.8 or later is required])
197 dnl checks for gstreamer
198 dnl uninstalled is selected preferentially -- see pkg-config(1)
199 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
200 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
201 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
202 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
203 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
204 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
205 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
207 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
208 AC_SUBST(GSTPB_PLUGINS_DIR)
209 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
211 dnl Check for documentation xrefs
212 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
213 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
214 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
215 AC_SUBST(GLIB_PREFIX)
217 AC_SUBST(GSTPB_PREFIX)
219 dnl GTK is optional and used in examples
221 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
222 if test "x$HAVE_GTK_22" = "xyes"; then
224 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
225 AC_SUBST(GTK_VERSION)
226 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
227 AC_SUBST(GTK_BASE_DIR)
228 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
229 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
230 AC_SUBST(GTK_BASE_DIR)
232 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
234 if test "x$HAVE_GTK_20" = "xyes"; then
237 GTK_CFLAGS=$GTK2_CFLAGS
242 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
244 dnl libglade is optional and only used in examples
246 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
248 AC_SUBST(GLADE_CFLAGS)
250 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
252 dnl set license and copyright notice
254 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
255 AC_SUBST(GST_LICENSE)
257 dnl set location of plugin directory
260 dnl define an ERROR_CFLAGS Makefile variable
261 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
263 dnl define correct level for debugging messages
264 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
266 dnl *** plug-ins to exclude ***
268 dnl see if we can build C++ plug-ins
269 if test "x$HAVE_CXX" != "xyes"; then
270 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
271 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/modplug//g'`
274 dnl real plugin only works on i386 and x86_64 for the time being.
275 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
276 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
277 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/real//g'`
280 dnl disable gst plugins we might not be able to build on this
281 dnl platform: librfb (ugly but minimally invasive)
282 dnl FIXME: maybe move to sys, or make work with winsock2
283 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
284 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
286 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
287 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/librfb//`
290 AC_SUBST(GST_PLUGINS_SELECTED)
292 dnl *** sys plug-ins ***
295 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENGL, true)
296 AG_GST_CHECK_FEATURE(OPENGL, [Open GL], glsink, [
297 PKG_CHECK_MODULES(GL, gl >= 7.1.0, [
307 dnl check for QuickTime
308 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
309 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
310 AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
313 dnl check for Video CD
314 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
315 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
316 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
319 dnl *** ext plug-ins ***
320 dnl keep this list sorted alphabetically !
322 if test "x$BUILD_EXTERNAL" = "xyes"; then
325 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
326 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
327 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
329 AC_SUBST(ALSA_CFLAGS)
332 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
337 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
338 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
339 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
343 AC_SUBST(AMRWB_LIBS))
347 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
348 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
349 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
354 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
355 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
356 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
360 # AC_SUBST(CAIRO_CFLAGS)
361 # AC_SUBST(CAIRO_LIBS)
365 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
366 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
367 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
368 AC_SUBST(CDAUDIO_CFLAGS)
369 AC_SUBST(CDAUDIO_LIBS)
374 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
375 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
376 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 == 2.0.0-rc5, HAVE_DC1394="yes", [
380 AC_SUBST(LIBDC1394_CFLAGS)
381 AC_SUBST(LIBDC1394_LIBS)
385 dnl **** DirectFB ****
386 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
387 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
388 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
395 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
396 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
398 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
399 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
400 if test $HAVE_DTS = "no"; then
401 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
402 DTS_LIBS="-ldca -lm")
408 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
409 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
411 AC_CHECK_HEADER(encore2.h, , [
412 AC_MSG_WARN([Divx4linux encore headers not found])
415 if [ test x$HAVE_DIVX = xyes ]; then
416 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
419 #if ENCORE_VERSION != 20021024
420 #error Wrong version of divx encore libraries
430 AC_MSG_WARN([Wrong version of divx4linux installed])
433 if [ test x$HAVE_DIVX = xyes ]; then
434 AC_CHECK_HEADER(decore.h, , [
435 AC_MSG_WARN([Divx4linux decoder headers not found])
439 if [ test x$HAVE_DIVX = xyes ]; then
440 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
443 #if DECORE_VERSION != 20021112
444 #error Wrong version of divx decore libraries
454 AC_MSG_WARN([Wrong version of divx4linux installed])
458 if test x$HAVE_DIVX = xyes; then
459 AC_CHECK_LIB(divxencore, encore, , [
460 AC_MSG_WARN([Divx4linux encore libs not found])
464 if test x$HAVE_DIVX = xyes; then
465 AC_CHECK_LIB(divxdecore, decore, , [
466 AC_MSG_WARN([Divx4linux decore libs not found])
470 if test x$HAVE_DIVX = xyes; then
471 DIVXENC_LIBS="-ldivxencore -lm"
472 DIVXDEC_LIBS="-ldivxdecore -lm"
473 AC_SUBST(DIVXENC_LIBS)
474 AC_SUBST(DIVXDEC_LIBS)
479 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
480 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
482 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
485 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
488 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
491 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))
492 if test x$HAVE_EXIF = xyes; then
493 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
494 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
497 if test x$HAVE_IPTC = xyes; then
498 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
499 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
502 if test x$HAVE_XMP = xyes; then
503 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
504 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
507 if test x$HAVE_METADATA = xno; then
508 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
510 dnl metadata plugin will parse whole chunks anyway
512 AC_SUBST(METADATA_CFLAGS)
513 AC_SUBST(METADATA_LIBS)
516 dnl **** Free AAC Encoder (FAAC) ****
517 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
518 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
519 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
520 FAAC_LIBS="-lfaac -lm")
521 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
525 dnl **** Free AAC Decoder (FAAD) ****
526 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
527 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
529 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
530 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
531 if test $HAVE_FAAD = "no"; then
532 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
533 [ FAAD_LIBS="-lfaad -lm"
534 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
538 if test $HAVE_FAAD = "yes"; then
539 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
540 AC_TRY_COMPILE([#include <faad.h>], [
541 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
544 /* Release candidate of 2.0 is not good enough for us. This field
545 * was added only in 2.0 final and does not exist in 2.0-RC3 */
546 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
556 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
558 AC_SUBST(FAAD_IS_NEAAC)
562 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
563 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
564 if test "x$HAVE_FBDEV" != "xyes"; then
565 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
570 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
571 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
572 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
573 if test $HAVE_GSM != "yes"; then
574 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
575 if test $HAVE_GSM = "yes"; then
576 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
583 dnl AM_PATH_IVORBIS only takes two options
584 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
585 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
588 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
589 [IVORBIS_LIBS=-lvorbisidec
593 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
597 AC_SUBST(IVORBIS_LIBS)
598 AC_SUBST(IVORBIS_CFLAGS)
602 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
603 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
604 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
605 AC_SUBST(JACK_CFLAGS)
610 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
611 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
612 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
616 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
617 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
618 dnl check with pkg-config first
619 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
624 AC_SUBST(LIBMMS_LIBS)
626 dnl *** mjpegtools version info ***
627 dnl some may prefer older version (given quirks above)
628 dnl hm, no version info seems available within mjpegtools headers
630 PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
631 AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
632 have_mpjegtools_19x=yes
634 have_mpjegtools_19x=no])
636 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
637 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
638 have_mpjegtools_18x=yes
640 have_mpjegtools_18x=no])
643 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
644 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
646 dnl we require a c++ compiler for this one
647 if [ test x$HAVE_CXX = xyes ]; then
648 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
649 dnl since many distros include mjpegtools specifically without mplex
650 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
651 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
652 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
654 dnl switch over to c++ to test things
656 OLD_CPPFLAGS="$CPPFLAGS"
658 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
659 CPPFLAGS="$CPPFLAGS_GOOD -I."
661 mpeg2enc_headers_ok=no
662 AC_CHECK_HEADER([mpeg2encoder.hh], [
663 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
665 LIBS="$LIBS $MPEG2ENC_LIBS"
666 AC_MSG_CHECKING([for valid mpeg2enc objects])
668 #include <mpeg2encoder.hh>
669 #include <mpeg2encoptions.hh>
675 MPEG2EncOptions *options = new MPEG2EncOptions ();
676 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
681 dnl so far so good, let's check more things:
682 dnl mjpegtools-1.8.0 does not install the required
683 dnl mpeg2syntaxcodes.h header by default, and a new release
684 dnl is not in sight, so check for this oversight in case
685 dnl distros or folks have fixed this themselves
686 if test "x$have_mpjegtools_18x" = "xyes"; then
687 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
688 mpeg2enc_headers_ok=yes
690 mpeg2enc_headers_ok=no
693 mpeg2enc_headers_ok=yes
696 if test "x$mpeg2enc_headers_ok" = "xyes"; then
699 CPP_FLAGS="$CPPFLAGS_GOOD"
700 AC_SUBST(MPEG2ENC_CFLAGS)
701 AC_SUBST(MPEG2ENC_LIBS)
708 CPPFLAGS="$OLD_CPPFLAGS"
717 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
718 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
720 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
722 MUSEPACK_LIBS="-lmpcdec"
723 AC_SUBST(MUSEPACK_LIBS)
724 ], [HAVE_MUSEPACK="no"])
728 dnl *** musicbrainz ***
729 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
730 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
731 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
732 AC_SUBST(MUSICBRAINZ_CFLAGS)
733 AC_SUBST(MUSICBRAINZ_LIBS)
737 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
738 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
739 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
743 AC_SUBST(GMYTH_CFLAGS)
748 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
749 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
751 if test "x$HAVE_X" = "xyes"; then
752 save_cppflags=$CFLAGS
753 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
754 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
755 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
756 CPPFLAGS="$save_cppflags"
763 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
764 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
765 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
769 AC_SUBST(NEON_CFLAGS)
774 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
775 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
776 PKG_CHECK_MODULES(SOUP, libsoup-2.4, HAVE_SOUP="yes", [
780 AC_SUBST(SOUP_CFLAGS)
785 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
786 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
787 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
789 AC_MSG_CHECKING([for timidity.cfg])
791 if test -r /etc/timidity.cfg; then
792 timidity_cfg=/etc/timidity.cfg
793 elif test -r /etc/timidity/timidity.cfg; then
794 timidity_cfg=/etc/timidity/timidity.cfg
795 elif test -r /usr/share/timidity/timidity.cfg; then
796 timidity_cfg=/usr/share/timidity/timidity.cfg
797 elif test -r /usr/local/share/timidity/timidity.cfg; then
798 timidity_cfg=/usr/local/share/timidity/timidity.cfg
800 if test "x$timidity_cfg" != "x"; then
801 AC_MSG_RESULT($timidity_cfg)
802 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
804 AC_MSG_RESULT([not found])
810 AC_SUBST(TIMIDITY_CFLAGS)
811 AC_SUBST(TIMIDITY_LIBS)
815 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
816 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
817 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
818 if test "x$HAVE_WILDMIDI" = "xyes"; then
820 WILDMIDI_LIBS=-lWildMidi
821 AC_MSG_NOTICE(compiling gstWildMidi)
825 AC_MSG_WARN(no WildMidi library found (libWildMidi))
827 AC_SUBST(WILDMIDI_CFLAGS)
828 AC_SUBST(WILDMIDI_LIBS)
832 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
833 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
834 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
838 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
839 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
840 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
841 AC_SUBST(SNDFILE_CFLAGS)
842 AC_SUBST(SNDFILE_LIBS)
845 dnl *** soundtouch ***
846 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
847 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
848 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
850 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
852 HAVE_SOUNDTOUCH=no)])
853 AC_SUBST(SOUNDTOUCH_CFLAGS)
854 AC_SUBST(SOUNDTOUCH_LIBS)
855 if test "x$HAVE_CXX" != "xyes"; then
857 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
862 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
863 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
864 AC_CHECK_HEADER(openspc.h, [
865 AC_CHECK_LIB(openspc, OSPC_Init, [
878 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
879 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
880 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
884 AC_SUBST(SWFDEC_CFLAGS)
885 AC_SUBST(SWFDEC_LIBS)
889 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
890 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
891 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
895 AC_SUBST(THEORADEC_LIBS)
896 AC_SUBST(THEORADEC_CFLAGS)
899 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
900 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
901 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
902 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
903 X264_LIBS="$LDFLAGS -lx264 -lm"
904 X264_CFLAGS="$CFLAGS"
906 AC_SUBST(X264_CFLAGS))
910 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
911 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
913 AC_CHECK_HEADER(xvid.h, [
916 AC_CHECK_LIB(xvidcore, xvid_encore, [
917 AC_CHECK_LIB(xvidcore, xvid_decore, [
918 AC_CHECK_LIB(xvidcore, xvid_global, [
919 AC_MSG_CHECKING([for uptodate XviD API version])
920 AC_TRY_COMPILE([#include <xvid.h>], [
921 #if XVID_API_MAJOR(XVID_API) != 4
922 #error "Incompatible XviD API version"
924 ],[ AC_MSG_RESULT(yes)
925 XVID_LIBS="-lxvidcore -lm"
928 ], AC_MSG_RESULT(no) )
937 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
938 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
939 AC_MSG_CHECKING([Checking for up to date dvb installation])
940 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
945 dnl not building plugins with external dependencies,
946 dnl but we still need to set the conditionals
948 AM_CONDITIONAL(USE_OPENGL, false)
949 AM_CONDITIONAL(USE_QUICKTIME, false)
950 AM_CONDITIONAL(USE_VCD, false)
951 AM_CONDITIONAL(USE_ALSA, false)
952 AM_CONDITIONAL(USE_AMRWB, false)
953 AM_CONDITIONAL(USE_BZ2, false)
954 AM_CONDITIONAL(USE_CDAUDIO, false)
955 AM_CONDITIONAL(USE_DIRECTFB, false)
956 AM_CONDITIONAL(USE_DTS, false)
957 AM_CONDITIONAL(USE_DIVX, false)
958 AM_CONDITIONAL(USE_FAAC, false)
959 AM_CONDITIONAL(USE_FAAD, false)
960 AM_CONDITIONAL(USE_FBDEV, false)
961 AM_CONDITIONAL(USE_GSM, false)
962 AM_CONDITIONAL(USE_IVORBIS, false)
963 AM_CONDITIONAL(USE_JACK, false)
964 AM_CONDITIONAL(USE_LADSPA, false)
965 AM_CONDITIONAL(USE_LIBMMS, false)
966 AM_CONDITIONAL(USE_MPEG2ENC, false)
967 AM_CONDITIONAL(USE_MUSEPACK, false)
968 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
969 AM_CONDITIONAL(USE_MYTHTV, false)
970 AM_CONDITIONAL(USE_NAS, false)
971 AM_CONDITIONAL(USE_NEON, false)
972 AM_CONDITIONAL(USE_SOUP, false)
973 AM_CONDITIONAL(USE_SDL, false)
974 AM_CONDITIONAL(USE_SNDFILE, false)
975 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
976 AM_CONDITIONAL(USE_SPC, false)
977 AM_CONDITIONAL(USE_SWFDEC, false)
978 AM_CONDITIONAL(USE_THEORADEC, false)
979 AM_CONDITIONAL(USE_TIMIDITY, false)
980 AM_CONDITIONAL(USE_X264, false)
981 AM_CONDITIONAL(USE_XVID, false)
982 AM_CONDITIONAL(USE_WILDMIDI, false)
983 AM_CONDITIONAL(USE_DVB, false)
985 fi dnl of EXT plugins
987 dnl *** finalize CFLAGS, LDFLAGS, LIBS
990 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
991 dnl GST_*: flags shared by built objects to link against GStreamer
992 dnl GST_ALL_LDFLAGS: linker flags shared by all
993 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
994 dnl GST_LT_LDFLAGS: library versioning of our libraries
995 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
997 dnl GST_OPTION_CFLAGS
998 if test "x$USE_DEBUG" = xyes; then
1001 AC_SUBST(PROFILE_CFLAGS)
1003 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
1004 dnl Define _only_ during CVS (not pre-releases or releases)
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/festival/Makefile
1051 gst/h264parse/Makefile
1052 gst/interleave/Makefile
1054 gst/modplug/Makefile
1055 gst/modplug/libmodplug/Makefile
1056 gst/mpegtsparse/Makefile
1057 gst/mpeg4videoparse/Makefile
1058 gst/mpegvideoparse/Makefile
1059 gst/multifile/Makefile
1062 gst/nuvdemux/Makefile
1063 gst/rawparse/Makefile
1064 gst/replaygain/Makefile
1065 gst/rtpmanager/Makefile
1067 gst/selector/Makefile
1068 gst/spectrum/Makefile
1070 gst/speexresample/Makefile
1073 gst/videosignal/Makefile
1078 gst-libs/gst/Makefile
1079 gst-libs/gst/app/Makefile
1084 sys/qtwrapper/Makefile
1087 examples/app/Makefile
1088 examples/directfb/Makefile
1089 examples/switch/Makefile
1091 ext/alsaspdif/Makefile
1093 ext/cdaudio/Makefile
1095 ext/directfb/Makefile
1098 ext/metadata/Makefile
1102 ext/ivorbis/Makefile
1108 ext/mpeg2enc/Makefile
1109 ext/musepack/Makefile
1110 ext/musicbrainz/Makefile
1115 ext/sndfile/Makefile
1116 ext/soundtouch/Makefile
1120 ext/timidity/Makefile
1125 docs/plugins/Makefile
1126 docs/version.entities
1131 tests/check/Makefile
1132 tests/icles/Makefile
1133 win32/common/config.h
1137 AG_GST_OUTPUT_PLUGINS