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

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