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.6.3,
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])
47 dnl *** required versions of GStreamer stuff ***
48 dnl *** remove rtpmanager stuff below when this is updated
52 dnl *** autotools stuff ****
54 dnl allow for different autotools
55 AS_AUTOTOOLS_ALTERNATE
57 dnl Add parameters for aclocal
58 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
61 dnl the version check needs to stay here because autopoint greps for it
62 AM_GNU_GETTEXT_VERSION([0.11.5])
63 AM_GNU_GETTEXT([external])
64 AG_GST_GETTEXT([gst-plugins-bad-$GST_MAJORMINOR])
66 dnl *** check for arguments to configure ***
75 AG_GST_ARG_WITH_PKG_CONFIG_PATH
76 AG_GST_ARG_WITH_PACKAGE_NAME
77 AG_GST_ARG_WITH_PACKAGE_ORIGIN
79 AG_GST_ARG_WITH_PLUGINS
81 AG_GST_ARG_ENABLE_EXTERNAL
83 AG_GST_ARG_ENABLE_EXPERIMENTAL
85 dnl *** checks for platform ***
87 dnl * hardware/architecture *
89 dnl common/m4/gst-arch.m4
93 dnl Determine endianness
96 dnl *** checks for programs ***
101 dnl determine c++ compiler
103 dnl determine if c++ is available on this system
104 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
108 dnl check if the compiler supports '-c' and '-o' options
111 dnl check if the compiler supports do while(0) macros
112 AG_GST_CHECK_DOWHILE_MACROS
114 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
115 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
117 dnl check for documentation tools
119 AS_PATH_PYTHON([2.1])
120 AG_GST_PLUGIN_DOCS([1.3],[2.1])
122 dnl *** checks for libraries ***
124 dnl check for libm, for sin() etc.
128 dnl *** checks for header files ***
130 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
131 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
133 if test "x$HAVE_UNISTD_H" != "xyes"; then
134 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
140 dnl *** checks for types/defines ***
142 dnl *** checks for structures ***
144 dnl *** checks for compiler characteristics ***
146 dnl *** checks for library functions ***
148 dnl *** checks for dependency libraries ***
151 AG_GST_GLIB_CHECK([2.6])
153 dnl liboil is required
154 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
155 if test "x$HAVE_LIBOIL" != "xyes"; then
156 AC_ERROR([liboil-0.3.8 or later is required])
159 dnl checks for gstreamer
160 dnl uninstalled is selected preferentially -- see pkg-config(1)
161 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
162 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
163 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
164 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
165 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
166 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
167 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
169 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
170 AC_SUBST(GSTPB_PLUGINS_DIR)
171 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
173 dnl Check for documentation xrefs
174 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
175 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
176 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
177 AC_SUBST(GLIB_PREFIX)
179 AC_SUBST(GSTPB_PREFIX)
181 dnl GTK is optional and used in examples
183 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
184 if test "x$HAVE_GTK_22" = "xyes"; then
186 GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
187 AC_SUBST(GTK_VERSION)
188 GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
189 AC_SUBST(GTK_BASE_DIR)
190 GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
191 GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
192 AC_SUBST(GTK_BASE_DIR)
194 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
196 if test "x$HAVE_GTK_20" = "xyes"; then
199 GTK_CFLAGS=$GTK2_CFLAGS
204 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
206 dnl libglade is optional and only used in examples
208 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
210 AC_SUBST(GLADE_CFLAGS)
212 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
214 dnl set license and copyright notice
216 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
217 AC_SUBST(GST_LICENSE)
219 dnl set location of plugin directory
222 dnl define an ERROR_CFLAGS Makefile variable
223 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
225 dnl define an ERROR_CXXFLAGS Makefile variable
226 AG_GST_SET_ERROR_CXXFLAGS($GST_CVS)
228 dnl define correct level for debugging messages
229 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
231 dnl *** plug-ins to include ***
233 dnl these are all the gst plug-ins, compilable without additional libs
234 AG_GST_CHECK_PLUGIN(app)
235 AG_GST_CHECK_PLUGIN(bayer)
236 AG_GST_CHECK_PLUGIN(cdxaparse)
237 AG_GST_CHECK_PLUGIN(deinterlace)
238 AG_GST_CHECK_PLUGIN(dvdspu)
239 AG_GST_CHECK_PLUGIN(festival)
240 AG_GST_CHECK_PLUGIN(filter)
241 AG_GST_CHECK_PLUGIN(flv)
242 AG_GST_CHECK_PLUGIN(freeze)
243 AG_GST_CHECK_PLUGIN(h264parse)
244 AG_GST_CHECK_PLUGIN(interleave)
245 AG_GST_CHECK_PLUGIN(librfb)
246 AG_GST_CHECK_PLUGIN(modplug)
247 AG_GST_CHECK_PLUGIN(mpegtsparse)
248 AG_GST_CHECK_PLUGIN(mpeg4videoparse)
249 AG_GST_CHECK_PLUGIN(mpegvideoparse)
250 AG_GST_CHECK_PLUGIN(mve)
251 AG_GST_CHECK_PLUGIN(nsf)
252 AG_GST_CHECK_PLUGIN(nuvdemux)
253 AG_GST_CHECK_PLUGIN(rawparse)
254 AG_GST_CHECK_PLUGIN(real)
255 AG_GST_CHECK_PLUGIN(replaygain)
256 AG_GST_CHECK_PLUGIN(rtpmanager)
257 AG_GST_CHECK_PLUGIN(sdp)
258 AG_GST_CHECK_PLUGIN(selector)
259 AG_GST_CHECK_PLUGIN(speed)
260 AG_GST_CHECK_PLUGIN(speexresample)
261 AG_GST_CHECK_PLUGIN(subenc)
262 AG_GST_CHECK_PLUGIN(stereo)
263 AG_GST_CHECK_PLUGIN(tta)
264 AG_GST_CHECK_PLUGIN(videosignal)
265 AG_GST_CHECK_PLUGIN(vmnc)
266 AG_GST_CHECK_PLUGIN(y4m)
268 dnl *** plug-ins to exclude ***
270 dnl see if we can build C++ plug-ins
271 if test "x$HAVE_CXX" != "xyes"; then
272 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
273 AG_GST_DISABLE_PLUGIN(modplug)
276 dnl real plugin only works on i386 and x86_64 for the time being.
277 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
278 AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
279 AG_GST_DISABLE_PLUGIN(real)
282 dnl disable gst plugins we might not be able to build on this
283 dnl platform: librfb (ugly but minimally invasive)
284 dnl FIXME: maybe move to sys, or make work with winsock2
285 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
286 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
288 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
289 AG_GST_DISABLE_PLUGIN(librfb)
292 dnl *** sys plug-ins ***
294 dnl check for QuickTime
295 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
296 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
297 AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
300 dnl check for Video CD
301 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
302 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
303 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
306 dnl *** ext plug-ins ***
307 dnl keep this list sorted alphabetically !
309 if test "x$BUILD_EXTERNAL" = "xyes"; then
312 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
313 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
314 PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
316 AC_SUBST(ALSA_CFLAGS)
319 AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
324 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
325 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
326 AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
330 AC_SUBST(AMRWB_LIBS))
334 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
335 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
336 AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
341 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
342 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
343 # PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
347 # AC_SUBST(CAIRO_CFLAGS)
348 # AC_SUBST(CAIRO_LIBS)
352 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
353 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
354 AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
355 AC_SUBST(CDAUDIO_CFLAGS)
356 AC_SUBST(CDAUDIO_LIBS)
361 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
362 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
363 PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0, [
364 if test -z "`pkg-config --modversion libdc1394-2 | grep 2.0.0-rc`"; then
374 AC_SUBST(LIBDC1394_CFLAGS)
375 AC_SUBST(LIBDC1394_LIBS)
379 dnl **** DirectFB ****
380 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
381 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
382 PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
389 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRAC, true)
390 AG_GST_CHECK_FEATURE(DIRAC, [dirac], dirac, [
391 PKG_CHECK_MODULES(DIRAC, dirac >= 0.9, HAVE_DIRAC="yes", [
398 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
399 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
401 AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
402 DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
403 if test $HAVE_DTS = "no"; then
404 AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
405 DTS_LIBS="-ldca -lm")
411 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
412 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
414 AC_CHECK_HEADER(encore2.h, , [
415 AC_MSG_WARN([Divx4linux encore headers not found])
418 if [ test x$HAVE_DIVX = xyes ]; then
419 AC_MSG_CHECKING([Checking for valid divx4linux encore version])
422 #if ENCORE_VERSION != 20021024
423 #error Wrong version of divx encore libraries
433 AC_MSG_WARN([Wrong version of divx4linux installed])
436 if [ test x$HAVE_DIVX = xyes ]; then
437 AC_CHECK_HEADER(decore.h, , [
438 AC_MSG_WARN([Divx4linux decoder headers not found])
442 if [ test x$HAVE_DIVX = xyes ]; then
443 AC_MSG_CHECKING([Checking for valid divx4linux decore version])
446 #if DECORE_VERSION != 20021112
447 #error Wrong version of divx decore libraries
457 AC_MSG_WARN([Wrong version of divx4linux installed])
461 if test x$HAVE_DIVX = xyes; then
462 AC_CHECK_LIB(divxencore, encore, , [
463 AC_MSG_WARN([Divx4linux encore libs not found])
467 if test x$HAVE_DIVX = xyes; then
468 AC_CHECK_LIB(divxdecore, decore, , [
469 AC_MSG_WARN([Divx4linux decore libs not found])
473 if test x$HAVE_DIVX = xyes; then
474 DIVXENC_LIBS="-ldivxencore -lm"
475 DIVXDEC_LIBS="-ldivxdecore -lm"
476 AC_SUBST(DIVXENC_LIBS)
477 AC_SUBST(DIVXDEC_LIBS)
482 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
483 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
485 PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
488 PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
491 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
494 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))
495 if test x$HAVE_EXIF = xyes; then
496 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
497 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
500 if test x$HAVE_IPTC = xyes; then
501 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
502 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
505 if test x$HAVE_XMP = xyes; then
506 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
507 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
510 if test x$HAVE_METADATA = xno; then
511 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
513 dnl metadata plugin will parse whole chunks anyway
515 AC_SUBST(METADATA_CFLAGS)
516 AC_SUBST(METADATA_LIBS)
519 dnl **** Free AAC Encoder (FAAC) ****
520 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
521 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
522 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
523 FAAC_LIBS="-lfaac -lm")
524 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
528 dnl **** Free AAC Decoder (FAAD) ****
529 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
530 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
532 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
533 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
534 if test $HAVE_FAAD = "no"; then
535 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
536 [ FAAD_LIBS="-lfaad -lm"
537 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
541 if test $HAVE_FAAD = "yes"; then
542 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
543 AC_TRY_COMPILE([#include <faad.h>], [
544 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
547 /* Release candidate of 2.0 is not good enough for us. This field
548 * was added only in 2.0 final and does not exist in 2.0-RC3 */
549 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
559 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
561 AC_SUBST(FAAD_IS_NEAAC)
565 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
566 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
567 if test "x$HAVE_FBDEV" != "xyes"; then
568 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
573 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
574 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
575 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
576 if test $HAVE_GSM != "yes"; then
577 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
578 if test $HAVE_GSM = "yes"; then
579 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
586 dnl AM_PATH_IVORBIS only takes two options
587 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
588 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
591 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
592 [IVORBIS_LIBS=-lvorbisidec
596 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
600 AC_SUBST(IVORBIS_LIBS)
601 AC_SUBST(IVORBIS_CFLAGS)
605 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
606 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
607 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
608 AC_SUBST(JACK_CFLAGS)
613 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
614 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
615 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
619 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
620 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
621 dnl check with pkg-config first
622 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
627 AC_SUBST(LIBMMS_LIBS)
629 dnl *** mjpegtools version info ***
630 dnl some may prefer older version (given quirks above)
631 dnl hm, no version info seems available within mjpegtools headers
632 dnl and API really moves along
634 PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [
637 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
640 PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0, [
641 dnl logging API changed in release candidates
644 CFLAGS="$MJPEG_CFLAGS"
645 LIBS="$LIBS $MJPEG_LIBS -lmjpegutils -lm -lpthread"
646 AC_CHECK_FUNC(mjpeg_loglev_t, [
658 AC_DEFINE_UNQUOTED(GST_MJPEGTOOLS_API, $mjpegtools_api,
659 [mjpegtools API evolution])
662 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
663 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
665 dnl we require a c++ compiler for this one
666 if [ test x$HAVE_CXX = xyes ]; then
667 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
668 dnl since many distros include mjpegtools specifically without mplex
669 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
670 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
671 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
673 dnl switch over to c++ to test things
675 OLD_CPPFLAGS="$CPPFLAGS"
677 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
678 CPPFLAGS="$CPPFLAGS_GOOD -I."
680 mpeg2enc_headers_ok=no
681 AC_CHECK_HEADER([mpeg2encoder.hh], [
682 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
684 LIBS="$LIBS $MPEG2ENC_LIBS"
685 AC_MSG_CHECKING([for valid mpeg2enc objects])
687 #include <mpeg2encoder.hh>
688 #include <mpeg2encoptions.hh>
694 MPEG2EncOptions *options = new MPEG2EncOptions ();
695 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
700 dnl so far so good, let's check more things:
701 dnl mjpegtools-1.8.0 does not install the required
702 dnl mpeg2syntaxcodes.h header by default, and a new release
703 dnl is not in sight, so check for this oversight in case
704 dnl distros or folks have fixed this themselves
705 if test "$mjpegtools_api" -ge "10800"; then
706 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
707 mpeg2enc_headers_ok=yes
709 mpeg2enc_headers_ok=no
712 mpeg2enc_headers_ok=yes
714 if test "x$mpeg2enc_headers_ok" = "xyes"; then
717 CPP_FLAGS="$CPPFLAGS_GOOD"
718 AC_SUBST(MPEG2ENC_CFLAGS)
719 AC_SUBST(MPEG2ENC_LIBS)
726 CPPFLAGS="$OLD_CPPFLAGS"
735 translit(dnm, m, l) AM_CONDITIONAL(USE_MPLEX, true)
736 AG_GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [
738 dnl we require a c++ compiler for this one
739 if [ test x$HAVE_CXX = xyes ]; then
740 dnl libmplex was first included in mjpegtools-1.6.2-rc4 (1.6.1.93)
741 dnl since many distros include mjpegtools specifically without mplex
742 dnl and mpeg2enc, we check for mplex on its own, too.
743 dnl libmplex < 1.9rc? has fuzzy ABI, valgrind and other problems
744 PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.9.0, [
745 dnl switch over to c++ to test things
747 OLD_CPPFLAGS="$CPPFLAGS"
748 CPPFLAGS="$CPPFLAGS $MPLEX_CFLAGS"
749 AC_CHECK_HEADER(interact.hpp, [
750 MPLEX_LIBS="$MPLEX_LIBS -lmplex2 -lm"
752 LIBS="$LIBS $MPLEX_LIBS"
753 dnl older libmplex uses off_t SegmentSize (), which leads to fuzzy ABI;
754 dnl don't want this here
755 AC_MSG_CHECKING([for valid mplex objects])
758 #include <interact.hpp>
759 #include <outputstrm.hpp>
760 #include <multiplexor.hpp>
765 class TestOutputStream : public OutputStream {
767 TestOutputStream () : OutputStream () { }
768 void Write (uint8_t *a, unsigned int b) { }
769 void NextSegment () { }
770 uint64_t SegmentSize () { }
774 MultiplexJob *job = new MultiplexJob ();
775 vector<IBitStream *> inputs;
776 job->SetupInputStreams (inputs);
777 TestOutputStream *out = new TestOutputStream ();
778 Multiplexor *mux = new Multiplexor(*job, *out, NULL);
783 AC_SUBST(MPLEX_CFLAGS)
786 ], AC_MSG_RESULT(no))
789 CPPFLAGS="$OLD_CPPFLAGS"
796 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
797 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
799 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
801 MUSEPACK_LIBS="-lmpcdec"
802 AC_SUBST(MUSEPACK_LIBS)
803 ], [HAVE_MUSEPACK="no"])
807 dnl *** musicbrainz ***
808 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
809 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
810 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
811 AC_SUBST(MUSICBRAINZ_CFLAGS)
812 AC_SUBST(MUSICBRAINZ_LIBS)
816 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
817 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
818 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.7.99, HAVE_MYTHTV="yes", [
822 AC_SUBST(GMYTH_CFLAGS)
827 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
828 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
831 if test "x$HAVE_X" = "xyes"; then
832 save_cppflags=$CFLAGS
833 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
834 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
835 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
836 CPPFLAGS="$save_cppflags"
843 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
844 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
845 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.28.99, HAVE_NEON="yes", [
849 AC_SUBST(NEON_CFLAGS)
854 translit(dnm, m, l) AM_CONDITIONAL(USE_OFA, true)
855 AG_GST_CHECK_FEATURE(OFA, [ofa plugins], ofa, [
856 PKG_CHECK_MODULES(OFA, libofa >= 0.9.3, HAVE_OFA="yes", [
865 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
866 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
867 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
869 AC_MSG_CHECKING([for timidity.cfg])
871 if test -r /etc/timidity.cfg; then
872 timidity_cfg=/etc/timidity.cfg
873 elif test -r /etc/timidity/timidity.cfg; then
874 timidity_cfg=/etc/timidity/timidity.cfg
875 elif test -r /usr/share/timidity/timidity.cfg; then
876 timidity_cfg=/usr/share/timidity/timidity.cfg
877 elif test -r /usr/local/share/timidity/timidity.cfg; then
878 timidity_cfg=/usr/local/share/timidity/timidity.cfg
880 if test "x$timidity_cfg" != "x"; then
881 AC_MSG_RESULT($timidity_cfg)
882 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
884 AC_MSG_RESULT([not found])
890 AC_SUBST(TIMIDITY_CFLAGS)
891 AC_SUBST(TIMIDITY_LIBS)
895 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
896 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
897 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
898 if test "x$HAVE_WILDMIDI" = "xyes"; then
900 WILDMIDI_LIBS=-lWildMidi
901 AC_MSG_NOTICE(compiling gstWildMidi)
905 AC_MSG_WARN(no WildMidi library found (libWildMidi))
907 AC_SUBST(WILDMIDI_CFLAGS)
908 AC_SUBST(WILDMIDI_LIBS)
912 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
913 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
914 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
918 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
919 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
920 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
921 AC_SUBST(SNDFILE_CFLAGS)
922 AC_SUBST(SNDFILE_LIBS)
925 dnl *** soundtouch ***
926 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
927 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
928 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
930 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
932 HAVE_SOUNDTOUCH=no)])
933 AC_SUBST(SOUNDTOUCH_CFLAGS)
934 AC_SUBST(SOUNDTOUCH_LIBS)
935 if test "x$HAVE_CXX" != "xyes"; then
937 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
942 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
943 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
944 AC_CHECK_HEADER(openspc.h, [
945 AC_CHECK_LIB(openspc, OSPC_Init, [
958 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
959 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
960 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
964 AC_SUBST(SWFDEC_CFLAGS)
965 AC_SUBST(SWFDEC_LIBS)
969 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
970 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
971 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
975 AC_SUBST(THEORADEC_LIBS)
976 AC_SUBST(THEORADEC_CFLAGS)
979 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
980 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
981 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
982 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
983 X264_LIBS="$LDFLAGS -lx264 -lm"
984 X264_CFLAGS="$CFLAGS"
986 AC_SUBST(X264_CFLAGS))
990 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
991 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
993 AC_CHECK_HEADER(xvid.h, [
996 AC_CHECK_LIB(xvidcore, xvid_encore, [
997 AC_CHECK_LIB(xvidcore, xvid_decore, [
998 AC_CHECK_LIB(xvidcore, xvid_global, [
999 AC_MSG_CHECKING([for uptodate XviD API version])
1000 AC_TRY_COMPILE([#include <xvid.h>], [
1001 #if XVID_API_MAJOR(XVID_API) != 4
1002 #error "Incompatible XviD API version"
1004 ],[ AC_MSG_RESULT(yes)
1005 XVID_LIBS="-lxvidcore -lm"
1008 ], AC_MSG_RESULT(no) )
1017 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
1018 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
1019 AC_MSG_CHECKING([Checking for up to date dvb installation])
1020 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
1024 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS4, true)
1025 AG_GST_CHECK_FEATURE(OSS4, [Open Sound System 4], oss4, [
1026 AC_MSG_CHECKING([Checking if we can build the OSS4 elements])
1027 AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/stat.h sys/types.h],
1028 [HAVE_OSS4="yes"], [HAVE_OSS4="no"])
1032 translit(dnm, m, l) AM_CONDITIONAL(USE_WININET, true)
1033 AG_GST_CHECK_FEATURE(WININET, [Windows internet library], wininet, [
1034 AC_MSG_CHECKING([Checking for windows internet support])
1035 AC_CHECK_HEADERS([windows.h wininet.h],
1036 [HAVE_WININET="yes"], [HAVE_WININET="no"])
1041 dnl not building plugins with external dependencies,
1042 dnl but we still need to set the conditionals
1044 AM_CONDITIONAL(USE_QUICKTIME, false)
1045 AM_CONDITIONAL(USE_VCD, false)
1046 AM_CONDITIONAL(USE_ALSA, false)
1047 AM_CONDITIONAL(USE_AMRWB, false)
1048 AM_CONDITIONAL(USE_BZ2, false)
1049 AM_CONDITIONAL(USE_CDAUDIO, false)
1050 AM_CONDITIONAL(USE_DC1394, false)
1051 AM_CONDITIONAL(USE_DIRECTFB, false)
1052 AM_CONDITIONAL(USE_DTS, false)
1053 AM_CONDITIONAL(USE_DIRAC, false)
1054 AM_CONDITIONAL(USE_DIVX, false)
1055 AM_CONDITIONAL(USE_DVB, false)
1056 AM_CONDITIONAL(USE_FAAC, false)
1057 AM_CONDITIONAL(USE_FAAD, false)
1058 AM_CONDITIONAL(USE_FBDEV, false)
1059 AM_CONDITIONAL(USE_GSM, false)
1060 AM_CONDITIONAL(USE_IVORBIS, false)
1061 AM_CONDITIONAL(USE_JACK, false)
1062 AM_CONDITIONAL(USE_LADSPA, false)
1063 AM_CONDITIONAL(USE_LIBMMS, false)
1064 AM_CONDITIONAL(USE_METADATA, false)
1065 AM_CONDITIONAL(USE_MPEG2ENC, false)
1066 AM_CONDITIONAL(USE_MPLEX, false)
1067 AM_CONDITIONAL(USE_MUSEPACK, false)
1068 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
1069 AM_CONDITIONAL(USE_MYTHTV, false)
1070 AM_CONDITIONAL(USE_NAS, false)
1071 AM_CONDITIONAL(USE_NEON, false)
1072 AM_CONDITIONAL(USE_OFA, false)
1073 AM_CONDITIONAL(USE_OSS4, false)
1074 AM_CONDITIONAL(USE_SDL, false)
1075 AM_CONDITIONAL(USE_SNDFILE, false)
1076 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
1077 AM_CONDITIONAL(USE_SPC, false)
1078 AM_CONDITIONAL(USE_SWFDEC, false)
1079 AM_CONDITIONAL(USE_THEORADEC, false)
1080 AM_CONDITIONAL(USE_TIMIDITY, false)
1081 AM_CONDITIONAL(USE_X264, false)
1082 AM_CONDITIONAL(USE_XVID, false)
1083 AM_CONDITIONAL(USE_WILDMIDI, false)
1084 AM_CONDITIONAL(USE_WININET, false)
1086 fi dnl of EXT plugins
1088 dnl *** finalize CFLAGS, LDFLAGS, LIBS
1091 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
1092 dnl GST_*: flags shared by built objects to link against GStreamer
1093 dnl GST_ALL_LDFLAGS: linker flags shared by all
1094 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
1095 dnl GST_LT_LDFLAGS: library versioning of our libraries
1096 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
1098 dnl GST_OPTION_CFLAGS
1099 if test "x$USE_DEBUG" = xyes; then
1102 AC_SUBST(PROFILE_CFLAGS)
1104 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
1105 dnl Define _only_ during CVS (not pre-releases or releases)
1106 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1108 DEPRECATED_CFLAGS=""
1110 AC_SUBST(DEPRECATED_CFLAGS)
1112 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
1113 dnl at make time with e.g. make ERROR_CFLAGS=""
1114 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1115 GST_OPTION_CXXFLAGS="\$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1116 AC_SUBST(GST_OPTION_CFLAGS)
1117 AC_SUBST(GST_OPTION_CXXFLAGS)
1119 dnl FIXME: do we want to rename to GST_ALL_* ?
1120 dnl prefer internal headers to already installed ones
1121 dnl also add builddir include for enumtypes and marshal
1122 dnl add GST_OPTION_CFLAGS, but overridable
1123 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1124 GST_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CXXFLAGS)"
1125 AC_SUBST(GST_CFLAGS)
1126 AC_SUBST(GST_CXXFLAGS)
1129 dnl LDFLAGS really should only contain flags, not libs - they get added before
1130 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1131 GST_ALL_LDFLAGS="-no-undefined"
1132 AC_SUBST(GST_ALL_LDFLAGS)
1134 dnl this really should only contain flags, not libs - they get added before
1135 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1136 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1137 AC_SUBST(GST_PLUGIN_LDFLAGS)
1139 dnl *** output files ***
1146 gst-plugins-bad.spec
1150 gst/cdxaparse/Makefile
1151 gst/deinterlace/Makefile
1153 gst/festival/Makefile
1157 gst/h264parse/Makefile
1158 gst/interleave/Makefile
1160 gst/modplug/Makefile
1161 gst/modplug/libmodplug/Makefile
1162 gst/mpegtsparse/Makefile
1163 gst/mpeg4videoparse/Makefile
1164 gst/mpegvideoparse/Makefile
1167 gst/nuvdemux/Makefile
1168 gst/rawparse/Makefile
1169 gst/replaygain/Makefile
1170 gst/rtpmanager/Makefile
1172 gst/selector/Makefile
1174 gst/speexresample/Makefile
1178 gst/videosignal/Makefile
1183 gst-libs/gst/Makefile
1184 gst-libs/gst/app/Makefile
1185 gst-libs/gst/dshow/Makefile
1187 sys/dshowdecwrapper/Makefile
1188 sys/dshowsrcwrapper/Makefile
1192 sys/qtwrapper/Makefile
1194 sys/wininet/Makefile
1196 examples/app/Makefile
1197 examples/directfb/Makefile
1198 examples/switch/Makefile
1200 ext/alsaspdif/Makefile
1202 ext/cdaudio/Makefile
1205 ext/directfb/Makefile
1208 ext/metadata/Makefile
1212 ext/ivorbis/Makefile
1218 ext/mpeg2enc/Makefile
1220 ext/musepack/Makefile
1221 ext/musicbrainz/Makefile
1226 ext/sndfile/Makefile
1227 ext/soundtouch/Makefile
1231 ext/timidity/Makefile
1236 docs/plugins/Makefile
1237 docs/version.entities
1242 tests/check/Makefile
1243 tests/icles/Makefile
1244 win32/common/config.h
1248 AG_GST_OUTPUT_PLUGINS