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")
324 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
325 AG_GST_CHECK_FEATURE(X, [X libraries and plugins],
329 dnl now try to find the HEADER
330 ac_cflags_save="$CFLAGS"
331 ac_cppflags_save="$CPPFLAGS"
332 CFLAGS="$CFLAGS $X_CFLAGS"
333 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
334 AC_CHECK_HEADER(X11/X.h, HAVE_X="yes", HAVE_X="no")
336 if test "x$HAVE_X" = "xno"
338 AC_MSG_NOTICE([cannot find X11 development files])
340 dnl this is much more than we want
341 X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
342 dnl AC_PATH_XTRA only defines the path needed to find the X libs,
343 dnl it does not add the libs; therefore we add them here
344 X_LIBS="$X_LIBS -lX11"
349 CFLAGS="$ac_cflags_save"
350 CPPFLAGS="$ac_cppflags_save"
353 dnl *** ext plug-ins ***
354 dnl keep this list sorted alphabetically !
356 if test "x$BUILD_EXTERNAL" = "xyes"; then
359 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
360 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
361 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
363 AC_SUBST(ALSA_CFLAGS)
366 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
371 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
372 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
373 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
377 AC_SUBST(AMRWB_LIBS))
381 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
382 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
383 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
388 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
389 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
390 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
394 # AC_SUBST(CAIRO_CFLAGS)
395 # AC_SUBST(CAIRO_LIBS)
399 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
400 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
401 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
402 AC_SUBST(CDAUDIO_CFLAGS)
403 AC_SUBST(CDAUDIO_LIBS)
408 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
409 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
410 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0-rc5, HAVE_DC1394="yes", [
414 AC_SUBST(LIBDC1394_CFLAGS)
415 AC_SUBST(LIBDC1394_LIBS)
419 dnl **** DirectFB ****
420 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
421 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
422 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
429 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
430 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
432 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
433 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
434 if test $HAVE_DTS = "no"; then
435 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
436 DTS_LIBS="-ldca -lm")
442 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
443 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
445 AC_CHECK_HEADER(encore2.h, , [
446 AC_MSG_WARN([Divx4linux encore headers not found])
449 if [ test x$HAVE_DIVX = xyes ]; then
450 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
453 #if ENCORE_VERSION != 20021024
454 #error Wrong version of divx encore libraries
464 AC_MSG_WARN([Wrong version of divx4linux installed])
467 if [ test x$HAVE_DIVX = xyes ]; then
468 AC_CHECK_HEADER(decore.h, , [
469 AC_MSG_WARN([Divx4linux decoder headers not found])
473 if [ test x$HAVE_DIVX = xyes ]; then
474 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
477 #if DECORE_VERSION != 20021112
478 #error Wrong version of divx decore libraries
488 AC_MSG_WARN([Wrong version of divx4linux installed])
492 if test x$HAVE_DIVX = xyes; then
493 AC_CHECK_LIB(divxencore, encore, , [
494 AC_MSG_WARN([Divx4linux encore libs not found])
498 if test x$HAVE_DIVX = xyes; then
499 AC_CHECK_LIB(divxdecore, decore, , [
500 AC_MSG_WARN([Divx4linux decore libs not found])
504 if test x$HAVE_DIVX = xyes; then
505 DIVXENC_LIBS="-ldivxencore -lm"
506 DIVXDEC_LIBS="-ldivxdecore -lm"
507 AC_SUBST(DIVXENC_LIBS)
508 AC_SUBST(DIVXDEC_LIBS)
513 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
514 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
516 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
519 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
522 AC_CHECK_HEADER(exempi-2.0/exempi/xmp.h,
524 AC_CHECK_LIB(exempi, xmp_init,
527 XMP_CFLAGS="-I/usr/local/include/exempi-2.0/exempi/"
531 if test x$HAVE_EXIF = xyes; then
532 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
533 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
536 if test x$HAVE_IPTC = xyes; then
537 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
538 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
541 if test x$HAVE_XMP = xyes; then
542 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
543 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
546 if test x$HAVE_METADATA = xno; then
547 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
549 dnl metadata plugin will parse whole chunks anyway
551 AC_SUBST(METADATA_CFLAGS)
552 AC_SUBST(METADATA_LIBS)
555 dnl **** Free AAC Encoder (FAAC) ****
556 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
557 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
558 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
559 FAAC_LIBS="-lfaac -lm")
560 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
564 dnl **** Free AAC Decoder (FAAD) ****
565 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
566 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
568 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
569 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
570 if test $HAVE_FAAD = "no"; then
571 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
572 [ FAAD_LIBS="-lfaad -lm"
573 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
577 if test $HAVE_FAAD = "yes"; then
578 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
579 AC_TRY_COMPILE([#include <faad.h>], [
580 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
583 /* Release candidate of 2.0 is not good enough for us. This field
584 * was added only in 2.0 final and does not exist in 2.0-RC3 */
585 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
595 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
597 AC_SUBST(FAAD_IS_NEAAC)
601 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
602 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
603 if test "x$HAVE_FBDEV" != "xyes"; then
604 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
609 translit(dnm, m, l) AM_CONDITIONAL(USE_GIO, true)
610 AG_GST_CHECK_FEATURE(GIO, [GIO library], gio, [
611 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.15.2, HAVE_GIO="yes", [
620 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
621 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
622 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
623 if test $HAVE_GSM != "yes"; then
624 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
625 if test $HAVE_GSM = "yes"; then
626 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
633 dnl AM_PATH_IVORBIS only takes two options
634 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
635 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
638 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
639 [IVORBIS_LIBS=-lvorbisidec
643 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
647 AC_SUBST(IVORBIS_LIBS)
648 AC_SUBST(IVORBIS_CFLAGS)
652 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
653 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
654 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
655 AC_SUBST(JACK_CFLAGS)
660 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
661 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
662 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
666 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
667 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
668 dnl check with pkg-config first
669 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
674 AC_SUBST(LIBMMS_LIBS)
676 dnl *** mjpegtools version info ***
677 dnl some may prefer older version (given quirks above)
678 dnl hm, no version info seems available within mjpegtools headers
679 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
680 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
681 have_mpjegtools_18x=yes
683 have_mpjegtools_18x=no])
686 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
687 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
689 dnl we require a c++ compiler for this one
690 if [ test x$HAVE_CXX = xyes ]; then
691 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
692 dnl since many distros include mjpegtools specifically without mplex
693 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
694 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
695 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
697 dnl switch over to c++ to test things
699 OLD_CPPFLAGS="$CPPFLAGS"
701 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
702 CPPFLAGS="$CPPFLAGS_GOOD -I."
704 mpeg2enc_headers_ok=no
705 AC_CHECK_HEADER([mpeg2encoder.hh], [
706 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
708 LIBS="$LIBS $MPEG2ENC_LIBS"
709 AC_MSG_CHECKING([for valid mpeg2enc objects])
711 #include <mpeg2encoder.hh>
712 #include <mpeg2encoptions.hh>
718 MPEG2EncOptions *options = new MPEG2EncOptions ();
719 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
724 dnl so far so good, let's check more things:
725 dnl mjpegtools-1.8.0 does not install the required
726 dnl mpeg2syntaxcodes.h header by default, and a new release
727 dnl is not in sight, so check for this oversight in case
728 dnl distros or folks have fixed this themselves
729 if test "x$have_mpjegtools_18x" = "xyes"; then
730 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
731 mpeg2enc_headers_ok=yes
733 mpeg2enc_headers_ok=no
736 if test "x$mpeg2enc_headers_ok" = "xyes"; then
739 CPP_FLAGS="$CPPFLAGS_GOOD"
740 AC_SUBST(MPEG2ENC_CFLAGS)
741 AC_SUBST(MPEG2ENC_LIBS)
748 CPPFLAGS="$OLD_CPPFLAGS"
757 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
758 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
760 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
762 MUSEPACK_LIBS="-lmpcdec"
763 AC_SUBST(MUSEPACK_LIBS)
764 ], [HAVE_MUSEPACK="no"])
768 dnl *** musicbrainz ***
769 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
770 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
771 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
772 AC_SUBST(MUSICBRAINZ_CFLAGS)
773 AC_SUBST(MUSICBRAINZ_LIBS)
777 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
778 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
779 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
783 AC_SUBST(GMYTH_CFLAGS)
788 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
789 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
791 if test "x$HAVE_X" = "xyes"; then
792 save_cppflags=$CFLAGS
793 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
794 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
795 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
796 CPPFLAGS="$save_cppflags"
803 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
804 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
805 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
809 AC_SUBST(NEON_CFLAGS)
814 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
815 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugins], souphttpsrc, [
816 PKG_CHECK_MODULES(SOUP, libsoup-2.2 >= 2.2.104, HAVE_SOUP="yes", [
820 AC_SUBST(SOUP_CFLAGS)
825 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
826 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
827 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
829 AC_MSG_CHECKING([for timidity.cfg])
831 if test -r /etc/timidity.cfg; then
832 timidity_cfg=/etc/timidity.cfg
833 elif test -r /etc/timidity/timidity.cfg; then
834 timidity_cfg=/etc/timidity/timidity.cfg
835 elif test -r /usr/share/timidity/timidity.cfg; then
836 timidity_cfg=/usr/share/timidity/timidity.cfg
837 elif test -r /usr/local/share/timidity/timidity.cfg; then
838 timidity_cfg=/usr/local/share/timidity/timidity.cfg
840 if test "x$timidity_cfg" != "x"; then
841 AC_MSG_RESULT($timidity_cfg)
842 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
844 AC_MSG_RESULT([not found])
850 AC_SUBST(TIMIDITY_CFLAGS)
851 AC_SUBST(TIMIDITY_LIBS)
855 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
856 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
857 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
858 if test "x$HAVE_WILDMIDI" = "xyes"; then
860 WILDMIDI_LIBS=-lWildMidi
861 AC_MSG_NOTICE(compiling gstWildMidi)
865 AC_MSG_WARN(no WildMidi library found (libWildMidi))
867 AC_SUBST(WILDMIDI_CFLAGS)
868 AC_SUBST(WILDMIDI_LIBS)
872 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
873 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
874 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
878 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
879 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
880 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
881 AC_SUBST(SNDFILE_CFLAGS)
882 AC_SUBST(SNDFILE_LIBS)
885 dnl *** soundtouch ***
886 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
887 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
888 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
890 PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
893 AC_SUBST(SOUNDTOUCH_CFLAGS)
894 AC_SUBST(SOUNDTOUCH_LIBS)
895 if test "x$HAVE_CXX" != "xyes"; then
897 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
902 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
903 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
904 AC_CHECK_HEADER(openspc.h, [
905 AC_CHECK_LIB(openspc, OSPC_Init, [
918 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
919 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
920 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
924 AC_SUBST(SWFDEC_CFLAGS)
925 AC_SUBST(SWFDEC_LIBS)
929 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
930 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
931 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
935 AC_SUBST(THEORADEC_LIBS)
936 AC_SUBST(THEORADEC_CFLAGS)
939 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
940 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
941 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
942 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
943 X264_LIBS="$LDFLAGS -lx264 -lm"
944 X264_CFLAGS="$CFLAGS"
946 AC_SUBST(X264_CFLAGS))
950 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
951 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
953 AC_CHECK_HEADER(xvid.h, [
956 AC_CHECK_LIB(xvidcore, xvid_encore, [
957 AC_CHECK_LIB(xvidcore, xvid_decore, [
958 AC_CHECK_LIB(xvidcore, xvid_global, [
959 AC_MSG_CHECKING([for uptodate XviD API version])
960 AC_TRY_COMPILE([#include <xvid.h>], [
961 #if XVID_API_MAJOR(XVID_API) != 4
962 #error "Incompatible XviD API version"
964 ],[ AC_MSG_RESULT(yes)
965 XVID_LIBS="-lxvidcore -lm"
968 ], AC_MSG_RESULT(no) )
977 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
978 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
979 AC_MSG_CHECKING([Checking for up to date dvb installation])
980 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
985 dnl not building plugins with external dependencies,
986 dnl but we still need to set the conditionals
988 AM_CONDITIONAL(USE_OPENGL, false)
989 AM_CONDITIONAL(USE_QUICKTIME, false)
990 AM_CONDITIONAL(USE_VCD, false)
991 AM_CONDITIONAL(USE_X, false)
992 AM_CONDITIONAL(USE_ALSA, false)
993 AM_CONDITIONAL(USE_AMRWB, false)
994 AM_CONDITIONAL(USE_BZ2, false)
995 AM_CONDITIONAL(USE_CDAUDIO, false)
996 AM_CONDITIONAL(USE_DIRECTFB, false)
997 AM_CONDITIONAL(USE_DTS, false)
998 AM_CONDITIONAL(USE_DIVX, false)
999 AM_CONDITIONAL(USE_FAAC, false)
1000 AM_CONDITIONAL(USE_FAAD, false)
1001 AM_CONDITIONAL(USE_FBDEV, false)
1002 AM_CONDITIONAL(USE_GIO, false)
1003 AM_CONDITIONAL(USE_GSM, false)
1004 AM_CONDITIONAL(USE_IVORBIS, false)
1005 AM_CONDITIONAL(USE_JACK, false)
1006 AM_CONDITIONAL(USE_LADSPA, false)
1007 AM_CONDITIONAL(USE_LIBMMS, false)
1008 AM_CONDITIONAL(USE_MPEG2ENC, false)
1009 AM_CONDITIONAL(USE_MUSEPACK, false)
1010 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
1011 AM_CONDITIONAL(USE_MYTHTV, false)
1012 AM_CONDITIONAL(USE_NAS, false)
1013 AM_CONDITIONAL(USE_NEON, false)
1014 AM_CONDITIONAL(USE_SOUP, false)
1015 AM_CONDITIONAL(USE_SDL, false)
1016 AM_CONDITIONAL(USE_SNDFILE, false)
1017 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
1018 AM_CONDITIONAL(USE_SPC, false)
1019 AM_CONDITIONAL(USE_SWFDEC, false)
1020 AM_CONDITIONAL(USE_THEORADEC, false)
1021 AM_CONDITIONAL(USE_TIMIDITY, false)
1022 AM_CONDITIONAL(USE_X264, false)
1023 AM_CONDITIONAL(USE_XVID, false)
1024 AM_CONDITIONAL(USE_WILDMIDI, false)
1025 AM_CONDITIONAL(USE_DVB, false)
1027 fi dnl of EXT plugins
1029 dnl *** finalize CFLAGS, LDFLAGS, LIBS
1032 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
1033 dnl GST_*: flags shared by built objects to link against GStreamer
1034 dnl GST_ALL_LDFLAGS: linker flags shared by all
1035 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
1036 dnl GST_LT_LDFLAGS: library versioning of our libraries
1037 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
1039 dnl GST_OPTION_CFLAGS
1040 if test "x$USE_DEBUG" = xyes; then
1043 AC_SUBST(PROFILE_CFLAGS)
1045 if test "x$GST_CVS" = "xyes"; then
1046 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1048 DEPRECATED_CFLAGS=""
1050 AC_SUBST(DEPRECATED_CFLAGS)
1052 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
1053 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1054 AC_SUBST(GST_OPTION_CFLAGS)
1056 dnl FIXME: do we want to rename to GST_ALL_* ?
1057 dnl prefer internal headers to already installed ones
1058 dnl also add builddir include for enumtypes and marshal
1059 dnl add GST_OPTION_CFLAGS, but overridable
1060 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1061 AC_SUBST(GST_CFLAGS)
1064 dnl LDFLAGS really should only contain flags, not libs - they get added before
1065 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1066 GST_ALL_LDFLAGS="-no-undefined"
1067 AC_SUBST(GST_ALL_LDFLAGS)
1069 dnl this really should only contain flags, not libs - they get added before
1070 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1071 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1072 AC_SUBST(GST_PLUGIN_LDFLAGS)
1074 dnl *** output files ***
1081 gst-plugins-bad.spec
1085 gst/cdxaparse/Makefile
1086 gst/deinterlace/Makefile
1088 gst/equalizer/Makefile
1089 gst/festival/Makefile
1093 gst/h264parse/Makefile
1094 gst/interleave/Makefile
1096 gst/modplug/Makefile
1097 gst/modplug/libmodplug/Makefile
1098 gst/mpegtsparse/Makefile
1099 gst/mpeg4videoparse/Makefile
1100 gst/mpegvideoparse/Makefile
1101 gst/multifile/Makefile
1104 gst/nuvdemux/Makefile
1105 gst/rawparse/Makefile
1106 gst/replaygain/Makefile
1107 gst/rtpmanager/Makefile
1109 gst/spectrum/Makefile
1111 gst/speexresample/Makefile
1115 gst/videosignal/Makefile
1117 gst/xingheader/Makefile
1121 gst-libs/gst/Makefile
1122 gst-libs/gst/app/Makefile
1127 sys/qtwrapper/Makefile
1130 examples/app/Makefile
1131 examples/directfb/Makefile
1132 examples/switch/Makefile
1134 ext/alsaspdif/Makefile
1136 ext/cdaudio/Makefile
1138 ext/directfb/Makefile
1141 ext/metadata/Makefile
1146 ext/ivorbis/Makefile
1152 ext/mpeg2enc/Makefile
1153 ext/musepack/Makefile
1154 ext/musicbrainz/Makefile
1159 ext/sndfile/Makefile
1160 ext/soundtouch/Makefile
1164 ext/timidity/Makefile
1169 docs/plugins/Makefile
1170 docs/version.entities
1175 tests/check/Makefile
1176 tests/icles/Makefile
1177 win32/common/config.h
1181 AG_GST_OUTPUT_PLUGINS