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