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