4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AS_VERSION(gstreamer, GST_VERSION, 0, 9, 1, 1, GST_CVS="no", GST_CVS="yes")
8 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
10 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
12 dnl our libraries and install dirs use major.minor as a version
13 GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
14 dnl we override it here for release candidates for a new series
16 AC_SUBST(GST_MAJORMINOR)
19 dnl For interactive UNIX (a Sun thing)
22 dnl CURRENT, REVISION, AGE
23 dnl - library source changed -> increment REVISION
24 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
25 dnl - interfaces added -> increment AGE
26 dnl - interfaces removed -> AGE = 0
27 AS_LIBTOOL(GST, 6, 0, 0)
31 AC_CONFIG_SRCDIR([gst/gst.c])
32 AM_CONFIG_HEADER(config.h)
34 dnl Add parameters for aclocal
35 AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4 -I .")
41 dnl the gettext stuff needed
42 AM_GNU_GETTEXT_VERSION(0.11.5)
43 AM_GNU_GETTEXT([external])
45 GETTEXT_PACKAGE=gstreamer-$GST_MAJORMINOR
46 AC_SUBST(GETTEXT_PACKAGE)
47 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
48 [gettext package name])
50 dnl define LOCALEDIR in config.h
51 AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
52 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
55 dnl define LIBDIR so we can inform people where we live
56 AS_AC_EXPAND(LIBDIR, $libdir)
57 AC_DEFINE_UNQUOTED([LIBDIR], "$LIBDIR",
60 GST_SET_ERROR_CFLAGS($GST_CVS)
62 dnl We disable static building for development, for time savings
63 dnl *NOTE*: dnl this line before release, so release does static too
69 dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
70 dnl messages printed when running cvs builds
71 if test "x$GST_CVS" = "xyes"; then
72 AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
75 dnl subsystems - can influence other decisions so needs to be high up
76 dnl we need to do AM_CONDITIONAL them here for automake 1.6.x compatibility
77 GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
78 AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes")
79 GST_CHECK_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
80 AM_CONDITIONAL(GST_DISABLE_LOADSAVE, test "x$GST_DISABLE_LOADSAVE" = "xyes")
81 GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
82 AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes")
83 GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
84 AM_CONDITIONAL(GST_DISABLE_TRACE, test "x$GST_DISABLE_TRACE" = "xyes")
85 GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing])
86 AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, test "x$GST_DISABLE_ALLOC_TRACE" = "xyes")
87 GST_CHECK_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
88 AM_CONDITIONAL(GST_DISABLE_REGISTRY, test "x$GST_DISABLE_REGISTRY" = "xyes")
89 GST_CHECK_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types])
90 AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, test "x$GST_DISABLE_ENUMTYPES" = "xyes")
91 GST_CHECK_SUBSYSTEM_DISABLE(INDEX,[index])
92 AM_CONDITIONAL(GST_DISABLE_INDEX, test "x$GST_DISABLE_INDEX" = "xyes")
93 GST_CHECK_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
94 AM_CONDITIONAL(GST_DISABLE_PLUGIN, test "x$GST_DISABLE_PLUGIN" = "xyes")
95 GST_CHECK_SUBSYSTEM_DISABLE(URI,[uri handlers])
96 AM_CONDITIONAL(GST_DISABLE_URI, test "x$GST_DISABLE_URI" = "xyes")
98 dnl ##############################
99 dnl # Do automated configuration #
100 dnl ##############################
105 dnl allow for different autotools
106 AS_AUTOTOOLS_ALTERNATE()
108 dnl modify pkg-config path
109 AC_ARG_WITH(pkg-config-path,
110 AC_HELP_STRING([--with-pkg-config-path],
111 [colon-separated list of pkg-config(1) dirs]),
112 [export PKG_CONFIG_PATH=${withval}])
117 dnl Perl is used in building documentation
118 AC_PATH_PROG(PERL_PATH, perl, no)
119 if test x$PERL_PATH = xno; then
120 AC_MSG_ERROR(Could not find perl)
125 dnl we require bison for building the parser
126 dnl FIXME: check if AC_PROG_YACC is suitable here
127 AC_PATH_PROG(BISON_PATH, bison, no)
128 if test x$BISON_PATH = xno; then
129 AC_MSG_ERROR(Could not find bison)
132 dnl check bison version
133 AC_MSG_CHECKING([bison version])
135 if $BISON_PATH --version | head -n 1 | $AWK '{ if ($4 < 1.35) exit 1; else exit 0;}';
139 AC_MSG_RESULT([too old.])
140 AC_MSG_ERROR([Your bison version is too old, v1.35 or later is required.])
143 dnl we require flex for building the parser
144 dnl FIXME: check if AC_PROG_LEX is suitable here
145 AC_PATH_PROG(FLEX_PATH, flex, no)
146 if test x$FLEX_PATH = xno; then
147 AC_MSG_ERROR(Could not find flex)
151 dnl We should really use AC_SYS_LARGEFILE, but the problem is
152 dnl many of the plugins don't include "config.h". To assure
153 dnl binary compatibility, it is necessary that all gstreamer
154 dnl code be compiled with the same sizeof(off_t), so we use
155 dnl the following crude hack.
158 AC_MSG_CHECKING(for large file support)
160 #define _LARGEFILE_SOURCE
161 #define _FILE_OFFSET_BITS 64
162 #include <sys/types.h>
163 int main () { return !(sizeof(off_t) == 8); }
167 GST_PKG_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
178 if test "$ac_cv_func_mmap_fixed_mapped" = "yes" ; then
179 GST_DISABLE_OMEGA_COTHREADS=no
181 GST_DISABLE_OMEGA_COTHREADS=yes
183 dnl for future --disabling, maybe. Right now, it depends on HAVE_MMAP
184 AM_CONDITIONAL(GST_DISABLE_OMEGA_COTHREADS, test "x$GST_DISABLE_OMEGA_COTHREADS" = "xyes")
186 dnl check for makecontext and define HAVE_MAKECONTEXT if we have it
188 if test "$ac_cv_check_mcsc" = "yes"; then
189 AC_DEFINE_UNQUOTED(HAVE_MAKECONTEXT, $HAVE_MAKECONTEXT,
190 [defined if we have makecontext ()])
193 dnl Check for a way to display the function name in debug output
196 dnl check if we should use -Wa,-mregnames on PowerPC, so we can use
197 dnl symbolic register names in inline asm
198 if test x$HAVE_CPU_PPC = xyes ; then
199 AS_COMPILER_FLAG(["-Wa,-mregnames"],
200 [GST_INT_CFLAGS="$GST_INT_CFLAGS -Wa,-mregnames"],
205 AC_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),
206 enable_gcov=$enableval,enable_gcov=no)
207 if test x$enable_gcov = xyes ; then
208 AS_COMPILER_FLAG(["-fprofile-arcs"],
209 [GST_INT_CFLAGS="$GST_INT_CFLAGS -fprofile-arcs"],
211 AS_COMPILER_FLAG(["-ftest-coverage"],
212 [GST_INT_CFLAGS="$GST_INT_CFLAGS -ftest-coverage"],
214 GST_INT_CFLAGS=`echo "$GST_INT_CFLAGS" | sed -e 's/-O[0-9]*//g'`
216 AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
218 AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
220 dnl Check for some compiler flags that optimize our code.
221 if test "x$GCC" = xyes; then
222 AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
225 dnl HAVE_WIN32 currently means "disable POSIXisms".
228 AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
234 GST_UNALIGNED_ACCESS()
235 if test x${as_cv_unaligned_access} = xyes ; then
236 GST_HAVE_UNALIGNED_ACCESS_DEFINE="#define GST_HAVE_UNALIGNED_ACCESS 1"
238 GST_HAVE_UNALIGNED_ACCESS_DEFINE="#define GST_HAVE_UNALIGNED_ACCESS 0"
240 AC_SUBST(GST_HAVE_UNALIGNED_ACCESS_DEFINE)
242 dnl Check for essential libraries first:
243 dnl ====================================
246 dnl Minimum required version of GLib2
247 dnl required for compilation without warnings
251 dnl Check for glib2 with sugar on top
252 PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0,HAVE_GLIB2=yes,HAVE_GLIB2=no)
253 dnl for the poor souls who for example have glib in /usr/local
254 AS_SCRUB_INCLUDE(GLIB2_CFLAGS)
255 GLIB_LIBS=$GLIB2_LIBS
256 GLIB_CFLAGS=$GLIB2_CFLAGS
258 AC_SUBST(GLIB_CFLAGS)
260 if test "x$HAVE_GLIB2" = "xno"; then
261 AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.])
264 dnl Check for glib2 without extra fat, useful for the unversioned tool frontends
265 PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB2_REQ)
266 AC_SUBST(GLIB_ONLY_CFLAGS)
267 AC_SUBST(GLIB_ONLY_LIBS)
270 if test "x$GST_DISABLE_LOADSAVE" = "xyes" && test "x$GST_DISABLE_REGISTRY" = "xyes"
272 AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2])
274 dnl check for libxml2 with minimum req version
275 GST_LIBXML2_CHECK(2.4.9)
279 dnl FIXME: This test passes on popt 1.6.2, maybe earlier, but popt 1.6.2
280 dnl causes segfaults on gst_init. Write a working test if possible.
281 GST_CHECK_LIBHEADER(POPT, popt, poptStrippedArgv,, popt.h, POPT_LIBS="-lpopt",
282 AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
283 download the latest version from
284 ftp://ftp.rpm.org/pub/rpm/dist/])
286 AC_MSG_NOTICE(Checking for POPT_TABLEEND)
291 #ifndef POPT_TABLEEND
299 AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
300 download the latest version from
301 ftp://ftp.rpm.org/pub/rpm/dist/])
303 AC_SUBST(POPT_CFLAGS)
306 dnl Check for ucontext.h
307 AC_CHECK_HEADER(ucontext.h, AC_DEFINE(HAVE_UCONTEXT_H, 1, [defined if we have ucontext.h]))
309 dnl check for "check", unit testing library/header
310 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
311 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
313 dnl ######################################################################
314 dnl # Check command line parameters, and set shell variables accordingly #
315 dnl ######################################################################
317 dnl FIXME: simplify all this down using a few m4 macros
319 AC_ARG_ENABLE(fast-stack-trash,
320 AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
321 [case "${enableval}" in
322 yes) USE_FAST_STACK_TRASH=yes;;
323 noset) USE_FAST_STACK_TRASH=no;;
324 no) USE_FAST_STACK_TRASH=no;;
325 *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
327 [USE_FAST_STACK_TRASH=yes]) dnl Default value
329 AC_ARG_ENABLE(plugin-builddir,
330 AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]),
331 [case "${enableval}" in
332 yes) PLUGINS_USE_BUILDDIR=yes ;;
333 no) PLUGINS_USE_BUILDDIR=no ;;
334 *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
336 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
338 AC_ARG_ENABLE(profiling,
339 AC_HELP_STRING([--enable-profiling],[adds -pg to compiler commandline, for profiling]),
340 [case "${enableval}" in
341 yes) USE_PROFILING=yes ;;
342 no) USE_PROFILING=no ;;
343 *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
345 [USE_PROFILING=no]) dnl Default value
347 dnl use a cache dir for storing element registry info.
348 dnl default to building registry in the source tree if we are enabling plugin build dir
349 if test "x$PLUGINS_USE_BUILDDIR" = "xyes"; then
352 dnl ${localstatedir} points to PREFIX/var
353 GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
355 AC_ARG_WITH(cachedir,
356 AC_HELP_STRING([--with-cachedir],[specify path to use for plugin and command completion registries]),
357 [case "${withval}" in
358 yes) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
359 no) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
360 *) GST_CACHE_DIR="${withval}" ;;
362 [:]) dnl Default value
364 AS_AC_EXPAND(GST_CACHE_DIR, $GST_CACHE_DIR)
365 AC_DEFINE_UNQUOTED(GST_CACHE_DIR, "$GST_CACHE_DIR", [Location of registry])
366 AC_MSG_NOTICE(Using $GST_CACHE_DIR as registry cache dir)
368 dnl building of tests
370 AC_HELP_STRING([--disable-tests],[disable building test apps]),
371 [case "${enableval}" in
372 yes) BUILD_TESTS=yes ;;
373 no) BUILD_TESTS=no ;;
374 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
376 [BUILD_TESTS=yes]) dnl Default value
377 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
379 dnl tests known to fail
380 AC_ARG_ENABLE(failing-tests,
381 AC_HELP_STRING([--disable-failing-tests],[disable building tests known to fail]),
382 [case "${enableval}" in
383 yes) BUILD_FAILING_TESTS=yes ;;
384 no) BUILD_FAILING_TESTS=no ;;
385 *) AC_MSG_ERROR(bad value ${enableval} for --disable-failing-tests) ;;
387 [BUILD_FAILING_TESTS=no]) dnl Default value
388 AM_CONDITIONAL(BUILD_FAILING_TESTS, test "x$BUILD_FAILING_TESTS" = "xyes")
389 if test x$BUILD_FAILING_TESTS = xyes; then
390 AC_MSG_WARN([building tests known to fail, use --disable-failing-tests to disable])
392 AC_MSG_WARN([Sissy ! By asking to not build the tests known to fail, you hereby waive your right to customer support. If you do not agree with this EULA, please press Ctrl-C before the next line is printed. By allowing the next line to be printed, you expressly acknowledge your acceptance of this EULA.])
395 AC_ARG_ENABLE(examples,
396 AC_HELP_STRING([--disable-examples],[disable building examples]),
397 [case "${enableval}" in
398 yes) BUILD_EXAMPLES=yes ;;
399 no) BUILD_EXAMPLES=no ;;
400 *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
402 [BUILD_EXAMPLES=yes]) dnl Default value
403 AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
405 dnl poison destroyed objects
406 AC_ARG_ENABLE(poisoning,
407 AC_HELP_STRING([--enable-poisoning],[enable poisoning of deallocated objects]),
408 [case "${enableval}" in
409 yes) USE_POISONING=yes ;;
410 no) USE_POISONING=no ;;
411 *) AC_MSG_ERROR(bad value ${enableval} for --enable-poisoning) ;;
413 [USE_POISONING=no]) dnl Default value
415 dnl Next, check for the optional components:
416 dnl ========================================
420 AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
421 [case "${enableval}" in
422 yes) USE_DEBUG=yes ;;
424 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
426 [USE_DEBUG=yes]) dnl Default value
428 dnl valgrind inclusion
429 AC_ARG_ENABLE(valgrind,
430 AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
431 [case "${enableval}" in
432 yes) USE_VALGRIND="$USE_DEBUG" ;;
433 no) USE_VALGRIND=no ;;
434 *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
436 [USE_VALGRIND="$USE_DEBUG"]) dnl Default value
438 if test "x$USE_VALGRIND" = xyes; then
440 PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ, USE_VALGRIND="yes", USE_VALGRIND="no")
442 if test "x$USE_VALGRIND" = xyes; then
443 AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
444 AC_MSG_NOTICE(Using extra code paths for valgrind)
446 AC_SUBST(VALGRIND_CFLAGS)
447 AC_SUBST(VALGRIND_LIBS)
449 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
450 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
452 dnl ################################################
453 dnl # Set defines according to variables set above #
454 dnl ################################################
457 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
458 dnl HAVE_ and it is likely to be easier to stick with the old name
459 if test "x$USE_FAST_STACK_TRASH" = xyes; then
460 AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions])
463 if test "x$USE_POISONING" = xyes; then
464 AC_DEFINE(USE_POISONING, 1, [Define if we should poison deallocated memory])
467 dnl test for sigaction()
468 AC_CHECK_FUNC(sigaction,
469 AC_DEFINE(HAVE_SIGACTION, 1,
470 [Defined if we have sigaction ()]))
472 dnl test for register_printf_function
473 AC_CHECK_FUNC(register_printf_function,
475 GST_PRINTF_EXTENSION_FORMAT_DEFINE="#define GST_PTR_FORMAT \"P\""
476 AC_DEFINE(HAVE_PRINTF_EXTENSION, 1,
477 [Defined if we have register_printf_function ()])
479 GST_PRINTF_EXTENSION_FORMAT_DEFINE="#define GST_PTR_FORMAT \"p\""
481 AC_SUBST(GST_PRINTF_EXTENSION_FORMAT_DEFINE)
483 dnl test if we have dladdr(); we use it for debugging
484 save_cflags="$CFLAGS"
485 CFLAGS="$CFLAGS -D_GNU_SOURCE"
486 AC_CHECK_LIB(dl, dladdr,
487 AC_DEFINE(HAVE_DLADDR, 1,
488 [Defined if we have dladdr ()]))
489 CFLAGS="$save_cflags"
491 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
492 AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
495 if test "x$USE_DEBUG" = xyes; then
496 GST_INT_CFLAGS="$GST_INT_CFLAGS -g"
499 dnl #############################
500 dnl # Set automake conditionals #
501 dnl #############################
503 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
504 dnl HAVE_ and it is likely to be easier to stick with the old name
505 AM_CONDITIONAL(EXPERIMENTAL, test "x$EXPERIMENTAL" = "yes")
506 AM_CONDITIONAL(BROKEN, test "x$BROKEN" = "yes")
507 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR, test "x$PLUGINS_USE_BUILDDIR" = "xyes")
510 dnl ############################
511 dnl # Set up some more defines #
512 dnl ############################
514 dnl set license and copyright notice
515 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
517 dnl package name in plugins
518 AC_ARG_WITH(package-name,
519 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
520 [case "${withval}" in
521 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
522 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
523 *) GST_PACKAGE="${withval}" ;;
527 if test "x$GST_CVS" = "xyes"
530 GST_PACKAGE="GStreamer CVS/prerelease"
532 GST_PACKAGE="GStreamer source release"
536 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
537 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
539 dnl package origin URL
540 AC_ARG_WITH(package-origin,
541 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
542 [case "${withval}" in
543 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
544 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
545 *) GST_ORIGIN="${withval}" ;;
547 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
548 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
549 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
551 dnl Set location of plugin directory
552 AS_AC_EXPAND(PLUGINS_DIR, ${libdir}/gstreamer-$GST_MAJORMINOR)
553 AC_DEFINE_UNQUOTED(PLUGINS_DIR, "$PLUGINS_DIR", [Define the plugin directory])
554 AC_SUBST(PLUGINS_DIR)
555 AC_MSG_NOTICE([Using $PLUGINS_DIR as the plugin install location])
557 dnl Set location of uninstalled plugin directory
558 PLUGINS_BUILDDIR=`pwd`
559 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR, "$PLUGINS_BUILDDIR", [Define the uninstalled plugin directory])
560 AC_SUBST(PLUGINS_BUILDDIR)
562 dnl LDFLAGS modifier defining exported symbols from built objects
563 EXPORT_LDFLAGS="-export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*"
565 dnl GST_PKG_*: the flags we use that are also used
566 dnl for external applications/.pc file
567 dnl GST_LIB_*: used for the main library
568 dnl GST_OBJ_*: the flags we use for all the objects internal to the core
569 dnl GST_PLUGIN_*: additional flags we use for all plugins
571 dnl finalize _CFLAGS and _LIBS
572 dnl flags exported for external applications and use in our pkg-config .pc files
573 dnl since glib and xml are package deps, there's no need to include their cflags
574 dnl in the pkg-config file
576 GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0"
577 AC_SUBST(GST_PKG_CFLAGS)
578 AC_SUBST(GST_PKG_LIBS)
579 AC_SUBST(GST_PKG_DEPS)
581 dnl flags shared for all internal objects (core libs, elements, applications)
582 dnl we disable deprecated internally
583 dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS
584 dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
585 GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
586 $GST_INT_CFLAGS \$(ERROR_CFLAGS) -DGST_DISABLE_DEPRECATED"
588 dnl Private vars for libgst only
589 GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \
590 $VALGRIND_CFLAGS -I\$(top_srcdir)"
591 GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS"
592 GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION -no-undefined $EXPORT_LDFLAGS"
593 AC_SUBST(GST_LIB_CFLAGS)
594 AC_SUBST(GST_LIB_LIBS)
595 AC_SUBST(GST_LIB_LDFLAGS)
597 dnl Vars for all internal objects built on libgstreamer
598 GST_OBJ_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)"
599 GST_OBJ_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la"
601 AC_SUBST(GST_OBJ_CFLAGS, "$GST_OBJ_CFLAGS")
602 AC_SUBST(GST_OBJ_LIBS, "$GST_OBJ_LIBS")
604 dnl specific additional LDFLAGS for plugins
605 GST_PLUGIN_LDFLAGS="-module -avoid-version $EXPORT_LDFLAGS"
606 AC_SUBST(GST_PLUGIN_LDFLAGS, "$GST_PLUGIN_LDFLAGS")
608 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
611 dnl ##################################################
612 dnl # deps for examples from manual #
613 dnl ##################################################
615 PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0,
616 HAVE_LIBGNOMEUI="yes", HAVE_LIBGNOMEUI="no")
617 AC_SUBST(LIBGNOMEUI_CFLAGS)
618 AC_SUBST(LIBGNOMEUI_LIBS)
619 AM_CONDITIONAL(HAVE_LIBGNOMEUI, test "x$HAVE_LIBGNOMEUI" = "xyes")
621 dnl ##################################################
622 dnl # Prepare informative messages to display at end #
623 dnl ##################################################
627 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
628 infomessages="$infomessages
629 *** Warning: You have configured using the --enable-plugin-builddir option.
631 This option is for development purposes only: binaries built with
632 it should be used with code in the build tree only. To build an
633 installable version, use ./configure without the --enable-plugin-builddir
634 option. Note that the autogen.sh script supplies the plugin builddir
635 option automatically -- run ./autogen.sh -- --disable-plugin-builddir to make
636 an installable build.
641 dnl #########################
642 dnl # Make the output files #
643 dnl #########################
645 dnl libs/ext/Makefile
646 dnl nothing there yet !
654 gst/indexers/Makefile
655 gst/elements/Makefile
657 gst/registries/Makefile
660 libs/gst/control/Makefile
661 libs/gst/dataprotocol/Makefile
662 libs/gst/getbits/Makefile
666 tests/instantiate/Makefile
667 tests/memchunk/Makefile
668 tests/muxing/Makefile
669 tests/seeking/Makefile
671 tests/threadstate/Makefile
673 testsuite/bytestream/Makefile
674 testsuite/caps/Makefile
675 testsuite/cleanup/Makefile
676 testsuite/debug/Makefile
677 testsuite/dlopen/Makefile
678 testsuite/dynparams/Makefile
679 testsuite/elements/Makefile
680 testsuite/indexers/Makefile
681 testsuite/negotiation/Makefile
682 testsuite/pad/Makefile
683 testsuite/parse/Makefile
684 testsuite/plugin/Makefile
685 testsuite/refcounting/Makefile
686 testsuite/schedulers/Makefile
687 testsuite/states/Makefile
688 testsuite/threads/Makefile
689 testsuite/trigger/Makefile
691 examples/cutter/Makefile
692 examples/helloworld/Makefile
693 examples/launch/Makefile
694 examples/manual/Makefile
695 examples/mixer/Makefile
696 examples/pingpong/Makefile
697 examples/plugins/Makefile
698 examples/pwg/Makefile
699 examples/queue/Makefile
700 examples/retag/Makefile
701 examples/thread/Makefile
702 examples/typefind/Makefile
703 examples/xml/Makefile
712 docs/plugins/Makefile
713 docs/plugins/gstreamer-plugins.types
716 docs/version.entities
719 pkgconfig/gstreamer.pc
720 pkgconfig/gstreamer-uninstalled.pc
721 pkgconfig/gstreamer-base.pc
722 pkgconfig/gstreamer-base-uninstalled.pc
723 pkgconfig/gstreamer-control.pc
724 pkgconfig/gstreamer-control-uninstalled.pc
725 pkgconfig/gstreamer-dataprotocol.pc
726 pkgconfig/gstreamer-dataprotocol-uninstalled.pc
728 echo "$infomessages", infomessages="$infomessages"