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
116 AC_SUBST(GST_PLUGINS_ALL)
118 AG_GST_ARG_WITH_PLUGINS
120 AG_GST_ARG_ENABLE_EXTERNAL
122 AG_GST_ARG_ENABLE_EXPERIMENTAL
124 dnl *** checks for platform ***
126 dnl * hardware/architecture *
128 dnl common/m4/gst-arch.m4
132 dnl Determine endianness
135 dnl *** checks for programs ***
140 dnl determine c++ compiler
142 dnl determine if c++ is available on this system
143 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
147 dnl check if the compiler supports '-c' and '-o' options
150 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
151 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
153 dnl check for documentation tools
155 AS_PATH_PYTHON([2.1])
156 AG_GST_PLUGIN_DOCS([1.3],[2.1])
158 dnl *** checks for libraries ***
160 dnl check for libm, for sin() etc.
164 dnl *** checks for header files ***
166 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
167 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
169 if test "x$HAVE_UNISTD_H" != "xyes"; then
170 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
176 dnl *** checks for types/defines ***
178 dnl *** checks for structures ***
180 dnl *** checks for compiler characteristics ***
182 dnl *** checks for library functions ***
184 dnl *** checks for dependency libraries ***
187 AG_GST_GLIB_CHECK([2.6])
189 dnl liboil is required
190 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
191 if test "x${HAVE_LIBOIL}" != xyes ; then
192 AC_ERROR([liboil-0.3.8 or later is required])
195 dnl checks for gstreamer
196 dnl uninstalled is selected preferentially -- see pkg-config(1)
197 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
198 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
199 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
200 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
201 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
202 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
203 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
205 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
206 AC_SUBST(GSTPB_PLUGINS_DIR)
207 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
209 dnl Check for documentation xrefs
210 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
211 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
212 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
213 AC_SUBST(GLIB_PREFIX)
215 AC_SUBST(GSTPB_PREFIX)
217 dnl GTK is optional and used in examples
219 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
220 if test "x$HAVE_GTK_22" = "xyes"; then
222 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
223 AC_SUBST(GTK_VERSION)
224 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
225 AC_SUBST(GTK_BASE_DIR)
226 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
227 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
228 AC_SUBST(GTK_BASE_DIR)
230 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
232 if test "x$HAVE_GTK_20" = "xyes"; then
235 GTK_CFLAGS=$GTK2_CFLAGS
240 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
242 dnl libglade is optional and only used in examples
244 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
246 AC_SUBST(GLADE_CFLAGS)
248 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
250 dnl set license and copyright notice
252 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
253 AC_SUBST(GST_LICENSE)
255 dnl set location of plugin directory
258 dnl define an ERROR_CFLAGS Makefile variable
259 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
261 dnl define correct level for debugging messages
262 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
264 dnl *** plug-ins to exclude ***
266 dnl see if we can build C++ plug-ins
267 if test "x$HAVE_CXX" != "xyes"; then
268 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
269 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/modplug//g'`
272 dnl real plugin only works on i386 and x86_64 for the time being.
273 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
274 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
275 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/real//g'`
278 dnl disable gst plugins we might not be able to build on this
279 dnl platform: librfb (ugly but minimally invasive)
280 dnl FIXME: maybe move to sys, or make work with winsock2
281 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
282 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
284 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
285 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/librfb//`
288 AC_SUBST(GST_PLUGINS_SELECTED)
290 dnl *** sys plug-ins ***
292 dnl check for QuickTime
293 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
294 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
295 AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
298 dnl check for Video CD
299 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
300 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
301 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
304 dnl *** ext plug-ins ***
305 dnl keep this list sorted alphabetically !
307 if test "x$BUILD_EXTERNAL" = "xyes"; then
310 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
311 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
312 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
314 AC_SUBST(ALSA_CFLAGS)
317 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
322 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
323 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
324 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
328 AC_SUBST(AMRWB_LIBS))
332 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
333 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
334 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
339 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
340 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
341 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
345 # AC_SUBST(CAIRO_CFLAGS)
346 # AC_SUBST(CAIRO_LIBS)
350 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
351 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
352 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
353 AC_SUBST(CDAUDIO_CFLAGS)
354 AC_SUBST(CDAUDIO_LIBS)
359 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
360 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
361 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 == 2.0.0-rc5, HAVE_DC1394="yes", [
365 AC_SUBST(LIBDC1394_CFLAGS)
366 AC_SUBST(LIBDC1394_LIBS)
370 dnl **** DirectFB ****
371 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
372 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
373 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
380 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
381 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
383 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
384 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
385 if test $HAVE_DTS = "no"; then
386 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
387 DTS_LIBS="-ldca -lm")
393 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
394 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
396 AC_CHECK_HEADER(encore2.h, , [
397 AC_MSG_WARN([Divx4linux encore headers not found])
400 if [ test x$HAVE_DIVX = xyes ]; then
401 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
404 #if ENCORE_VERSION != 20021024
405 #error Wrong version of divx encore libraries
415 AC_MSG_WARN([Wrong version of divx4linux installed])
418 if [ test x$HAVE_DIVX = xyes ]; then
419 AC_CHECK_HEADER(decore.h, , [
420 AC_MSG_WARN([Divx4linux decoder headers not found])
424 if [ test x$HAVE_DIVX = xyes ]; then
425 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
428 #if DECORE_VERSION != 20021112
429 #error Wrong version of divx decore libraries
439 AC_MSG_WARN([Wrong version of divx4linux installed])
443 if test x$HAVE_DIVX = xyes; then
444 AC_CHECK_LIB(divxencore, encore, , [
445 AC_MSG_WARN([Divx4linux encore libs not found])
449 if test x$HAVE_DIVX = xyes; then
450 AC_CHECK_LIB(divxdecore, decore, , [
451 AC_MSG_WARN([Divx4linux decore libs not found])
455 if test x$HAVE_DIVX = xyes; then
456 DIVXENC_LIBS="-ldivxencore -lm"
457 DIVXDEC_LIBS="-ldivxdecore -lm"
458 AC_SUBST(DIVXENC_LIBS)
459 AC_SUBST(DIVXDEC_LIBS)
464 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
465 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
467 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
470 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
473 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
476 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))
477 if test x$HAVE_EXIF = xyes; then
478 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
479 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
482 if test x$HAVE_IPTC = xyes; then
483 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
484 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
487 if test x$HAVE_XMP = xyes; then
488 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
489 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
492 if test x$HAVE_METADATA = xno; then
493 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
495 dnl metadata plugin will parse whole chunks anyway
497 AC_SUBST(METADATA_CFLAGS)
498 AC_SUBST(METADATA_LIBS)
501 dnl **** Free AAC Encoder (FAAC) ****
502 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
503 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
504 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
505 FAAC_LIBS="-lfaac -lm")
506 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
510 dnl **** Free AAC Decoder (FAAD) ****
511 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
512 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
514 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
515 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
516 if test $HAVE_FAAD = "no"; then
517 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
518 [ FAAD_LIBS="-lfaad -lm"
519 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
523 if test $HAVE_FAAD = "yes"; then
524 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
525 AC_TRY_COMPILE([#include <faad.h>], [
526 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
529 /* Release candidate of 2.0 is not good enough for us. This field
530 * was added only in 2.0 final and does not exist in 2.0-RC3 */
531 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
541 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
543 AC_SUBST(FAAD_IS_NEAAC)
547 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
548 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
549 if test "x$HAVE_FBDEV" != "xyes"; then
550 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
555 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
556 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
557 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
558 if test $HAVE_GSM != "yes"; then
559 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
560 if test $HAVE_GSM = "yes"; then
561 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
568 dnl AM_PATH_IVORBIS only takes two options
569 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
570 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
573 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
574 [IVORBIS_LIBS=-lvorbisidec
578 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
582 AC_SUBST(IVORBIS_LIBS)
583 AC_SUBST(IVORBIS_CFLAGS)
587 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
588 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
589 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
590 AC_SUBST(JACK_CFLAGS)
595 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
596 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
597 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
601 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
602 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
603 dnl check with pkg-config first
604 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
609 AC_SUBST(LIBMMS_LIBS)
611 dnl *** mjpegtools version info ***
612 dnl some may prefer older version (given quirks above)
613 dnl hm, no version info seems available within mjpegtools headers
615 PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
616 AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
617 have_mpjegtools_19x=yes
619 have_mpjegtools_19x=no])
621 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
622 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
623 have_mpjegtools_18x=yes
625 have_mpjegtools_18x=no])
628 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
629 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
631 dnl we require a c++ compiler for this one
632 if [ test x$HAVE_CXX = xyes ]; then
633 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
634 dnl since many distros include mjpegtools specifically without mplex
635 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
636 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
637 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
639 dnl switch over to c++ to test things
641 OLD_CPPFLAGS="$CPPFLAGS"
643 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
644 CPPFLAGS="$CPPFLAGS_GOOD -I."
646 mpeg2enc_headers_ok=no
647 AC_CHECK_HEADER([mpeg2encoder.hh], [
648 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
650 LIBS="$LIBS $MPEG2ENC_LIBS"
651 AC_MSG_CHECKING([for valid mpeg2enc objects])
653 #include <mpeg2encoder.hh>
654 #include <mpeg2encoptions.hh>
660 MPEG2EncOptions *options = new MPEG2EncOptions ();
661 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
666 dnl so far so good, let's check more things:
667 dnl mjpegtools-1.8.0 does not install the required
668 dnl mpeg2syntaxcodes.h header by default, and a new release
669 dnl is not in sight, so check for this oversight in case
670 dnl distros or folks have fixed this themselves
671 if test "x$have_mpjegtools_18x" = "xyes"; then
672 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
673 mpeg2enc_headers_ok=yes
675 mpeg2enc_headers_ok=no
678 mpeg2enc_headers_ok=yes
681 if test "x$mpeg2enc_headers_ok" = "xyes"; then
684 CPP_FLAGS="$CPPFLAGS_GOOD"
685 AC_SUBST(MPEG2ENC_CFLAGS)
686 AC_SUBST(MPEG2ENC_LIBS)
693 CPPFLAGS="$OLD_CPPFLAGS"
702 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
703 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
705 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
707 MUSEPACK_LIBS="-lmpcdec"
708 AC_SUBST(MUSEPACK_LIBS)
709 ], [HAVE_MUSEPACK="no"])
713 dnl *** musicbrainz ***
714 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
715 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
716 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
717 AC_SUBST(MUSICBRAINZ_CFLAGS)
718 AC_SUBST(MUSICBRAINZ_LIBS)
722 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
723 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
724 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.7.99, HAVE_MYTHTV="yes", [
728 AC_SUBST(GMYTH_CFLAGS)
733 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
734 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
736 if test "x$HAVE_X" = "xyes"; then
737 save_cppflags=$CFLAGS
738 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
739 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
740 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
741 CPPFLAGS="$save_cppflags"
748 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
749 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
750 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
754 AC_SUBST(NEON_CFLAGS)
759 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
760 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
761 PKG_CHECK_MODULES(SOUP, libsoup-2.4, HAVE_SOUP="yes", [
765 AC_SUBST(SOUP_CFLAGS)
770 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
771 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
772 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
774 AC_MSG_CHECKING([for timidity.cfg])
776 if test -r /etc/timidity.cfg; then
777 timidity_cfg=/etc/timidity.cfg
778 elif test -r /etc/timidity/timidity.cfg; then
779 timidity_cfg=/etc/timidity/timidity.cfg
780 elif test -r /usr/share/timidity/timidity.cfg; then
781 timidity_cfg=/usr/share/timidity/timidity.cfg
782 elif test -r /usr/local/share/timidity/timidity.cfg; then
783 timidity_cfg=/usr/local/share/timidity/timidity.cfg
785 if test "x$timidity_cfg" != "x"; then
786 AC_MSG_RESULT($timidity_cfg)
787 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
789 AC_MSG_RESULT([not found])
795 AC_SUBST(TIMIDITY_CFLAGS)
796 AC_SUBST(TIMIDITY_LIBS)
800 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
801 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
802 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
803 if test "x$HAVE_WILDMIDI" = "xyes"; then
805 WILDMIDI_LIBS=-lWildMidi
806 AC_MSG_NOTICE(compiling gstWildMidi)
810 AC_MSG_WARN(no WildMidi library found (libWildMidi))
812 AC_SUBST(WILDMIDI_CFLAGS)
813 AC_SUBST(WILDMIDI_LIBS)
817 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
818 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
819 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
823 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
824 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
825 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
826 AC_SUBST(SNDFILE_CFLAGS)
827 AC_SUBST(SNDFILE_LIBS)
830 dnl *** soundtouch ***
831 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
832 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
833 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
835 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
837 HAVE_SOUNDTOUCH=no)])
838 AC_SUBST(SOUNDTOUCH_CFLAGS)
839 AC_SUBST(SOUNDTOUCH_LIBS)
840 if test "x$HAVE_CXX" != "xyes"; then
842 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
847 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
848 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
849 AC_CHECK_HEADER(openspc.h, [
850 AC_CHECK_LIB(openspc, OSPC_Init, [
863 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
864 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
865 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
869 AC_SUBST(SWFDEC_CFLAGS)
870 AC_SUBST(SWFDEC_LIBS)
874 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
875 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
876 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
880 AC_SUBST(THEORADEC_LIBS)
881 AC_SUBST(THEORADEC_CFLAGS)
884 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
885 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
886 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
887 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
888 X264_LIBS="$LDFLAGS -lx264 -lm"
889 X264_CFLAGS="$CFLAGS"
891 AC_SUBST(X264_CFLAGS))
895 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
896 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
898 AC_CHECK_HEADER(xvid.h, [
901 AC_CHECK_LIB(xvidcore, xvid_encore, [
902 AC_CHECK_LIB(xvidcore, xvid_decore, [
903 AC_CHECK_LIB(xvidcore, xvid_global, [
904 AC_MSG_CHECKING([for uptodate XviD API version])
905 AC_TRY_COMPILE([#include <xvid.h>], [
906 #if XVID_API_MAJOR(XVID_API) != 4
907 #error "Incompatible XviD API version"
909 ],[ AC_MSG_RESULT(yes)
910 XVID_LIBS="-lxvidcore -lm"
913 ], AC_MSG_RESULT(no) )
922 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
923 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
924 AC_MSG_CHECKING([Checking for up to date dvb installation])
925 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
930 dnl not building plugins with external dependencies,
931 dnl but we still need to set the conditionals
933 AM_CONDITIONAL(USE_QUICKTIME, false)
934 AM_CONDITIONAL(USE_VCD, false)
935 AM_CONDITIONAL(USE_ALSA, false)
936 AM_CONDITIONAL(USE_AMRWB, false)
937 AM_CONDITIONAL(USE_BZ2, false)
938 AM_CONDITIONAL(USE_CDAUDIO, false)
939 AM_CONDITIONAL(USE_DIRECTFB, false)
940 AM_CONDITIONAL(USE_DTS, false)
941 AM_CONDITIONAL(USE_DIVX, false)
942 AM_CONDITIONAL(USE_FAAC, false)
943 AM_CONDITIONAL(USE_FAAD, false)
944 AM_CONDITIONAL(USE_FBDEV, false)
945 AM_CONDITIONAL(USE_GSM, false)
946 AM_CONDITIONAL(USE_IVORBIS, false)
947 AM_CONDITIONAL(USE_JACK, false)
948 AM_CONDITIONAL(USE_LADSPA, false)
949 AM_CONDITIONAL(USE_LIBMMS, false)
950 AM_CONDITIONAL(USE_MPEG2ENC, false)
951 AM_CONDITIONAL(USE_MUSEPACK, false)
952 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
953 AM_CONDITIONAL(USE_MYTHTV, false)
954 AM_CONDITIONAL(USE_NAS, false)
955 AM_CONDITIONAL(USE_NEON, false)
956 AM_CONDITIONAL(USE_SOUP, false)
957 AM_CONDITIONAL(USE_SDL, false)
958 AM_CONDITIONAL(USE_SNDFILE, false)
959 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
960 AM_CONDITIONAL(USE_SPC, false)
961 AM_CONDITIONAL(USE_SWFDEC, false)
962 AM_CONDITIONAL(USE_THEORADEC, false)
963 AM_CONDITIONAL(USE_TIMIDITY, false)
964 AM_CONDITIONAL(USE_X264, false)
965 AM_CONDITIONAL(USE_XVID, false)
966 AM_CONDITIONAL(USE_WILDMIDI, false)
967 AM_CONDITIONAL(USE_DVB, false)
969 fi dnl of EXT plugins
971 dnl *** finalize CFLAGS, LDFLAGS, LIBS
974 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
975 dnl GST_*: flags shared by built objects to link against GStreamer
976 dnl GST_ALL_LDFLAGS: linker flags shared by all
977 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
978 dnl GST_LT_LDFLAGS: library versioning of our libraries
979 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
981 dnl GST_OPTION_CFLAGS
982 if test "x$USE_DEBUG" = xyes; then
985 AC_SUBST(PROFILE_CFLAGS)
987 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
988 dnl Define _only_ during CVS (not pre-releases or releases)
989 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
993 AC_SUBST(DEPRECATED_CFLAGS)
995 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
996 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
997 AC_SUBST(GST_OPTION_CFLAGS)
999 dnl FIXME: do we want to rename to GST_ALL_* ?
1000 dnl prefer internal headers to already installed ones
1001 dnl also add builddir include for enumtypes and marshal
1002 dnl add GST_OPTION_CFLAGS, but overridable
1003 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1004 AC_SUBST(GST_CFLAGS)
1007 dnl LDFLAGS really should only contain flags, not libs - they get added before
1008 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1009 GST_ALL_LDFLAGS="-no-undefined"
1010 AC_SUBST(GST_ALL_LDFLAGS)
1012 dnl this really should only contain flags, not libs - they get added before
1013 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1014 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1015 AC_SUBST(GST_PLUGIN_LDFLAGS)
1017 dnl *** output files ***
1024 gst-plugins-bad.spec
1028 gst/cdxaparse/Makefile
1029 gst/deinterlace/Makefile
1031 gst/festival/Makefile
1035 gst/h264parse/Makefile
1036 gst/interleave/Makefile
1038 gst/modplug/Makefile
1039 gst/modplug/libmodplug/Makefile
1040 gst/mpegtsparse/Makefile
1041 gst/mpeg4videoparse/Makefile
1042 gst/mpegvideoparse/Makefile
1045 gst/nuvdemux/Makefile
1046 gst/rawparse/Makefile
1047 gst/replaygain/Makefile
1048 gst/rtpmanager/Makefile
1050 gst/selector/Makefile
1052 gst/speexresample/Makefile
1055 gst/videosignal/Makefile
1060 gst-libs/gst/Makefile
1061 gst-libs/gst/app/Makefile
1062 gst-libs/gst/dshow/Makefile
1064 sys/dshowdecwrapper/Makefile
1065 sys/dshowsrcwrapper/Makefile
1068 sys/qtwrapper/Makefile
1071 examples/app/Makefile
1072 examples/directfb/Makefile
1073 examples/switch/Makefile
1075 ext/alsaspdif/Makefile
1077 ext/cdaudio/Makefile
1079 ext/directfb/Makefile
1082 ext/metadata/Makefile
1086 ext/ivorbis/Makefile
1092 ext/mpeg2enc/Makefile
1093 ext/musepack/Makefile
1094 ext/musicbrainz/Makefile
1099 ext/sndfile/Makefile
1100 ext/soundtouch/Makefile
1104 ext/timidity/Makefile
1109 docs/plugins/Makefile
1110 docs/version.entities
1115 tests/check/Makefile
1116 tests/icles/Makefile
1117 win32/common/config.h
1121 AG_GST_OUTPUT_PLUGINS