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 PKG_CHECK_MODULES(XMP, exempi-2.0, HAVE_XMP="yes", [
525 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))
526 if test x$HAVE_EXIF = xyes; then
527 METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
528 METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
531 if test x$HAVE_IPTC = xyes; then
532 METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
533 METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
536 if test x$HAVE_XMP = xyes; then
537 METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
538 METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
541 if test x$HAVE_METADATA = xno; then
542 AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
544 dnl metadata plugin will parse whole chunks anyway
546 AC_SUBST(METADATA_CFLAGS)
547 AC_SUBST(METADATA_LIBS)
550 dnl **** Free AAC Encoder (FAAC) ****
551 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
552 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
553 AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
554 FAAC_LIBS="-lfaac -lm")
555 AS_SCRUB_INCLUDE(FAAC_CFLAGS)
559 dnl **** Free AAC Decoder (FAAD) ****
560 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
561 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
563 AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
564 FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
565 if test $HAVE_FAAD = "no"; then
566 AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
567 [ FAAD_LIBS="-lfaad -lm"
568 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
572 if test $HAVE_FAAD = "yes"; then
573 AC_MSG_CHECKING([Checking for FAAD >= 2.0])
574 AC_TRY_COMPILE([#include <faad.h>], [
575 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
578 /* Release candidate of 2.0 is not good enough for us. This field
579 * was added only in 2.0 final and does not exist in 2.0-RC3 */
580 faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
590 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
592 AC_SUBST(FAAD_IS_NEAAC)
596 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
597 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
598 if test "x$HAVE_FBDEV" != "xyes"; then
599 AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
604 translit(dnm, m, l) AM_CONDITIONAL(USE_GIO, true)
605 AG_GST_CHECK_FEATURE(GIO, [GIO library], gio, [
606 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.15.2, HAVE_GIO="yes", [
615 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
616 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
617 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
618 if test $HAVE_GSM != "yes"; then
619 AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
620 if test $HAVE_GSM = "yes"; then
621 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
628 dnl AM_PATH_IVORBIS only takes two options
629 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
630 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
633 AC_CHECK_LIB(vorbisidec, vorbis_block_init,
634 [IVORBIS_LIBS=-lvorbisidec
638 IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
642 AC_SUBST(IVORBIS_LIBS)
643 AC_SUBST(IVORBIS_CFLAGS)
647 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
648 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
649 PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
650 AC_SUBST(JACK_CFLAGS)
655 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
656 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
657 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
661 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
662 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
663 dnl check with pkg-config first
664 PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
669 AC_SUBST(LIBMMS_LIBS)
671 dnl *** mjpegtools version info ***
672 dnl some may prefer older version (given quirks above)
673 dnl hm, no version info seems available within mjpegtools headers
675 PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
676 AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
677 have_mpjegtools_19x=yes
679 have_mpjegtools_19x=no])
681 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
682 AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
683 have_mpjegtools_18x=yes
685 have_mpjegtools_18x=no])
688 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
689 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
691 dnl we require a c++ compiler for this one
692 if [ test x$HAVE_CXX = xyes ]; then
693 dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
694 dnl since many distros include mjpegtools specifically without mplex
695 dnl and mpeg2enc, we check for mpeg2enc on its own, too.
696 PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
697 dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
699 dnl switch over to c++ to test things
701 OLD_CPPFLAGS="$CPPFLAGS"
703 CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
704 CPPFLAGS="$CPPFLAGS_GOOD -I."
706 mpeg2enc_headers_ok=no
707 AC_CHECK_HEADER([mpeg2encoder.hh], [
708 MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
710 LIBS="$LIBS $MPEG2ENC_LIBS"
711 AC_MSG_CHECKING([for valid mpeg2enc objects])
713 #include <mpeg2encoder.hh>
714 #include <mpeg2encoptions.hh>
720 MPEG2EncOptions *options = new MPEG2EncOptions ();
721 MPEG2Encoder *encoder = new MPEG2Encoder (*options);
726 dnl so far so good, let's check more things:
727 dnl mjpegtools-1.8.0 does not install the required
728 dnl mpeg2syntaxcodes.h header by default, and a new release
729 dnl is not in sight, so check for this oversight in case
730 dnl distros or folks have fixed this themselves
731 if test "x$have_mpjegtools_18x" = "xyes"; then
732 AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
733 mpeg2enc_headers_ok=yes
735 mpeg2enc_headers_ok=no
738 mpeg2enc_headers_ok=yes
741 if test "x$mpeg2enc_headers_ok" = "xyes"; then
744 CPP_FLAGS="$CPPFLAGS_GOOD"
745 AC_SUBST(MPEG2ENC_CFLAGS)
746 AC_SUBST(MPEG2ENC_LIBS)
753 CPPFLAGS="$OLD_CPPFLAGS"
762 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
763 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
765 AC_CHECK_HEADER([mpcdec/mpcdec.h], [
767 MUSEPACK_LIBS="-lmpcdec"
768 AC_SUBST(MUSEPACK_LIBS)
769 ], [HAVE_MUSEPACK="no"])
773 dnl *** musicbrainz ***
774 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
775 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
776 PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
777 AC_SUBST(MUSICBRAINZ_CFLAGS)
778 AC_SUBST(MUSICBRAINZ_LIBS)
782 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
783 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
784 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
788 AC_SUBST(GMYTH_CFLAGS)
793 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
794 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
796 if test "x$HAVE_X" = "xyes"; then
797 save_cppflags=$CFLAGS
798 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
799 AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
800 NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
801 CPPFLAGS="$save_cppflags"
808 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
809 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
810 PKG_CHECK_MODULES(NEON, neon >= 0.26.0 neon <= 0.27.99, HAVE_NEON="yes", [
814 AC_SUBST(NEON_CFLAGS)
819 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
820 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
821 PKG_CHECK_MODULES(SOUP, libsoup-2.4, HAVE_SOUP="yes", [
825 AC_SUBST(SOUP_CFLAGS)
830 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
831 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
832 PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
834 AC_MSG_CHECKING([for timidity.cfg])
836 if test -r /etc/timidity.cfg; then
837 timidity_cfg=/etc/timidity.cfg
838 elif test -r /etc/timidity/timidity.cfg; then
839 timidity_cfg=/etc/timidity/timidity.cfg
840 elif test -r /usr/share/timidity/timidity.cfg; then
841 timidity_cfg=/usr/share/timidity/timidity.cfg
842 elif test -r /usr/local/share/timidity/timidity.cfg; then
843 timidity_cfg=/usr/local/share/timidity/timidity.cfg
845 if test "x$timidity_cfg" != "x"; then
846 AC_MSG_RESULT($timidity_cfg)
847 AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
849 AC_MSG_RESULT([not found])
855 AC_SUBST(TIMIDITY_CFLAGS)
856 AC_SUBST(TIMIDITY_LIBS)
860 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
861 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
862 AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
863 if test "x$HAVE_WILDMIDI" = "xyes"; then
865 WILDMIDI_LIBS=-lWildMidi
866 AC_MSG_NOTICE(compiling gstWildMidi)
870 AC_MSG_WARN(no WildMidi library found (libWildMidi))
872 AC_SUBST(WILDMIDI_CFLAGS)
873 AC_SUBST(WILDMIDI_LIBS)
877 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
878 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
879 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
883 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
884 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
885 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
886 AC_SUBST(SNDFILE_CFLAGS)
887 AC_SUBST(SNDFILE_LIBS)
890 dnl *** soundtouch ***
891 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
892 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
893 PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
895 [PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
897 HAVE_SOUNDTOUCH=no)])
898 AC_SUBST(SOUNDTOUCH_CFLAGS)
899 AC_SUBST(SOUNDTOUCH_LIBS)
900 if test "x$HAVE_CXX" != "xyes"; then
902 AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
907 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
908 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
909 AC_CHECK_HEADER(openspc.h, [
910 AC_CHECK_LIB(openspc, OSPC_Init, [
923 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
924 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
925 PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
929 AC_SUBST(SWFDEC_CFLAGS)
930 AC_SUBST(SWFDEC_LIBS)
934 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
935 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
936 PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
940 AC_SUBST(THEORADEC_LIBS)
941 AC_SUBST(THEORADEC_CFLAGS)
944 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
945 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
946 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
947 AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
948 X264_LIBS="$LDFLAGS -lx264 -lm"
949 X264_CFLAGS="$CFLAGS"
951 AC_SUBST(X264_CFLAGS))
955 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
956 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
958 AC_CHECK_HEADER(xvid.h, [
961 AC_CHECK_LIB(xvidcore, xvid_encore, [
962 AC_CHECK_LIB(xvidcore, xvid_decore, [
963 AC_CHECK_LIB(xvidcore, xvid_global, [
964 AC_MSG_CHECKING([for uptodate XviD API version])
965 AC_TRY_COMPILE([#include <xvid.h>], [
966 #if XVID_API_MAJOR(XVID_API) != 4
967 #error "Incompatible XviD API version"
969 ],[ AC_MSG_RESULT(yes)
970 XVID_LIBS="-lxvidcore -lm"
973 ], AC_MSG_RESULT(no) )
982 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
983 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
984 AC_MSG_CHECKING([Checking for up to date dvb installation])
985 AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
990 dnl not building plugins with external dependencies,
991 dnl but we still need to set the conditionals
993 AM_CONDITIONAL(USE_OPENGL, false)
994 AM_CONDITIONAL(USE_QUICKTIME, false)
995 AM_CONDITIONAL(USE_VCD, false)
996 AM_CONDITIONAL(USE_X, false)
997 AM_CONDITIONAL(USE_ALSA, false)
998 AM_CONDITIONAL(USE_AMRWB, false)
999 AM_CONDITIONAL(USE_BZ2, false)
1000 AM_CONDITIONAL(USE_CDAUDIO, false)
1001 AM_CONDITIONAL(USE_DIRECTFB, false)
1002 AM_CONDITIONAL(USE_DTS, false)
1003 AM_CONDITIONAL(USE_DIVX, false)
1004 AM_CONDITIONAL(USE_FAAC, false)
1005 AM_CONDITIONAL(USE_FAAD, false)
1006 AM_CONDITIONAL(USE_FBDEV, false)
1007 AM_CONDITIONAL(USE_GIO, false)
1008 AM_CONDITIONAL(USE_GSM, false)
1009 AM_CONDITIONAL(USE_IVORBIS, false)
1010 AM_CONDITIONAL(USE_JACK, false)
1011 AM_CONDITIONAL(USE_LADSPA, false)
1012 AM_CONDITIONAL(USE_LIBMMS, false)
1013 AM_CONDITIONAL(USE_MPEG2ENC, false)
1014 AM_CONDITIONAL(USE_MUSEPACK, false)
1015 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
1016 AM_CONDITIONAL(USE_MYTHTV, false)
1017 AM_CONDITIONAL(USE_NAS, false)
1018 AM_CONDITIONAL(USE_NEON, false)
1019 AM_CONDITIONAL(USE_SOUP, false)
1020 AM_CONDITIONAL(USE_SDL, false)
1021 AM_CONDITIONAL(USE_SNDFILE, false)
1022 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
1023 AM_CONDITIONAL(USE_SPC, false)
1024 AM_CONDITIONAL(USE_SWFDEC, false)
1025 AM_CONDITIONAL(USE_THEORADEC, false)
1026 AM_CONDITIONAL(USE_TIMIDITY, false)
1027 AM_CONDITIONAL(USE_X264, false)
1028 AM_CONDITIONAL(USE_XVID, false)
1029 AM_CONDITIONAL(USE_WILDMIDI, false)
1030 AM_CONDITIONAL(USE_DVB, false)
1032 fi dnl of EXT plugins
1034 dnl *** finalize CFLAGS, LDFLAGS, LIBS
1037 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
1038 dnl GST_*: flags shared by built objects to link against GStreamer
1039 dnl GST_ALL_LDFLAGS: linker flags shared by all
1040 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
1041 dnl GST_LT_LDFLAGS: library versioning of our libraries
1042 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
1044 dnl GST_OPTION_CFLAGS
1045 if test "x$USE_DEBUG" = xyes; then
1048 AC_SUBST(PROFILE_CFLAGS)
1050 if test "x$GST_CVS" = "xyes"; then
1051 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1053 DEPRECATED_CFLAGS=""
1055 AC_SUBST(DEPRECATED_CFLAGS)
1057 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
1058 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1059 AC_SUBST(GST_OPTION_CFLAGS)
1061 dnl FIXME: do we want to rename to GST_ALL_* ?
1062 dnl prefer internal headers to already installed ones
1063 dnl also add builddir include for enumtypes and marshal
1064 dnl add GST_OPTION_CFLAGS, but overridable
1065 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1066 AC_SUBST(GST_CFLAGS)
1069 dnl LDFLAGS 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_ALL_LDFLAGS="-no-undefined"
1072 AC_SUBST(GST_ALL_LDFLAGS)
1074 dnl this really should only contain flags, not libs - they get added before
1075 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1076 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1077 AC_SUBST(GST_PLUGIN_LDFLAGS)
1079 dnl *** output files ***
1086 gst-plugins-bad.spec
1090 gst/cdxaparse/Makefile
1091 gst/deinterlace/Makefile
1093 gst/equalizer/Makefile
1094 gst/festival/Makefile
1098 gst/h264parse/Makefile
1099 gst/interleave/Makefile
1101 gst/modplug/Makefile
1102 gst/modplug/libmodplug/Makefile
1103 gst/mpegtsparse/Makefile
1104 gst/mpeg4videoparse/Makefile
1105 gst/mpegvideoparse/Makefile
1106 gst/multifile/Makefile
1109 gst/nuvdemux/Makefile
1110 gst/rawparse/Makefile
1111 gst/replaygain/Makefile
1112 gst/rtpmanager/Makefile
1114 gst/selector/Makefile
1115 gst/spectrum/Makefile
1117 gst/speexresample/Makefile
1120 gst/videosignal/Makefile
1122 gst/xingheader/Makefile
1126 gst-libs/gst/Makefile
1127 gst-libs/gst/app/Makefile
1132 sys/qtwrapper/Makefile
1135 examples/app/Makefile
1136 examples/directfb/Makefile
1137 examples/switch/Makefile
1139 ext/alsaspdif/Makefile
1141 ext/cdaudio/Makefile
1143 ext/directfb/Makefile
1146 ext/metadata/Makefile
1151 ext/ivorbis/Makefile
1157 ext/mpeg2enc/Makefile
1158 ext/musepack/Makefile
1159 ext/musicbrainz/Makefile
1164 ext/sndfile/Makefile
1165 ext/soundtouch/Makefile
1169 ext/timidity/Makefile
1174 docs/plugins/Makefile
1175 docs/version.entities
1180 tests/check/Makefile
1181 tests/icles/Makefile
1182 win32/common/config.h
1186 AG_GST_OUTPUT_PLUGINS