source: trunk/third/gstreamer/configure.ac @ 21448

Revision 21448, 23.7 KB checked in by ghudson, 19 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21447, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT
2AC_CANONICAL_TARGET
3
4dnl when going to/from release please set the nano (fourth number) right !
5dnl releases only do Wall, cvs and prerelease does Werror too
6AS_VERSION(gstreamer, GST_VERSION, 0, 8, 9, 0, GST_CVS="no", GST_CVS="yes")
7
8dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
9AM_MAINTAINER_MODE
10AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
11
12dnl our libraries and install dirs use major.minor as a version
13GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
14dnl we override it here for release candidates
15#GST_MAJORMINOR=0.8
16AC_SUBST(GST_MAJORMINOR)
17
18AC_PROG_CC
19dnl For interactive UNIX (a Sun thing)
20AC_ISC_POSIX
21
22dnl CURRENT, REVISION, AGE
23dnl - library source changed -> increment REVISION
24dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
25dnl - interfaces added -> increment AGE
26dnl - interfaces removed -> AGE = 0
27AS_LIBTOOL(GST, 5, 0, 4)
28AM_PROG_LIBTOOL
29
30AC_CONFIG_SRCDIR([gst/gst.c])
31AM_CONFIG_HEADER(config.h)
32
33dnl Add parameters for aclocal
34AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4 -I .")
35
36AM_PROG_CC_STDC
37AM_PROG_AS
38AS="${CC}"
39
40dnl the gettext stuff needed
41AM_GNU_GETTEXT_VERSION(0.11.5)
42AM_GNU_GETTEXT([external])
43
44GETTEXT_PACKAGE=gstreamer-$GST_MAJORMINOR
45AC_SUBST(GETTEXT_PACKAGE)
46AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
47                   [gettext package name])
48
49dnl define LOCALEDIR in config.h
50AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
51AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
52                   [gettext locale dir])
53
54dnl define LIBDIR so we can inform people where we live
55AS_AC_EXPAND(LIBDIR, $libdir)
56AC_DEFINE_UNQUOTED([LIBDIR], "$LIBDIR",
57                   [library dir])
58
59dnl decide on error flags
60dnl if we support -Wall, set it unconditionally
61AS_COMPILER_FLAG(-Wall,
62                 GST_ERROR_CFLAGS="-Wall",
63                 GST_ERROR_CFLAGS="")
64dnl if we're in nano >= 1, add -Werror if supported
65if test "x$GST_CVS" = "xyes"
66then
67  AS_COMPILER_FLAG(-Werror, GST_ERROR_CFLAGS="$GST_ERROR_CFLAGS -Werror")
68fi
69
70dnl We disable static building for development, for time savings
71dnl *NOTE*: dnl this line before release, so release does static too
72dnl AM_DISABLE_STATIC
73
74AC_HEADER_STDC([])
75AC_C_INLINE
76
77dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
78dnl messages printed when running cvs builds
79if test "x$GST_CVS" = "xyes"; then
80  AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
81fi
82
83dnl subsystems - can influence other decisions so needs to be high up
84dnl we need to do AM_CONDITIONAL them here for automake 1.6.x compatibility
85GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
86AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes")
87GST_CHECK_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
88AM_CONDITIONAL(GST_DISABLE_LOADSAVE, test "x$GST_DISABLE_LOADSAVE" = "xyes")
89GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
90AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes")
91GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
92AM_CONDITIONAL(GST_DISABLE_TRACE, test "x$GST_DISABLE_TRACE" = "xyes")
93GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing])
94AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, test "x$GST_DISABLE_ALLOC_TRACE" = "xyes")
95GST_CHECK_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
96AM_CONDITIONAL(GST_DISABLE_REGISTRY, test "x$GST_DISABLE_REGISTRY" = "xyes")
97GST_CHECK_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types])
98AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, test "x$GST_DISABLE_ENUMTYPES" = "xyes")
99GST_CHECK_SUBSYSTEM_DISABLE(INDEX,[index])
100AM_CONDITIONAL(GST_DISABLE_INDEX, test "x$GST_DISABLE_INDEX" = "xyes")
101GST_CHECK_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
102AM_CONDITIONAL(GST_DISABLE_PLUGIN, test "x$GST_DISABLE_PLUGIN" = "xyes")
103GST_CHECK_SUBSYSTEM_DISABLE(URI,[uri handlers])
104AM_CONDITIONAL(GST_DISABLE_URI, test "x$GST_DISABLE_URI" = "xyes")
105
106dnl ##############################
107dnl # Do automated configuration #
108dnl ##############################
109
110dnl Check for tools:
111dnl ================
112
113dnl allow for different autotools
114AS_AUTOTOOLS_ALTERNATE()
115
116dnl modify pkg-config path
117AC_ARG_WITH(pkg-config-path,
118   AC_HELP_STRING([--with-pkg-config-path],
119                  [colon-separated list of pkg-config(1) dirs]),
120   [export PKG_CONFIG_PATH=${withval}])
121
122GST_DOC()
123GST_ARCH()
124
125dnl Perl is used in building documentation
126AC_PATH_PROG(PERL_PATH, perl, no)
127if test x$PERL_PATH = xno; then
128  AC_MSG_ERROR(Could not find perl)
129fi
130
131AC_PROG_AWK
132
133dnl we require bison for building the parser
134dnl FIXME: check if AC_PROG_YACC is suitable here
135AC_PATH_PROG(BISON_PATH, bison, no)
136if test x$BISON_PATH = xno; then
137  AC_MSG_ERROR(Could not find bison)
138fi
139
140dnl check bison version
141AC_MSG_CHECKING([bison version])
142
143if $BISON_PATH --version | head -n 1 | $AWK '{ if ($4 < 1.35) exit 1; else exit 0;}';
144then
145  AC_MSG_RESULT([ok])
146else
147  AC_MSG_RESULT([too old.])
148  AC_MSG_ERROR([Your bison version is too old, v1.35 or later is required.])
149fi
150
151dnl we require flex for building the parser
152dnl FIXME: check if AC_PROG_LEX is suitable here
153AC_PATH_PROG(FLEX_PATH, flex, no)
154if test x$FLEX_PATH = xno; then
155  AC_MSG_ERROR(Could not find flex)
156fi
157
158dnl
159dnl We should really use AC_SYS_LARGEFILE, but the problem is
160dnl many of the plugins don't include "config.h".  To assure
161dnl binary compatibility, it is necessary that all gstreamer
162dnl code be compiled with the same sizeof(off_t), so we use
163dnl the following crude hack.
164dnl
165
166AC_MSG_CHECKING(for large file support)
167AC_TRY_RUN([
168#define _LARGEFILE_SOURCE
169#define _FILE_OFFSET_BITS 64
170#include <sys/types.h>
171int main () { return !(sizeof(off_t) == 8); }
172],
173[
174  AC_MSG_RESULT(yes)
175  GST_PKG_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
176],
177[
178  AC_MSG_RESULT(no)
179],
180[
181  AC_MSG_RESULT(no)
182])
183
184dnl check for mmap
185AC_FUNC_MMAP()
186if test "$ac_cv_func_mmap_fixed_mapped" = "yes" ; then
187  GST_DISABLE_OMEGA_COTHREADS=no
188else
189  GST_DISABLE_OMEGA_COTHREADS=yes
190fi
191dnl for future --disabling, maybe.  Right now, it depends on HAVE_MMAP
192AM_CONDITIONAL(GST_DISABLE_OMEGA_COTHREADS, test "x$GST_DISABLE_OMEGA_COTHREADS" = "xyes")
193
194dnl check for makecontext and define HAVE_MAKECONTEXT if we have it
195AC_CHECK_MCSC()
196if test "$ac_cv_check_mcsc" = "yes"; then
197  AC_DEFINE_UNQUOTED(HAVE_MAKECONTEXT, $HAVE_MAKECONTEXT,
198                     [defined if we have makecontext ()])
199fi
200
201dnl Check for a way to display the function name in debug output
202GST_CHECK_FUNCTION()
203
204dnl check if we should use -Wa,-mregnames on PowerPC, so we can use
205dnl symbolic register names in inline asm
206if test x$HAVE_CPU_PPC = xyes ; then
207  AS_COMPILER_FLAG(["-Wa,-mregnames"],
208    [GST_INT_CFLAGS="$GST_INT_CFLAGS -Wa,-mregnames"],
209    true)
210fi
211
212AC_ARG_ENABLE(gcov,
213  AC_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),
214  enable_gcov=$enableval,enable_gcov=no)
215if test x$enable_gcov = xyes ; then
216  AS_COMPILER_FLAG(["-fprofile-arcs"],
217    [GST_INT_CFLAGS="$GST_INT_CFLAGS -fprofile-arcs"],
218    true)
219  AS_COMPILER_FLAG(["-ftest-coverage"],
220    [GST_INT_CFLAGS="$GST_INT_CFLAGS -ftest-coverage"],
221    true)
222  GST_INT_CFLAGS=`echo "$GST_INT_CFLAGS" | sed -e 's/-O[0-9]*//g'`
223
224  AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
225fi
226AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
227
228dnl Check for some compiler flags that optimize our code.
229if test "x$GCC" = xyes; then
230  AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
231fi
232
233dnl HAVE_WIN32 currently means "disable POSIXisms".
234case "$host" in
235  *-*-mingw*)
236    AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
237    ;;
238  *)
239    ;;
240esac
241
242GST_UNALIGNED_ACCESS()
243if test x${as_cv_unaligned_access} = xyes ; then
244  GST_HAVE_UNALIGNED_ACCESS_DEFINE="#define GST_HAVE_UNALIGNED_ACCESS 1"
245else
246  GST_HAVE_UNALIGNED_ACCESS_DEFINE="#define GST_HAVE_UNALIGNED_ACCESS 0"
247fi
248AC_SUBST(GST_HAVE_UNALIGNED_ACCESS_DEFINE)
249
250dnl Check for essential libraries first:
251dnl ====================================
252
253dnl === GLib 2 ===
254dnl Minimum required version of GLib2
255dnl required for compilation without warnings
256GLIB2_REQ="2.2"
257AC_SUBST(GLIB2_REQ)
258
259dnl Check for glib2 with sugar on top
260PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0,HAVE_GLIB2=yes,HAVE_GLIB2=no)
261dnl for the poor souls who for example have glib in /usr/local
262AS_SCRUB_INCLUDE(GLIB2_CFLAGS)
263GLIB_LIBS=$GLIB2_LIBS
264GLIB_CFLAGS=$GLIB2_CFLAGS
265AC_SUBST(GLIB_LIBS)
266AC_SUBST(GLIB_CFLAGS)
267
268if test "x$HAVE_GLIB2" = "xno"; then
269  AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.])
270fi
271
272dnl Check for glib2 without extra fat, useful for the unversioned tool frontends
273PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB2_REQ)
274AC_SUBST(GLIB_ONLY_CFLAGS)
275AC_SUBST(GLIB_ONLY_LIBS)
276 
277dnl === libxml 2 ===
278if test "x$GST_DISABLE_LOADSAVE" = "xyes" && test "x$GST_DISABLE_REGISTRY" = "xyes"
279then
280  AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2])
281else
282  dnl check for libxml2 with minimum req version
283  GST_LIBXML2_CHECK(2.4.9)
284fi
285
286dnl popt checks
287dnl FIXME: This test passes on popt 1.6.2, maybe earlier, but popt 1.6.2
288dnl        causes segfaults on gst_init. Write a working test if possible.
289GST_CHECK_LIBHEADER(POPT, popt, poptStrippedArgv,, popt.h, POPT_LIBS="-lpopt",
290  AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
291                download the latest version from
292                ftp://ftp.rpm.org/pub/rpm/dist/])
293)
294AC_MSG_NOTICE(Checking for POPT_TABLEEND)
295AC_COMPILE_IFELSE([
296#include <popt.h>
297int main ()
298{
299#ifndef POPT_TABLEEND
300#error
301#else
302  return 0;
303#endif
304}
305],, [
306  dnl it failed
307  AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
308                download the latest version from
309                ftp://ftp.rpm.org/pub/rpm/dist/])
310])
311AC_SUBST(POPT_LIBS)
312
313dnl Check for ucontext.h
314AC_CHECK_HEADER(ucontext.h, AC_DEFINE(HAVE_UCONTEXT_H, 1, [defined if we have ucontext.h]))
315
316dnl ######################################################################
317dnl # Check command line parameters, and set shell variables accordingly #
318dnl ######################################################################
319
320dnl FIXME: simplify all this down using a few m4 macros
321
322AC_ARG_ENABLE(fast-stack-trash,
323AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
324[case "${enableval}" in
325  yes) USE_FAST_STACK_TRASH=yes;;
326  noset) USE_FAST_STACK_TRASH=no;;
327  no)  USE_FAST_STACK_TRASH=no;;
328  *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
329esac],
330[USE_FAST_STACK_TRASH=yes]) dnl Default value
331
332AC_ARG_ENABLE(plugin-builddir,
333AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]),
334[case "${enableval}" in
335  yes) PLUGINS_USE_BUILDDIR=yes ;;
336  no)  PLUGINS_USE_BUILDDIR=no ;;
337  *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
338esac],
339[PLUGINS_USE_BUILDDIR=no]) dnl Default value
340
341AC_ARG_ENABLE(profiling,
342AC_HELP_STRING([--enable-profiling],[adds -pg to compiler commandline, for profiling]),
343[case "${enableval}" in
344  yes) USE_PROFILING=yes ;;
345  no)  USE_PROFILING=no ;;
346  *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
347esac],
348[USE_PROFILING=no]) dnl Default value
349
350dnl use a cache dir for storing element registry info.
351dnl default to building registry in the source tree if we are enabling plugin build dir
352if test "x$PLUGINS_USE_BUILDDIR" = "xyes"; then
353  GST_CACHE_DIR=`pwd`
354else
355  dnl ${localstatedir} points to PREFIX/var
356  GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
357fi
358AC_ARG_WITH(cachedir,
359AC_HELP_STRING([--with-cachedir],[specify path to use for plugin and command completion registries]),
360[case "${withval}" in
361  yes) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
362  no) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
363  *) GST_CACHE_DIR="${withval}" ;;
364esac],
365[:]) dnl Default value
366
367AS_AC_EXPAND(GST_CACHE_DIR, $GST_CACHE_DIR)
368AC_DEFINE_UNQUOTED(GST_CACHE_DIR, "$GST_CACHE_DIR", [Location of registry])
369AC_MSG_NOTICE(Using $GST_CACHE_DIR as registry cache dir)
370
371dnl building of tests
372AC_ARG_ENABLE(tests,
373AC_HELP_STRING([--disable-tests],[disable building test apps]),
374[case "${enableval}" in
375  yes) BUILD_TESTS=yes ;;
376  no)  BUILD_TESTS=no ;;
377  *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
378esac],
379[BUILD_TESTS=yes]) dnl Default value
380AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
381
382dnl tests known to fail
383AC_ARG_ENABLE(failing-tests,
384AC_HELP_STRING([--disable-failing-tests],[disable building tests known to fail]),
385[case "${enableval}" in
386  yes) BUILD_FAILING_TESTS=yes ;;
387  no)  BUILD_FAILING_TESTS=no ;;
388  *) AC_MSG_ERROR(bad value ${enableval} for --disable-failing-tests) ;;
389esac],
390[BUILD_FAILING_TESTS=no]) dnl Default value
391AM_CONDITIONAL(BUILD_FAILING_TESTS, test "x$BUILD_FAILING_TESTS" = "xyes")
392if test x$BUILD_FAILING_TESTS = xyes; then
393  AC_MSG_WARN([building tests known to fail, use --disable-failing-tests to disable])
394else
395  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.])
396fi
397
398AC_ARG_ENABLE(examples,
399AC_HELP_STRING([--disable-examples],[disable building examples]),
400[case "${enableval}" in
401  yes) BUILD_EXAMPLES=yes ;;
402  no)  BUILD_EXAMPLES=no ;;
403  *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
404esac],
405[BUILD_EXAMPLES=yes]) dnl Default value
406AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
407
408dnl poison destroyed objects
409AC_ARG_ENABLE(poisoning,
410AC_HELP_STRING([--enable-poisoning],[enable poisoning of deallocated objects]),
411[case "${enableval}" in
412  yes) USE_POISONING=yes ;;
413  no)  USE_POISONING=no ;;
414  *) AC_MSG_ERROR(bad value ${enableval} for --enable-poisoning) ;;
415esac],
416[USE_POISONING=no]) dnl Default value
417
418dnl Next, check for the optional components:
419dnl ========================================
420
421dnl debugging stuff
422AC_ARG_ENABLE(debug,
423AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
424[case "${enableval}" in
425  yes) USE_DEBUG=yes ;;
426  no)  USE_DEBUG=no ;;
427  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
428esac],
429[USE_DEBUG=yes]) dnl Default value
430
431dnl valgrind inclusion
432AC_ARG_ENABLE(valgrind,
433AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
434[case "${enableval}" in
435  yes) USE_VALGRIND="$USE_DEBUG" ;;
436  no)  USE_VALGRIND=no ;;
437  *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
438esac],
439[USE_VALGRIND="$USE_DEBUG"]) dnl Default value
440VALGRIND_REQ="2.1"
441if test "x$USE_VALGRIND" = xyes; then
442
443  PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ, USE_VALGRIND="yes", USE_VALGRIND="no")
444fi
445if test "x$USE_VALGRIND" = xyes; then
446  AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
447  AC_MSG_NOTICE(Using extra code paths for valgrind)
448fi
449AC_SUBST(VALGRIND_CFLAGS)
450AC_SUBST(VALGRIND_LIBS)
451
452dnl ################################################
453dnl # Set defines according to variables set above #
454dnl ################################################
455
456
457dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
458dnl HAVE_ and it is likely to be easier to stick with the old name
459if 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])
461fi
462
463if test "x$USE_POISONING" = xyes; then
464  AC_DEFINE(USE_POISONING, 1, [Define if we should poison deallocated memory])
465fi
466
467dnl test for sigaction()
468AC_CHECK_FUNC(sigaction,
469   AC_DEFINE(HAVE_SIGACTION, 1,
470             [Defined if we have sigaction ()]))
471
472dnl test for register_printf_function
473AC_CHECK_FUNC(register_printf_function,
474  [
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 ()])
478  ],
479  GST_PRINTF_EXTENSION_FORMAT_DEFINE="#define GST_PTR_FORMAT \"p\""
480)
481AC_SUBST(GST_PRINTF_EXTENSION_FORMAT_DEFINE)
482
483dnl test if we have dladdr(); we use it for debugging
484save_cflags="$CFLAGS"
485CFLAGS="$CFLAGS -D_GNU_SOURCE"
486AC_CHECK_LIB(dl, dladdr,
487   AC_DEFINE(HAVE_DLADDR, 1,
488             [Defined if we have dladdr ()]))
489CFLAGS="$save_cflags"
490
491if 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])
493fi
494
495if test "x$USE_DEBUG" = xyes; then
496   GST_INT_CFLAGS="$GST_INT_CFLAGS -g"
497fi
498
499dnl #############################
500dnl # Set automake conditionals #
501dnl #############################
502
503dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
504dnl HAVE_ and it is likely to be easier to stick with the old name
505AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
506AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
507AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
508
509
510dnl ############################
511dnl # Set up some more defines #
512dnl ############################
513
514dnl set license and copyright notice
515AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
516
517dnl package name in plugins
518AC_ARG_WITH(package-name,
519AC_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}" ;;
524esac],
525[
526dnl default value
527if test "x$GST_CVS" = "xyes"
528then
529  dnl nano >= 1
530  GST_PACKAGE="GStreamer CVS/prerelease"
531else
532  GST_PACKAGE="GStreamer source release"
533fi
534]
535)
536AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
537AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
538
539dnl package origin URL
540AC_ARG_WITH(package-origin,
541AC_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}" ;;
546esac],
547[GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
548AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
549AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
550
551dnl Set location of plugin directory
552AS_AC_EXPAND(PLUGINS_DIR, ${libdir}/gstreamer-$GST_MAJORMINOR)
553AC_DEFINE_UNQUOTED(PLUGINS_DIR, "$PLUGINS_DIR", [Define the plugin directory])
554AC_SUBST(PLUGINS_DIR)
555AC_MSG_NOTICE([Using $PLUGINS_DIR as the plugin install location])
556
557dnl Set location of uninstalled plugin directory
558PLUGINS_BUILDDIR=`pwd`
559AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR, "$PLUGINS_BUILDDIR", [Define the uninstalled plugin directory])
560AC_SUBST(PLUGINS_BUILDDIR)
561
562dnl LDFLAGS modifier defining exported symbols from built objects
563EXPORT_LDFLAGS="-export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*"
564
565dnl GST_PKG_*:    the flags we use that are also used
566dnl               for external applications/.pc file
567dnl GST_LIB_*:    used for the main library
568dnl GST_OBJ_*:    the flags we use for all the objects internal to the core
569dnl GST_PLUGIN_*: additional flags we use for all plugins
570
571dnl finalize _CFLAGS and _LIBS
572dnl flags exported for external applications and use in our pkg-config .pc files
573dnl since glib and xml are package deps, there's no need to include their cflags
574dnl in the pkg-config file
575
576GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0"
577AC_SUBST(GST_PKG_CFLAGS)
578AC_SUBST(GST_PKG_LIBS)
579AC_SUBST(GST_PKG_DEPS)
580
581dnl flags shared for all internal objects (core libs, elements, applications)
582dnl we disable deprecated internally
583dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS
584dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
585GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
586 $GST_INT_CFLAGS $GST_ERROR_CFLAGS -DGST_DISABLE_DEPRECATED"
587
588dnl Private vars for libgst only
589GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \
590  $VALGRIND_CFLAGS -I\$(top_srcdir)"
591GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS"
592GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION $EXPORT_LDFLAGS"
593AC_SUBST(GST_LIB_CFLAGS)
594AC_SUBST(GST_LIB_LIBS)
595AC_SUBST(GST_LIB_LDFLAGS)
596
597dnl Vars for all internal objects built on libgstreamer
598GST_OBJ_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)"
599GST_OBJ_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la"
600
601AC_SUBST(GST_OBJ_CFLAGS, "$GST_OBJ_CFLAGS")
602AC_SUBST(GST_OBJ_LIBS, "$GST_OBJ_LIBS")
603
604dnl specific additional LDFLAGS for plugins
605GST_PLUGIN_LDFLAGS="-module -avoid-version $EXPORT_LDFLAGS"
606AC_SUBST(GST_PLUGIN_LDFLAGS, "$GST_PLUGIN_LDFLAGS")
607
608plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
609AC_SUBST(plugindir)
610
611dnl ##################################################
612dnl # deps for examples from manual                  #
613dnl ##################################################
614
615PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0,
616                  HAVE_LIBGNOMEUI="yes", HAVE_LIBGNOMEUI="no")
617AC_SUBST(LIBGNOMEUI_CFLAGS)
618AC_SUBST(LIBGNOMEUI_LIBS)
619AM_CONDITIONAL(HAVE_LIBGNOMEUI, test "x$HAVE_LIBGNOMEUI" = "xyes")
620
621dnl ##################################################
622dnl # Prepare informative messages to display at end #
623dnl ##################################################
624
625infomessages=
626
627if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
628  infomessages="$infomessages
629*** Warning: You have configured using the --enable-plugin-builddir option.
630
631This option is for development purposes only: binaries built with
632it should be used with code in the build tree only.  To build an
633installable version, use ./configure without the --enable-plugin-builddir
634option.  Note that the autogen.sh script supplies the plugin builddir
635option automatically -- run ./autogen.sh -- --disable-plugin-builddir to make
636an installable build.
637
638"
639fi
640
641dnl #########################
642dnl # Make the output files #
643dnl #########################
644
645dnl libs/ext/Makefile
646dnl nothing there yet !
647AC_OUTPUT(
648Makefile
649include/Makefile
650gst/Makefile
651gst/gstconfig.h
652gst/gstversion.h
653gst/autoplug/Makefile
654gst/indexers/Makefile
655gst/elements/Makefile
656gst/parse/Makefile
657gst/schedulers/Makefile
658gst/registries/Makefile
659libs/Makefile
660libs/gst/Makefile
661libs/gst/bytestream/Makefile
662libs/gst/control/Makefile
663libs/gst/dataprotocol/Makefile
664libs/gst/getbits/Makefile
665po/Makefile.in
666tests/Makefile
667tests/bufspeed/Makefile
668tests/instantiate/Makefile
669tests/memchunk/Makefile
670tests/muxing/Makefile
671tests/seeking/Makefile
672tests/sched/Makefile
673tests/threadstate/Makefile
674testsuite/Makefile
675testsuite/bins/Makefile
676testsuite/bytestream/Makefile
677testsuite/caps/Makefile
678testsuite/cleanup/Makefile
679testsuite/clock/Makefile
680testsuite/debug/Makefile
681testsuite/dlopen/Makefile
682testsuite/dynparams/Makefile
683testsuite/elements/Makefile
684testsuite/ghostpads/Makefile
685testsuite/indexers/Makefile
686testsuite/negotiation/Makefile
687testsuite/pad/Makefile
688testsuite/parse/Makefile
689testsuite/plugin/Makefile
690testsuite/refcounting/Makefile
691testsuite/schedulers/Makefile
692testsuite/states/Makefile
693testsuite/tags/Makefile
694testsuite/threads/Makefile
695examples/Makefile
696examples/cutter/Makefile
697examples/helloworld/Makefile
698examples/launch/Makefile
699examples/manual/Makefile
700examples/mixer/Makefile
701examples/pingpong/Makefile
702examples/plugins/Makefile
703examples/queue/Makefile
704examples/queue2/Makefile
705examples/queue3/Makefile
706examples/queue4/Makefile
707examples/retag/Makefile
708examples/thread/Makefile
709examples/typefind/Makefile
710examples/xml/Makefile
711tools/Makefile
712common/Makefile
713common/m4/Makefile
714docs/Makefile
715docs/faq/Makefile
716docs/gst/Makefile
717docs/libs/Makefile
718docs/manual/Makefile
719docs/plugins/Makefile
720docs/plugins/gstreamer-plugins.types
721docs/pwg/Makefile
722docs/xsl/Makefile
723docs/version.entities
724pkgconfig/Makefile
725stamp.h
726pkgconfig/gstreamer.pc
727pkgconfig/gstreamer-uninstalled.pc
728pkgconfig/gstreamer-control.pc
729pkgconfig/gstreamer-control-uninstalled.pc
730gstreamer.spec,
731echo "$infomessages", infomessages="$infomessages"
732)
Note: See TracBrowser for help on using the repository browser.