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
120 AC_SUBST(GST_PLUGINS_ALL)
122 AG_GST_ARG_WITH_PLUGINS
124 AG_GST_ARG_ENABLE_EXTERNAL
126 AG_GST_ARG_ENABLE_EXPERIMENTAL
128 USE_GIO=$BUILD_EXPERIMENTAL
130 dnl *** checks for platform ***
132 dnl * hardware/architecture *
134 dnl common/m4/gst-arch.m4
138 dnl Determine endianness
141 dnl *** checks for programs ***
146 dnl determine c++ compiler
148 dnl determine if c++ is available on this system
149 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
153 dnl check if the compiler supports '-c' and '-o' options
156 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
157 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
159 dnl check for documentation tools
161 AS_PATH_PYTHON([2.1])
162 AG_GST_PLUGIN_DOCS([1.3],[2.1])
164 dnl *** checks for libraries ***
166 dnl check for libm, for sin() etc.
170 dnl *** checks for header files ***
172 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
173 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
175 if test "x$HAVE_UNISTD_H" != "xyes"; then
176 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
182 dnl *** checks for types/defines ***
184 dnl *** checks for structures ***
186 dnl *** checks for compiler characteristics ***
188 dnl *** checks for library functions ***
190 dnl *** checks for dependency libraries ***
193 AG_GST_GLIB_CHECK([2.6])
195 dnl liboil is required
196 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
197 if test "x${HAVE_LIBOIL}" != xyes ; then
198 AC_ERROR([liboil-0.3.8 or later is required])
201 dnl checks for gstreamer
202 dnl uninstalled is selected preferentially -- see pkg-config(1)
203 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
204 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
205 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
206 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
207 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
208 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
209 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
211 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
212 AC_SUBST(GSTPB_PLUGINS_DIR)
213 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
215 dnl Check for documentation xrefs
216 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
217 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
218 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
219 AC_SUBST(GLIB_PREFIX)
221 AC_SUBST(GSTPB_PREFIX)
223 dnl GTK is optional and used in examples
225 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
226 if test "x$HAVE_GTK_22" = "xyes"; then
228 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
229 AC_SUBST(GTK_VERSION)
230 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
231 AC_SUBST(GTK_BASE_DIR)
232 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
233 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
234 AC_SUBST(GTK_BASE_DIR)
236 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
238 if test "x$HAVE_GTK_20" = "xyes"; then
241 GTK_CFLAGS=$GTK2_CFLAGS
246 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
248 dnl libglade is optional and only used in examples
250 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
252 AC_SUBST(GLADE_CFLAGS)
254 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
256 dnl set license and copyright notice
258 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
259 AC_SUBST(GST_LICENSE)
261 dnl set location of plugin directory
264 dnl define an ERROR_CFLAGS Makefile variable
265 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
267 dnl define correct level for debugging messages
268 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
270 dnl *** plug-ins to exclude ***
272 dnl see if we can build C++ plug-ins
273 if test "x$HAVE_CXX" != "xyes"; then
274 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
275 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/modplug//g'`
278 dnl real plugin only works on i386 and x86_64 for the time being.
279 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
280 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
281 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/real//g'`
284 dnl disable gst plugins we might not be able to build on this
285 dnl platform: librfb (ugly but minimally invasive)
286 dnl FIXME: maybe move to sys, or make work with winsock2
287 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
288 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
290 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
291 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/librfb//`
294 AC_SUBST(GST_PLUGINS_SELECTED)
296 dnl *** sys plug-ins ***
299 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENGL, true)
300 AG_GST_CHECK_FEATURE(OPENGL, [Open GL], glsink, [
301 PKG_CHECK_MODULES(GL, gl >= 7.1.0, [
311 dnl check for QuickTime
312 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
313 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
314 AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
317 dnl check for Video CD
318 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
319 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
320 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
323 dnl *** ext plug-ins ***
324 dnl keep this list sorted alphabetically !
326 if test "x$BUILD_EXTERNAL" = "xyes"; then
329 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
330 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
331 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
333 AC_SUBST(ALSA_CFLAGS)
336 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
341 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
342 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
343 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
347 AC_SUBST(AMRWB_LIBS))
351 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
352 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
353 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
358 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
359 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
360 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
364 # AC_SUBST(CAIRO_CFLAGS)
365 # AC_SUBST(CAIRO_LIBS)
369 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
370 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
371 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
372 AC_SUBST(CDAUDIO_CFLAGS)
373 AC_SUBST(CDAUDIO_LIBS)
378 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
379 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
380 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0-rc5, HAVE_DC1394="yes", [
384 AC_SUBST(LIBDC1394_CFLAGS)
385 AC_SUBST(LIBDC1394_LIBS)
389 dnl **** DirectFB ****
390 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
391 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
392 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
399 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
400 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
402 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
403 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
404 if test $HAVE_DTS = "no"; then
405 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
406 DTS_LIBS="-ldca -lm")
412 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
413 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
415 AC_CHECK_HEADER(encore2.h, , [
416 AC_MSG_WARN([Divx4linux encore headers not found])
419 if [ test x$HAVE_DIVX = xyes ]; then
420 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
423 #if ENCORE_VERSION != 20021024
424 #error Wrong version of divx encore libraries
434 AC_MSG_WARN([Wrong version of divx4linux installed])
437 if [ test x$HAVE_DIVX = xyes ]; then
438 AC_CHECK_HEADER(decore.h, , [
439 AC_MSG_WARN([Divx4linux decoder headers not found])
443 if [ test x$HAVE_DIVX = xyes ]; then
444 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
447 #if DECORE_VERSION != 20021112
448 #error Wrong version of divx decore libraries
458 AC_MSG_WARN([Wrong version of divx4linux installed])
462 if test x$HAVE_DIVX = xyes; then
463 AC_CHECK_LIB(divxencore, encore, , [
464 AC_MSG_WARN([Divx4linux encore libs not found])
468 if test x$HAVE_DIVX = xyes; then
469 AC_CHECK_LIB(divxdecore, decore, , [
470 AC_MSG_WARN([Divx4linux decore libs not found])
474 if test x$HAVE_DIVX = xyes; then
475 DIVXENC_LIBS="-ldivxencore -lm"
476 DIVXDEC_LIBS="-ldivxdecore -lm"
477 AC_SUBST(DIVXENC_LIBS)
478 AC_SUBST(DIVXDEC_LIBS)
483 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
484 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
486 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
489 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
492 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
495 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))
496 if test x$HAVE_EXIF = xyes; then
497 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
498 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
501 if test x$HAVE_IPTC = xyes; then
502 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
503 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
506 if test x$HAVE_XMP = xyes; then
507 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
508 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
511 if test x$HAVE_METADATA = xno; then
512 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
514 dnl metadata plugin will parse whole chunks anyway
516 AC_SUBST(METADATA_CFLAGS)
517 AC_SUBST(METADATA_LIBS)
520 dnl **** Free AAC Encoder (FAAC) ****
521 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
522 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
523 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
524 FAAC_LIBS="-lfaac -lm")
525 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
529 dnl **** Free AAC Decoder (FAAD) ****
530 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
531 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
533 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
534 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
535 if test $HAVE_FAAD = "no"; then
536 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
537 [ FAAD_LIBS="-lfaad -lm"
538 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
542 if test $HAVE_FAAD = "yes"; then
543 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
544 AC_TRY_COMPILE([#include <faad.h>], [
545 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
548 /* Release candidate of 2.0 is not good enough for us. This field
549 * was added only in 2.0 final and does not exist in 2.0-RC3 */
550 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
560 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
562 AC_SUBST(FAAD_IS_NEAAC)
566 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
567 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
568 if test "x$HAVE_FBDEV" != "xyes"; then
569 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
574 translit(dnm, m, l) AM_CONDITIONAL(USE_GIO, true)
575 AG_GST_CHECK_FEATURE(GIO, [GIO library], gio, [
576 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.15.2, HAVE_GIO="yes", [
585 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
586 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
587 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
588 if test $HAVE_GSM != "yes"; then
589 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
590 if test $HAVE_GSM = "yes"; then
591 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
598 dnl AM_PATH_IVORBIS only takes two options
599 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
600 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
603 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
604 [IVORBIS_LIBS=-lvorbisidec
608 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
612 AC_SUBST(IVORBIS_LIBS)
613 AC_SUBST(IVORBIS_CFLAGS)
617 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
618 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
619 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
620 AC_SUBST(JACK_CFLAGS)
625 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
626 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
627 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
631 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
632 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
633 dnl check with pkg-config first
634 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
639 AC_SUBST(LIBMMS_LIBS)
641 dnl *** mjpegtools version info ***
642 dnl some may prefer older version (given quirks above)
643 dnl hm, no version info seems available within mjpegtools headers
645 PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
646 AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
647 have_mpjegtools_19x=yes
649 have_mpjegtools_19x=no])
651 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
652 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
653 have_mpjegtools_18x=yes
655 have_mpjegtools_18x=no])
658 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
659 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
661 dnl we require a c++ compiler for this one
662 if [ test x$HAVE_CXX = xyes ]; then
663 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
664 dnl since many distros include mjpegtools specifically without mplex
665 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
666 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
667 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
669 dnl switch over to c++ to test things
671 OLD_CPPFLAGS="$CPPFLAGS"
673 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
674 CPPFLAGS="$CPPFLAGS_GOOD -I."
676 mpeg2enc_headers_ok=no
677 AC_CHECK_HEADER([mpeg2encoder.hh], [
678 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
680 LIBS="$LIBS $MPEG2ENC_LIBS"
681 AC_MSG_CHECKING([for valid mpeg2enc objects])
683 #include <mpeg2encoder.hh>
684 #include <mpeg2encoptions.hh>
690 MPEG2EncOptions *options = new MPEG2EncOptions ();
691 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
696 dnl so far so good, let's check more things:
697 dnl mjpegtools-1.8.0 does not install the required
698 dnl mpeg2syntaxcodes.h header by default, and a new release
699 dnl is not in sight, so check for this oversight in case
700 dnl distros or folks have fixed this themselves
701 if test "x$have_mpjegtools_18x" = "xyes"; then
702 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
703 mpeg2enc_headers_ok=yes
705 mpeg2enc_headers_ok=no
708 mpeg2enc_headers_ok=yes
711 if test "x$mpeg2enc_headers_ok" = "xyes"; then
714 CPP_FLAGS="$CPPFLAGS_GOOD"
715 AC_SUBST(MPEG2ENC_CFLAGS)
716 AC_SUBST(MPEG2ENC_LIBS)
723 CPPFLAGS="$OLD_CPPFLAGS"
732 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
733 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
735 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
737 MUSEPACK_LIBS="-lmpcdec"
738 AC_SUBST(MUSEPACK_LIBS)
739 ], [HAVE_MUSEPACK="no"])
743 dnl *** musicbrainz ***
744 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
745 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
746 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
747 AC_SUBST(MUSICBRAINZ_CFLAGS)
748 AC_SUBST(MUSICBRAINZ_LIBS)
752 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
753 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
754 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
758 AC_SUBST(GMYTH_CFLAGS)
763 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
764 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
766 if test "x$HAVE_X" = "xyes"; then
767 save_cppflags=$CFLAGS
768 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
769 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
770 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
771 CPPFLAGS="$save_cppflags"
778 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
779 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
780 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
784 AC_SUBST(NEON_CFLAGS)
789 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
790 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
791 PKG_CHECK_MODULES(SOUP, libsoup-2.4, HAVE_SOUP="yes", [
795 AC_SUBST(SOUP_CFLAGS)
800 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
801 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
802 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
804 AC_MSG_CHECKING([for timidity.cfg])
806 if test -r /etc/timidity.cfg; then
807 timidity_cfg=/etc/timidity.cfg
808 elif test -r /etc/timidity/timidity.cfg; then
809 timidity_cfg=/etc/timidity/timidity.cfg
810 elif test -r /usr/share/timidity/timidity.cfg; then
811 timidity_cfg=/usr/share/timidity/timidity.cfg
812 elif test -r /usr/local/share/timidity/timidity.cfg; then
813 timidity_cfg=/usr/local/share/timidity/timidity.cfg
815 if test "x$timidity_cfg" != "x"; then
816 AC_MSG_RESULT($timidity_cfg)
817 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
819 AC_MSG_RESULT([not found])
825 AC_SUBST(TIMIDITY_CFLAGS)
826 AC_SUBST(TIMIDITY_LIBS)
830 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
831 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
832 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
833 if test "x$HAVE_WILDMIDI" = "xyes"; then
835 WILDMIDI_LIBS=-lWildMidi
836 AC_MSG_NOTICE(compiling gstWildMidi)
840 AC_MSG_WARN(no WildMidi library found (libWildMidi))
842 AC_SUBST(WILDMIDI_CFLAGS)
843 AC_SUBST(WILDMIDI_LIBS)
847 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
848 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
849 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
853 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
854 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
855 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
856 AC_SUBST(SNDFILE_CFLAGS)
857 AC_SUBST(SNDFILE_LIBS)
860 dnl *** soundtouch ***
861 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
862 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
863 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
865 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
867 HAVE_SOUNDTOUCH=no)])
868 AC_SUBST(SOUNDTOUCH_CFLAGS)
869 AC_SUBST(SOUNDTOUCH_LIBS)
870 if test "x$HAVE_CXX" != "xyes"; then
872 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
877 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
878 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
879 AC_CHECK_HEADER(openspc.h, [
880 AC_CHECK_LIB(openspc, OSPC_Init, [
893 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
894 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
895 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
899 AC_SUBST(SWFDEC_CFLAGS)
900 AC_SUBST(SWFDEC_LIBS)
904 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
905 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
906 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
910 AC_SUBST(THEORADEC_LIBS)
911 AC_SUBST(THEORADEC_CFLAGS)
914 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
915 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
916 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
917 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
918 X264_LIBS="$LDFLAGS -lx264 -lm"
919 X264_CFLAGS="$CFLAGS"
921 AC_SUBST(X264_CFLAGS))
925 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
926 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
928 AC_CHECK_HEADER(xvid.h, [
931 AC_CHECK_LIB(xvidcore, xvid_encore, [
932 AC_CHECK_LIB(xvidcore, xvid_decore, [
933 AC_CHECK_LIB(xvidcore, xvid_global, [
934 AC_MSG_CHECKING([for uptodate XviD API version])
935 AC_TRY_COMPILE([#include <xvid.h>], [
936 #if XVID_API_MAJOR(XVID_API) != 4
937 #error "Incompatible XviD API version"
939 ],[ AC_MSG_RESULT(yes)
940 XVID_LIBS="-lxvidcore -lm"
943 ], AC_MSG_RESULT(no) )
952 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
953 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
954 AC_MSG_CHECKING([Checking for up to date dvb installation])
955 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
960 dnl not building plugins with external dependencies,
961 dnl but we still need to set the conditionals
963 AM_CONDITIONAL(USE_OPENGL, false)
964 AM_CONDITIONAL(USE_QUICKTIME, false)
965 AM_CONDITIONAL(USE_VCD, false)
966 AM_CONDITIONAL(USE_ALSA, false)
967 AM_CONDITIONAL(USE_AMRWB, false)
968 AM_CONDITIONAL(USE_BZ2, false)
969 AM_CONDITIONAL(USE_CDAUDIO, false)
970 AM_CONDITIONAL(USE_DIRECTFB, false)
971 AM_CONDITIONAL(USE_DTS, false)
972 AM_CONDITIONAL(USE_DIVX, false)
973 AM_CONDITIONAL(USE_FAAC, false)
974 AM_CONDITIONAL(USE_FAAD, false)
975 AM_CONDITIONAL(USE_FBDEV, false)
976 AM_CONDITIONAL(USE_GIO, false)
977 AM_CONDITIONAL(USE_GSM, false)
978 AM_CONDITIONAL(USE_IVORBIS, false)
979 AM_CONDITIONAL(USE_JACK, false)
980 AM_CONDITIONAL(USE_LADSPA, false)
981 AM_CONDITIONAL(USE_LIBMMS, false)
982 AM_CONDITIONAL(USE_MPEG2ENC, false)
983 AM_CONDITIONAL(USE_MUSEPACK, false)
984 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
985 AM_CONDITIONAL(USE_MYTHTV, false)
986 AM_CONDITIONAL(USE_NAS, false)
987 AM_CONDITIONAL(USE_NEON, false)
988 AM_CONDITIONAL(USE_SOUP, false)
989 AM_CONDITIONAL(USE_SDL, false)
990 AM_CONDITIONAL(USE_SNDFILE, false)
991 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
992 AM_CONDITIONAL(USE_SPC, false)
993 AM_CONDITIONAL(USE_SWFDEC, false)
994 AM_CONDITIONAL(USE_THEORADEC, false)
995 AM_CONDITIONAL(USE_TIMIDITY, false)
996 AM_CONDITIONAL(USE_X264, false)
997 AM_CONDITIONAL(USE_XVID, false)
998 AM_CONDITIONAL(USE_WILDMIDI, false)
999 AM_CONDITIONAL(USE_DVB, false)
1001 fi dnl of EXT plugins
1003 dnl *** finalize CFLAGS, LDFLAGS, LIBS
1006 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
1007 dnl GST_*: flags shared by built objects to link against GStreamer
1008 dnl GST_ALL_LDFLAGS: linker flags shared by all
1009 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
1010 dnl GST_LT_LDFLAGS: library versioning of our libraries
1011 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
1013 dnl GST_OPTION_CFLAGS
1014 if test "x$USE_DEBUG" = xyes; then
1017 AC_SUBST(PROFILE_CFLAGS)
1019 if test "x$GST_CVS" = "xyes"; then
1020 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1022 DEPRECATED_CFLAGS=""
1024 AC_SUBST(DEPRECATED_CFLAGS)
1026 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
1027 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1028 AC_SUBST(GST_OPTION_CFLAGS)
1030 dnl FIXME: do we want to rename to GST_ALL_* ?
1031 dnl prefer internal headers to already installed ones
1032 dnl also add builddir include for enumtypes and marshal
1033 dnl add GST_OPTION_CFLAGS, but overridable
1034 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1035 AC_SUBST(GST_CFLAGS)
1038 dnl LDFLAGS really should only contain flags, not libs - they get added before
1039 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1040 GST_ALL_LDFLAGS="-no-undefined"
1041 AC_SUBST(GST_ALL_LDFLAGS)
1043 dnl this really should only contain flags, not libs - they get added before
1044 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1045 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1046 AC_SUBST(GST_PLUGIN_LDFLAGS)
1048 dnl *** output files ***
1055 gst-plugins-bad.spec
1059 gst/cdxaparse/Makefile
1060 gst/deinterlace/Makefile
1062 gst/equalizer/Makefile
1063 gst/festival/Makefile
1067 gst/h264parse/Makefile
1068 gst/interleave/Makefile
1070 gst/modplug/Makefile
1071 gst/modplug/libmodplug/Makefile
1072 gst/mpegtsparse/Makefile
1073 gst/mpeg4videoparse/Makefile
1074 gst/mpegvideoparse/Makefile
1075 gst/multifile/Makefile
1078 gst/nuvdemux/Makefile
1079 gst/rawparse/Makefile
1080 gst/replaygain/Makefile
1081 gst/rtpmanager/Makefile
1083 gst/selector/Makefile
1084 gst/spectrum/Makefile
1086 gst/speexresample/Makefile
1089 gst/videosignal/Makefile
1091 gst/xingheader/Makefile
1095 gst-libs/gst/Makefile
1096 gst-libs/gst/app/Makefile
1101 sys/qtwrapper/Makefile
1104 examples/app/Makefile
1105 examples/directfb/Makefile
1106 examples/switch/Makefile
1108 ext/alsaspdif/Makefile
1110 ext/cdaudio/Makefile
1112 ext/directfb/Makefile
1115 ext/metadata/Makefile
1120 ext/ivorbis/Makefile
1126 ext/mpeg2enc/Makefile
1127 ext/musepack/Makefile
1128 ext/musicbrainz/Makefile
1133 ext/sndfile/Makefile
1134 ext/soundtouch/Makefile
1138 ext/timidity/Makefile
1143 docs/plugins/Makefile
1144 docs/version.entities
1149 tests/check/Makefile
1150 tests/icles/Makefile
1151 win32/common/config.h
1155 AG_GST_OUTPUT_PLUGINS