1 AC_INIT(gst/gstobject.h)
5 AM_CONFIG_HEADER(config.h)
7 STREAMER_MAJOR_VERSION=0
8 STREAMER_MINOR_VERSION=9
9 STREAMER_MICRO_VERSION=2
10 STREAMER_VERSION=$STREAMER_MAJOR_VERSION.$STREAMER_MINOR_VERSION.$STREAMER_MICRO_VERSION
17 AM_INIT_AUTOMAKE(gstreamer, $STREAMER_VERSION)
18 dnl Add parameters for aclocal
19 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
20 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
22 AC_SUBST(STREAMER_MAJOR_VERSION)
23 AC_SUBST(STREAMER_MINOR_VERSION)
24 AC_SUBST(STREAMER_MICRO_VERSION)
25 AC_SUBST(STREAMER_VERSION)
27 AC_SUBST(STREAMER_CURRENT)
28 AC_SUBST(STREAMER_REVISION)
29 AC_SUBST(STREAMER_AGE)
43 dnl ##############################
44 dnl # Do automated configuration #
45 dnl ##############################
47 dnl Set up conditionals for (target) architecture:
48 dnl ==============================================
51 case "x${target_cpu}" in
52 xi?86) HAVE_CPU_I386=yes ;
53 AC_DEFINE(HAVE_CPU_I386) ;;
54 xpowerpc) HAVE_CPU_PPC=yes ;
55 AC_DEFINE(HAVE_CPU_PPC) ;;
58 dnl Determine endianness
65 AC_PATH_PROG(NASM_PATH, nasm, no)
67 if test x$NASM_PATH = xno; then
68 AC_MSG_WARN(Couldn't find nasm)
75 dnl Check for essential libraries first:
76 dnl ====================================
80 AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
82 dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
83 LIBS="$LIBS $GLIB_LIBS"
84 CFLAGS="$FLAGS $GLIB_CFLAGS"
87 AC_PATH_PROG(XML_CONFIG, xml-config, no)
88 if test x$XML_CONFIG = xno; then
89 AC_MSG_ERROR(Couldn't find xml-config)
91 XML_LIBS=`xml-config --libs`
92 XML_CFLAGS=`xml-config --cflags`
97 dnl Next, check for the optional libraries:
98 dnl =======================================
100 dnl Check for libgdk-pixbuf
101 AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
102 if test x$GDK_PIXBUF_CONFIG = xno; then
103 AC_MSG_WARN(Couldn't find gdk-pixbuf-config)
108 GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
109 GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
112 AC_SUBST(GDK_PIXBUF_LIBS)
113 AC_SUBST(GDK_PIXBUF_CFLAGS)
119 dnl Check for libghttp
120 dnl FIXME: need to check for header
121 AC_CHECK_LIB(ghttp, ghttp_request_new,
122 [GHTTP_LIBS="-lghttp"
123 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
126 [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
128 GST_HTTPSRC_GET_TYPE=
133 AC_SUBST(GST_HTTPSRC_GET_TYPE)
135 dnl Check for libglade
136 HAVE_LIBGLADE_GNOME="no"
137 AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no)
138 if test x$LIBGLADE_CONFIG_PATH = xno; then
139 AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
141 libglade_save_CFLAGS=${CFLAGS}
142 CFLAGS="$CFLAGS `$LIBGLADE_CONFIG_PATH --libs gnome` `$LIBGLADE_CONFIG_PATH --cflags gnome`"
143 AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
144 HAVE_LIBGLADE_GNOME="yes",
146 [Couldn't find gnome libraries for libglade - Can't build gstplay])
148 CFLAGS=${libglade_save_CFLAGS}
151 dnl Check for atomic.h
152 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
153 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
154 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
155 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
156 if test x$HAVE_ATOMIC_H = xyes; then
158 #include "asm/atomic.h"
159 main() { atomic_t t; atomic_set(&t,0); return 0;}
162 if test x$HAVE_ATOMIC_H = xyes; then
163 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
169 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
173 dnl Check for MMX capable compiler
174 AC_MSG_CHECKING(Checking MMX compilation)
176 #include "include/mmx.h"
179 { movq_r2r(mm0, mm1); return 0; }
192 dnl Check for X11 extensions
194 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
195 AC_MSG_ERROR(can not find X11)
199 AC_SUBST(X_EXTRA_LIBS)
203 AC_CHECK_LIB(Xv, XvQueryExtension,
205 AC_DEFINE(HAVE_LIBXV),
206 HAVE_LIBXV=no, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
210 AC_CHECK_HEADER(xaudio/decoder.h,[
211 AC_DEFINE(HAVE_XAUDIO)
212 HAVE_XAUDIO="yes", []
215 dnl Set location of plugin directory
216 if test "x${prefix}" = "xNONE"; then
217 PLUGINS_DIR=${ac_default_prefix}/lib/gst
219 PLUGINS_DIR=${prefix}/lib/gst
221 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
222 AC_SUBST(PLUGINS_DIR)
224 dnl Set location of uninstalled plugin directory
225 PLUGINS_SRCDIR=`pwd`/$srcdir
226 AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
227 AC_SUBST(PLUGINS_SRCDIR)
229 dnl check if css-auth.c exists (FIXME)
230 AC_MSG_CHECKING(DVD CSS code)
231 if test -f plugins/dvdsrc/css-auth.c
235 AC_DEFINE(HAVE_CSSAUTH)
241 dnl check for libvorbis
242 AC_MSG_CHECKING(Vorbis library)
243 AC_CHECK_LIB(vorbis, ogg_sync_init,
245 AC_DEFINE(HAVE_VORBIS),
248 dnl check for cdparanoia
249 AC_MSG_CHECKING(CDparanoia library)
251 AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, )
252 AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
253 AC_CHECK_LIB(cdda_interface, cdda_open, : , HAVE_CDPARANOIA=no, )
254 AC_CHECK_HEADER(cdda_interface.h, :, HAVE_CDPARANOIA=no)
256 dnl check for liblame
257 AC_MSG_CHECKING(LAME library)
258 AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, )
259 AC_CHECK_HEADER(lame.h, :, HAVE_LIBLAME=no)
262 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
264 dnl check for db2html
265 AC_CHECK_PROG(HAVE_DB2HTML, db2html, true, false)
266 AC_CHECK_PROG(HAVE_DB2PS, db2ps, true, false)
267 AC_CHECK_PROG(HAVE_DB2PDF, db2pdf, true, false)
270 dnl ######################################################################
271 dnl # Check command line parameters, and set shell variables accordingly #
272 dnl ######################################################################
274 AC_ARG_ENABLE(gdk-pixbuf,
275 [ --enable-gdk-pixbuf use gdk pixbuf, if available],
276 [case "${enableval}" in
277 yes) USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF ;;
278 no) USE_GDK_PIXBUF=no ;;
279 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdk-pixbuf) ;;
281 [USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF]) dnl Default value
283 AC_ARG_ENABLE(libghttp,
284 [ --enable-libghttp use the ghttp library, if available],
285 [case "${enableval}" in
286 yes) USE_LIBGHTTP=$HAVE_LIBGHTTP ;;
287 no) USE_LIBGHTTP=no ;;
288 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libghttp) ;;
290 [USE_LIBGHTTP=$HAVE_LIBGHTTP]) dnl Default value
292 AC_ARG_ENABLE(libmmx,
293 [ --enable-libmmx use libmmx, if available],
294 [case "${enableval}" in
295 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
297 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
299 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
301 AC_ARG_ENABLE(atomic,
302 [ --enable-atomic use atomic reference counting header],
303 [case "${enableval}" in
304 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
305 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
306 no) USE_ATOMIC_H=no;;
307 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
309 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
311 AC_ARG_ENABLE(plugin-srcdir,
312 [ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
313 [case "${enableval}" in
314 yes) PLUGINS_USE_SRCDIR=yes ;;
315 no) PLUGINS_USE_SRCDIR=no ;;
316 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
318 [PLUGINS_USE_SRCDIR=yes]) dnl Default value
321 [ --enable-debug spews lots of useless info at runtime],
322 [case "${enableval}" in
323 yes) USE_DEBUG=yes ;;
325 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
327 [USE_DEBUG=no]) dnl Default value
329 AC_ARG_ENABLE(profiling,
330 [ --enable-profiling adds -pg to compiler commandline, for profiling],
331 [case "${enableval}" in
332 yes) USE_PROFILING=yes ;;
333 no) UES_PROFILING=no ;;
334 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
336 [USE_PROFILING=no]) dnl Default value
339 dnl ################################################
340 dnl # Set defines according to variables set above #
341 dnl ################################################
343 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
344 dnl HAVE_ and it is likely to be easier to stick with the old name
345 if test "x$USE_GDK_PIXBUF" = xyes; then
346 AC_DEFINE(HAVE_GDK_PIXBUF)
349 if test "x$USE_LIBGHTTP" = xyes; then
350 AC_DEFINE(HAVE_LIBGHTTP)
353 if test "x$USE_LIBMMX" = xyes; then
354 AC_DEFINE(HAVE_LIBMMX)
357 if test "x$USE_ATOMIC_H" = xyes; then
358 AC_DEFINE(HAVE_ATOMIC_H)
361 if test "x$PLUGINS_USE_SRCDIR" = xyes; then
362 AC_DEFINE(PLUGINS_USE_SRCDIR)
365 if test "x$USE_DEBUG" = xyes; then
367 AC_DEFINE(GST_DEBUG_ENABLED)
370 if test "x$USE_PROFILING" = xyes; then
376 dnl #############################
377 dnl # Set automake conditionals #
378 dnl #############################
380 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
381 dnl HAVE_ and it is likely to be easier to stick with the old name
382 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
383 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
384 AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
385 AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
386 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
387 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
388 AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes")
389 AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes")
390 AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBIS" = "xyes")
391 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
392 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
393 AM_CONDITIONAL(HAVE_LIBXV, test "x$HAVE_LIBXV" = "xyes")
394 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
395 AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML)
396 AM_CONDITIONAL(HAVE_DB2PDF, $HAVE_DB2PDF)
397 AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS)
398 AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
399 AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
402 dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS
409 dnl #############################
410 dnl # Configure the subpackages #
411 dnl #############################
413 AC_CONFIG_SUBDIRS(gist)
414 AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
417 dnl #########################
418 dnl # Make the output files #
419 dnl #########################
425 gst/elements/Makefile
429 libs/colorspace/Makefile
430 libs/videoscale/Makefile
431 libs/getbits/Makefile
432 libs/putbits/Makefile
433 libs/winloader/Makefile
439 plugins/avi/wincodec/Makefile
440 plugins/jpeg/Makefile
441 plugins/mp3decode/Makefile
442 plugins/mp3decode/types/Makefile
443 plugins/mp3decode/xa/Makefile
444 plugins/mp3decode/xing/Makefile
445 plugins/mp3decode/mpg123/Makefile
446 plugins/mp3decode/parse/Makefile
447 plugins/mp3encode/Makefile
448 plugins/mp3encode/lame/Makefile
449 plugins/mpeg2/Makefile
450 plugins/mpeg2/parse/Makefile
451 plugins/mpeg2/ac3parse/Makefile
452 plugins/mpeg2/ac3dec/Makefile
453 plugins/mpeg2/video/Makefile
454 plugins/mpeg2/mpeg2enc/Makefile
455 plugins/mpeg2/mpeg2dec/Makefile
456 plugins/mpeg2/subtitles/Makefile
457 plugins/mpeg2/videoparse/Makefile
458 plugins/mpeg2/mpegtypes/Makefile
459 plugins/mpeg1/Makefile
460 plugins/mpeg1/mpegtypes/Makefile
461 plugins/mpeg1/mpeg_play/Makefile
462 plugins/mpeg1/mpegaudio/Makefile
463 plugins/mpeg1/parse/Makefile
464 plugins/mpeg1/system_encode/Makefile
465 plugins/mpeg1/mpeg1encoder/Makefile
466 plugins/mpeg1video/Makefile
467 plugins/mpeg1video/parse/Makefile
468 plugins/filters/Makefile
469 plugins/filters/smooth/Makefile
470 plugins/filters/median/Makefile
471 plugins/effects/Makefile
472 plugins/effects/stereo/Makefile
473 plugins/effects/volume/Makefile
474 plugins/visualization/Makefile
475 plugins/visualization/spectrum/Makefile
476 plugins/visualization/vumeter/Makefile
477 plugins/visualization/synaesthesia/Makefile
478 plugins/visualization/smoothwave/Makefile
479 plugins/videosink/Makefile
480 plugins/videoscale/Makefile
481 plugins/audioscale/Makefile
482 plugins/dvdsrc/Makefile
483 plugins/vcdsrc/Makefile
484 plugins/cobin/Makefile
485 plugins/rtjpeg/Makefile
486 plugins/vorbis/Makefile
487 plugins/capture/Makefile
488 plugins/capture/v4l/Makefile
489 plugins/cdparanoia/Makefile
491 components/bonobo-gstmediaplay/Makefile
494 test/bindings/Makefile
495 test/cothreads/Makefile
501 docs/gst/gstreamer.types
503 docs/plugins/Makefile
504 docs/plugins/gstreamer-plugins.types
510 AC_OUTPUT_COMMANDS([chmod +x gstreamer-config])