1 dnl Note: this file is now the main autoconf file
3 AC_CONFIG_SRCDIR([gst/gstobject.h])
5 AC_CANONICAL_TARGET([])
7 AM_CONFIG_HEADER(config.h)
13 dnl we use the release tag during CVS development
14 GST_VERSION_RELEASE=`date +%Y%m%d`
16 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
21 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
22 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
25 AC_DEFINE_UNQUOTED(GST_VERSION_RELEASE, "$GST_VERSION_RELEASE")
26 AC_SUBST(GST_VERSION_RELEASE)
32 GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
34 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
35 dnl Add parameters for aclocal
36 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
37 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
39 AC_SUBST(GST_VERSION_MAJOR)
40 AC_SUBST(GST_VERSION_MINOR)
41 AC_SUBST(GST_VERSION_MICRO)
45 AC_SUBST(GST_REVISION)
47 AC_SUBST(GST_LIBVERSION)
59 dnl We disable static building for development, for time savings
60 dnl *NOTE*: dnl this line before release, so release does static too
68 dnl ##############################
69 dnl # Do automated configuration #
70 dnl ##############################
76 AC_PATH_PROG(NASM_PATH, nasm, no)
78 if test x$NASM_PATH = xno; then
79 AC_MSG_WARN(Couldn't find nasm)
82 AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
86 dnl fix pkg-config's broken default search path
87 if test -z $PKG_CONFIG_PATH; then
88 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
90 export PKG_CONFIG_PATH
92 dnl Check for pkgconfig
93 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, true, false)
96 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
98 if test "x$with_html_dir" = "x" ; then
99 HTML_DIR='${datadir}/gst/html'
101 HTML_DIR=$with_html_dir
106 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
107 gtk_doc_min_version=0.6
108 if $HAVE_GTK_DOC ; then
109 gtk_doc_version=`gtkdoc-mkdb --version`
110 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
112 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
113 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
121 GTK_DOC_SCANOBJ=gtkdoc-scanobj
123 AC_SUBST(HAVE_GTK_DOC)
124 AC_SUBST(GTK_DOC_SCANOBJ)
126 dnl check for docbook tools
127 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, true, false)
128 AC_CHECK_PROG(HAVE_PDFTOPS, pdftops, true, false)
129 dnl this does not yet work properly, at least on debain -- wingo
132 dnl check for image conversion tool
133 AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false)
135 dnl The following is a hack: if fig2dev doesn't display an error message
136 dnl for the desired type, we assume it supports it.
137 HAVE_FIG2DEV_PNG=false
138 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
139 fig2dev_quiet=`fig2dev -L png </dev/null 2>&1 >/dev/null`
140 if test "x$fig2dev_quiet" = "x" ; then
141 HAVE_FIG2DEV_PNG=true
144 HAVE_FIG2DEV_PDF=false
145 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
146 fig2dev_quiet=`fig2dev -L pdf </dev/null 2>&1 >/dev/null`
147 if test "x$fig2dev_quiet" = "x" ; then
148 HAVE_FIG2DEV_PDF=true
153 dnl Set up conditionals for (target) architecture:
154 dnl ==============================================
157 case "x${target_cpu}" in
158 xi?86 | k?) HAVE_CPU_I386=yes
159 AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
160 dnl FIXME could use some better detection
162 case "x${target_cpu}" in
164 *) AC_DEFINE(HAVE_RDTSC) ;;
166 xpowerpc) HAVE_CPU_PPC=yes
167 AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
168 xalpha) HAVE_CPU_ALPHA=yes
169 AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
170 xarm*) HAVE_CPU_ARM=yes
171 AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
172 xsparc*) HAVE_CPU_SPARC=yes
173 AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
174 xmips*) HAVE_CPU_MIPS=yes
175 AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
176 xhppa*) HAVE_CPU_HPPA=yes
177 AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
180 dnl Determine endianness
183 dnl Check for MMX-capable compiler
184 AC_MSG_CHECKING(for MMX-capable compiler)
186 #include "include/mmx.h"
189 { movq_r2r(mm0, mm1); return 0; }
203 dnl We should really use AC_SYS_LARGEFILE, but the problem is
204 dnl many of the plugins don't include "config.h". To assure
205 dnl binary compatibility, it is necessary that all gstreamer
206 dnl code be compiled with the same sizeof(off_t), so we use
207 dnl the following crude hack.
210 AC_MSG_CHECKING(for large file support)
212 #define _LARGEFILE_SOURCE
213 #define _FILE_OFFSET_BITS 64
214 #include <sys/types.h>
215 int main () { return !(sizeof(off_t) == 8); }
219 GST_CFLAGS="$GST_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
228 dnl Check for essential libraries first:
229 dnl ====================================
232 translit(dnm, m, l) AM_CONDITIONAL(USE_GLIB2, true)
233 GST_CHECK_FEATURE(GLIB2, [use of glib-2.0 and GObject], , [
234 PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
235 HAVE_GLIB2=yes,HAVE_GLIB2=no)
236 GLIB_LIBS=$GLIB2_LIBS
237 GLIB_CFLAGS=$GLIB2_CFLAGS
239 AC_SUBST(GLIB_CFLAGS)
242 GST_CFLAGS="$GST_CFLAGS -DUSE_GLIB2"
246 if test x$USE_GLIB2 = xno; then
247 GST_PKG_DEPS="glib >= 1.2.0, gtk+ >= 1.2.0"
249 dnl Check for glib and gtk
251 AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
252 glib gmodule gthread)
254 AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
257 GLIB_LIBS="$GLIB_LIBS $GTK_LIBS"
258 GLIB_CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS"
260 GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0"
262 PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
264 GTK_CFLAGS=$GTK2_CFLAGS
267 if $HAVE_GTK_DOC; then
268 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scangobj, true, false)
269 if $HAVE_GTK_DOC; then
270 GTK_DOC_SCANOBJ=gtkdoc-scangobj
274 dnl FIXME: check for gnome2 - this conditional is currently
276 AM_CONDITIONAL(USE_GNOME2, test "x$USE_GNOME2" = "xyes")
280 AC_SUBST(GST_PKG_DEPS)
285 if test x$USE_GLIB2 = xno; then
286 LIBXML_PKG=', libxml >= 1.8.1'
287 AC_PATH_PROG(XML_CONFIG, xml-config, no)
288 if test x$XML_CONFIG = xno; then
289 AC_MSG_ERROR(Couldn't find $LIBXML_PKG)
291 XML_LIBS="`xml-config --libs`"
292 XML_CFLAGS="`xml-config --cflags`"
293 AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
294 [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
297 LIBXML_PKG=', libxml-2.0'
298 PKG_CHECK_MODULES(XML, $LIBXML_PKG, XML_CONFIG=yes, XML_CONFIG=no)
299 AC_PATH_PROG(XML_CONFIG, xml-config, no)
300 AC_DEFINE(HAVE_LIBXML2)
301 GST_CFLAGS="$GST_CFLAGS -DHAVE_LIBXML2"
307 dnl Check for libgdk-pixbuf
308 dnl FIXME: not sure that this is still used anywhere.
310 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_GDK_PIXBUF, true)
311 dnl GST_CHECK_FEATURE(GDK_PIXBUF, [use gdk pixbuf], , [
312 dnl translit(dnm, m, l) AC_SUBST(GDK_PIXBUF_LIBS)
313 dnl translit(dnm, m, l) AC_SUBST(GDK_PIXBUF_CFLAGS)
314 dnl GST_CHECK_CONFIGPROG(GDK_PIXBUF, gdk-pixbuf-config)
319 if test x$USE_GLIB2 = xyes; then
320 dnl we don't support gnome/gtk with glib2.0 yet
324 AC_MSG_WARN(gnome disabled for glib2.0)
326 dnl Check for libgnome
327 GST_CHECK_CONFIGPROG(GNOME, gnome-config, gnome gnomeui)
330 AC_SUBST(GNOME_CFLAGS)
333 dnl Check for libghttp
334 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBGHTTP, true)
335 GST_CHECK_FEATURE(LIBGHTTP, [libghttp plugins], gsthttpsrc, [
336 dnl FIXME: need to check for header
338 GST_HTTPSRC_GET_TYPE=
339 if test x$USE_GLIB2 = xyes; then
340 AC_MSG_WARN(ghttp disabled for glib2.0)
342 AC_CHECK_LIB(ghttp, ghttp_request_new,
343 [GHTTP_LIBS="-lghttp"
344 GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
349 AC_SUBST(GST_HTTPSRC_GET_TYPE)
352 dnl Check for libglade with gnome support; no libglade for glib2.0
353 HAVE_LIBGLADE_GNOME="no"
354 if test x$USE_GLIB2 = xyes; then
355 AC_MSG_WARN(libglade disabled for glib2.0)
356 PKG_CHECK_MODULES(LIBGLADE_GNOME, libglade-2.0 libgnomeui-2.0, HAVE_LIBGLADE_GNOME=yes, HAVE_LIBGLADE_GNOME=no)
357 if test x$HAVE_LIBGLADE_GNOME = xno; then
358 AC_MSG_WARN(Couldn't find libglade-2.0 - Can't build gstplay)
360 LIBGLADE_GNOME_CFLAGS=
363 AM_PATH_LIBGLADE(HAVE_LIBGLADE_GNOME="yes", HAVE_LIBGLADE_GNOME="no", gnome)
364 if test x$HAVE_LIBGLADE_GNOME = xno; then
365 AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
367 LIBGLADE_GNOME_LIBS=$LIBGLADE_LIBS
368 LIBGLADE_GNOME_CFLAGS=$LIBGLADE_CFLAGS
369 AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
370 HAVE_LIBGLADE_GNOME="yes"
372 [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
376 AC_SUBST(HAVE_LIBGLADE_GNOME)
377 AC_SUBST(LIBGLADE_GNOME_LIBS)
378 AC_SUBST(LIBGLADE_GNOME_CFLAGS)
380 dnl Check for atomic.h
381 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
382 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
383 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
384 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
385 if test x$HAVE_ATOMIC_H = xyes; then
387 #include "asm/atomic.h"
388 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
391 if test x$HAVE_ATOMIC_H = xyes; then
392 AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
398 AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.)
403 dnl Check for X11 extensions
405 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
406 AC_MSG_ERROR(can not find X11)
410 AC_SUBST(X_EXTRA_LIBS)
414 dnl Check for the Xv library
416 AC_CHECK_LIB(Xv, XvQueryExtension,
419 $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS
422 AC_CHECK_HEADER(X11/extensions/Xv.h, :, HAVE_LIBXV=no)
423 AC_CHECK_HEADER(X11/extensions/Xvlib.h, :, HAVE_LIBXV=no)
426 dnl ######################################################################
427 dnl # Check command line parameters, and set shell variables accordingly #
428 dnl ######################################################################
430 AC_ARG_ENABLE(libmmx,
431 [ --enable-libmmx use libmmx, if available],
432 [case "${enableval}" in
433 yes) USE_LIBMMX=$HAVE_LIBMMX ;;
435 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
437 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
439 AC_ARG_ENABLE(atomic,
440 [ --enable-atomic use atomic reference counting header],
441 [case "${enableval}" in
442 yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
443 noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
444 no) USE_ATOMIC_H=no;;
445 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
447 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
449 AC_ARG_ENABLE(plugin-builddir,
450 [ --enable-plugin-builddir allow tests/demos to use non-installed plugins ],
451 [case "${enableval}" in
452 yes) PLUGINS_USE_BUILDDIR=yes ;;
453 no) PLUGINS_USE_BUILDDIR=no ;;
454 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
456 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
459 [ --enable-debug compile with -g debugging info],
460 [case "${enableval}" in
461 yes) USE_DEBUG=yes ;;
463 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
465 [USE_DEBUG=no]) dnl Default value
468 [ --enable-DEBUG compiles in a large number of debugging messages],
469 [case "${enableval}" in
470 yes) ENABLE_DEBUG=yes ;;
471 no) ENABLE_DEBUG=no ;;
472 *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
474 [ENABLE_DEBUG=no]) dnl Default value
475 if test x$ENABLE_DEBUG = xyes; then
476 AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
480 [ --disable-INFO disables compilation of informational messages],
481 [case "${enableval}" in
482 yes) ENABLE_INFO=yes ;;
483 no) ENABLE_INFO=no ;;
484 *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
486 [ENABLE_INFO=yes]) dnl Default value
487 if test x$ENABLE_INFO = xyes; then
488 AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
491 AC_ARG_ENABLE(debug-color,
492 [ --disable-debug-color disables color output of DEBUG and INFO output],
493 [case "${enableval}" in
494 yes) ENABLE_DEBUG_COLOR=yes ;;
495 no) ENABLE_DEBUG_COLOR=no ;;
496 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
498 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
499 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
500 AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
503 AC_ARG_ENABLE(profiling,
504 [ --enable-profiling adds -pg to compiler commandline, for profiling],
505 [case "${enableval}" in
506 yes) USE_PROFILING=yes ;;
507 no) UES_PROFILING=no ;;
508 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
510 [USE_PROFILING=no]) dnl Default value
512 dnl default to building registry in the source tree if we are enabling plugin build dir
513 if test "x$PLUGINS_USE_BUILDDIR"="xyes"; then
516 GST_CONFIG_DIR=/etc/gstreamer
518 AC_ARG_WITH(configdir,
519 [ --with-configdir specify path to use for configdir],
520 [case "${withval}" in
521 yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
522 no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
523 *) GST_CONFIG_DIR="${withval}" ;;
525 [:]) dnl Default value
528 GST_WIN32_LIBDIR="/usr/lib/win32"
529 AC_ARG_WITH(win32_libdir,
530 [ --with-win32-libdir specify location for win32 DLLs],
531 [case "${withval}" in
532 yes) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
533 no) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
534 *) GST_WIN32_LIBDIR="${withval}" ;;
536 [:]) dnl Default value
538 AC_ARG_ENABLE(docs-build,
539 [ --enable-docs-build enable building of documentation],
540 [case "${enableval}" in
541 yes) if $HAVE_GTK_DOC; then BUILD_DOCS=yes; else AC_MSG_ERROR([you don't have gtk-doc, so don't use --docs-build]); fi; ;;
543 *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
545 [BUILD_DOCS=no]) dnl Default value
547 AC_ARG_ENABLE(plugin-docs,
548 [ --enable-plugin-docs enable the building of plugin documentation
549 (this is currently broken, so off by default)],
550 [case "${enableval}" in
551 yes) BUILD_PLUGIN_DOCS=yes ;;
552 no) BUILD_PLUGIN_DOCS=no ;;
553 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
555 [BUILD_PLUGIN_DOCS=no]) dnl Default value
558 [ --disable-tests disable building test apps],
559 [case "${enableval}" in
560 yes) BUILD_TESTS=yes ;;
561 no) BUILD_TESTS=no ;;
562 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
564 [BUILD_TESTS=yes]) dnl Default value
566 AC_ARG_ENABLE(examples,
567 [ --disable-examples disable building examples],
568 [case "${enableval}" in
569 yes) BUILD_EXAMPLES=yes ;;
570 no) BUILD_EXAMPLES=no ;;
571 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
573 [BUILD_EXAMPLES=yes]) dnl Default value
575 dnl Next, check for the optional components:
576 dnl ========================================
579 AC_DEFUN(GST_SUBSYSTEM_DISABLE,
581 dnl Add a subsystem --disable flag and all the necessary symbols and substitions
583 AC_ARG_ENABLE(translit([$1], A-Z, a-z),
584 [ ]builtin(format, --disable-%-17s disable %s, translit([$1], A-Z, a-z), $2),
585 [ case "${enableval}" in
586 yes) GST_DISABLE_[$1]=no ;;
587 no) GST_DISABLE_[$1]=yes ;;
588 *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
590 [GST_DISABLE_[$1]=no]) dnl Default value
591 if test x$GST_DISABLE_[$1] = xyes; then
592 AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
593 GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
595 AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
596 AC_SUBST(GST_DISABLE_[$1]_DEFINE)
597 GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
600 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
601 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
602 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true)
603 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
604 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_AUTOPLUG, true)
605 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
606 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_PARSE, true)
607 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
608 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TRACE, true)
609 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
610 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_REGISTRY, true)
611 GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
613 GST_CFLAGS="$GST_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
616 GST_PKG_CFLAGS=$GST_CFLAGS
617 AC_SUBST(GST_PKG_CFLAGS)
619 dnl ################################################
620 dnl # Set defines according to variables set above #
621 dnl ################################################
624 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
625 dnl HAVE_ and it is likely to be easier to stick with the old name
626 if test "x$USE_LIBGHTTP" = xyes; then
627 AC_DEFINE(HAVE_LIBGHTTP, 1, [Define if ghttp library is available])
630 if test "x$USE_LIBMMX" = xyes; then
631 AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
634 if test "x$USE_ATOMIC_H" = xyes; then
635 AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
638 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
639 AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
642 dnl if test "x$USE_DEBUG" = xyes; then
643 dnl CFLAGS="$CFLAGS -g"
646 if test "x$USE_PROFILING" = xyes; then
647 dnl CFLAGS="$CFLAGS -pg -fprofile-arcs"
648 FOMIT_FRAME_POINTER=""
650 FOMIT_FRAME_POINTER="-fomit-frame-pointer"
654 dnl AC_SUBST(FOMIT_FRAME_POINTER)
657 if test "x$HAVE_LIBXV" = xyes; then
658 AC_DEFINE(HAVE_LIBXV)
661 dnl #############################
662 dnl # Set automake conditionals #
663 dnl #############################
665 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
666 dnl HAVE_ and it is likely to be easier to stick with the old name
667 AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
668 AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
669 AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
670 AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
671 AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
672 AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
674 AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes")
676 AM_CONDITIONAL(EXPERIMENTAL, test "$EXPERIMENTAL" = "$xyes")
677 AM_CONDITIONAL(BROKEN, test "$BROKEN" = "$xyes")
679 AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes")
680 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
681 AM_CONDITIONAL(HAVE_GNOME, test "x$HAVE_GNOME" = "xyes")
682 AM_CONDITIONAL(HAVE_LIBXV, test "x$HAVE_LIBXV" = "xyes")
683 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
684 AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
685 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
686 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
687 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
688 AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
689 AM_CONDITIONAL(HAVE_PDFXMLTEX, $HAVE_PDFXMLTEX)
690 AM_CONDITIONAL(HAVE_PDFTOPS, $HAVE_PDFTOPS)
691 AM_CONDITIONAL(HAVE_XSLTPROC, $HAVE_XSLTPROC)
692 AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
693 AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
694 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR, test "x$PLUGINS_USE_BUILDDIR" = "xyes")
697 dnl ############################
698 dnl # Set up some more defines #
699 dnl ############################
701 dnl Set location of configuration dir.
702 AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
703 AC_SUBST(GST_CONFIG_DIR)
705 dnl Set location of windows dll dir.
706 AC_DEFINE_UNQUOTED(GST_WIN32_LIBDIR,"$GST_WIN32_LIBDIR")
707 AC_SUBST(GST_WIN32_LIBDIR)
709 dnl Set location of plugin directory
710 if test "x${prefix}" = "xNONE"; then
711 PLUGINS_DIR=${ac_default_prefix}/lib/gst
713 PLUGINS_DIR=${prefix}/lib/gst
715 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
716 AC_SUBST(PLUGINS_DIR)
718 dnl Set location of uninstalled plugin directory
719 PLUGINS_BUILDDIR=`pwd`
720 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
721 AC_SUBST(PLUGINS_BUILDDIR)
723 dnl Private vars for libgst only
724 LIBGST_LIBS="$GST_LIBS $XML_LIBS $GLIB_LIBS"
725 LIBGST_CFLAGS="$GST_CFLAGS $XML_CFLAGS $GLIB_CFLAGS"
726 AC_SUBST(LIBGST_LIBS)
727 AC_SUBST(LIBGST_CFLAGS)
729 dnl Vars for everyone else
730 GST_LIBS="\$(top_builddir)/gst/libgst.la $LIBGST_LIBS"
731 GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/libs -I\$(top_srcdir)/include $LIBGST_CFLAGS"
735 dnl ##################################################
736 dnl # Prepare informative messages to display at end #
737 dnl ##################################################
741 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
742 infomessages="$infomessages
743 *** Warning: You have configured using the --enable-plugin-builddir option.
745 This option is for development purposes only: binaries built with
746 it should be used with code in the build tree only. To build an
747 installable version, use ./configure without the --enable-plugin-builddir
748 option. Note that the autogen.sh script supplies the plugin builddir
749 option automatically - it cannot be used to configure installable builds.
754 dnl #########################
755 dnl # Make the output files #
756 dnl #########################
758 dnl until ffmpeg is handled by configure plugins/ffmpeg/Makefile
759 dnl components/bonobo-gstmediaplay/Makefile
760 dnl someone should fix this test/misc/Makefile
761 dnl wtay fix this: testsuite/threads/Makefile
762 dnl testsuite/refcounting/Makefile
769 gst/elements/Makefile
770 gst/autoplug/Makefile
771 gst/schedulers/Makefile
774 libs/gst/bytestream/Makefile
775 libs/gst/getbits/Makefile
776 libs/gst/putbits/Makefile
777 libs/gst/control/Makefile
781 test/bindings/Makefile
782 test/memchunk/Makefile
787 tests/muxing/Makefile
789 testsuite/bytestream/Makefile
790 testsuite/capsnego/Makefile
791 testsuite/plugin/Makefile
792 testsuite/cleanup/Makefile
795 examples/autoplug/Makefile
796 examples/helloworld/Makefile
797 examples/helloworld2/Makefile
798 examples/launch/Makefile
799 examples/queue/Makefile
800 examples/queue2/Makefile
801 examples/queue3/Makefile
802 examples/queue4/Makefile
803 examples/thread/Makefile
804 examples/mixer/Makefile
805 examples/cutter/Makefile
806 examples/launch/Makefile
807 examples/xml/Makefile
808 examples/plugins/Makefile
809 examples/typefind/Makefile
810 examples/mixer/Makefile
812 editor/pixmaps/Makefile
816 docs/gst/gstreamer.types
818 docs/plugins/Makefile
819 docs/plugins/gstreamer-plugins.types
824 gstreamer-uninstalled.pc
826 echo "$infomessages", infomessages="$infomessages"
829 echo -e "configure: *** Plugins that will be built : $GST_PLUGINS_YES"
831 echo -e "configure: *** Plugins that will not be built : $GST_PLUGINS_NO"