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