disabling cleanup3 until it knows if it fails or passes
[platform/upstream/gstreamer.git] / configure.ac
1 AC_INIT
2 AC_CANONICAL_TARGET([])
3
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, 7, 1, 1, GST_CVS="no", GST_CVS="yes")
7
8 if test x$program_suffix = xNONE ; then
9   program_suffix=-$GST_VERSION_MAJOR.$GST_VERSION_MINOR
10 fi
11
12 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
13 AM_MAINTAINER_MODE
14 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
15
16 dnl our libraries and install dirs use major.minor as a version
17 GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
18 AC_SUBST(GST_MAJORMINOR)
19
20 AC_PROG_CC
21 dnl For interactive UNIX (a Sun thing)
22 AC_ISC_POSIX
23
24 dnl CURRENT, REVISION, AGE
25 dnl - library source changed -> increment REVISION
26 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
27 dnl - interfaces added -> increment AGE
28 dnl - interfaces removed -> AGE = 0
29 AS_LIBTOOL(GST, 3, 0, 0)
30
31 AC_CONFIG_SRCDIR([gst/gst.c])
32 AM_CONFIG_HEADER(config.h)
33
34 dnl Add parameters for aclocal
35 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
36 ACLOCAL="$ACLOCAL -I common/m4 $ACLOCAL_FLAGS"
37
38 AM_PROG_CC_STDC
39 AM_PROG_AS
40 AS="${CC}"
41
42 dnl AC_PROC_INTLTOOL([0.26])
43 dnl AM_GNU_GETTEXT([external])
44 ALL_LINGUAS="de es no nl"
45 GETTEXT_PACKAGE=gstreamer-$GST_VERSION_MAJOR.$GST_VERSION_MINOR
46 AC_SUBST(GETTEXT_PACKAGE)
47 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],"$GETTEXT_PACKAGE",[gettext package name])
48 AM_GLIB_GNU_GETTEXT
49
50 AM_GLIB_DEFINE_LOCALEDIR(GST_LOCALEDIR)
51
52 dnl decide on error flags
53 AS_COMPILER_FLAG(-Wall,GST_ERROR="$GST_ERROR -Wall",GST_ERROR="$GST_ERROR")
54 if test "x$GST_CVS" = "xyes"; then
55   AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
56   GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
57 fi
58
59 dnl We disable static building for development, for time savings
60 dnl *NOTE*: dnl this line before release, so release does static too
61 dnl AM_DISABLE_STATIC
62
63 AC_HEADER_STDC([])
64
65
66 dnl ##############################
67 dnl # Do automated configuration #
68 dnl ##############################
69
70 dnl Check for tools:
71 dnl ================
72
73 dnl allow for different autotools
74 AS_AUTOTOOLS_ALTERNATE()
75
76 dnl modify pkg-config path
77 AC_ARG_WITH(pkg-config-path, 
78    AC_HELP_STRING([--with-pkg-config-path],
79                   [colon-separated list of pkg-config(1) dirs]),
80    [export PKG_CONFIG_PATH=${withval}])
81
82 GST_DOC()
83 GST_ARCH()
84
85 dnl Perl is used in building documentation
86 AC_PATH_PROG(PERL_PATH, perl, no)
87 if test x$PERL_PATH = xno; then
88   AC_MSG_ERROR(Could not find perl)
89 fi
90
91 dnl we require bison for building of some of the marshal files
92 dnl FIXME: check if AC_PROG_YACC is suitable here
93 AC_PATH_PROG(BISON_PATH, bison, no)
94 if test x$BISON_PATH = xno; then
95   AC_MSG_ERROR(Could not find bison)
96 fi
97
98 dnl we require flex for building the parser
99 dnl FIXME: check if AC_PROG_LEX is suitable here
100 AC_PATH_PROG(FLEX_PATH, flex, no)
101 if test x$FLEX_PATH = xno; then
102   AC_MSG_ERROR(Could not find flex)
103 fi
104
105 dnl
106 dnl We should really use AC_SYS_LARGEFILE, but the problem is
107 dnl many of the plugins don't include "config.h".  To assure
108 dnl binary compatibility, it is necessary that all gstreamer
109 dnl code be compiled with the same sizeof(off_t), so we use
110 dnl the following crude hack.
111 dnl
112
113 dnl
114 dnl GST_CFLAGS are split up as GST_EXT_CFLAGS and GST_INT_CFLAGS
115 dnl same for libs
116 dnl this is so we can make GST_CFLAGS for external modules available
117 dnl without mixing in internal (uninstalled) CFLAGS
118 dnl
119
120 dnl disable deprecated functions internally
121 GST_INT_CFLAGS="-DGST_DISABLE_DEPRECATED"
122
123 AC_MSG_CHECKING(for large file support)
124 AC_TRY_RUN([
125 #define _LARGEFILE_SOURCE
126 #define _FILE_OFFSET_BITS 64
127 #include <sys/types.h>
128 int main () { return !(sizeof(off_t) == 8); }
129 ],
130 [
131 AC_MSG_RESULT(yes)
132 GST_EXT_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
133 ],
134 [
135 AC_MSG_RESULT(no)
136 ],
137 [
138 AC_MSG_RESULT(no)
139 ])
140
141 dnl check for makecontext and define HAVE_MAKECONTEXT if we have it
142 AC_CHECK_MCSC()
143 if test "$ac_cv_check_mcsc" == "yes"; then
144   AC_DEFINE_UNQUOTED(HAVE_MAKECONTEXT, $HAVE_MAKECONTEXT,
145                      [defined if we have makecontext ()])
146 fi
147
148 dnl Check for a way to display the function name in debug output
149 GST_CHECK_FUNCTION()
150
151 dnl check if we should use -Wa,-mregnames on PowerPC, so we can use
152 dnl symbolic register names in inline asm
153 if test x$HAVE_CPU_PPC = xyes ; then
154   AS_COMPILER_FLAG(["-Wa,-mregnames"],
155     [GST_INT_CFLAGS="$GST_INT_CFLAGS -Wa,-mregnames"],
156     true)
157 fi
158
159
160 dnl Check for essential libraries first:
161 dnl ====================================
162
163 dnl === GLib 2 ===
164 dnl Minimum required version of GLib2
165 dnl required for compilation without warnings
166 GLIB2_REQ="2.0.1"
167 AC_SUBST(GLIB2_REQ)
168
169 dnl Check for glib2
170 PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0,HAVE_GLIB2=yes,HAVE_GLIB2=no)
171 GLIB_LIBS=$GLIB2_LIBS
172 GLIB_CFLAGS=$GLIB2_CFLAGS
173 AC_SUBST(GLIB_LIBS)
174 AC_SUBST(GLIB_CFLAGS)
175
176 if test "x$HAVE_GLIB2" = "xno"; then
177   AC_MSG_ERROR([GStreamer requires GLib 2.0 to compile.])
178 fi
179
180 GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0"
181 AC_SUBST(GST_PKG_DEPS)
182   
183 dnl === libxml 2 ===
184 dnl Minimum required version of libxml2
185 LIBXML2_REQ="2.4.9"
186 AC_SUBST(LIBXML2_REQ)
187
188 dnl check for libxml2
189 GST_LIBXML2_CHECK()
190
191 dnl popt checks
192 dnl FIXME: This test passes on popt 1.6.2, maybe earlier, but popt 1.6.2
193 dnl        causes segfaults on gst_init. Write a working test if possible.
194 GST_CHECK_LIBHEADER(POPT, popt, poptStrippedArgv,, popt.h, POPT_LIBS="-lpopt",
195   AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
196                 download the latest version from 
197                 ftp://ftp.rpm.org/pub/rpm/dist/])
198 )
199 AC_MSG_NOTICE(Checking for POPT_TABLEEND)
200 AC_COMPILE_IFELSE([
201 #include <popt.h>
202 int main ()
203 {
204 #ifndef POPT_TABLEEND
205 #error
206 #else
207   return 0;
208 #endif
209 }
210 ],, [
211   dnl it failed
212   AC_MSG_ERROR([popt 1.6.3 or newer is required to build gstreamer. You can
213                 download the latest version from 
214                 ftp://ftp.rpm.org/pub/rpm/dist/])
215 ])
216
217 dnl Check for atomic.h
218 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
219 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
220 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
221 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
222 if test x$HAVE_ATOMIC_H = xyes; then
223   AC_LINK_IFELSE([
224 #include "asm/atomic.h"
225 main() {atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
226   ],, [
227     # Not successful
228     if test x$HAVE_ATOMIC_H = xyes; then
229       AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
230     fi
231     HAVE_ATOMIC_H=no
232   ])
233 fi
234
235 dnl Check for ucontext.h
236 AC_CHECK_HEADER(ucontext.h, AC_DEFINE(HAVE_UCONTEXT_H, 1, [defined if we have ucontext.h]))
237
238 dnl ######################################################################
239 dnl # Check command line parameters, and set shell variables accordingly #
240 dnl ######################################################################
241
242 dnl FIXME: simplify all this down using a few m4 macros
243
244 AC_ARG_ENABLE(libmmx,
245 AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
246 [case "${enableval}" in
247   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
248   no)  USE_LIBMMX=no ;;
249   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
250 esac], 
251 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
252
253 AC_ARG_ENABLE(atomic,
254 AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
255 [case "${enableval}" in
256   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
257   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
258   no)  USE_ATOMIC_H=no;;
259   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
260 esac], 
261 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
262
263 AC_ARG_ENABLE(fast-stack-trash,
264 AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
265 [case "${enableval}" in
266   yes) USE_FAST_STACK_TRASH=yes;;
267   noset) USE_FAST_STACK_TRASH=no;;
268   no)  USE_FAST_STACK_TRASH=no;;
269   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
270 esac], 
271 [USE_FAST_STACK_TRASH=yes]) dnl Default value
272
273 AC_ARG_ENABLE(plugin-builddir,
274 AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]),
275 [case "${enableval}" in
276   yes) PLUGINS_USE_BUILDDIR=yes ;;
277   no)  PLUGINS_USE_BUILDDIR=no ;;
278   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
279 esac], 
280 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
281
282 AC_ARG_ENABLE(profiling,
283 AC_HELP_STRING([--enable-profiling],[adds -pg to compiler commandline, for profiling]),
284 [case "${enableval}" in
285   yes) USE_PROFILING=yes ;;
286   no)  UES_PROFILING=no ;;
287   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
288 esac], 
289 [USE_PROFILING=no]) dnl Default value
290
291 dnl use a cache dir for storing element registry info.
292 dnl default to building registry in the source tree if we are enabling plugin build dir
293 if test "x$PLUGINS_USE_BUILDDIR" = "xyes"; then
294   GST_CACHE_DIR=`pwd`
295 else
296   dnl ${localstatedir} points to PREFIX/var
297   GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
298 fi
299 AC_ARG_WITH(cachedir,
300 AC_HELP_STRING([--with-cachedir],[specify path to use for plugin and command completion registries]),
301 [case "${withval}" in
302   yes) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
303   no) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
304   *) GST_CACHE_DIR="${withval}" ;;
305 esac], 
306 [:]) dnl Default value
307
308 AS_AC_EXPAND(GST_CACHE_DIR, $GST_CACHE_DIR)
309 AC_MSG_NOTICE(Using $GST_CACHE_DIR as registry cache dir)
310
311
312 dnl building of tests
313 AC_ARG_ENABLE(tests,
314 AC_HELP_STRING([--disable-tests],[disable building test apps]),
315 [case "${enableval}" in
316   yes) BUILD_TESTS=yes ;;
317   no)  BUILD_TESTS=no ;;
318   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
319 esac], 
320 [BUILD_TESTS=yes]) dnl Default value
321 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
322
323 dnl tests known to fail
324 AC_ARG_ENABLE(failing-tests,
325 AC_HELP_STRING([--disable-failing-tests],[disable building tests known to fail]),
326 [case "${enableval}" in
327   yes) BUILD_FAILING_TESTS=yes ;;
328   no)  BUILD_FAILING_TESTS=no ;;
329   *) AC_MSG_ERROR(bad value ${enableval} for --disable-failing-tests) ;;
330 esac], 
331 [BUILD_FAILING_TESTS=no]) dnl Default value
332 AM_CONDITIONAL(BUILD_FAILING_TESTS, test "x$BUILD_FAILING_TESTS" = "xyes")
333 if test x$BUILD_FAILING_TESTS = xyes; then
334   AC_MSG_WARN([building tests known to fail, use --disable-failing-tests to disable])
335 else
336   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.])
337 fi
338
339 AC_ARG_ENABLE(examples,
340 AC_HELP_STRING([--disable-examples],[disable building examples]),
341 [case "${enableval}" in
342   yes) BUILD_EXAMPLES=yes ;;
343   no)  BUILD_EXAMPLES=no ;;
344   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
345 esac], 
346 [BUILD_EXAMPLES=yes]) dnl Default value
347 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
348
349 dnl poison destroyed objects
350 AC_ARG_ENABLE(poisoning,
351 AC_HELP_STRING([--enable-poisoning],[enable poisoning of deallocated objects]),
352 [case "${enableval}" in
353   yes) USE_POISONING=yes ;;
354   no)  USE_POISONING=no ;;
355   *) AC_MSG_ERROR(bad value ${enableval} for --enable-poisoning) ;;
356 esac], 
357 [USE_POISONING=no]) dnl Default value
358
359 dnl Next, check for the optional components:
360 dnl ========================================
361
362 dnl debugging stuff
363 AC_ARG_ENABLE(debug,
364 AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
365 [case "${enableval}" in
366   yes) USE_DEBUG=yes ;;
367   no)  USE_DEBUG=no ;;
368   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
369 esac],
370 [USE_DEBUG=yes]) dnl Default value
371 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, true)
372 GST_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
373
374 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
375 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
376 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_AUTOPLUG, true)
377 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
378 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_PARSE, true)
379 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
380 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TRACE, true)
381 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
382 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, true)
383 GST_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing])
384
385 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_REGISTRY, true)
386 GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
387 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, true)
388 GST_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types])
389 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_INDEX, true)
390 GST_SUBSYSTEM_DISABLE(INDEX,[index])
391 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_PLUGIN, true)
392 GST_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
393 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_URI, true)
394 GST_SUBSYSTEM_DISABLE(URI,[uri handlers])
395
396 dnl ################################################
397 dnl # Set defines according to variables set above #
398 dnl ################################################
399
400
401 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
402 dnl HAVE_ and it is likely to be easier to stick with the old name
403 if test "x$USE_LIBMMX" = xyes; then
404   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
405 fi
406
407 if test "x$USE_ATOMIC_H" = xyes; then
408   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
409 fi
410
411 if test "x$USE_FAST_STACK_TRASH" = xyes; then
412   AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions])
413 fi
414
415 if test "x$USE_POISONING" = xyes; then
416   AC_DEFINE(USE_POISONING, 1, [Define if we should poison deallocated memory])
417 fi
418
419 dnl test if we have pthread_attr_setstack; if not use the older calls
420 AC_CHECK_LIB(pthread, pthread_attr_setstack, 
421    AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACK, 1, 
422              [Defined if libpthread has pthread_attr_setstack ()]))
423
424 dnl test if we have posix_memalign; FreeBSD doesn't
425 AC_CHECK_FUNC(posix_memalign,
426    AC_DEFINE(HAVE_POSIX_MEMALIGN, 1,
427              [Defined if we have posix_memalign ()]))
428
429 dnl test for sigaction()
430 AC_CHECK_FUNC(sigaction,
431    AC_DEFINE(HAVE_SIGACTION, 1,
432              [Defined if we have sigaction ()]))
433
434 dnl test if we have dladdr(); we use it for debugging
435 save_cflags="$CFLAGS"
436 CFLAGS="$CFLAGS -D_GNU_SOURCE"
437 AC_CHECK_LIB(dl, dladdr,
438    AC_DEFINE(HAVE_DLADDR, 1,
439              [Defined if we have dladdr ()]))
440 CFLAGS="$save_cflags"
441
442 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
443   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
444 fi
445
446 if test "x$USE_DEBUG" = xyes; then
447    GST_INT_CFLAGS="$GST_INT_CFLAGS -g"
448 fi
449
450 dnl #############################
451 dnl # Set automake conditionals #
452 dnl #############################
453
454 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
455 dnl HAVE_ and it is likely to be easier to stick with the old name
456 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
457
458 AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
459 AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
460
461 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
462
463
464 dnl ############################
465 dnl # Set up some more defines #
466 dnl ############################
467
468 dnl set license and copyright notice
469 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
470 AC_DEFINE(GST_COPYRIGHT, "(c) 1999-2003 The GStreamer Team", [copyright message in plugins])
471 dnl package name in plugins
472 AC_ARG_WITH(package-name,
473 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
474 [case "${withval}" in
475   yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
476   no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
477   *) GST_PACKAGE="${withval}" ;;
478 esac], 
479 [GST_PACKAGE="Gstreamer"]) dnl Default value
480 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
481 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
482 dnl package origin URL
483 AC_ARG_WITH(package-origin,
484 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
485 [case "${withval}" in
486   yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
487   no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
488   *) GST_ORIGIN="${withval}" ;;
489 esac], 
490 [GST_ORIGIN="http://gstreamer.net"]) dnl Default value
491 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
492 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
493
494 dnl Set location of plugin directory
495 if test "x${prefix}" = "xNONE"; then
496   PLUGINS_DIR=${ac_default_prefix}/lib/gstreamer-$GST_MAJORMINOR
497 else
498   PLUGINS_DIR=${prefix}/lib/gstreamer-$GST_MAJORMINOR
499 fi
500 AC_DEFINE_UNQUOTED(PLUGINS_DIR, "$PLUGINS_DIR", [Define the plugin directory])
501 AC_SUBST(PLUGINS_DIR)
502
503 dnl Set location of uninstalled plugin directory
504 PLUGINS_BUILDDIR=`pwd`
505 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR, "$PLUGINS_BUILDDIR", [Define the uninstalled plugin directory])
506 AC_SUBST(PLUGINS_BUILDDIR)
507
508 dnl since glib and xml are package deps, there's no need to include their cflags
509 dnl in the pkg-config file
510
511 dnl for pkg-config
512 GST_PKG_CFLAGS=$GST_EXT_CFLAGS
513 GST_PKG_LIBS=$GST_EXT_LIBS
514 AC_SUBST(GST_PKG_CFLAGS)
515 AC_SUBST(GST_PKG_LIBS)
516
517 dnl finalize _CFLAGS and _LIBS
518 dnl add GLIB and XML if necessary to EXT_*
519 GST_CFLAGS="$GST_EXT_CFLAGS $XML_CFLAGS $GLIB_CFLAGS"
520 GST_LIBS="$GST_EXT_LIBS $XML_LIBS $GLIB_LIBS -lpopt"
521
522 dnl Private vars for libgst only
523 LIBGST_LIBS="$GST_LIBS"
524 LIBGST_CFLAGS="$GST_CFLAGS -I\$(top_srcdir) $GST_ERROR"
525 AC_SUBST(LIBGST_LIBS)
526 AC_SUBST(LIBGST_CFLAGS)
527
528 dnl Vars for everyone else
529 GST_INT_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la"
530 GST_INT_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)/include"
531
532 AC_SUBST(GST_CFLAGS, "$LIBGST_CFLAGS $GST_INT_CFLAGS")
533 AC_SUBST(GST_LIBS, "$LIBGST_LIBS $GST_INT_LIBS")
534
535 GST_PLUGIN_LDFLAGS="-module -avoid-version"
536 AC_SUBST(GST_PLUGIN_LDFLAGS, "$GST_PLUGIN_LDFLAGS")
537
538
539 dnl ##################################################
540 dnl # deps for examples from manual                  #
541 dnl ##################################################
542
543 PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0,
544                   HAVE_LIBGNOMEUI="yes", HAVE_LIBGNOMEUI="no")
545 AC_SUBST(LIBGNOMEUI_CFLAGS)
546 AC_SUBST(LIBGNOMEUI_LIBS)
547 AM_CONDITIONAL(HAVE_LIBGNOMEUI, test "x$HAVE_LIBGNOMEUI" = "xyes")
548
549 dnl ##################################################
550 dnl # Prepare informative messages to display at end #
551 dnl ##################################################
552
553 infomessages=
554
555 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
556   infomessages="$infomessages
557 *** Warning: You have configured using the --enable-plugin-builddir option.
558
559 This option is for development purposes only: binaries built with
560 it should be used with code in the build tree only.  To build an
561 installable version, use ./configure without the --enable-plugin-builddir
562 option.  Note that the autogen.sh script supplies the plugin builddir
563 option automatically -- run ./autogen.sh -- --disable-plugin-builddir to make
564 an installable build.
565
566 "
567 fi
568
569 dnl #########################
570 dnl # Make the output files #
571 dnl #########################
572
573 dnl libs/ext/Makefile
574 dnl nothing there yet !
575 AC_OUTPUT(
576 Makefile
577 include/Makefile
578 gst/Makefile
579 gst/gstconfig.h
580 gst/gstversion.h
581 gst/autoplug/Makefile
582 gst/indexers/Makefile
583 gst/elements/Makefile
584 gst/parse/Makefile
585 gst/schedulers/Makefile
586 gst/registries/Makefile
587 libs/Makefile
588 libs/gst/Makefile
589 libs/gst/bytestream/Makefile
590 libs/gst/control/Makefile
591 libs/gst/getbits/Makefile
592 libs/ext/Makefile
593 po/Makefile.in
594 tests/Makefile
595 tests/bufspeed/Makefile
596 tests/memchunk/Makefile
597 tests/muxing/Makefile
598 tests/seeking/Makefile
599 tests/sched/Makefile
600 tests/threadstate/Makefile
601 testsuite/Makefile
602 testsuite/bytestream/Makefile
603 testsuite/caps/Makefile
604 testsuite/cleanup/Makefile
605 testsuite/clock/Makefile
606 testsuite/debug/Makefile
607 testsuite/dynparams/Makefile
608 testsuite/elements/Makefile
609 testsuite/indexers/Makefile
610 testsuite/parse/Makefile
611 testsuite/plugin/Makefile
612 testsuite/refcounting/Makefile
613 testsuite/threads/Makefile
614 examples/Makefile
615 examples/autoplug/Makefile
616 examples/cutter/Makefile
617 examples/helloworld/Makefile
618 examples/helloworld2/Makefile
619 examples/launch/Makefile
620 examples/manual/Makefile
621 examples/mixer/Makefile
622 examples/pingpong/Makefile
623 examples/plugins/Makefile
624 examples/queue/Makefile
625 examples/queue2/Makefile
626 examples/queue3/Makefile
627 examples/queue4/Makefile
628 examples/thread/Makefile
629 examples/typefind/Makefile
630 examples/xml/Makefile
631 tools/Makefile
632 docs/Makefile
633 docs/version.entities
634 docs/faq/Makefile
635 docs/gst/Makefile
636 docs/libs/Makefile
637 docs/manual/Makefile
638 docs/pwg/Makefile
639 docs/plugins/Makefile
640 docs/plugins/gstreamer-plugins.types
641 docs/xsl/Makefile
642 pkgconfig/Makefile
643 stamp.h
644 pkgconfig/gstreamer.pc
645 pkgconfig/gstreamer-uninstalled.pc
646 pkgconfig/gstreamer-control.pc
647 pkgconfig/gstreamer-control-uninstalled.pc
648 gstreamer.spec,
649 echo "$infomessages", infomessages="$infomessages"
650 )
651