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