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 when going to/from release please set the nano (fourth number) right !
11 dnl We disable static building for development, for time savings
13 AS_VERSION(gst-plugins, GST_PLUGINS, 0, 4, 0, 1)
14 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
15 AS_LIBTOOL(GST_PLUGINS, 0, 0, 0, yes)
17 dnl we'll move this to a configure option later on which will be turned on
19 dnl GST_ERROR="-Wall -Werror"
22 dnl FIXME take something else ?
23 AC_CONFIG_SRCDIR([gst/law/alaw.c])
24 AM_CONFIG_HEADER(config.h)
26 ##AUTOMAKE="$AUTOMAKE"
27 dnl Add parameters for aclocal
28 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
29 ACLOCAL="$ACLOCAL -I m4 -I common/m4 $ACLOCAL_FLAGS"
43 dnl ############################################
44 dnl # Super Duper options for plug-in building #
45 dnl ############################################
47 dnl ext plug-ins; plug-ins that have external dependencies
48 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
49 [HAVE_EXTERNAL=yes],enabled,
51 AC_MSG_WARN(building experimental plug-ins)
54 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
57 # make BUILD_EXTERNAL available to Makefile.am
58 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
60 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
61 dnl read 'builds, but might not work'UTO
62 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
63 [HAVE_EXPERIMENTAL=yes],disabled,
65 AC_MSG_WARN(building experimental plug-ins)
68 AC_MSG_NOTICE(not building experimental plug-ins)
72 dnl broken plug-ins; stuff that doesn't seem to build at the moment
73 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
74 HAVE_BROKEN=yes,disabled,
76 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
84 AC_MSG_NOTICE([not building broken plug-ins])
87 dnl ##############################
88 dnl # Do automated configuration #
89 dnl ##############################
94 dnl allow for different autotools
95 AS_AUTOTOOLS_ALTERNATE()
97 dnl modify pkg-config path
98 AC_ARG_WITH(pkg-config-path,
99 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
100 [export PKG_CONFIG_PATH=${withval}])
103 AC_PATH_PROG(NASM_PATH, nasm, no)
105 if test x$NASM_PATH = xno; then
106 AC_MSG_WARN(Couldn't find nasm)
109 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
113 dnl check for gconftool-2
114 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
115 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
116 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
117 if test x$GCONFTOOL = xno; then
118 AC_MSG_WARN(Not installing GConf schemas)
124 AC_SUBST(HAVE_GCONFTOOL)
127 dnl check for GConf libraries
128 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
129 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
130 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
131 AC_SUBST(GCONF_CFLAGS)
136 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
137 PKG_CHECK_MODULES(GST, gstreamer >= $GST_PLUGINS_MAJOR.$GST_PLUGINS_MINOR.$GST_PLUGINS_MICRO,
138 HAVE_GST="yes", HAVE_GST="no")
140 if test "x$HAVE_GST" = "xno"; then
141 AC_MSG_ERROR(no GStreamer found)
144 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer`
145 if test -z $GST_TOOLS_DIR; then
146 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
148 AC_SUBST(GST_TOOLS_DIR)
150 dnl Set up conditionals for (target) architecture:
151 dnl ==============================================
154 case "x${target_cpu}" in
155 xi?86 | k?) HAVE_CPU_I386=yes
156 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
157 dnl FIXME could use some better detection
159 case "x${target_cpu}" in
161 *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
163 xpowerpc) HAVE_CPU_PPC=yes
164 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
165 xalpha) HAVE_CPU_ALPHA=yes
166 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
167 xarm*) HAVE_CPU_ARM=yes
168 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
169 xsparc*) HAVE_CPU_SPARC=yes
170 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
171 xmips*) HAVE_CPU_MIPS=yes
172 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
173 xhppa*) HAVE_CPU_HPPA=yes
174 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
177 dnl Determine endianness
180 dnl Check for fast float to int casting as defined in C99
184 dnl Check for essential libraries first:
185 dnl ====================================
188 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
189 GTK_CFLAGS=$GTK2_CFLAGS
194 dnl Check for X11 extensions
196 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
197 AC_MSG_NOTICE([cannot find X11, the build system needs fixage])
201 AC_SUBST(X_EXTRA_LIBS)
204 dnl ===========================================================================
205 dnl ============================= gst plug-ins ================================
206 dnl ===========================================================================
207 GST_PLUGIN_LDFLAGS='-module -avoid-version'
208 AC_SUBST(GST_PLUGIN_LDFLAGS)
210 dnl these are all the gst plug-ins, compilable without additional libs
212 ac3parse adder audioscale auparse avi cdxaparse chart\
213 cutter deinterlace effectv festival filter flx goom\
215 median mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\
216 mpegaudio mpegaudioparse mpegstream mpegtypes modplug\
217 monoscope passthrough playondemand qtdemux rtjpeg silence sine\
218 smooth spectrum speed stereo stereomono\
219 synaesthesia udp videoscale volenv volume vumeter wavparse y4m"
221 AC_SUBST(GST_PLUGINS_ALL)
223 GST_PLUGINS_SELECTED=""
226 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
227 [for i in `echo $withval | tr , ' '`; do
228 if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
229 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
231 echo "plug-in $i not recognized, ignoring..."
234 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
236 AC_SUBST(GST_PLUGINS_SELECTED)
238 dnl ==========================================================================
239 dnl ============================= sys plug-ins ================================
240 dnl ==========================================================================
242 dnl *** DXR3 card ***
243 translit(dnm, m, l) AM_CONDITIONAL(USE_DXR3, true)
244 GST_CHECK_FEATURE(DXR3, [DXR3 hardware mpeg video decoder], dxr3videosink, [
245 AC_CHECK_HEADER(linux/em8300.h, HAVE_DXR3="yes", HAVE_DXR3="no")
248 dnl *** OSS audio ***
249 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
250 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
251 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
255 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
256 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
257 dnl this one is for hadess, no qcam when no nasm found
258 if test "x$HAVE_NASM" = "xno";
261 AC_MSG_WARN([QuickCam needs nasm])
267 dnl *** Video 4 Linux ***
268 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
269 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
270 AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>])
274 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
275 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
276 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
280 translit(dnm, m, l) AM_CONDITIONAL(USE_VGA, true)
281 GST_CHECK_FEATURE(VGA, [VGA], vgavideosink, [
282 AC_CHECK_HEADER(asm/vga.h, HAVE_VGA="yes", HAVE_VGA="no")
286 dnl Look for the PIC library first, Debian requires it.
287 dnl Check debian-devel archives for gory details.
289 dnl At the moment XFree86 doesn't distribute shared libXv due
290 dnl to unstable API. On many platforms you CAN NOT link a shared
291 dnl lib to a static non-PIC lib. This is what the xvideo GStreamer
292 dnl plug-in wants to do. So Debian distributes a PIC compiled
293 dnl version of the static lib for plug-ins to link to when it is
294 dnl inappropriate to link the main application to libXv directly.
295 dnl FIXME: add check if this platform can support linking to a
296 dnl non-PIC libXv, if not then don not use Xv.
297 dnl FIXME: perhaps warn user if they have a shared libXv since
298 dnl this is an error until XFree86 starts shipping one
299 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
300 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink videosink, [
301 dnl check for PIC static lib
302 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")
303 if test x$HAVE_XVIDEO = xno; then
304 dnl PIC lib not found, check for regular lib
305 GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
307 AC_SUBST(XVIDEO_LIBS)
310 dnl Next, check for the optional libraries:
311 dnl These are all libraries used in building plug-ins
312 dnl ================================================
313 dnl let's try and sort them alphabetically, shall we ?
315 if test "x$BUILD_EXTERNAL" = "xyes"; then
317 AC_MSG_NOTICE(Checking for plug-in dependency libraries)
320 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
321 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
322 AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
326 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
327 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
328 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
332 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
333 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
334 AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
338 dnl if mcopidl can't be found there's no use in compiling it
339 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
340 if test "xHAVE_MCOPIDL" = "xno";
345 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
346 GST_CHECK_FEATURE(ARTS, [arts plug-ins], arts, [
347 AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
351 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
352 GST_CHECK_FEATURE(ARTSC, [artsd plug-ins], artsdsink, [
356 dnl *** audiofile ***
357 dnl this check uses the GST_CHECK_CONFIGPROG macro
358 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
359 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
360 translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
361 translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
362 GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
366 dnl this check uses the GST_CHECK_CONFIGPROG macro
367 dnl this check needs more fixing
368 dnl translit(dnm, m, l) AC_SUBST(AVIFILE_LIBS)
369 translit(dnm, m, l) AM_CONDITIONAL(USE_AVIFILE, true)
370 GST_CHECK_FEATURE(AVIFILE, [avifile], windec winenc, [
371 translit(dnm, m, l) AC_SUBST(AVIFILE_CFLAGS)
372 GST_CHECK_CONFIGPROG(AVIFILE, avifile-config)
373 AVIFILE_LIBS="$AVIFILE_LIBS -lstdc++"
374 AC_SUBST(AVIFILE_LIBS)
377 dnl *** CDParanoia ***
378 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
379 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
380 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
383 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
385 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface,
387 cdda/cdda_interface.h,
388 CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
390 if test "x$HEADER_DIR" = "xyes";
392 AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, ,
393 defined if cdda headers are in a cdda/ directory)
395 AC_SUBST(CDPARANOIA_LIBS)
397 dnl FIXME : add second check somehow if that is necessary
398 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
399 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
402 translit(dnm, m, l) AM_CONDITIONAL(USE_DV, true)
403 GST_CHECK_FEATURE(DV, [dv library], dv, [
404 AM_PATH_LIBDV(HAVE_DV=yes, HAVE_DV=no)
409 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
410 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
411 GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
412 AC_SUBST(DVDREAD_LIBS)
416 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDNAV, true)
417 GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
418 translit(dnm, m, l) AC_SUBST(DVDNAV_LIBS)
419 translit(dnm, m, l) AC_SUBST(DVDNAV_CFLAGS)
420 GST_CHECK_CONFIGPROG(DVDNAV, dvdnav-config)
424 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
425 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
426 AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
429 dnl **** festival ****
430 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
431 dnl GST_CHECK_FEATURE(FESTIVAL, [festival plug-ins], festivalsrc, [
432 dnl NOTE: just using local net connection now, add this lib check
433 dnl in the future if needed
434 dnl AC_LANG_PUSH(C++)
435 dnl dnl FIXME: took out func to check for
436 dnl dnl This check puts festival_tidy_up in extern "C".
437 dnl dnl But, at least on Debian as of 20020110, it is compiled with name
438 dnl dnl mangling C++ nonsense and symbols can't resolve
439 dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
440 dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
442 dnl AC_SUBST(FESTIVAL_LIBS)
443 dnl HAVE_FESTIVAL=yes
447 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
448 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
449 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_decoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
453 dnl *** Gnome VFS ***
454 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
455 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
456 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
457 AC_SUBST(GNOME_VFS_CFLAGS)
458 AC_SUBST(GNOME_VFS_LIBS)
462 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
463 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
464 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
465 if test $HAVE_GSM != "yes"; then
466 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
467 if test $HAVE_GSM = "yes"; then
468 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
475 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
476 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
477 GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
478 ], AC_SUBST(HERMES_LIBS))
481 translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
482 GST_CHECK_FEATURE(HTTP, [http plug-ins], gsthttpsrc, [
483 dnl FIXME: need to check for header
485 GST_HTTPSRC_GET_TYPE=
486 if test x$USE_GLIB2 = xyes; then
487 AC_MSG_WARN(ghttp disabled for glib2.0)
489 AC_CHECK_LIB(ghttp, ghttp_request_new,
491 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
496 AC_SUBST(GST_HTTPSRC_GET_TYPE)
500 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
501 GST_CHECK_FEATURE(JACK, Jack, jack, [
502 PKG_CHECK_MODULES(JACK, jack >= 0.29.0, HAVE_JACK="yes", HAVE_JACK="no")
503 AC_SUBST(JACK_CFLAGS)
508 dnl FIXME: we could use header checks here as well IMO
509 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
510 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
511 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
517 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
518 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
519 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
523 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
524 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
525 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame")
529 dnl *** libcolorspace ***
530 translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
531 GST_CHECK_FEATURE(LCS, Lcs, lcs, [
532 PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
538 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
539 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
540 PKG_CHECK_MODULES(LIBDV, libdv, HAVE_LIBDV="yes", HAVE_LIBDV="no")
541 AC_SUBST(LIBDV_CFLAGS)
546 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBFAME, true)
547 GST_CHECK_FEATURE(LIBFAME, [libfame MPEG1/4 encoder], libfame, [
548 AM_PATH_LIBFAME(0.9.0, HAVE_LIBFAME="yes", HAVE_LIBFAME="no")
549 AC_SUBST(LIBFAME_CFLAGS)
550 AC_SUBST(LIBFAME_LIBS)
554 dnl FIXME: we could use header checks here as well IMO
555 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
556 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
557 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
558 if test "x$HAVE_MAD" = "xyes"; then
559 # installed with mad >= 0.14
563 AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag")
570 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
571 GST_CHECK_FEATURE(MIKMOD, [mikmod plug-in], mikmod, [
572 AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
573 AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
574 AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
577 dnl *** mjpegtools ***
578 translit(dnm, m, l) AM_CONDITIONAL(USE_MJPEGTOOLS, true)
579 GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
580 PKG_CHECK_MODULES(MJPEGTOOLS, mjpegtools, HAVE_MJPEGTOOLS="yes", HAVE_MJPEGTOOLS="no")
581 AC_SUBST(MJPEGTOOLS_LIBS)
582 AC_SUBST(MJPEGTOOLS_CFLAGS)
586 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
587 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
588 AC_CHECK_MPEG2DEC(HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no)
591 dnl *** openquicktime ***
592 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENQUICKTIME, true)
593 GST_CHECK_FEATURE(OPENQUICKTIME, [Open Quicktime], quicktime_parser quicktime_decoder quicktime_demux,[
594 GST_CHECK_LIBHEADER(OPENQUICKTIME, openquicktime, quicktime_init,, openquicktime/openquicktime.h, OPENQUICKTIME_LIBS="-lopenquicktime")
595 AC_SUBST(OPENQUICKTIME_LIBS)
599 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
600 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
601 GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_get_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-raw1394")
602 AC_SUBST(RAW1394_LIBS)
606 dnl FIXME : adapt and make it work
607 translit(dnm, m, l) AM_CONDITIONAL(USE_RTP, true)
608 GST_CHECK_FEATURE(RTP, [RTP library], rtpenc rtpdec,[
609 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_RTP=yes, HAVE_RTP=no, $GST_CFLAGS $GST_LIBS)
614 dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
615 dnl can use GST_* which should have GLIB_* info
616 dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
617 dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
618 dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
619 dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
622 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
623 GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink, [
624 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
628 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
629 GST_CHECK_FEATURE(SHOUT, [shout plug-in], icecastsend, [
630 GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
635 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
636 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
640 dnl *** smoothwave ***
641 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
642 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plug-in], smoothwave, [
643 if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
648 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
649 GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
650 GST_CHECK_LIBHEADER(LIBPNG, png, png_read_info, -lz, png.h, LIBPNG_LIBS="-lpng -lz")
651 AC_SUBST(LIBPNG_LIBS)
655 dnl for now the sources are included in the plug-in
656 dnl and should be moved to ext-libs/ perhaps
657 translit(dnm, m, l) AM_CONDITIONAL(USE_TARKIN, true)
658 GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
663 dnl AM_PATH_VORBIS only takes two options
664 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
665 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
666 AM_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
670 translit(dnm, m, l) AM_CONDITIONAL(USE_XMMS, true)
671 GST_CHECK_FEATURE(XMMS, [xmms plug-in], xmms, [
672 AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
675 fi dnl of EXT plugins
677 dnl Check for atomic.h
678 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
679 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
680 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
681 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
682 if test x$HAVE_ATOMIC_H = xyes; then
684 #include "asm/atomic.h"
685 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
688 if test x$HAVE_ATOMIC_H = xyes; then
689 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
695 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
700 dnl ######################################################################
701 dnl # Check command line parameters, and set shell variables accordingly #
702 dnl ######################################################################
706 AC_ARG_ENABLE(libmmx,
707 AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
708 [case "${enableval}" in
709 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
711 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
713 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
715 AC_ARG_ENABLE(atomic,
716 AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
717 [case "${enableval}" in
718 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
719 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
720 no) USE_ATOMIC_H=no;;
721 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
723 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
725 AC_ARG_ENABLE(profiling,
726 AC_HELP_STRING([--enable-profiling],
727 [-pg to compiler commandline, for profiling]),
728 [case "${enableval}" in
729 yes) USE_PROFILING=yes ;;
730 no) UES_PROFILING=no ;;
731 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
733 [USE_PROFILING=no]) dnl Default value
736 AC_HELP_STRING([--disable-tests],[disable building test apps]),
737 [case "${enableval}" in
738 yes) BUILD_TESTS=yes ;;
739 no) BUILD_TESTS=no ;;
740 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
742 [BUILD_TESTS=yes]) dnl Default value
744 AC_ARG_ENABLE(examples,
745 AC_HELP_STRING([--disable-examples],[disable building examples]),
746 [case "${enableval}" in
747 yes) BUILD_EXAMPLES=yes ;;
748 no) BUILD_EXAMPLES=no ;;
749 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
751 [BUILD_EXAMPLES=yes]) dnl Default value
753 dnl ################################################
754 dnl # Set defines according to variables set above #
755 dnl ################################################
758 if test "x$USE_LIBMMX" = xyes; then
759 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
762 if test "x$USE_ATOMIC_H" = xyes; then
763 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
766 dnl if test "x$USE_DEBUG" = xyes; then
767 dnl CFLAGS="$CFLAGS -g"
770 if test "x$USE_PROFILING" = xyes; then
771 dnl CFLAGS="$CFLAGS -pg -fprofile-arcs"
772 FOMIT_FRAME_POINTER=""
774 FOMIT_FRAME_POINTER="-fomit-frame-pointer"
778 dnl AC_SUBST(FOMIT_FRAME_POINTER)
781 dnl #############################
782 dnl # Set automake conditionals #
783 dnl #############################
785 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
786 dnl HAVE_ and it is likely to be easier to stick with the old name
787 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
788 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
789 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
790 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
791 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
792 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
794 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
796 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
797 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
799 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
800 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
801 AM_CONDITIONAL(HAVE_GNOME, test "x$HAVE_GNOME" = "xyes")
802 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
803 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
804 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
805 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
806 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
807 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
808 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
809 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
810 AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
812 GST_CFLAGS="$GST_CFLAGS -I\$(top_srcdir)/gst-libs -Wall -Werror"
816 dnl #########################
817 dnl # Make the output files #
818 dnl #########################
820 dnl testsuite/autoplug/Makefile
821 dnl testsuite/Makefile
825 gstreamer-libs-uninstalled.pc
828 gst/ac3parse/Makefile
830 gst/audioscale/Makefile
833 gst/cdxaparse/Makefile
836 gst/deinterlace/Makefile
838 gst/festival/Makefile
842 gst/intfloat/Makefile
846 gst/mpeg1enc/Makefile
847 gst/mpeg1sys/Makefile
848 gst/mpeg1videoparse/Makefile
849 gst/mpeg2enc/Makefile
850 gst/mpeg2sub/Makefile
851 gst/mpegaudio/Makefile
852 gst/mpegaudioparse/Makefile
853 gst/mpegstream/Makefile
854 gst/mpegtypes/Makefile
856 gst/modplug/libmodplug/Makefile
857 gst/monoscope/Makefile
858 gst/passthrough/Makefile
859 gst/playondemand/Makefile
865 gst/spectrum/Makefile
868 gst/stereomono/Makefile
869 gst/synaesthesia/Makefile
871 gst/videoscale/Makefile
875 gst/wavparse/Makefile
885 sys/videosink/Makefile
892 ext/audiofile/Makefile
894 ext/cdparanoia/Makefile
901 ext/gnomevfs/Makefile
913 ext/mjpegtools/Makefile
914 ext/mpeg2dec/Makefile
915 ext/openquicktime/Makefile
921 ext/smoothwave/Makefile
926 gst-libs/gst/Makefile
927 gst-libs/gst/audio/Makefile
928 gst-libs/gst/floatcast/Makefile
929 gst-libs/gst/gconf/Makefile
930 gst-libs/gst/idct/Makefile
931 gst-libs/gst/resample/Makefile
932 gst-libs/gst/riff/Makefile
933 examples/dynparams/Makefile
934 examples/capsfilter/Makefile
935 examples/seeking/Makefile
943 echo -e "configure: *** Plug-ins that will be built : $GST_PLUGINS_YES"
945 echo -e "configure: *** Plug-ins that will not be built : $GST_PLUGINS_NO"
947 if test "x$BUILD_EXTERNAL" = "xno"; then
948 echo "configure: *** No external plug-ins will be built"