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, 3, 4, 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 :)])
86 AC_MSG_NOTICE(not building broken plug-ins)
89 dnl ##############################
90 dnl # Do automated configuration #
91 dnl ##############################
96 dnl allow for different autotools
97 AS_AUTOTOOLS_ALTERNATE()
99 dnl modify pkg-config path
100 AC_ARG_WITH(pkg-config-path,
101 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
102 [export PKG_CONFIG_PATH=${withval}])
105 AC_PATH_PROG(NASM_PATH, nasm, no)
107 if test x$NASM_PATH = xno; then
108 AC_MSG_WARN(Couldn't find nasm)
111 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
116 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
117 GST_CHECK_FEATURE(GCONF, [GConf stuff], , [
118 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
119 if test x$GCONFTOOL = xno; then
120 AC_MSG_WARN(Not installing GConf schemas)
129 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
130 PKG_CHECK_MODULES(GST, gstreamer >= $GST_PLUGINS_MAJOR.$GST_PLUGINS_MINOR.$GST_PLUGINS_MICRO,
131 HAVE_GST="yes", HAVE_GST="no")
133 if test "x$HAVE_GST" = "xno"; then
134 AC_MSG_ERROR(no GStreamer found)
137 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer`
138 if test -z $GST_TOOLS_DIR; then
139 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
141 AC_SUBST(GST_TOOLS_DIR)
143 dnl Set up conditionals for (target) architecture:
144 dnl ==============================================
147 case "x${target_cpu}" in
148 xi?86 | k?) HAVE_CPU_I386=yes
149 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
150 dnl FIXME could use some better detection
152 case "x${target_cpu}" in
154 *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
156 xpowerpc) HAVE_CPU_PPC=yes
157 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
158 xalpha) HAVE_CPU_ALPHA=yes
159 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
160 xarm*) HAVE_CPU_ARM=yes
161 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
162 xsparc*) HAVE_CPU_SPARC=yes
163 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
164 xmips*) HAVE_CPU_MIPS=yes
165 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
166 xhppa*) HAVE_CPU_HPPA=yes
167 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
170 dnl Determine endianness
173 dnl Check for fast float to int casting as defined in C99
177 dnl Check for essential libraries first:
178 dnl ====================================
181 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
182 GTK_CFLAGS=$GTK2_CFLAGS
187 dnl Check for X11 extensions
189 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
190 AC_MSG_NOTICE([cannot find X11, the build system needs fixage])
194 AC_SUBST(X_EXTRA_LIBS)
197 dnl ===========================================================================
198 dnl ============================= gst plug-ins ================================
199 dnl ===========================================================================
200 GST_PLUGIN_LDFLAGS='-module -avoid-version'
201 AC_SUBST(GST_PLUGIN_LDFLAGS)
203 dnl these are all the gst plug-ins, compilable without additional libs
205 ac3parse adder audioscale auparse avi cdxaparse chart\
206 cutter deinterlace effectv festival filter flx goom\
208 median mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\
209 mpegaudio mpegaudioparse mpegstream mpegtypes modplug\
210 monoscope passthrough playondemand qtdemux rtjpeg silence sine\
211 smooth spectrum speed stereo stereomono\
212 synaesthesia udp videoscale volenv volume vumeter wavparse y4m"
214 AC_SUBST(GST_PLUGINS_ALL)
216 GST_PLUGINS_SELECTED=""
219 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
220 [for i in `echo $withval | tr , ' '`; do
221 if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
222 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
224 echo "plug-in $i not recognized, ignoring..."
227 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
229 AC_SUBST(GST_PLUGINS_SELECTED)
231 dnl ==========================================================================
232 dnl ============================= sys plug-ins ================================
233 dnl ==========================================================================
235 dnl *** DXR3 card ***
236 translit(dnm, m, l) AM_CONDITIONAL(USE_DXR3, true)
237 GST_CHECK_FEATURE(DXR3, [DXR3 hardware mpeg video decoder], dxr3videosink, [
238 AC_CHECK_HEADER(linux/em8300.h, HAVE_DXR3="yes", HAVE_DXR3="no")
241 dnl *** OSS audio ***
242 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
243 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
244 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
248 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
249 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
250 dnl this one is for hadess, no qcam when no nasm found
251 if test "x$HAVE_NASM" = "xno";
254 AC_MSG_WARN([QuickCam needs nasm])
260 dnl *** Video 4 Linux ***
261 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
262 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
263 AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>])
267 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
268 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
269 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
273 translit(dnm, m, l) AM_CONDITIONAL(USE_VGA, true)
274 GST_CHECK_FEATURE(VGA, [VGA], vgavideosink, [
275 AC_CHECK_HEADER(asm/vga.h, HAVE_VGA="yes", HAVE_VGA="no")
279 dnl Look for the PIC library first, Debian requires it.
280 dnl Check debian-devel archives for gory details.
282 dnl At the moment XFree86 doesn't distribute shared libXv due
283 dnl to unstable API. On many platforms you CAN NOT link a shared
284 dnl lib to a static non-PIC lib. This is what the xvideo GStreamer
285 dnl plug-in wants to do. So Debian distributes a PIC compiled
286 dnl version of the static lib for plug-ins to link to when it is
287 dnl inappropriate to link the main application to libXv directly.
288 dnl FIXME: add check if this platform can support linking to a
289 dnl non-PIC libXv, if not then don not use Xv.
290 dnl FIXME: perhaps warn user if they have a shared libXv since
291 dnl this is an error until XFree86 starts shipping one
292 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
293 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink videosink, [
294 dnl check for PIC static lib
295 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")
296 if test x$HAVE_XVIDEO = xno; then
297 dnl PIC lib not found, check for regular lib
298 GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
300 AC_SUBST(XVIDEO_LIBS)
303 dnl Next, check for the optional libraries:
304 dnl These are all libraries used in building plug-ins
305 dnl ================================================
306 dnl let's try and sort them alphabetically, shall we ?
308 if test "x$BUILD_EXTERNAL" = "xyes"; then
310 AC_MSG_NOTICE(Checking for plug-in dependency libraries)
313 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
314 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
315 AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
319 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
320 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
321 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
325 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
326 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
327 AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
331 dnl if mcopidl can't be found there's no use in compiling it
332 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
333 if test "xHAVE_MCOPIDL" = "xno";
338 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
339 GST_CHECK_FEATURE(ARTS, [arts plug-ins], arts, [
340 AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
344 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
345 GST_CHECK_FEATURE(ARTSC, [artsd plug-ins], artsdsink, [
349 dnl *** audiofile ***
350 dnl this check uses the GST_CHECK_CONFIGPROG macro
351 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
352 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
353 translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
354 translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
355 GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
359 dnl this check uses the GST_CHECK_CONFIGPROG macro
360 dnl this check needs more fixing
361 dnl translit(dnm, m, l) AC_SUBST(AVIFILE_LIBS)
362 translit(dnm, m, l) AM_CONDITIONAL(USE_AVIFILE, true)
363 GST_CHECK_FEATURE(AVIFILE, [avifile], windec winenc, [
364 translit(dnm, m, l) AC_SUBST(AVIFILE_CFLAGS)
365 GST_CHECK_CONFIGPROG(AVIFILE, avifile-config)
366 AVIFILE_LIBS="$AVIFILE_LIBS -lstdc++"
367 AC_SUBST(AVIFILE_LIBS)
370 dnl *** CDParanoia ***
371 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
372 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
373 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, cdda_open, -lm, cdda_interface.h, CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia")
374 AC_SUBST(CDPARANOIA_LIBS)
376 dnl FIXME : add second check somehow if that is necessary
377 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
378 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
381 translit(dnm, m, l) AM_CONDITIONAL(USE_DV, true)
382 GST_CHECK_FEATURE(DV, [dv library], dv, [
383 AM_PATH_LIBDV(HAVE_DV=yes, HAVE_DV=no)
388 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
389 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
390 GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
391 AC_SUBST(DVDREAD_LIBS)
395 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDNAV, true)
396 GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
397 translit(dnm, m, l) AC_SUBST(DVDNAV_LIBS)
398 translit(dnm, m, l) AC_SUBST(DVDNAV_CFLAGS)
399 GST_CHECK_CONFIGPROG(DVDNAV, dvdnav-config)
403 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
404 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
405 AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
408 dnl **** festival ****
409 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
410 dnl GST_CHECK_FEATURE(FESTIVAL, [festival plug-ins], festivalsrc, [
411 dnl NOTE: just using local net connection now, add this lib check
412 dnl in the future if needed
413 dnl AC_LANG_PUSH(C++)
414 dnl dnl FIXME: took out func to check for
415 dnl dnl This check puts festival_tidy_up in extern "C".
416 dnl dnl But, at least on Debian as of 20020110, it is compiled with name
417 dnl dnl mangling C++ nonsense and symbols can't resolve
418 dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
419 dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
421 dnl AC_SUBST(FESTIVAL_LIBS)
422 dnl HAVE_FESTIVAL=yes
426 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
427 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
428 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_decoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
432 dnl *** Gnome VFS ***
433 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
434 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
435 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
436 AC_SUBST(GNOME_VFS_CFLAGS)
437 AC_SUBST(GNOME_VFS_LIBS)
441 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
442 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
443 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
444 if test $HAVE_GSM != "yes"; then
445 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
446 if test $HAVE_GSM = "yes"; then
447 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
454 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
455 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
456 GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
457 ], AC_SUBST(HERMES_LIBS))
460 translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
461 GST_CHECK_FEATURE(HTTP, [http plug-ins], gsthttpsrc, [
462 dnl FIXME: need to check for header
464 GST_HTTPSRC_GET_TYPE=
465 if test x$USE_GLIB2 = xyes; then
466 AC_MSG_WARN(ghttp disabled for glib2.0)
468 AC_CHECK_LIB(ghttp, ghttp_request_new,
470 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
475 AC_SUBST(GST_HTTPSRC_GET_TYPE)
479 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
480 GST_CHECK_FEATURE(JACK, Jack, jack, [
481 PKG_CHECK_MODULES(JACK, jack >= 0.29.0, HAVE_JACK="yes", HAVE_JACK="no")
482 AC_SUBST(JACK_CFLAGS)
487 dnl FIXME: we could use header checks here as well IMO
488 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
489 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
490 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
496 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
497 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
498 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
502 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
503 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
504 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame")
508 dnl *** libcolorspace ***
509 translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
510 GST_CHECK_FEATURE(LCS, Lcs, lcs, [
511 PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
517 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
518 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
519 PKG_CHECK_MODULES(LIBDV, libdv, HAVE_LIBDV="yes", HAVE_LIBDV="no")
520 AC_SUBST(LIBDV_CFLAGS)
525 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBFAME, true)
526 GST_CHECK_FEATURE(LIBFAME, [libfame MPEG1/4 encoder], libfame, [
527 AM_PATH_LIBFAME(0.9.0, HAVE_LIBFAME="yes", HAVE_LIBFAME="no")
528 AC_SUBST(LIBFAME_CFLAGS)
529 AC_SUBST(LIBFAME_LIBS)
533 dnl FIXME: we could use header checks here as well IMO
534 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
535 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
536 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
537 if test "x$HAVE_MAD" = "xyes"; then
538 # installed with mad >= 0.14
542 AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag")
549 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
550 GST_CHECK_FEATURE(MIKMOD, [mikmod plug-in], mikmod, [
551 AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
552 AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
553 AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
556 dnl *** mjpegtools ***
557 translit(dnm, m, l) AM_CONDITIONAL(USE_MJPEGTOOLS, true)
558 GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
559 PKG_CHECK_MODULES(MJPEGTOOLS, mjpegtools, HAVE_MJPEGTOOLS="yes", HAVE_MJPEGTOOLS="no")
560 AC_SUBST(MJPEGTOOLS_LIBS)
561 AC_SUBST(MJPEGTOOLS_CFLAGS)
565 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
566 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
567 AC_CHECK_MPEG2DEC(HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no)
570 dnl *** openquicktime ***
571 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENQUICKTIME, true)
572 GST_CHECK_FEATURE(OPENQUICKTIME, [Open Quicktime], quicktime_parser quicktime_decoder quicktime_demux,[
573 GST_CHECK_LIBHEADER(OPENQUICKTIME, openquicktime, quicktime_init,, openquicktime/openquicktime.h, OPENQUICKTIME_LIBS="-lopenquicktime")
574 AC_SUBST(OPENQUICKTIME_LIBS)
578 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
579 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
580 GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_get_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-raw1394")
581 AC_SUBST(RAW1394_LIBS)
585 dnl FIXME : adapt and make it work
586 translit(dnm, m, l) AM_CONDITIONAL(USE_RTP, true)
587 GST_CHECK_FEATURE(RTP, [RTP library], rtpenc rtpdec,[
588 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_RTP=yes, HAVE_RTP=no, $GST_CFLAGS $GST_LIBS)
593 dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
594 dnl can use GST_* which should have GLIB_* info
595 dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
596 dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
597 dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
598 dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
601 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
602 GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink, [
603 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
607 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
608 GST_CHECK_FEATURE(SHOUT, [shout plug-in], icecastsend, [
609 GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
614 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
615 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
619 dnl *** smoothwave ***
620 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
621 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plug-in], smoothwave, [
622 if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
627 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
628 GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
629 GST_CHECK_LIBHEADER(LIBPNG, png, png_read_info, -lz, png.h, LIBPNG_LIBS="-lpng -lz")
630 AC_SUBST(LIBPNG_LIBS)
634 dnl for now the sources are included in the plug-in
635 dnl and should be moved to ext-libs/ perhaps
636 translit(dnm, m, l) AM_CONDITIONAL(USE_TARKIN, true)
637 GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
642 dnl AM_PATH_VORBIS only takes two options
643 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
644 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
645 AM_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
649 translit(dnm, m, l) AM_CONDITIONAL(USE_XMMS, true)
650 GST_CHECK_FEATURE(XMMS, [xmms plug-in], xmms, [
651 AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
654 fi dnl of EXT plugins
656 dnl Check for atomic.h
657 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
658 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
659 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
660 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
661 if test x$HAVE_ATOMIC_H = xyes; then
663 #include "asm/atomic.h"
664 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
667 if test x$HAVE_ATOMIC_H = xyes; then
668 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
674 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
679 dnl ######################################################################
680 dnl # Check command line parameters, and set shell variables accordingly #
681 dnl ######################################################################
685 AC_ARG_ENABLE(libmmx,
686 AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
687 [case "${enableval}" in
688 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
690 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
692 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
694 AC_ARG_ENABLE(atomic,
695 AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
696 [case "${enableval}" in
697 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
698 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
699 no) USE_ATOMIC_H=no;;
700 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
702 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
704 AC_ARG_ENABLE(profiling,
705 AC_HELP_STRING([--enable-profiling],
706 [-pg to compiler commandline, for profiling]),
707 [case "${enableval}" in
708 yes) USE_PROFILING=yes ;;
709 no) UES_PROFILING=no ;;
710 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
712 [USE_PROFILING=no]) dnl Default value
715 AC_HELP_STRING([--disable-tests],[disable building test apps]),
716 [case "${enableval}" in
717 yes) BUILD_TESTS=yes ;;
718 no) BUILD_TESTS=no ;;
719 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
721 [BUILD_TESTS=yes]) dnl Default value
723 AC_ARG_ENABLE(examples,
724 AC_HELP_STRING([--disable-examples],[disable building examples]),
725 [case "${enableval}" in
726 yes) BUILD_EXAMPLES=yes ;;
727 no) BUILD_EXAMPLES=no ;;
728 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
730 [BUILD_EXAMPLES=yes]) dnl Default value
732 dnl ################################################
733 dnl # Set defines according to variables set above #
734 dnl ################################################
737 if test "x$USE_LIBMMX" = xyes; then
738 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
741 if test "x$USE_ATOMIC_H" = xyes; then
742 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
745 dnl if test "x$USE_DEBUG" = xyes; then
746 dnl CFLAGS="$CFLAGS -g"
749 if test "x$USE_PROFILING" = xyes; then
750 dnl CFLAGS="$CFLAGS -pg -fprofile-arcs"
751 FOMIT_FRAME_POINTER=""
753 FOMIT_FRAME_POINTER="-fomit-frame-pointer"
757 dnl AC_SUBST(FOMIT_FRAME_POINTER)
760 dnl #############################
761 dnl # Set automake conditionals #
762 dnl #############################
764 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
765 dnl HAVE_ and it is likely to be easier to stick with the old name
766 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
767 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
768 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
769 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
770 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
771 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
773 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
775 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
776 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
778 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
779 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
780 AM_CONDITIONAL(HAVE_GNOME, test "x$HAVE_GNOME" = "xyes")
781 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
782 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
783 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
784 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
785 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
786 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
787 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
788 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
789 AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
791 GST_CFLAGS="$GST_CFLAGS -I\$(top_srcdir)/gst-libs -Wall -Werror"
795 dnl #########################
796 dnl # Make the output files #
797 dnl #########################
799 dnl testsuite/autoplug/Makefile
800 dnl testsuite/Makefile
804 gstreamer-libs-uninstalled.pc
807 gst/ac3parse/Makefile
809 gst/audioscale/Makefile
812 gst/cdxaparse/Makefile
815 gst/deinterlace/Makefile
817 gst/festival/Makefile
821 gst/intfloat/Makefile
825 gst/mpeg1enc/Makefile
826 gst/mpeg1sys/Makefile
827 gst/mpeg1videoparse/Makefile
828 gst/mpeg2enc/Makefile
829 gst/mpeg2sub/Makefile
830 gst/mpegaudio/Makefile
831 gst/mpegaudioparse/Makefile
832 gst/mpegstream/Makefile
833 gst/mpegtypes/Makefile
835 gst/modplug/libmodplug/Makefile
836 gst/monoscope/Makefile
837 gst/passthrough/Makefile
838 gst/playondemand/Makefile
844 gst/spectrum/Makefile
847 gst/stereomono/Makefile
848 gst/synaesthesia/Makefile
850 gst/videoscale/Makefile
854 gst/wavparse/Makefile
864 sys/videosink/Makefile
871 ext/audiofile/Makefile
873 ext/cdparanoia/Makefile
880 ext/gnomevfs/Makefile
892 ext/mjpegtools/Makefile
893 ext/mpeg2dec/Makefile
894 ext/openquicktime/Makefile
900 ext/smoothwave/Makefile
905 gst-libs/gst/Makefile
906 gst-libs/gst/audio/Makefile
907 gst-libs/gst/idct/Makefile
908 gst-libs/gst/resample/Makefile
909 gst-libs/gst/riff/Makefile
910 gst-libs/gst/floatcast/Makefile
911 examples/dynparams/Makefile
912 examples/capsfilter/Makefile
913 examples/seeking/Makefile
921 echo -e "configure: *** Plug-ins that will be built : $GST_PLUGINS_YES"
923 echo -e "configure: *** Plug-ins that will not be built : $GST_PLUGINS_NO"
925 if test "x$BUILD_EXTERNAL" = "xno"; then
926 echo "configure: *** No external plug-ins will be built"