1 dnl autoconf configuration file for gst-plugins
3 AC_CANONICAL_TARGET([])
5 dnl We disable static building for development, for time savings
6 dnl this goes before AS_LIBTOOL to appease autoconf
7 dnl *NOTE*: dnl this line before release, so release does static too
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
13 dnl when going to/from release please set the nano (fourth number) right !
14 dnl releases only do Wall, cvs and prerelease does Werror too
15 AS_VERSION(gst-plugins, GST_PLUGINS_VERSION, 0, 7, 0, 1, GST_ERROR="-Wall", GST_ERROR="-Wall -Werror")
16 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
18 dnl our libraries and install dirs use major.minor as a version
19 GST_MAJORMINOR=$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
20 AC_SUBST(GST_MAJORMINOR)
22 dnl CURRENT, REVISION, AGE
23 dnl - library source changed -> increment REVISION
24 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
25 dnl - interfaces added -> increment AGE
26 dnl - interfaces removed -> AGE = 0
27 AS_LIBTOOL(GST_PLUGINS, 1, 0, 0)
29 dnl FIXME take something else ?
30 AC_CONFIG_SRCDIR([gst/law/alaw.c])
31 AM_CONFIG_HEADER(config.h)
33 dnl Add parameters for aclocal
34 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
35 ACLOCAL_FLAGS="-I m4 -I common/m4"
36 AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
42 dnl determine c++ compiler
44 dnl determine if c++ is available on this system
45 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
46 dnl determine c++ preprocessor
52 dnl ############################################
53 dnl # Super Duper options for plug-in building #
54 dnl ############################################
56 dnl ext plug-ins; plug-ins that have external dependencies
57 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
58 [HAVE_EXTERNAL=yes],enabled,
60 AC_MSG_WARN(building external plug-ins)
63 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
66 # make BUILD_EXTERNAL available to Makefile.am
67 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
69 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
70 dnl read 'builds, but might not work'UTO
71 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
72 [HAVE_EXPERIMENTAL=yes],disabled,
74 AC_MSG_WARN(building experimental plug-ins)
79 AC_MSG_NOTICE(not building experimental plug-ins)
85 dnl broken plug-ins; stuff that doesn't seem to build at the moment
86 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
87 HAVE_BROKEN=yes,disabled,
89 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
97 AC_MSG_NOTICE([not building broken plug-ins])
100 dnl ##############################
101 dnl # Do automated configuration #
102 dnl ##############################
107 dnl allow for different autotools
108 AS_AUTOTOOLS_ALTERNATE()
110 dnl modify pkg-config path
111 AC_ARG_WITH(pkg-config-path,
112 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
113 [export PKG_CONFIG_PATH=${withval}])
116 AC_PATH_PROG(NASM_PATH, nasm, no)
118 if test x$NASM_PATH = xno; then
119 AC_MSG_WARN(Couldn't find nasm)
122 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
126 dnl check for gconftool-2
127 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
128 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
129 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
130 if test x$GCONFTOOL = xno; then
131 AC_MSG_WARN(Not installing GConf schemas)
137 AC_SUBST(HAVE_GCONFTOOL)
140 dnl check for GConf libraries
141 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
142 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
143 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
144 AC_SUBST(GCONF_CFLAGS)
148 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
149 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR.$GST_PLUGINS_VERSION_MICRO,
150 HAVE_GST="yes", HAVE_GST="no")
152 if test "x$HAVE_GST" = "xno"; then
153 AC_MSG_ERROR(no GStreamer found)
156 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
157 if test -z $GST_TOOLS_DIR; then
158 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
160 AC_SUBST(GST_TOOLS_DIR)
162 dnl additional gstcontrol libs
163 GST_CONTROL_LIBS=`pkg-config --variable=gstcontrol_libs gstreamer-$GST_MAJORMINOR`
164 AC_SUBST(GST_CONTROL_LIBS)
166 dnl Set up conditionals for (target) architecture:
167 dnl ==============================================
170 case "x${target_cpu}" in
171 xi?86 | k?) HAVE_CPU_I386=yes
172 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
173 dnl FIXME could use some better detection
175 case "x${target_cpu}" in
177 *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
179 xpowerpc) HAVE_CPU_PPC=yes
180 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
181 xalpha) HAVE_CPU_ALPHA=yes
182 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
183 xarm*) HAVE_CPU_ARM=yes
184 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
185 xsparc*) HAVE_CPU_SPARC=yes
186 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
187 xmips*) HAVE_CPU_MIPS=yes
188 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
189 xhppa*) HAVE_CPU_HPPA=yes
190 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
193 dnl Determine endianness
196 dnl Check for fast float to int casting as defined in C99
200 dnl Check for essential libraries first:
201 dnl ====================================
204 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
205 GTK_CFLAGS=$GTK2_CFLAGS
211 dnl Check for X11 extensions
213 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
214 AC_MSG_NOTICE([cannot find X11, the build system needs fixage])
218 AC_SUBST(X_EXTRA_LIBS)
221 dnl ===========================================================================
222 dnl ============================= gst plug-ins ================================
223 dnl ===========================================================================
225 GST_PLUGIN_LDFLAGS='-module -avoid-version'
226 AC_SUBST(GST_PLUGIN_LDFLAGS)
228 dnl these are all the gst plug-ins, compilable without additional libs
230 ac3parse adder audioscale auparse avi asfdemux cdxaparse chart\
231 cutter deinterlace effectv festival filter flx goom\
233 median mixmatrix mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\
234 mpegaudio mpegaudioparse mpegstream mpegtypes\
235 monoscope oneton passthrough playondemand qtdemux rtjpeg silence sine\
236 smooth smpte spectrum speed stereo stereomono synaesthesia\
237 udp vbidec videocrop videoscale videotestsrc volenv volume\
238 vumeter wavenc wavparse y4m"
240 dnl see if we can build C++ plug-ins
241 if test "x$HAVE_CXX" = "xyes"; then
242 GST_PLUGINS_ALL="$GST_PLUGINS_ALL \
245 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
248 AC_SUBST(GST_PLUGINS_ALL)
250 GST_PLUGINS_SELECTED=""
253 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
254 [for i in `echo $withval | tr , ' '`; do
255 if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
256 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
258 echo "plug-in $i not recognized, ignoring..."
261 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
263 AC_SUBST(GST_PLUGINS_SELECTED)
265 dnl ==========================================================================
266 dnl ============================= sys plug-ins ================================
267 dnl ==========================================================================
269 dnl *** DXR3 card ***
270 translit(dnm, m, l) AM_CONDITIONAL(USE_DXR3, true)
271 GST_CHECK_FEATURE(DXR3, [DXR3 hardware mpeg video decoder], dxr3videosink, [
272 AC_CHECK_HEADER(linux/em8300.h, HAVE_DXR3="yes", HAVE_DXR3="no")
275 dnl *** OSS audio ***
276 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
277 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
278 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
282 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
283 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
284 dnl this one is for hadess, no qcam when no nasm found
285 if test "x$HAVE_NASM" = "xno";
288 AC_MSG_WARN([QuickCam needs nasm])
294 dnl *** Video 4 Linux ***
295 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
296 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
297 AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>])
300 dnl *** Video 4 Linux 2***
301 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L2, true)
302 GST_CHECK_FEATURE(V4L2, [Video 4 Linux 2], v4l2src, [
303 AC_CHECK_HEADER(linux/videodev2.h, HAVE_V4L2="yes", HAVE_V4L2="no")
307 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
308 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
309 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
313 translit(dnm, m, l) AM_CONDITIONAL(USE_VGA, true)
314 GST_CHECK_FEATURE(VGA, [VGA], vgavideosink, [
315 AC_CHECK_HEADER(asm/vga.h, HAVE_VGA="yes", HAVE_VGA="no")
318 dnl *** CDROM Audio ***
319 translit(dnm, m, l) AM_CONDITIONAL(USE_CDROM, true)
320 GST_CHECK_FEATURE(CDROM, [CDROM Audio], cdrom, [
321 AC_CHECK_HEADERS(linux/cdrom.h) dnl linux
322 AC_CHECK_HEADERS(sys/cdio.h) dnl almost everything else
323 dnl AC_CHECK_HEADERS(dmedia/cdaudio.h) dnl irix
325 if test "${ac_cv_header_linux_cdrom_h}" = "yes" || test "${ac_cv_header_sys_cdio_h}" = "yes" || test "${ac_cv_header_dmedia_cdaudio_h}" = "yes"; then
327 *-sun-* | *-*-linux*)
328 AC_DEFINE(HAVE_CDROM_SOLARIS,, [Define if cdrom access is in Solaris style])
331 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
333 *-*-netbsd* | *-*-openbsd*)
334 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
335 AC_DEFINE(HAVE_CDROM_BSD_NETBSD,, [Define if cdrom access uses NetBSD variant])
338 AC_DEFINE(HAVE_CDROM_BSD,, [Define if cdrom access is in BSD style])
339 AC_DEFINE(HAVE_CDROM_BSD_DARWIN,, [Define if cdrom access uses Darwin variant])
342 dnl AC_DEFINE(HAVE_CDROM_IRIX,, [Define if cdrom access is in Irix DMedia style])
353 dnl Look for the PIC library first, Debian requires it.
354 dnl Check debian-devel archives for gory details.
356 dnl At the moment XFree86 doesn't distribute shared libXv due
357 dnl to unstable API. On many platforms you CAN NOT link a shared
358 dnl lib to a static non-PIC lib. This is what the xvideo GStreamer
359 dnl plug-in wants to do. So Debian distributes a PIC compiled
360 dnl version of the static lib for plug-ins to link to when it is
361 dnl inappropriate to link the main application to libXv directly.
362 dnl FIXME: add check if this platform can support linking to a
363 dnl non-PIC libXv, if not then don not use Xv.
364 dnl FIXME: perhaps warn user if they have a shared libXv since
365 dnl this is an error until XFree86 starts shipping one
366 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
368 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink videosink, [
369 dnl use X_CFLAGS for check
373 dnl check for PIC static lib
374 GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv_pic -lXext")
375 if test x$HAVE_XVIDEO = xno; then
376 dnl PIC lib not found, check for regular lib
377 GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
379 AC_SUBST(XVIDEO_LIBS)
385 dnl Next, check for the optional libraries:
386 dnl These are all libraries used in building plug-ins
387 dnl ================================================
388 dnl let's try and sort them alphabetically, shall we ?
390 if test "x$BUILD_EXTERNAL" = "xyes"; then
392 AC_MSG_NOTICE(Checking for plug-in dependency libraries)
395 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
396 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
397 AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
401 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
402 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
403 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
404 AS_SCRUB_INCLUDE(AALIB_CFLAGS)
408 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
409 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
410 AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
414 dnl if mcopidl can't be found there's no use in compiling it
415 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
416 if test "xHAVE_MCOPIDL" = "xno";
421 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
422 GST_CHECK_FEATURE(ARTS, [arts plug-ins], arts, [
423 AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
427 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
428 GST_CHECK_FEATURE(ARTSC, [artsd plug-ins], artsdsink, [
432 dnl *** audiofile ***
433 dnl this check uses the GST_CHECK_CONFIGPROG macro
434 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
435 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
436 translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
437 translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
438 GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
439 dnl we need this function
440 AC_CHECK_LIB(audiofile, afOpenVirtualFile, , HAVE_AUDIOFILE="no")
444 translit(dnm, m, l) AM_CONDITIONAL(USE_AVIFILE, true)
445 GST_CHECK_FEATURE(AVIFILE, [avifile], winenc windec, [
446 if test "x$no_x" = "xyes"; then
447 AC_MSG_WARN([No X libraries found, avifile test might fail compilation])
449 if test "x$HAVE_CXX" != "xyes"; then
450 AC_MSG_WARN([No C++ compiler found, avifile test will fail compilation])
455 dnl *** CDParanoia ***
456 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
457 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
458 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
461 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
463 FOUND_CDPARANOIA="yes")
464 if test "x$FOUND_CDPARANOIA" != "xyes";
466 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
468 cdda/cdda_interface.h,
469 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
471 FOUND_CDPARANOIA="yes")
473 if test "x$HEADER_DIR" = "xyes";
475 AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, ,
476 defined if cdda headers are in a cdda/ directory)
478 AC_SUBST(CDPARANOIA_LIBS)
480 dnl FIXME : add second check somehow if that is necessary
481 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
482 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
485 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
486 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
487 GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
488 AC_SUBST(DVDREAD_LIBS)
492 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDNAV, true)
493 GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
494 translit(dnm, m, l) AC_SUBST(DVDNAV_LIBS)
495 translit(dnm, m, l) AC_SUBST(DVDNAV_CFLAGS)
496 GST_CHECK_CONFIGPROG(DVDNAV, dvdnav-config)
497 AS_SCRUB_INCLUDE(DVDNAV_CFLAGS)
501 translit(dnm, m, l) AM_CONDITIONAL(USE_MAS, true)
502 GST_CHECK_FEATURE(MAS, [mas library], massink, [
503 translit(dnm, m, l) AC_SUBST(MAS_LIBS)
504 translit(dnm, m, l) AC_SUBST(MAS_CFLAGS)
505 GST_CHECK_CONFIGPROG(MAS, mas-config)
506 AS_SCRUB_INCLUDE(MAS_CFLAGS)
510 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
511 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
512 AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
513 AS_SCRUB_INCLUDE(ESD_CFLAGS)
516 dnl **** festival ****
517 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
518 dnl GST_CHECK_FEATURE(FESTIVAL, [festival plug-ins], festivalsrc, [
519 dnl NOTE: just using local net connection now, add this lib check
520 dnl in the future if needed
521 dnl AC_LANG_PUSH(C++)
522 dnl dnl FIXME: took out func to check for
523 dnl dnl This check puts festival_tidy_up in extern "C".
524 dnl dnl But, at least on Debian as of 20020110, it is compiled with name
525 dnl dnl mangling C++ nonsense and symbols can't resolve
526 dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
527 dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
529 dnl AC_SUBST(FESTIVAL_LIBS)
530 dnl HAVE_FESTIVAL=yes
534 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
535 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
536 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_decoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
541 translit(dnm, m, l) AM_CONDITIONAL(USE_FFMPEG, true)
542 GST_CHECK_FEATURE(FFMPEG, [ffmpeg plug-ins], ffmpeg, [
543 # only slurp in the case where we are in CVS mode;
544 # prerelease and release should get it disted
545 if test "x$GST_PLUGINS_VERSION_NANO" = x1; then
546 AC_MSG_NOTICE(slurping FFmpeg CVS source)
547 AS_SLURP_FFMPEG(gst-libs/ext/ffmpeg, 2002-12-14 12:00 GMT,
548 HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
550 AC_MSG_NOTICE(FFmpeg CVS code should be included already)
553 # we only bother with uninstalled (included) ffmpeg for now
554 AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
555 [defined if we use uninstalled ffmpeg])
558 dnl *** Gnome VFS ***
559 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
560 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
561 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
562 AC_SUBST(GNOME_VFS_CFLAGS)
563 AC_SUBST(GNOME_VFS_LIBS)
567 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
568 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
569 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
570 if test $HAVE_GSM != "yes"; then
571 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
572 if test $HAVE_GSM = "yes"; then
573 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
580 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
581 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
582 GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
583 ], AC_SUBST(HERMES_LIBS))
586 translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
587 GST_CHECK_FEATURE(HTTP, [http plug-ins], gsthttpsrc, [
588 dnl FIXME: need to check for header
590 GST_HTTPSRC_GET_TYPE=
591 if test x$USE_GLIB2 = xyes; then
592 AC_MSG_WARN(ghttp disabled for glib2.0)
594 AC_CHECK_LIB(ghttp, ghttp_request_new,
596 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
601 AC_SUBST(GST_HTTPSRC_GET_TYPE)
605 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
606 GST_CHECK_FEATURE(JACK, Jack, jack, [
607 PKG_CHECK_MODULES(JACK, jack >= 0.29.0, HAVE_JACK="yes", HAVE_JACK="no")
608 AC_SUBST(JACK_CFLAGS)
613 dnl FIXME: we could use header checks here as well IMO
614 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
615 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
616 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
622 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
623 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
624 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
628 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
629 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
630 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame")
634 dnl *** libcolorspace ***
635 translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
636 GST_CHECK_FEATURE(LCS, Lcs, lcs, [
637 PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
643 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
644 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
645 PKG_CHECK_MODULES(LIBDV, libdv >= 0.98, HAVE_LIBDV="yes", HAVE_LIBDV="no")
646 AC_SUBST(LIBDV_CFLAGS)
651 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBFAME, true)
652 GST_CHECK_FEATURE(LIBFAME, [libfame MPEG1/4 encoder], libfame, [
653 AM_PATH_LIBFAME(0.9.0, HAVE_LIBFAME="yes", HAVE_LIBFAME="no")
654 AC_SUBST(LIBFAME_CFLAGS)
655 AC_SUBST(LIBFAME_LIBS)
659 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
660 GST_CHECK_FEATURE(LIBPNG, [libpng PNG encoder], pngenc, [
661 PKG_CHECK_MODULES(LIBPNG, libpng12, HAVE_LIBPNG="yes", HAVE_LIBPNG="no")
662 AC_SUBST(LIBPNG_CFLAGS)
663 AC_SUBST(LIBPNG_LIBS)
668 dnl FIXME: we could use header checks here as well IMO
669 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
670 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
671 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
672 if test "x$HAVE_MAD" = "xyes"; then
673 # installed with mad >= 0.14
677 AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag")
684 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
685 GST_CHECK_FEATURE(MIKMOD, [mikmod plug-in], mikmod, [
686 AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
687 AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
688 AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
691 dnl *** mjpegtools ***
692 translit(dnm, m, l) AM_CONDITIONAL(USE_MJPEGTOOLS, true)
693 GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
694 PKG_CHECK_MODULES(MJPEGTOOLS, mjpegtools, HAVE_MJPEGTOOLS="yes", HAVE_MJPEGTOOLS="no")
696 if [ test x$HAVE_MJPEGTOOLS = x"yes" ]; then
697 dnl some headers we might want to need
698 AC_CHECK_HEADERS(stdint.h, HAVE_STDINT_H="yes", HAVE_STDINT_H="no")
699 if [ test x$HAVE_STDINT_H = x"no" ]; then
700 AC_CHECK_HEADERS(inttypes.h sys/types.h, HAVE_INTTYPES_H="yes", [
701 AC_MSG_WARN(No valid header files found, mjpegtools plugins disabled)
702 HAVE_INTTYPES_H="no" HAVE_MJPEGTOOLS="no"
705 AC_CHECK_HEADERS(stdbool.h, HAVE_STDBOOL_H="yes", HAVE_STDBOOL_H="no")
707 dnl sizeof PRId64 etc...
709 AC_CHECK_SIZEOF(long)
710 AC_CHECK_SIZEOF(long long)
713 PRID64_STRING_FORMAT="d"
716 PRID64_STRING_FORMAT="ld"
718 $ac_cv_sizeof_long_long)
719 PRID64_STRING_FORMAT="lld"
722 AC_MSG_WARN(No suitable variant for 64bits integers found, mjpegtools plugins disabled)
727 AC_DEFINE_UNQUOTED(PRID64_STRING_FORMAT, "$PRID64_STRING_FORMAT",
728 [ A printf type definition for 64 bit integers ])
729 AC_SUBST(MJPEGTOOLS_LIBS)
730 AC_SUBST(MJPEGTOOLS_CFLAGS)
735 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
736 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
737 PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.3.1,
738 HAVE_MPEG2DEC="yes", HAVE_MPEG2DEC="no")
739 AC_SUBST(MPEG2DEC_CFLAGS)
740 AC_SUBST(MPEG2DEC_LIBS)
743 dnl *** openquicktime ***
744 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENQUICKTIME, true)
745 GST_CHECK_FEATURE(OPENQUICKTIME, [Open Quicktime], quicktime_parser quicktime_decoder quicktime_demux,[
746 GST_CHECK_LIBHEADER(OPENQUICKTIME, openquicktime, quicktime_init,, openquicktime/openquicktime.h, OPENQUICKTIME_LIBS="-lopenquicktime")
747 AC_SUBST(OPENQUICKTIME_LIBS)
751 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
752 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
753 GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_new_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
754 AC_SUBST(RAW1394_LIBS)
758 dnl FIXME : adapt and make it work
759 translit(dnm, m, l) AM_CONDITIONAL(USE_RTP, true)
760 GST_CHECK_FEATURE(RTP, [RTP library], rtpenc rtpdec,[
761 AC_CHECK_LIB(ortp, ortp_init, HAVE_RTP=yes, HAVE_RTP=no, $GST_CFLAGS $GST_LIBS)
766 dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
767 dnl can use GST_* which should have GLIB_* info
768 dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
769 dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
770 dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
771 dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
774 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
775 GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink, [
776 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
780 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
781 GST_CHECK_FEATURE(SHOUT, [shout plug-in], icecastsend, [
782 GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
787 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
788 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
789 AM_PATH_SHOUT2(HAVE_SHOUT2=yes, HAVE_SHOUT2=no)
790 AC_SUBST(SHOUT2_CFLAGS)
791 AC_SUBST(SHOUT2_LIBS)
795 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
796 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
800 dnl *** smoothwave ***
801 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
802 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plug-in], smoothwave, [
803 if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
808 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
809 GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
810 GST_CHECK_LIBHEADER(LIBPNG, png, png_read_info, -lz -lm, png.h, LIBPNG_LIBS="-lpng -lz -lm")
811 AC_SUBST(LIBPNG_LIBS)
815 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
816 GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
817 PKG_CHECK_MODULES(SWFDEC, swfdec >= 0.1.3.1, HAVE_SWFDEC=yes, HAVE_SWFDEC=no)
818 AC_SUBST(SWFDEC_CFLAGS)
819 AC_SUBST(SWFDEC_LIBS)
823 dnl for now the sources are included in the plug-in
824 dnl and should be moved to ext-libs/ perhaps
825 translit(dnm, m, l) AM_CONDITIONAL(USE_TARKIN, true)
826 GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
831 dnl AM_PATH_VORBIS only takes two options
832 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
833 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
834 XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
835 AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
839 translit(dnm, m, l) AM_CONDITIONAL(USE_XMMS, true)
840 GST_CHECK_FEATURE(XMMS, [xmms plug-in], xmms, [
841 AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
844 fi dnl of EXT plugins
846 dnl Check for atomic.h
847 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
848 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
849 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
850 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
851 if test x$HAVE_ATOMIC_H = xyes; then
853 #include "asm/atomic.h"
854 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
857 if test x$HAVE_ATOMIC_H = xyes; then
858 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
864 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
869 dnl ######################################################################
870 dnl # Check command line parameters, and set shell variables accordingly #
871 dnl ######################################################################
875 AC_ARG_ENABLE(libmmx,
876 AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
877 [case "${enableval}" in
878 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
880 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
882 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
884 AC_ARG_ENABLE(atomic,
885 AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
886 [case "${enableval}" in
887 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
888 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
889 no) USE_ATOMIC_H=no;;
890 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
892 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
894 AC_ARG_ENABLE(profiling,
895 AC_HELP_STRING([--enable-profiling],
896 [-pg to compiler commandline, for profiling]),
897 [case "${enableval}" in
898 yes) USE_PROFILING=yes ;;
899 no) UES_PROFILING=no ;;
900 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
902 [USE_PROFILING=no]) dnl Default value
905 AC_HELP_STRING([--disable-tests],[disable building test apps]),
906 [case "${enableval}" in
907 yes) BUILD_TESTS=yes ;;
908 no) BUILD_TESTS=no ;;
909 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
911 [BUILD_TESTS=yes]) dnl Default value
913 AC_ARG_ENABLE(examples,
914 AC_HELP_STRING([--disable-examples],[disable building examples]),
915 [case "${enableval}" in
916 yes) BUILD_EXAMPLES=yes ;;
917 no) BUILD_EXAMPLES=no ;;
918 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
920 [BUILD_EXAMPLES=yes]) dnl Default value
922 dnl seeking needs freetype, so check for it here
923 AC_CHECK_FT2(2.0.9,HAVE_FT2=yes,HAVE_FT2=no)
924 dnl make the HAVE_FT2 variable available to automake and Makefile.am
925 AM_CONDITIONAL(HAVE_FT2, test "x$HAVE_FT2" = "xyes")
929 dnl ################################################
930 dnl # Set defines according to variables set above #
931 dnl ################################################
934 if test "x$USE_LIBMMX" = xyes; then
935 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
938 if test "x$USE_ATOMIC_H" = xyes; then
939 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
942 # do not use deprecated stuff
943 GST_CFLAGS="$GST_CFLAGS -DGST_DISABLE_DEPRECATED"
945 if test "x$USE_DEBUG" = xyes; then
946 GST_CFLAGS="$GST_CFLAGS -g"
949 if test "x$USE_PROFILING" = xyes; then
950 dnl CFLAGS="$CFLAGS -pg -fprofile-arcs"
951 FOMIT_FRAME_POINTER=""
953 FOMIT_FRAME_POINTER="-fomit-frame-pointer"
957 dnl AC_SUBST(FOMIT_FRAME_POINTER)
960 dnl #############################
961 dnl # Set automake conditionals #
962 dnl #############################
964 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
965 dnl HAVE_ and it is likely to be easier to stick with the old name
966 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
967 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
968 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
969 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
970 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
971 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
973 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
975 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
976 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
978 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
979 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
980 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
981 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
982 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
983 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
984 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
985 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
986 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
987 AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
989 dnl prefer internal headers to already installed ones
990 GST_CFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GST_ERROR"
995 dnl ###########################
996 dnl # Configure external libs #
997 dnl ###########################
998 if test "x$HAVE_FFMPEG" = xyes; then
999 AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg/ffmpeg)
1002 dnl #########################
1003 dnl # Make the output files #
1004 dnl #########################
1009 gstreamer-libs-uninstalled.pc
1011 gstreamer-play-uninstalled.pc
1014 gst/ac3parse/Makefile
1016 gst/audioscale/Makefile
1017 gst/auparse/Makefile
1019 gst/asfdemux/Makefile
1020 gst/cdxaparse/Makefile
1023 gst/deinterlace/Makefile
1024 gst/effectv/Makefile
1025 gst/festival/Makefile
1029 gst/intfloat/Makefile
1033 gst/mixmatrix/Makefile
1034 gst/mpeg1enc/Makefile
1035 gst/mpeg1sys/Makefile
1036 gst/mpeg1videoparse/Makefile
1037 gst/mpeg2enc/Makefile
1038 gst/mpeg2sub/Makefile
1039 gst/mpegaudio/Makefile
1040 gst/mpegaudioparse/Makefile
1041 gst/mpegstream/Makefile
1042 gst/mpegtypes/Makefile
1043 gst/modplug/Makefile
1044 gst/modplug/libmodplug/Makefile
1045 gst/monoscope/Makefile
1047 gst/passthrough/Makefile
1048 gst/playondemand/Makefile
1049 gst/qtdemux/Makefile
1051 gst/silence/Makefile
1055 gst/spectrum/Makefile
1058 gst/stereomono/Makefile
1059 gst/synaesthesia/Makefile
1062 gst/videoscale/Makefile
1063 gst/videotestsrc/Makefile
1064 gst/videocrop/Makefile
1067 gst/vumeter/Makefile
1069 gst/wavparse/Makefile
1081 sys/videosink/Makefile
1088 ext/audiofile/Makefile
1089 ext/avifile/Makefile
1090 ext/cdparanoia/Makefile
1092 ext/dvdread/Makefile
1097 ext/gnomevfs/Makefile
1106 ext/libfame/Makefile
1111 ext/mjpegtools/Makefile
1112 ext/mpeg2dec/Makefile
1113 ext/openquicktime/Makefile
1114 ext/raw1394/Makefile
1119 ext/sidplay/Makefile
1120 ext/smoothwave/Makefile
1121 ext/snapshot/Makefile
1127 gst-libs/gst/Makefile
1128 gst-libs/gst/audio/Makefile
1129 gst-libs/gst/floatcast/Makefile
1130 gst-libs/gst/gconf/Makefile
1131 gst-libs/gst/idct/Makefile
1132 gst-libs/gst/media-info/Makefile
1133 gst-libs/gst/play/Makefile
1134 gst-libs/gst/resample/Makefile
1135 gst-libs/gst/riff/Makefile
1136 gst-libs/gst/video/Makefile
1137 gst-libs/ext/Makefile
1138 gst-libs/ext/ffmpeg/Makefile
1139 examples/dynparams/Makefile
1140 examples/capsfilter/Makefile
1141 examples/seeking/Makefile
1142 examples/indexing/Makefile
1144 testsuite/autoplug/Makefile
1145 testsuite/spider/Makefile
1152 echo -e "configure: *** Plug-ins that will be built : $GST_PLUGINS_YES"
1154 echo -e "configure: *** Plug-ins that will not be built : $GST_PLUGINS_NO"
1156 if test "x$BUILD_EXTERNAL" = "xno"; then
1157 echo "configure: *** No external plug-ins will be built"