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 dnl Add parameters for aclocal
27 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
28 ACLOCAL="$ACLOCAL -I m4 -I common/m4 $ACLOCAL_FLAGS"
42 dnl ###########################################
43 dnl # Super Duper options for plugin building #
44 dnl ###########################################
46 dnl experimental plugins; stuff that hasn't had the dust settle yet
47 dnl read 'builds, but might not work'
48 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plugins],,
49 [HAVE_EXPERIMENTAL=yes],disabled,
51 AC_MSG_WARN(building experimental plugins)
54 AC_MSG_NOTICE(not building experimental plugins)
58 dnl broken plugins; stuff that doesn't seem to build at the moment
59 GST_CHECK_FEATURE(BROKEN, [enable building of broken plugins],,
60 HAVE_BROKEN=yes,disabled,
62 AC_MSG_WARN([building broken plugins -- no bug reports on these, only patches :)])
70 AC_MSG_NOTICE(not building broken plugins)
73 dnl ##############################
74 dnl # Do automated configuration #
75 dnl ##############################
80 dnl modify pkg-config path
81 AC_ARG_WITH(pkg-config-path,
82 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
83 [export PKG_CONFIG_PATH=${withval}])
86 AC_PATH_PROG(NASM_PATH, nasm, no)
88 if test x$NASM_PATH = xno; then
89 AC_MSG_WARN(Couldn't find nasm)
92 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
97 translit(dnm, m, l) AM_CONDITIONAL(HAVE_GCONF, true)
98 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
99 if test x$GCONFTOOL = xno; then
100 AC_MSG_WARN(Not installing GConf schemas)
108 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
109 PKG_CHECK_MODULES(GST, gstreamer >= $GST_PLUGINS_MAJOR.$GST_PLUGINS_MINOR.$GST_PLUGINS_MICRO,
110 HAVE_GST="yes", HAVE_GST="no")
112 if test "x$HAVE_GST" = "xno"; then
113 AC_MSG_ERROR(no GStreamer found)
116 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer`
117 if test -z $GST_TOOLS_DIR; then
118 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
120 AC_SUBST(GST_TOOLS_DIR)
122 dnl Set up conditionals for (target) architecture:
123 dnl ==============================================
126 case "x${target_cpu}" in
127 xi?86 | k?) HAVE_CPU_I386=yes
128 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
129 dnl FIXME could use some better detection
131 case "x${target_cpu}" in
133 *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;;
135 xpowerpc) HAVE_CPU_PPC=yes
136 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
137 xalpha) HAVE_CPU_ALPHA=yes
138 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
139 xarm*) HAVE_CPU_ARM=yes
140 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
141 xsparc*) HAVE_CPU_SPARC=yes
142 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
143 xmips*) HAVE_CPU_MIPS=yes
144 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
145 xhppa*) HAVE_CPU_HPPA=yes
146 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
149 dnl Determine endianness
152 dnl Check for fast float to int casting as defined in C99
156 dnl Check for essential libraries first:
157 dnl ====================================
160 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
161 GTK_CFLAGS=$GTK2_CFLAGS
166 dnl Check for X11 extensions
168 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
169 AC_MSG_NOTICE([cannot find X11, the build system needs fixage])
173 AC_SUBST(X_EXTRA_LIBS)
176 dnl ==========================================================================
177 dnl ============================= gst plugins ================================
178 dnl ==========================================================================
179 GST_PLUGIN_LDFLAGS='-module -avoid-version'
180 AC_SUBST(GST_PLUGIN_LDFLAGS)
182 dnl these are all the gst plugins, compilable without additional libs
184 ac3parse adder audioscale auparse avi cdxaparse chart\
185 cutter deinterlace effectv festival flx goom intfloat law level\
186 median mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\
187 mpegaudio mpegaudioparse mpegstream mpegtypes modplug\
188 monoscope passthrough playondemand qtdemux rtjpeg silence sine\
189 smooth spectrum speed stereo stereomono\
190 synaesthesia udp videoscale volenv volume vumeter wavparse y4m"
192 AC_SUBST(GST_PLUGINS_ALL)
194 GST_PLUGINS_SELECTED=""
197 AC_HELP_STRING([--with-plugins],[comma-separated list of plugins to compile]),
198 [for i in `echo $withval | tr , ' '`; do
199 if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
200 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
202 echo "plugin $i not recognized, ignoring..."
205 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
207 AC_SUBST(GST_PLUGINS_SELECTED)
209 dnl ==========================================================================
210 dnl ============================= sys plugins ================================
211 dnl ==========================================================================
214 dnl *** DXR3 card ***
215 translit(dnm, m, l) AM_CONDITIONAL(USE_DXR3, true)
216 GST_CHECK_FEATURE(DXR3, [DXR3 hardware mpeg video decoder], dxr3videosink, [
217 AC_CHECK_HEADER(linux/em8300.h, HAVE_DXR3="yes", HAVE_DXR3="no")
220 dnl *** OSS audio ***
221 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
222 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
223 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
227 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
228 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
229 dnl this one is for hadess, no qcam when no nasm found
230 if test "x$HAVE_NASM" = "xno";
233 AC_MSG_WARN([QuickCam needs nasm])
239 dnl *** Video 4 Linux ***
240 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
241 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
242 AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>])
246 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
247 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
248 AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
252 translit(dnm, m, l) AM_CONDITIONAL(USE_VGA, true)
253 GST_CHECK_FEATURE(VGA, [VGA], vgavideosink, [
254 AC_CHECK_HEADER(asm/vga.h, HAVE_VGA="yes", HAVE_VGA="no")
258 dnl Look for the PIC library first, Debian requires it.
259 dnl Check debian-devel archives for gory details.
261 dnl At the moment XFree86 doesn't distribute shared libXv due
262 dnl to unstable API. On many platforms you CAN NOT link a shared
263 dnl lib to a static non-PIC lib. This is what the xvideo GStreamer
264 dnl plugin wants to do. So Debian distributes a PIC compiled
265 dnl version of the static lib for plugins to link to when it is
266 dnl inappropriate to link the main application to libXv directly.
267 dnl FIXME: add check if this platform can support linking to a
268 dnl non-PIC libXv, if not then don not use Xv.
269 dnl FIXME: perhaps warn user if they have a shared libXv since
270 dnl this is an error until XFree86 starts shipping one
271 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
272 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink videosink, [
273 dnl check for PIC static lib
274 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")
275 if test x$HAVE_XVIDEO = xno; then
276 dnl PIC lib not found, check for regular lib
277 GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
279 AC_SUBST(XVIDEO_LIBS)
282 dnl Next, check for the optional libraries:
283 dnl These are all libraries used in building plugins
284 dnl ================================================
285 dnl let's try and sort them alphabetically, shall we ?
289 AC_MSG_NOTICE(Checking for plugin libraries)
292 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
293 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
294 AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
298 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
299 GST_CHECK_FEATURE(AALIB, [aasink plugin], aasink, [
300 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
304 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
305 GST_CHECK_FEATURE(ALSA, [alsa plugins], gstalsa, [
306 AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
311 dnl if mcopidl can't be found there's no use in compiling it
312 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
313 if test "xHAVE_MCOPIDL" = "xno";
318 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
319 GST_CHECK_FEATURE(ARTS, [arts plugins], arts, [
320 AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
322 dnl if mcopidl can't be found there's no use in compiling it
323 AC_PATH_PROG(MCOPIDL, mcopidl, yes, no)
324 if test "xHAVE_MCOPIDL" = "xno";
330 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
331 GST_CHECK_FEATURE(ARTSC, [artsd plugins], artsdsink, [
335 dnl *** audiofile ***
336 dnl this check uses the GST_CHECK_CONFIGPROG macro
337 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
338 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
339 translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
340 translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
341 GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
345 dnl this check uses the GST_CHECK_CONFIGPROG macro
346 dnl this check needs more fixing
347 dnl translit(dnm, m, l) AC_SUBST(AVIFILE_LIBS)
348 translit(dnm, m, l) AM_CONDITIONAL(USE_AVIFILE, true)
349 GST_CHECK_FEATURE(AVIFILE, [avifile], windec winenc, [
350 translit(dnm, m, l) AC_SUBST(AVIFILE_CFLAGS)
351 GST_CHECK_CONFIGPROG(AVIFILE, avifile-config)
352 AVIFILE_LIBS="$AVIFILE_LIBS -lstdc++"
353 AC_SUBST(AVIFILE_LIBS)
356 dnl *** CDParanoia ***
357 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
358 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
359 GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, cdda_open, -lm, cdda_interface.h, CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia")
360 AC_SUBST(CDPARANOIA_LIBS)
362 dnl FIXME : add second check somehow if that is necessary
363 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
364 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
367 translit(dnm, m, l) AM_CONDITIONAL(USE_DV, true)
368 GST_CHECK_FEATURE(DV, [dv library], dv, [
369 GST_CHECK_LIBHEADER(DV, dv, dv_init, -lm $GST_CFLAGS $GST_LIBS, libdv/dv.h, DV_LIBS="-ldv")
374 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
375 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdsrc, [
376 GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
377 AC_SUBST(DVDREAD_LIBS)
381 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
382 GST_CHECK_FEATURE(ESD, [esound plugins], esdsink esdmon, [
383 AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
386 dnl **** festival ****
387 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
388 dnl GST_CHECK_FEATURE(FESTIVAL, [festival plugins], festivalsrc, [
389 dnl NOTE: just using local net connection now, add this lib check
390 dnl in the future if needed
391 dnl AC_LANG_PUSH(C++)
392 dnl dnl FIXME: took out func to check for
393 dnl dnl This check puts festival_tidy_up in extern "C".
394 dnl dnl But, at least on Debian as of 20020110, it is compiled with name
395 dnl dnl mangling C++ nonsense and symbols can't resolve
396 dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
397 dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
399 dnl AC_SUBST(FESTIVAL_LIBS)
400 dnl HAVE_FESTIVAL=yes
404 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
405 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
406 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_decoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
410 dnl *** Gnome VFS ***
411 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
412 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
413 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
414 AC_SUBST(GNOME_VFS_CFLAGS)
415 AC_SUBST(GNOME_VFS_LIBS)
419 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
420 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
421 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
422 if test $HAVE_GSM != "yes"; then
423 GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
424 if test $HAVE_GSM = "yes"; then
425 AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
432 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
433 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
434 GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
435 ], AC_SUBST(HERMES_LIBS))
438 translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
439 GST_CHECK_FEATURE(HTTP, [http plugins], gsthttpsrc, [
440 dnl FIXME: need to check for header
442 GST_HTTPSRC_GET_TYPE=
443 if test x$USE_GLIB2 = xyes; then
444 AC_MSG_WARN(ghttp disabled for glib2.0)
446 AC_CHECK_LIB(ghttp, ghttp_request_new,
448 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
453 AC_SUBST(GST_HTTPSRC_GET_TYPE)
457 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
458 GST_CHECK_FEATURE(JACK, Jack, jack, [
459 PKG_CHECK_MODULES(JACK, jack, HAVE_JACK="yes", HAVE_JACK="no")
460 AC_SUBST(JACK_CFLAGS)
465 dnl FIXME: we could use header checks here as well IMO
466 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
467 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
468 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
474 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
475 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
476 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, HAVE_LAME="yes" LAME_LIBS="-lmp3lame")
480 dnl *** libcolorspace ***
481 translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
482 GST_CHECK_FEATURE(LCS, Lcs, lcs, [
483 PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
488 dnl FIXME : check if these CPP flags can be dealt with otherwise
489 dnl libdvcheck_save_CPPFLAGS="$CPPFLAGS"
490 dnl CPPFLAGS="$CPPFLAGS $GST_CFLAGS"
491 dnl AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
492 dnl CPPFLAGS="$libdvcheck_save_CPPFLAGS"
495 dnl FIXME: we could use header checks here as well IMO
496 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
497 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
498 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
499 if test "x$HAVE_MAD" = "xyes"; then
500 # installed with mad >= 0.14
504 AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag")
511 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
512 GST_CHECK_FEATURE(MIKMOD, [mikmod plugin], mikmod, [
513 AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
514 AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
515 AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
518 dnl *** mjpegtools ***
519 translit(dnm, m, l) AM_CONDITIONAL(USE_MJPEGTOOLS, true)
520 GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
521 PKG_CHECK_MODULES(MJPEGTOOLS, mjpegtools, HAVE_MJPEGTOOLS="yes", HAVE_MJPEGTOOLS="no")
522 AC_SUBST(MJPEGTOOLS_LIBS)
523 AC_SUBST(MJPEGTOOLS_CFLAGS)
527 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
528 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
529 AC_CHECK_MPEG2DEC(HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no)
532 dnl *** openquicktime ***
533 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENQUICKTIME, true)
534 GST_CHECK_FEATURE(OPENQUICKTIME, [Open Quicktime], quicktime_parser quicktime_decoder quicktime_demux,[
535 GST_CHECK_LIBHEADER(OPENQUICKTIME, openquicktime, quicktime_init,, openquicktime/openquicktime.h, OPENQUICKTIME_LIBS="-lopenquicktime")
536 AC_SUBST(OPENQUICKTIME_LIBS)
540 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
541 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
542 GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_get_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-raw1394")
543 AC_SUBST(RAW1394_LIBS)
547 dnl FIXME : adapt and make it work
548 translit(dnm, m, l) AM_CONDITIONAL(USE_RTP, true)
549 GST_CHECK_FEATURE(RTP, [RTP library], rtpenc rtpdec,[
550 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_RTP=yes, HAVE_RTP=no, $GST_CFLAGS $GST_LIBS)
555 dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
556 dnl can use GST_* which should have GLIB_* info
557 dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
558 dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
559 dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
560 dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
563 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
564 GST_CHECK_FEATURE(SDL, [SDL plugin], sdlvideosink, [
565 AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
569 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
570 GST_CHECK_FEATURE(SHOUT, [shout plugin], icecastsend, [
571 GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
576 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
577 GST_CHECK_FEATURE(SIDPLAY, [sidplay plugin], sidplay, [
581 dnl *** smoothwave ***
582 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
583 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plugin], smoothwave, [
584 if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
589 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
590 GST_CHECK_FEATURE(LIBPNG, [snapshot plugin], snapshot, [
591 GST_CHECK_LIBHEADER(LIBPNG, png, png_read_info, -lz, png.h, LIBPNG_LIBS="-lpng -lz")
592 AC_SUBST(LIBPNG_LIBS)
596 dnl for now the sources are included in the plugin
597 dnl and should be moved to ext-libs/ perhaps
598 translit(dnm, m, l) AM_CONDITIONAL(USE_TARKIN, true)
599 GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
604 dnl AM_PATH_VORBIS only takes two options
605 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
606 GST_CHECK_FEATURE(VORBIS, [vorbis plugin], vorbisenc vorbisdec, [
607 AM_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
611 translit(dnm, m, l) AM_CONDITIONAL(USE_XMMS, true)
612 GST_CHECK_FEATURE(XMMS, [xmms plugin], xmms, [
613 AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
616 dnl Check for atomic.h
617 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
618 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
619 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
620 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
621 if test x$HAVE_ATOMIC_H = xyes; then
623 #include "asm/atomic.h"
624 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
627 if test x$HAVE_ATOMIC_H = xyes; then
628 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
634 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
639 dnl ######################################################################
640 dnl # Check command line parameters, and set shell variables accordingly #
641 dnl ######################################################################
645 AC_ARG_ENABLE(libmmx,
646 [ --enable-libmmx use libmmx, if available],
647 [case "${enableval}" in
648 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
650 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
652 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
654 AC_ARG_ENABLE(atomic,
655 [ --enable-atomic use atomic reference counting header],
656 [case "${enableval}" in
657 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
658 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
659 no) USE_ATOMIC_H=no;;
660 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
662 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
664 AC_ARG_ENABLE(profiling,
665 [ --enable-profiling adds -pg to compiler commandline, for profiling],
666 [case "${enableval}" in
667 yes) USE_PROFILING=yes ;;
668 no) UES_PROFILING=no ;;
669 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
671 [USE_PROFILING=no]) dnl Default value
674 [ --disable-tests disable building test apps],
675 [case "${enableval}" in
676 yes) BUILD_TESTS=yes ;;
677 no) BUILD_TESTS=no ;;
678 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
680 [BUILD_TESTS=yes]) dnl Default value
682 AC_ARG_ENABLE(examples,
683 [ --disable-examples disable building examples],
684 [case "${enableval}" in
685 yes) BUILD_EXAMPLES=yes ;;
686 no) BUILD_EXAMPLES=no ;;
687 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
689 [BUILD_EXAMPLES=yes]) dnl Default value
691 dnl ################################################
692 dnl # Set defines according to variables set above #
693 dnl ################################################
696 if test "x$USE_LIBMMX" = xyes; then
697 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
700 if test "x$USE_ATOMIC_H" = xyes; then
701 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
704 dnl if test "x$USE_DEBUG" = xyes; then
705 dnl CFLAGS="$CFLAGS -g"
708 if test "x$USE_PROFILING" = xyes; then
709 dnl CFLAGS="$CFLAGS -pg -fprofile-arcs"
710 FOMIT_FRAME_POINTER=""
712 FOMIT_FRAME_POINTER="-fomit-frame-pointer"
716 dnl AC_SUBST(FOMIT_FRAME_POINTER)
719 dnl #############################
720 dnl # Set automake conditionals #
721 dnl #############################
723 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
724 dnl HAVE_ and it is likely to be easier to stick with the old name
725 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
726 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
727 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
728 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
729 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
730 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
732 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
734 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
735 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
737 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
738 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
739 AM_CONDITIONAL(HAVE_GNOME, test "x$HAVE_GNOME" = "xyes")
740 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
741 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
742 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
743 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
744 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
745 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
746 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
747 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
748 AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
750 GST_CFLAGS="$GST_CFLAGS -I\$(top_srcdir)/gst-libs -Wall -Werror"
754 dnl #########################
755 dnl # Make the output files #
756 dnl #########################
758 dnl testsuite/autoplug/Makefile
759 dnl testsuite/Makefile
763 gstreamer-libs-uninstalled.pc
766 gst/ac3parse/Makefile
768 gst/audioscale/Makefile
771 gst/cdxaparse/Makefile
774 gst/deinterlace/Makefile
776 gst/festival/Makefile
779 gst/intfloat/Makefile
783 gst/mpeg1enc/Makefile
784 gst/mpeg1sys/Makefile
785 gst/mpeg1videoparse/Makefile
786 gst/mpeg2enc/Makefile
787 gst/mpeg2sub/Makefile
788 gst/mpegaudio/Makefile
789 gst/mpegaudioparse/Makefile
790 gst/mpegstream/Makefile
791 gst/mpegtypes/Makefile
793 gst/modplug/libmodplug/Makefile
794 gst/monoscope/Makefile
795 gst/passthrough/Makefile
796 gst/playondemand/Makefile
802 gst/spectrum/Makefile
805 gst/stereomono/Makefile
806 gst/synaesthesia/Makefile
808 gst/videoscale/Makefile
812 gst/wavparse/Makefile
822 sys/videosink/Makefile
829 ext/audiofile/Makefile
831 ext/cdparanoia/Makefile
837 ext/gnomevfs/Makefile
848 ext/mjpegtools/Makefile
849 ext/mpeg2dec/Makefile
850 ext/openquicktime/Makefile
856 ext/smoothwave/Makefile
861 gst-libs/gst/Makefile
862 gst-libs/gst/audio/Makefile
863 gst-libs/gst/idct/Makefile
864 gst-libs/gst/resample/Makefile
865 gst-libs/gst/riff/Makefile
866 gst-libs/gst/floatcast/Makefile
867 examples/capsfilter/Makefile
875 echo -e "configure: *** Plugins that will be built : $GST_PLUGINS_YES"
877 echo -e "configure: *** Plugins that will not be built : $GST_PLUGINS_NO"