This patch (nearly) completes the removal of vertical events from the core.
[platform/upstream/gstreamer.git] / configure.ac
1 dnl Note: this file is now the main autoconf file
2 AC_INIT
3 AC_CONFIG_SRCDIR([gst/gstobject.h])
4
5 AC_CANONICAL_TARGET([])
6
7 AM_CONFIG_HEADER(config.h)
8
9 GST_VERSION_MAJOR=0
10 GST_VERSION_MINOR=3
11 GST_VERSION_MICRO=2
12
13 dnl we use a datestamped release tag and a fourth version ".1" number
14 dnl during CVS development
15 GST_VERSION_RELEASE=`date +%Y%m%d`
16 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO.1
17 dnl we use a normal release tag increased manually when releasing
18 dnl GST_VERSION_RELEASE=1
19 dnl GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
20
21 PACKAGE=gstreamer
22 VERSION=$GST_VERSION
23
24 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
25 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
26 AC_SUBST(PACKAGE)
27 AC_SUBST(VERSION)
28 AC_DEFINE_UNQUOTED(GST_VERSION_RELEASE, "$GST_VERSION_RELEASE")
29 AC_SUBST(GST_VERSION_RELEASE)
30
31 dnl libtool
32 GST_CURRENT=0
33 GST_REVISION=0
34 GST_AGE=0
35 GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
36
37 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
38 dnl Add parameters for aclocal
39 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
40 ACLOCAL="cat m4/*.m4 >acinclude.m4;$ACLOCAL $ACLOCAL_FLAGS"
41
42 AC_SUBST(GST_VERSION_MAJOR)
43 AC_SUBST(GST_VERSION_MINOR)
44 AC_SUBST(GST_VERSION_MICRO)
45 AC_SUBST(GST_VERSION)
46
47 AC_SUBST(GST_CURRENT)
48 AC_SUBST(GST_REVISION)
49 AC_SUBST(GST_AGE)
50 AC_SUBST(GST_LIBVERSION)
51
52 AM_MAINTAINER_MODE
53
54 AC_PROG_CC
55 AM_PROG_CC_STDC
56 AM_PROG_AS
57 AS="${CC}"
58 AC_PROG_CXX
59 AC_PROG_CXXCPP
60 AC_ISC_POSIX
61
62 dnl We disable static building for development, for time savings
63 dnl *NOTE*: dnl this line before release, so release does static too
64 dnl AM_DISABLE_STATIC
65 AC_LIBTOOL_DLOPEN
66 AM_PROG_LIBTOOL
67
68 AC_HEADER_STDC([])
69
70
71 dnl ##############################
72 dnl # Do automated configuration #
73 dnl ##############################
74
75 dnl Check for tools:
76 dnl ================
77
78 dnl modify pkg-config path
79 AC_ARG_WITH(pkg-config-path, 
80    AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
81    [export PKG_CONFIG_PATH=${withval}])
82
83 dnl Check for nasm
84 AC_PATH_PROG(NASM_PATH, nasm, no)
85 AC_SUBST(NASM_PATH)
86 if test x$NASM_PATH = xno; then
87   AC_MSG_WARN(Couldn't find nasm)
88   HAVE_NASM="no"
89 else AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
90   HAVE_NASM="yes"
91 fi
92
93 dnl check for gtk-doc
94 AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]))
95
96 if test "x$with_html_dir" = "x" ; then
97   HTML_DIR='${datadir}/gst/html'
98 else
99   HTML_DIR=$with_html_dir
100 fi
101
102 AC_SUBST(HTML_DIR)
103
104 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scangobj, true, false)
105 gtk_doc_min_version=0.6
106 if $HAVE_GTK_DOC ; then 
107     gtk_doc_version=`gtkdoc-mkdb --version`
108     AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
109     if perl <<EOF ; then
110       exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
111             ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
112 EOF
113       AC_MSG_RESULT(yes)
114    else
115       AC_MSG_RESULT(no)
116       HAVE_GTK_DOC=false
117    fi
118 fi
119 # don't you love undocumented command line options?
120 GTK_DOC_SCANOBJ="gtkdoc-scangobj --nogtkinit"
121 AC_SUBST(HAVE_GTK_DOC)
122 AC_SUBST(GTK_DOC_SCANOBJ)
123
124 dnl check for docbook tools
125 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, true, false)
126 AC_CHECK_PROG(HAVE_PDFTOPS, pdftops, true, false)
127 dnl this does not yet work properly, at least on debian -- wingo
128 HAVE_PDFXMLTEX=false
129
130 dnl check for image conversion tool
131 AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false)
132
133 dnl The following is a hack: if fig2dev doesn't display an error message
134 dnl for the desired type, we assume it supports it.
135 HAVE_FIG2DEV_PNG=false
136 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
137   fig2dev_quiet=`fig2dev -L png </dev/null 2>&1 >/dev/null`
138   if test "x$fig2dev_quiet" = "x" ; then
139     HAVE_FIG2DEV_PNG=true
140   fi
141 fi
142 HAVE_FIG2DEV_PDF=false
143 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
144   fig2dev_quiet=`fig2dev -L pdf </dev/null 2>&1 >/dev/null`
145   if test "x$fig2dev_quiet" = "x" ; then
146     HAVE_FIG2DEV_PDF=true
147   fi
148 fi
149
150
151 dnl Set up conditionals for (target) architecture:
152 dnl ==============================================
153
154 dnl Determine CPU
155 case "x${target_cpu}" in
156   xi?86 | k?) HAVE_CPU_I386=yes
157               AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
158               dnl FIXME could use some better detection
159               dnl       (ie CPUID)
160               case "x${target_cpu}" in
161                 xi386 | xi486) ;;
162                 *)             AC_DEFINE(HAVE_RDTSC) ;;
163               esac ;;
164   xpowerpc)   HAVE_CPU_PPC=yes
165               AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
166   xalpha)     HAVE_CPU_ALPHA=yes
167               AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
168   xarm*)      HAVE_CPU_ARM=yes
169               AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
170   xsparc*)    HAVE_CPU_SPARC=yes
171               AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
172   xmips*)     HAVE_CPU_MIPS=yes
173               AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
174   xhppa*)     HAVE_CPU_HPPA=yes
175               AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
176 esac
177
178 dnl Determine endianness
179 AC_C_BIGENDIAN
180
181 dnl Check for MMX-capable compiler
182 AC_MSG_CHECKING(for MMX-capable compiler)
183 AC_TRY_RUN([
184 #include "include/mmx.h"
185
186 main()
187 { movq_r2r(mm0, mm1); return 0; }
188 ],
189 [
190 HAVE_LIBMMX="yes"
191 AC_MSG_RESULT(yes)
192 ],
193 HAVE_LIBMMX="no"
194 AC_MSG_RESULT(no)
195 ,
196 HAVE_LIBMMX="no"
197 AC_MSG_RESULT(no)
198 )
199
200 dnl
201 dnl We should really use AC_SYS_LARGEFILE, but the problem is
202 dnl many of the plugins don't include "config.h".  To assure
203 dnl binary compatibility, it is necessary that all gstreamer
204 dnl code be compiled with the same sizeof(off_t), so we use
205 dnl the following crude hack.
206 dnl
207
208 dnl
209 dnl GST_CFLAGS are split up as GST_EXT_CFLAGS and GST_INT_CFLAGS
210 dnl same for libs
211 dnl this is so we can make GST_CFLAGS for external modules available
212 dnl without mixing in internal (uninstalled) CFLAGS
213 dnl
214
215 AC_MSG_CHECKING(for large file support)
216 AC_TRY_RUN([
217 #define _LARGEFILE_SOURCE
218 #define _FILE_OFFSET_BITS 64
219 #include <sys/types.h>
220 int main () { return !(sizeof(off_t) == 8); }
221 ],
222 [
223 AC_MSG_RESULT(yes)
224 GST_EXT_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
225 ],
226 [
227 AC_MSG_RESULT(no)
228 ],
229 [
230 AC_MSG_RESULT(no)
231 ])
232
233 dnl Check for essential libraries first:
234 dnl ====================================
235
236 dnl Check for glib2
237 PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
238   HAVE_GLIB2=yes,HAVE_GLIB2=no)
239 GLIB_LIBS=$GLIB2_LIBS
240 GLIB_CFLAGS=$GLIB2_CFLAGS
241 AC_SUBST(GLIB_LIBS)
242 AC_SUBST(GLIB_CFLAGS)
243
244 if test "x$HAVE_GLIB2" = "xno"; then
245   AC_MSG_ERROR([GStreamer requires GLib 2.0 to compile.])
246 fi
247
248 GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0"
249 AC_SUBST(GST_PKG_DEPS)
250   
251 LIBXML_PKG=', libxml-2.0'
252 PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
253 if test "x$HAVE_LIBXML2" = "xyes"; then
254   AC_DEFINE(HAVE_LIBXML2)
255 else
256   AC_ERROR([Need libxml2 for glib2 builds -- you should be able to do without it -- this needs fixing])
257 fi
258 AC_SUBST(LIBXML_PKG)
259 AC_SUBST(XML_LIBS)
260 AC_SUBST(XML_CFLAGS)
261
262 dnl Check for atomic.h
263 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
264 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
265 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
266 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
267 if test x$HAVE_ATOMIC_H = xyes; then
268   AC_TRY_RUN([
269 #include "asm/atomic.h"
270 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
271   ],, [
272     # Not successful
273     if test x$HAVE_ATOMIC_H = xyes; then
274       AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
275     fi
276     HAVE_ATOMIC_H=no
277   ], [
278     # Cross compiling
279     AC_MSG_RESULT(yes)
280     AC_MSG_WARN(Can't check properly for atomic reference counting.  Assuming OK.)
281   ])
282 fi
283
284 dnl ==========================================================================
285 dnl ============================= gst plugins ================================
286 dnl ==========================================================================
287 GST_PLUGIN_LDFLAGS='-module -avoid-version'
288 AC_SUBST(GST_PLUGIN_LDFLAGS)
289
290 dnl ######################################################################
291 dnl # Check command line parameters, and set shell variables accordingly #
292 dnl ######################################################################
293
294 dnl FIXME: simplify all this down using a few m4 macros
295
296 AC_ARG_ENABLE(libmmx,
297 AC_HELP_STRING([--enable-libmmx][use libmmx, if available]),
298 [case "${enableval}" in
299   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
300   no)  USE_LIBMMX=no ;;
301   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
302 esac], 
303 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
304
305 AC_ARG_ENABLE(atomic,
306 AC_HELP_STRING([--enable-atomic][use atomic reference counting header]),
307 [case "${enableval}" in
308   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
309   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
310   no)  USE_ATOMIC_H=no;;
311   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
312 esac], 
313 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
314
315 AC_ARG_ENABLE(plugin-builddir,
316 AC_HELP_STRING([--enable-plugin-builddir][allow tests/demos to use non-installed plugins]),
317 [case "${enableval}" in
318   yes) PLUGINS_USE_BUILDDIR=yes ;;
319   no)  PLUGINS_USE_BUILDDIR=no ;;
320   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
321 esac], 
322 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
323
324 AC_ARG_ENABLE(debug,
325 AC_HELP_STRING([--disable-debug][disable addition of -g debugging info]),
326 [case "${enableval}" in
327   yes) USE_DEBUG=yes ;;
328   no)  USE_DEBUG=no ;;
329   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
330 esac], 
331 [USE_DEBUG=yes]) dnl Default value
332
333 AC_ARG_ENABLE(DEBUG,
334 AC_HELP_STRING([--disable-DEBUG][disables compilation of debugging messages]),
335 [case "${enableval}" in
336   yes) ENABLE_DEBUG=yes ;;
337   no)  ENABLE_DEBUG=no ;;
338   *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
339 esac], 
340 [ENABLE_DEBUG=yes]) dnl Default value
341 if test x$ENABLE_DEBUG = xyes; then
342   AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
343 fi
344
345 AC_ARG_ENABLE(INFO,
346 AC_HELP_STRING([--disable-INFO][disables compilation of informational messages]),
347 [case "${enableval}" in
348   yes) ENABLE_INFO=yes ;;
349   no)  ENABLE_INFO=no ;;
350   *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
351 esac], 
352 [ENABLE_INFO=yes]) dnl Default value
353 if test x$ENABLE_INFO = xyes; then
354   AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
355 fi
356
357 AC_ARG_ENABLE(debug-color,
358 AC_HELP_STRING([--disable-debug-color][disables color output of DEBUG and INFO output]),
359 [case "${enableval}" in
360   yes) ENABLE_DEBUG_COLOR=yes ;;
361   no)  ENABLE_DEBUG_COLOR=no ;;
362   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
363 esac], 
364 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
365 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
366   AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
367 fi
368
369 AC_ARG_ENABLE(profiling,
370 AC_HELP_STRING([--enable-profiling][adds -pg to compiler commandline, for profiling]),
371 [case "${enableval}" in
372   yes) USE_PROFILING=yes ;;
373   no)  UES_PROFILING=no ;;
374   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
375 esac], 
376 [USE_PROFILING=no]) dnl Default value
377
378 dnl default to building registry in the source tree if we are enabling plugin build dir
379 if test "x$PLUGINS_USE_BUILDDIR" = "xyes"; then
380   GST_CONFIG_DIR=`pwd`
381 else
382   GST_CONFIG_DIR=/etc/gstreamer
383 fi
384 AC_ARG_WITH(configdir,
385 AC_HELP_STRING([--with-configdir][specify path to use for plugin and command completion registries]),
386 [case "${withval}" in
387   yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
388   no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
389   *) GST_CONFIG_DIR="${withval}" ;;
390 esac], 
391 [:]) dnl Default value
392
393 AC_ARG_ENABLE(docs-build,
394 AC_HELP_STRING([--enable-docs-build][enable building of documentation]),
395 [case "${enableval}" in
396   yes) if $HAVE_GTK_DOC; then BUILD_DOCS=yes; else AC_MSG_ERROR([you don't have gtk-doc, so don't use --docs-build]); fi; ;;
397   no)  BUILD_DOCS=no ;;
398   *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
399 esac], 
400 [BUILD_DOCS=no]) dnl Default value
401
402 dnl AC_ARG_ENABLE(plugin-docs,
403 dnl [  --enable-plugin-docs         enable the building of plugin documentation
404 dnl                                (this is currently broken, so off by default)],
405 dnl [case "${enableval}" in
406 dnl   yes) BUILD_PLUGIN_DOCS=yes ;;
407 dnl   no)  BUILD_PLUGIN_DOCS=no ;;
408 dnl   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
409 dnl esac], 
410 dnl [BUILD_PLUGIN_DOCS=no]) dnl Default value
411 BUILD_PLUGIN_DOCS=no
412
413 AC_ARG_ENABLE(tests,
414 AC_HELP_STRING([--disable-tests][disable building test apps]),
415 [case "${enableval}" in
416   yes) BUILD_TESTS=yes ;;
417   no)  BUILD_TESTS=no ;;
418   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
419 esac], 
420 [BUILD_TESTS=yes]) dnl Default value
421
422 AC_ARG_ENABLE(examples,
423 AC_HELP_STRING([--disable-examples][disable building examples]),
424 [case "${enableval}" in
425   yes) BUILD_EXAMPLES=yes ;;
426   no)  BUILD_EXAMPLES=no ;;
427   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
428 esac], 
429 [BUILD_EXAMPLES=yes]) dnl Default value
430
431 dnl Next, check for the optional components:
432 dnl ========================================
433
434 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
435 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
436 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true)
437 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
438 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_AUTOPLUG, true)
439 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
440 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_PARSE, true)
441 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
442 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TRACE, true)
443 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
444 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_REGISTRY, true)
445 GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
446
447 GST_EXT_CFLAGS="$GST_EXT_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
448
449 dnl ################################################
450 dnl # Set defines according to variables set above #
451 dnl ################################################
452
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 if test "x$USE_LIBMMX" = xyes; then
457   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
458 fi
459
460 if test "x$USE_ATOMIC_H" = xyes; then
461   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
462 fi
463
464 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
465   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
466 fi
467
468 dnl if test "x$USE_DEBUG" = xyes; then
469 dnl   CFLAGS="$CFLAGS -g"
470 dnl fi
471
472 if test "x$USE_PROFILING" = xyes; then
473 dnl  CFLAGS="$CFLAGS -pg -fprofile-arcs"
474   FOMIT_FRAME_POINTER=""
475 else
476   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
477 fi
478
479 dnl
480 dnl AC_SUBST(FOMIT_FRAME_POINTER)
481 dnl
482
483 dnl #############################
484 dnl # Set automake conditionals #
485 dnl #############################
486
487 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
488 dnl HAVE_ and it is likely to be easier to stick with the old name
489 AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
490 AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
491 AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
492 AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
493 AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
494 AM_CONDITIONAL(HAVE_LIBMMX,         test "x$USE_LIBMMX" = "xyes")
495
496 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
497
498 AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
499 AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
500
501 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
502 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
503 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
504 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
505 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
506 AM_CONDITIONAL(BUILD_PLUGIN_DOCS,   test "x$BUILD_PLUGIN_DOCS" = "xyes")
507 AM_CONDITIONAL(HAVE_PDFXMLTEX,      $HAVE_PDFXMLTEX)
508 AM_CONDITIONAL(HAVE_PDFTOPS,        $HAVE_PDFTOPS)
509 AM_CONDITIONAL(HAVE_XSLTPROC,       $HAVE_XSLTPROC)
510 AM_CONDITIONAL(HAVE_FIG2DEV_PNG,    $HAVE_FIG2DEV_PNG)
511 AM_CONDITIONAL(HAVE_FIG2DEV_PDF,    $HAVE_FIG2DEV_PDF)
512 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
513
514
515 dnl ############################
516 dnl # Set up some more defines #
517 dnl ############################
518
519 dnl Set location of configuration dir.
520 AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
521 AC_SUBST(GST_CONFIG_DIR)
522
523 dnl Set location of plugin directory
524 if test "x${prefix}" = "xNONE"; then
525   PLUGINS_DIR=${ac_default_prefix}/lib/gst
526 else
527   PLUGINS_DIR=${prefix}/lib/gst
528 fi
529 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
530 AC_SUBST(PLUGINS_DIR)
531
532 dnl Set location of uninstalled plugin directory
533 PLUGINS_BUILDDIR=`pwd`
534 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
535 AC_SUBST(PLUGINS_BUILDDIR)
536
537 dnl finalize _CFLAGS and _LIBS
538 dnl add GLIB and XML if necessary to EXT_*
539 GST_EXT_CFLAGS="$GST_EXT_CFLAGS $XML_CFLAGS $GLIB_CFLAGS"
540 GST_EXT_LIBS="$GST_EXT_LIBS $XML_LIBS $GLIB_LIBS"
541
542 dnl for pkg-config
543 GST_PKG_CFLAGS=$GST_EXT_CFLAGS
544 GST_PKG_LIBS=$GST_EXT_LIBS
545 AC_SUBST(GST_PKG_CFLAGS)
546 AC_SUBST(GST_PKG_LIBS)
547
548 dnl Private vars for libgst only
549 LIBGST_LIBS="$GST_EXT_LIBS"
550 LIBGST_CFLAGS="$GST_EXT_CFLAGS -I\$(top_srcdir)"
551 AC_SUBST(LIBGST_LIBS)
552 AC_SUBST(LIBGST_CFLAGS)
553
554 dnl Vars for everyone else
555 GST_INT_LIBS="\$(top_builddir)/gst/libgst.la"
556 GST_INT_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir)/include -I\$(top_srcdir) -Wall"
557
558 AC_SUBST(GST_CFLAGS, "$GST_EXT_CFLAGS $GST_INT_CFLAGS")
559 AC_SUBST(GST_LIBS, "$GST_EXT_LIBS $GST_INT_LIBS")
560
561 dnl AC_CONFIG_SUBDIRS(gst/cothreads)
562
563 dnl ##################################################
564 dnl # Prepare informative messages to display at end #
565 dnl ##################################################
566
567 infomessages=
568
569 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
570   infomessages="$infomessages
571 *** Warning: You have configured using the --enable-plugin-builddir option.
572
573 This option is for development purposes only: binaries built with
574 it should be used with code in the build tree only.  To build an
575 installable version, use ./configure without the --enable-plugin-builddir
576 option.  Note that the autogen.sh script supplies the plugin builddir
577 option automatically -- run ./autogen.sh --disable-plugin-buildddir to make
578 an installable build.
579
580 "
581 fi
582
583 dnl #########################
584 dnl # Make the output files #
585 dnl #########################
586
587 dnl libs/ext/Makefile
588 AC_OUTPUT(
589 Makefile
590 include/Makefile
591 m4/Makefile
592 gst/Makefile
593 gst/gstversion.h
594 gst/types/Makefile
595 gst/elements/Makefile
596 gst/autoplug/Makefile
597 gst/schedulers/Makefile
598 libs/Makefile
599 libs/gst/Makefile
600 libs/gst/bytestream/Makefile
601 libs/gst/getbits/Makefile
602 libs/gst/putbits/Makefile
603 libs/gst/control/Makefile
604 tests/Makefile
605 tests/bufspeed/Makefile
606 tests/memchunk/Makefile
607 tests/muxing/Makefile
608 tests/sched/Makefile
609 testsuite/Makefile
610 testsuite/bytestream/Makefile
611 testsuite/caps/Makefile
612 testsuite/cleanup/Makefile
613 testsuite/elements/Makefile
614 testsuite/plugin/Makefile
615 examples/Makefile
616 examples/autoplug/Makefile
617 examples/helloworld/Makefile
618 examples/helloworld2/Makefile
619 examples/launch/Makefile
620 examples/queue/Makefile
621 examples/queue2/Makefile
622 examples/queue3/Makefile
623 examples/queue4/Makefile
624 examples/thread/Makefile
625 examples/mixer/Makefile
626 examples/cutter/Makefile
627 examples/launch/Makefile
628 examples/xml/Makefile
629 examples/plugins/Makefile
630 examples/typefind/Makefile
631 examples/mixer/Makefile
632 tools/Makefile
633 docs/Makefile
634 docs/gst/Makefile
635 docs/gst/gstreamer.types
636 docs/libs/Makefile
637 docs/plugins/Makefile
638 docs/plugins/gstreamer-plugins.types
639 docs/manual/Makefile
640 docs/fwg/Makefile
641 docs/xsl/Makefile
642 stamp.h
643 gstreamer.pc
644 gstreamer-uninstalled.pc
645 gstreamer.spec,
646 echo "$infomessages", infomessages="$infomessages"
647 )