default location for configdir is now set to the build dir if plugin-builddir is...
[platform/upstream/gstreamer.git] / configure.base
1 dnl Note: this file is generated from configure.base by autogen.sh
2 SUBSTFOR configure.ac:AC_INIT
3 SUBSTFOR configure.ac:AC_CONFIG_SRCDIR([gst/gstobject.h])
4 SUBSTFOR configure.in:AC_INIT(gst/gstobject.h)
5
6 SUBSTFOR configure.ac:AC_CANONICAL_TARGET([])
7 SUBSTFOR configure.in:AC_CANONICAL_SYSTEM
8
9 AM_CONFIG_HEADER(config.h)
10
11 GST_VERSION_MAJOR=0
12 GST_VERSION_MINOR=2
13 GST_VERSION_MICRO=1
14 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
15
16 PACKAGE=gstreamer
17 VERSION=$GST_VERSION
18
19 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
20 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
21 AC_SUBST(PACKAGE)
22 AC_SUBST(VERSION)
23
24 dnl libtool
25 GST_CURRENT=0
26 GST_REVISION=0
27 GST_AGE=0
28 GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
29
30 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
31 dnl Add parameters for aclocal
32 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
33 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
34
35 AC_SUBST(GST_VERSION_MAJOR)
36 AC_SUBST(GST_VERSION_MINOR)
37 AC_SUBST(GST_VERSION_MICRO)
38 AC_SUBST(GST_VERSION)
39
40 AC_SUBST(GST_CURRENT)
41 AC_SUBST(GST_REVISION)
42 AC_SUBST(GST_AGE)
43 AC_SUBST(GST_LIBVERSION)
44
45
46 AM_MAINTAINER_MODE
47
48 AC_PROG_CC
49 AC_PROG_CXX
50 AC_PROG_CXXCPP
51 AC_ISC_POSIX
52 SUBSTFOR configure.ac:AC_HEADER_STDC([])
53 SUBSTFOR configure.in:AC_STDC_HEADERS
54 AC_ARG_PROGRAM
55
56 dnl We disable static building for development, for time savings
57 dnl *NOTE*: dnl this line before release, so release does static too
58 AM_DISABLE_STATIC
59 AC_LIBTOOL_DLOPEN
60 AM_PROG_LIBTOOL
61
62 CFLAGS=""
63
64 dnl This is used for the -config script...
65 builddir=`pwd`
66 AC_SUBST(builddir)
67
68 dnl ##############################
69 dnl # Do automated configuration #
70 dnl ##############################
71
72 dnl Check for tools:
73 dnl ================
74
75 dnl Check for nasm
76 AC_PATH_PROG(NASM_PATH, nasm, no)
77 AC_SUBST(NASM_PATH)
78 if test x$NASM_PATH = xno; then
79   AC_MSG_WARN(Couldn't find nasm)
80   HAVE_NASM="no"
81 else
82   AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
83   HAVE_NASM="yes"
84 fi
85
86 dnl check for gtkdoc
87 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
88 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scanobj, :, false)
89 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scan, :, false)
90 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mktmpl, :, false)
91 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, :, false)
92 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkhtml, :, false)
93 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-fixxref, :, false)
94
95 dnl check for docbook tools
96 AC_CHECK_PROG(HAVE_DB2HTML, db2html, true, false)
97 AC_CHECK_PROG(HAVE_DB2PS, db2ps, true, false)
98 AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, true, false)
99
100 dnl check for image conversion tool
101 AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false)
102
103 dnl The following is a hack: if fig2dev doesn't display an error message
104 dnl for the desired type, we assume it supports it.
105 HAVE_FIG2DEV_PNG=false
106 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
107   fig2dev_quiet=`fig2dev -L png </dev/null 2>&1 >/dev/null`
108   if test "x$fig2dev_quiet" = "x" ; then
109     HAVE_FIG2DEV_PNG=true
110   fi
111 fi
112 HAVE_FIG2DEV_EPS=false
113 if test "x$HAVE_FIG2DEV" = "xtrue" ; then
114   fig2dev_quiet=`fig2dev -L eps </dev/null 2>&1 >/dev/null`
115   if test "x$fig2dev_quiet" = "x" ; then
116     HAVE_FIG2DEV_EPS=true
117   fi
118 fi
119
120
121 dnl Set up conditionals for (target) architecture:
122 dnl ==============================================
123
124 dnl Determine CPU
125 case "x${target_cpu}" in
126   xi?86 | k?) HAVE_CPU_I386=yes
127               AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
128               dnl FIXME could use some better detection
129               dnl       (ie CPUID)
130               case "x${target_cpu}" in
131                 xi386 | xi486) ;;
132                 *)             AC_DEFINE(HAVE_RDTSC) ;;
133               esac ;;
134   xpowerpc)   HAVE_CPU_PPC=yes
135               AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
136   xalpha)     HAVE_CPU_ALPHA=yes
137               AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
138   xarm*)      HAVE_CPU_ARM=yes
139               AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
140   xsparc*)    HAVE_CPU_SPARC=yes
141               AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
142   xmips*)     HAVE_CPU_MIPS=yes
143               AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
144   xhppa*)     HAVE_CPU_HPPA=yes
145               AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
146 esac
147
148 dnl Determine endianness
149 AC_C_BIGENDIAN
150
151 dnl Check for MMX-capable compiler
152 AC_MSG_CHECKING(for MMX-capable compiler)
153 AC_TRY_RUN([
154 #include "include/mmx.h"
155
156 main()
157 { movq_r2r(mm0, mm1); return 0; }
158 ],
159 [
160 HAVE_LIBMMX="yes"
161 AC_MSG_RESULT(yes)
162 ],
163 HAVE_LIBMMX="no"
164 AC_MSG_RESULT(no)
165 ,
166 HAVE_LIBMMX="no"
167 AC_MSG_RESULT(no)
168 )
169
170 dnl
171 dnl We should really use AC_SYS_LARGEFILE, but the problem is
172 dnl many of the plugins don't include "config.h".  To assure
173 dnl binary compatibility, it is necessary that all gstreamer
174 dnl code be compiled with the same sizeof(off_t), so we use
175 dnl the following crude hack.
176 dnl
177
178 AC_MSG_CHECKING(for large file support)
179 AC_TRY_RUN([
180 #define _LARGEFILE_SOURCE
181 #define _FILE_OFFSET_BITS 64
182 #include <sys/types.h>
183 int main () { return !(sizeof(off_t) == 8); }
184 ],
185 [
186 AC_MSG_RESULT(yes)
187 CORE_CFLAGS="$CORE_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
188 GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
189 ],
190 [
191 AC_MSG_RESULT(no)
192 ],
193 [
194 AC_MSG_RESULT(no)
195 ])
196
197
198 dnl Check for essential libraries first:
199 dnl ====================================
200
201 dnl Check for glib2
202 GST_CHECK_FEATURE(GLIB2, [use of glib-2.0 and GObject], , [
203   PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
204     HAVE_GLIB2=yes,HAVE_GLIB2=no)
205   AC_SUBST(GLIB2_LIBS)
206   AC_SUBST(GLIB2_CFLAGS)
207 ], disabled, [
208   CORE_LIBS="$CORE_LIBS $GLIB2_LIBS"
209   CORE_CFLAGS="$CORE_CFLAGS $GLIB2_CFLAGS"
210
211   AC_DEFINE(USE_GLIB2)
212   GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS -DUSE_GLIB2"
213 ])
214 AC_SUBST(USE_GLIB2)
215
216 dnl FIXME: check for gtk2 and gnome2 - these conditionals are currently
217 dnl always false.
218 AM_CONDITIONAL(USE_GTK2, test "x$USE_GTK2" = "xyes")
219 AC_SUBST(USE_GTK2)
220 AM_CONDITIONAL(USE_GNOME2, test "x$USE_GNOME2" = "xyes")
221 AC_SUBST(USE_GNOME2)
222
223 if test x$USE_GLIB2 = xno; then
224   dnl Check for glib and gtk
225   AM_PATH_GLIB(1.2.0,,
226               AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
227               glib gmodule gthread)
228   AM_PATH_GTK(1.2.0,,
229               AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
230
231   CORE_LIBS="$CORE_LIBS $GLIB_LIBS $GTK_LIBS"
232   CORE_CFLAGS="$CORE_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS"
233 fi
234
235
236 dnl Check for libxml
237 AC_PATH_PROG(XML_CONFIG, xml-config, no)
238 if test x$XML_CONFIG = xno; then
239   AC_MSG_ERROR(Couldn't find xml-config)
240 fi
241 xml_save_LIBS=$LIBS
242 xml_save_CFLAGS=$CFLAGS
243 XML_LIBS=`xml-config --libs`
244 XML_CFLAGS=`xml-config --cflags`
245 LIBS=$XML_LIBS
246 CFLAGS=$XML_CFLAGS
247 AC_CHECK_LIB(xml, xmlDocGetRootElement, ,
248   [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
249   $XML_LIBS)
250 LIBS=$xml_save_LIBS
251 CFLAGS=$xml_save_CFLAGS
252 AC_SUBST(XML_LIBS)
253 AC_SUBST(XML_CFLAGS)
254 CORE_LIBS="$CORE_LIBS $XML_LIBS"
255 CORE_CFLAGS="$CORE_CFLAGS $XML_CFLAGS"
256
257
258 dnl ==========================================================================
259 dnl ========================= Macro definitions ==============================
260 dnl ==========================================================================
261
262 dnl These macros should be moved out to separate files (acinclude.m4?), but
263 dnl can't currently be because of the SUBSTFOR magic.
264
265 dnl Perform a check for existence of ARTS
266 dnl Richard Boulton <richard-alsa@tartarus.org>
267 dnl Last modification: 26/06/2001
268 dnl GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
269 dnl                   DEPENDENT-PLUGINS, TEST-FOR-FEATURE)
270 dnl
271 dnl This check was written for GStreamer: it should be renamed and checked
272 dnl for portability if you decide to use it elsewhere.
273 dnl
274 AC_DEFUN(GST_CHECK_ARTS,
275 [
276 dnl Set the flags
277 ARTS_LIBS="-L/usr/local/lib -L/usr/lib -lmcop -lartsflow -lartsflow_idl"
278 ARTS_CFLAGS="-I/usr/local/include/arts -I/usr/include/kde/arts -I/usr/include/arts"
279 ARTS_MCOPFLAGS=$ARTS_CFLAGS
280 dnl There's no arts-config script, so we make a guess based on the artsc-config
281 AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
282 if test x$ARTSC_CONFIG = xyes; then
283   ARTS_ARTSC_CFLAGS=`artsc-config --cflags | sed 's/artsc/arts/g'`
284   ARTS_CFLAGS="$ARTS_CFLAGS $ARTS_ARTSC_CFLAGS"
285   ARTS_MCOPFLAGS="$ARTS_MCOPFLAGS $ARTS_ARTSC_CFLAGS"
286 fi
287 AC_SUBST(ARTS_LIBS)
288 AC_SUBST(ARTS_CFLAGS)
289 AC_SUBST(ARTS_MCOPFLAGS)
290
291 dnl Now check if it exists
292 SUBSTFOR configure.ac:AC_LANG_PUSH(C++)
293 SUBSTFOR configure.in:AC_LANG_SAVE
294 SUBSTFOR configure.in:AC_LANG_CPLUSPLUS
295 HAVE_ARTS=yes
296 dnl FIXME: Can't get this test to pass, so commented it out.  Rely on header check.
297 dnl AC_CHECK_LIB(artsflow, convert_stereo_2float_i16le, :, HAVE_ARTS=no, $LIBS)
298
299 dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
300 dnl FIXME: ensure only suitable flags result from artsc-config --cflags
301 CPPFLAGS="$CPPFLAGS $ARTS_CFLAGS"
302 AC_CHECK_HEADER(artsflow.h, :, HAVE_ARTS=no)
303
304 SUBSTFOR configure.ac:AC_LANG_POP(C++)
305 SUBSTFOR configure.in:AC_LANG_RESTORE
306 dnl Check for the idl generator
307 AC_CHECK_PROG(HAVE_MCOPIDL, mcopidl, yes, no)
308 if test x$HAVE_MCOPIDL = xno; then
309   HAVE_ARTS=no
310 fi
311 ])
312
313 dnl ==========================================================================
314 dnl ========================= End macro definitions ==========================
315 dnl ==========================================================================
316
317
318 dnl Next, check for the optional libraries:
319 dnl =======================================
320
321
322 dnl ***** ESound *****
323 GST_CHECK_FEATURE(LIBESD, [esound plugins], esdsrc esdsink, [
324   AM_PATH_ESD(0.2.12, HAVE_LIBESD=yes, HAVE_LIBESD=no)
325 ])
326
327 dnl Check for artsc
328 GST_CHECK_FEATURE(ARTSC, [artsd plugins], artsdsink, [GST_CHECK_ARTSC()])
329
330 dnl Check for artsc
331 GST_CHECK_FEATURE(ARTS, [arts plugins], arts, [GST_CHECK_ARTS()])
332
333 dnl Check for xmms
334 GST_CHECK_FEATURE(LIBXMMS, [xmms plugin], xmms, [
335   AM_PATH_XMMS(0.1.0, HAVE_LIBXMMS=yes, HAVE_LIBXMMS=no)
336 ], disabled)
337
338 dnl Check for alsa
339 GST_CHECK_FEATURE(ALSA, [alsa plugins], gstalsa, [
340   AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
341 ])
342 if test x$HAVE_ALSA = xno; then
343   unset USE_ALSA
344   ALSA_CFLAGS=
345   ALSA_LIBS=
346 fi
347
348 dnl Check for libaudiofile
349 GST_CHECK_FEATURE(LIBAUDIOFILE, [use gdk pixbuf], afsink afsrc, [
350   GST_CHECK_CONFIGPROG(LIBAUDIOFILE, audiofile-config)
351 ])
352
353 dnl Check for libgdk-pixbuf
354 dnl FIXME: not sure that this is still used anywhere.
355 GST_CHECK_FEATURE(GDK_PIXBUF, [use gdk pixbuf], , [
356   GST_CHECK_CONFIGPROG(GDK_PIXBUF, gdk-pixbuf-config)
357 ])
358
359 if test x$USE_GLIB2 = xyes; then
360   dnl we don't support gnome/gtk with glib2.0 yet
361   GNOME_LIBS=
362   GNOME_CFLAGS=
363   HAVE_GNOME=no
364   AC_MSG_WARN(gnome disabled for glib2.0)
365 else
366   dnl Check for libgnome
367   GST_CHECK_CONFIGPROG(GNOME, gnome-config, gnome gnomeui)
368 fi
369
370 dnl Check for libghttp
371 GST_CHECK_FEATURE(LIBGHTTP, [libghttp plugins], gsthttpsrc, [
372   dnl FIXME: need to check for header
373   GHTTP_LIBS=
374   GST_HTTPSRC_GET_TYPE=
375   if test x$USE_GLIB2 = xyes; then
376     AC_MSG_WARN(ghttp disabled for glib2.0)
377   else
378     AC_CHECK_LIB(ghttp, ghttp_request_new,
379       [GHTTP_LIBS="-lghttp"
380        GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
381        HAVE_LIBGHTTP=yes
382       ], :, $LIBS)
383   fi
384   AC_SUBST(GHTTP_LIBS)
385   AC_SUBST(GST_HTTPSRC_GET_TYPE)
386 ])
387
388 dnl Check for libglade
389 HAVE_LIBGLADE_GNOME="no"
390 if test x$USE_GLIB2 = xyes; then
391   dnl no glade for glib2.0
392   LIBGLADE_GNOME_LIBS=
393   LIBGLADE_GNOME_CFLAGS=
394   AC_MSG_WARN(libglade disabled for glib2.0)
395 else
396   AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no)
397   if test x$LIBGLADE_CONFIG_PATH = xno; then
398     AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
399     LIBGLADE_GNOME_LIBS=
400     LIBGLADE_GNOME_CFLAGS=
401   else
402     LIBGLADE_GNOME_LIBS=`libglade-config --libs gnome`
403     LIBGLADE_GNOME_CFLAGS=`libglade-config --cflags gnome`
404     libglade_save_CFLAGS="$CFLAGS"
405     libglade_save_LIBS="$LIBS"
406     CFLAGS="$CFLAGS $LIBGLADE_GNOME_CFLAGS $GTK_CFLAGS"
407     LIBS="$LIBS $LIBGLADE_GNOME_LIBS $GTK_LIBS"
408     AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
409                 HAVE_LIBGLADE_GNOME="yes",
410                 AC_MSG_WARN(
411       [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
412              )
413     CFLAGS="$libglade_save_CFLAGS"
414     LIBS="$libglade_save_LIBS"
415   fi
416 fi
417 AC_SUBST(LIBGLADE_GNOME_LIBS)
418 AC_SUBST(LIBGLADE_GNOME_CFLAGS)
419
420 dnl Check for Gnome VFS
421 HAVE_GNOME_VFS="no"
422 if test x$USE_GLIB2 = xyes; then
423   VFS_LIBS=
424   VFS_CFLAGS=
425   AC_MSG_WARN(Gnome-VFS disabled for glib2.0)
426 else
427   AC_MSG_CHECKING(for Gnome VFS)
428   if gnome-config --libs vfs > /dev/null 2>&1; then
429         HAVE_GNOME_VFS="yes"
430         AC_MSG_RESULT(found)
431         VFS_LIBS="`gnome-config --libs vfs`"
432         VFS_CFLAGS="`gnome-config --cflags vfs`"
433   else
434         AC_MSG_WARN(Did not find Gnome-VFS installed)
435         VFS_LIBS=
436         VFS_CFLAGS=
437   fi
438 fi
439 AC_SUBST(VFS_LIBS)
440 AC_SUBST(VFS_CFLAGS)
441
442 dnl Check for Avifile
443 HAVE_AVIFILE="no"
444 AC_MSG_CHECKING(for Avifile)
445 if avifile-config --libs > /dev/null 2>&1; then
446         HAVE_AVIFILE="yes"
447         AC_MSG_RESULT(found)
448 else
449         AC_MSG_WARN(Did not find Avifile installed)
450 fi
451 AVIFILE_LIBS="`avifile-config --libs`"
452 AVIFILE_CFLAGS="`avifile-config --cflags`"
453 AC_SUBST(AVIFILE_LIBS)
454 AC_SUBST(AVIFILE_CFLAGS)
455
456 dnl Check for atomic.h
457 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
458 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
459 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
460 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
461 if test x$HAVE_ATOMIC_H = xyes; then
462   AC_TRY_RUN([
463 #include "asm/atomic.h"
464 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
465   ],, [
466     # Not successful
467     if test x$HAVE_ATOMIC_H = xyes; then
468       AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
469     fi
470     HAVE_ATOMIC_H=no
471   ], [
472     # Cross compiling
473     AC_MSG_RESULT(yes)
474     AC_MSG_WARN(Can't check properly for atomic reference counting.  Assuming OK.)
475   ])
476 fi
477
478
479 dnl Check for X11 extensions
480 AC_PATH_XTRA
481 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
482   AC_MSG_ERROR(can not find X11)
483 fi
484 AC_SUBST(X_CFLAGS)
485 AC_SUBST(X_PRE_LIBS)
486 AC_SUBST(X_EXTRA_LIBS)
487 AC_SUBST(X_LIBS)
488
489
490 dnl Check for the Xv library
491 xvsave_LIBS=${LIBS}
492 AC_CHECK_LIB(Xv, XvQueryExtension,
493   HAVE_LIBXV=yes,
494   HAVE_LIBXV=no,
495   $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS
496 )
497 LIBS=${xvsave_LIBS}
498 AC_CHECK_HEADER(X11/extensions/Xv.h, :, HAVE_LIBXV=no)
499 AC_CHECK_HEADER(X11/extensions/Xvlib.h, :, HAVE_LIBXV=no)
500
501 dnl Check for OSS audio
502 AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS=yes, HAVE_OSS=no)
503
504 dnl Check for xaudio
505 AC_CHECK_HEADER(xaudio/decoder.h,
506   AC_DEFINE(HAVE_XAUDIO, 1, [Define if xaudio is available])
507   HAVE_XAUDIO="yes",
508   AC_MSG_WARN(
509 ***** NOTE: These plugins won't be built: gstxa
510 )
511   HAVE_XAUDIO="no",
512 )
513
514 dnl Check for libmad
515 AC_MSG_CHECKING(MAD library)
516 AC_CHECK_LIB(mad, mad_decoder_finish,
517   HAVE_LIBMAD=yes
518   AC_DEFINE(HAVE_LIBMAD, 1, [Define if libmad is available]),
519   AC_MSG_WARN(
520 ***** NOTE: These plugins won't be built: mad
521 )
522   HAVE_LIBMAD=no,
523 )
524
525 dnl Check for libmikmod
526 AC_MSG_CHECKING(Mikmod library)
527 AC_CHECK_LIB(mikmod, MikMod_Init,
528   HAVE_LIBMIKMOD=yes
529   AC_DEFINE(HAVE_LIBMIKMOD, 1, [Define if libmikmod is available]),
530   AC_MSG_WARN(
531 ***** NOTE: These plugins won't be built: mikmod
532 )
533   HAVE_LIBMIKMOD=no,
534 )
535
536
537 dnl Check for libvorbis
538 AC_MSG_CHECKING(Vorbis library)
539 AC_CHECK_LIB(vorbis, ogg_sync_init,
540   HAVE_VORBIS=yes
541   AC_DEFINE(HAVE_VORBIS, 1, [Define if vorbis library is available]),
542   AC_MSG_WARN(
543 ***** NOTE: These plugins won't be built: vorbisdec vorbisenc
544 )
545   HAVE_VORBIS=no,
546 )
547
548 dnl Check for libjpeg
549 AC_MSG_CHECKING(libjpeg library)
550 AC_CHECK_LIB(jpeg, jpeg_set_defaults,
551   HAVE_LIBJPEG=yes
552   AC_DEFINE(HAVE_LIBJPEG, 1, [Define if libjpeg is available]),
553   AC_MSG_WARN(
554 ***** NOTE: These plugins won't be built: jpegdec jpegenc
555 )
556   HAVE_LIBJPEG=no,
557 )
558
559 dnl Check for libHermes
560 AC_MSG_CHECKING(Hermes library)
561 AC_CHECK_LIB(Hermes, Hermes_ConverterInstance,
562   HAVE_LIBHERMES=yes
563   AC_DEFINE(HAVE_LIBHERMES, 1, [Define if Hermes library is available]),
564   AC_MSG_WARN(
565 ***** NOTE: These plugins won't be built: colorspace
566 )
567   HAVE_LIBHERMES=no,
568 )
569 AC_CHECK_HEADER(Hermes/Hermes.h, :, HAVE_LIBHERMES=no)
570
571 dnl Check for libgsm
572 AC_MSG_CHECKING(GSM library)
573 AC_CHECK_LIB(gsm, gsm_create, HAVE_LIBGSM=yes, HAVE_LIBGSM=no,)
574 GSM_CFLAGS=
575 GSM_LIBS=-lgsm
576 AC_CHECK_HEADER(gsm.h, :, 
577   GSM_CFLAGS="$GSM_CFLAGS -DGSM_HEADER_IN_SUBDIR"
578   AC_CHECK_HEADER(gsm/gsm.h, :, HAVE_LIBGSM=no)
579 )
580 AC_SUBST(GSM_CFLAGS)
581 AC_SUBST(GSM_LIBS)
582
583 if test "x$HAVE_LIBGSM" = "xyes"; then
584   AC_DEFINE(HAVE_LIBGSM, 1, [Define if GSM library is available])
585 else
586   AC_MSG_WARN(
587 ***** NOTE: These plugins won't be built: gsmdec, gsmenc
588 )
589 fi
590
591 dnl Check for cdparanoia
592 AC_MSG_CHECKING(CDparanoia library)
593 HAVE_CDPARANOIA=yes
594 AC_CHECK_LIB(cdda_interface, cdda_open, : , HAVE_CDPARANOIA=no, )
595 AC_CHECK_HEADER(cdda_interface.h, :, HAVE_CDPARANOIA=no)
596 AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
597 AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
598
599 dnl Check for liblame
600 AC_MSG_CHECKING(LAME library)
601 AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
602 AC_CHECK_HEADER(lame/lame.h, :, HAVE_LIBLAME=no)
603
604 dnl Check for libshout
605 AC_MSG_CHECKING(Shout library)
606 AC_CHECK_LIB(shout, shout_init_connection, HAVE_LIBSHOUT=yes, HAVE_LIBSHOUT=no, )
607 AC_CHECK_HEADER(shout/shout.h, :, HAVE_LIBSHOUT=no)
608
609 dnl Check for mpeg2dec
610 AC_MSG_CHECKING(mpeg2dec library)
611 AC_CHECK_LIB(mpeg2, mpeg2_init, HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no, )
612 AC_CHECK_HEADER(mpeg2dec/mpeg2.h, :, HAVE_MPEG2DEC=no)
613
614 dnl Check for a52dec
615 AC_MSG_CHECKING(a52dec library)
616 AC_CHECK_LIB(a52, a52_init, HAVE_A52DEC=yes, HAVE_A52DEC=no, -lm)
617 AC_CHECK_HEADER(a52dec/a52.h, :, HAVE_A52DEC=no)
618
619 dnl Check for sidplay
620 AC_PATH_LIBSIDPLAY
621
622 dnl Check for FLAC
623 dnl thomas : checking for compile with main instead of actual function,
624 dnl since that made autoconf break (for version 2.13)
625 AC_MSG_CHECKING(FLAC library)
626 AC_CHECK_LIB(FLAC, main, HAVE_FLACLIB=yes, HAVE_FLACLIB=no, -lm)
627 AC_CHECK_HEADER(FLAC/all.h, :, HAVE_FLACLIB=no)
628
629 dnl Check for librtp
630 AC_MSG_CHECKING(rtp library)
631 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
632 AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
633 AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
634 AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
635
636 dnl Check for libraw1394
637 AC_MSG_CHECKING(raw1394 library)
638 AC_CHECK_LIB(raw1394, raw1394_get_handle, HAVE_RAW1394=yes, HAVE_RAW1394=no, )
639 AC_CHECK_HEADER(libraw1394/raw1394.h, :, HAVE_RAW1394=no)
640
641 dnl Check for libdv
642 AC_MSG_CHECKING(libdv)
643 AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
644 libdvcheck_save_CPPFLAGS="$CPPFLAGS"
645 CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
646 AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
647 CPPFLAGS="$libdvcheck_save_CPPFLAGS"
648
649 dnl Check for aalib
650 AC_MSG_CHECKING(aalib)
651 AC_CHECK_LIB(aa, aa_init, HAVE_LIBAA=yes, HAVE_LIBAA=no, )
652 AC_CHECK_HEADER(aalib.h, :, HAVE_LIBAA=no)
653
654 dnl Check for quicktime
655 AC_MSG_CHECKING(openquicktime)
656 AC_CHECK_LIB(openquicktime, quicktime_init, HAVE_LIBOPENQUICKTIME=yes, HAVE_LIBOPENQUICKTIME=no, )
657 AC_CHECK_HEADER(openquicktime/openquicktime.h, :, HAVE_LIBOPENQUICKTIME=no)
658
659
660 dnl check if css-auth.c exists (FIXME)
661 AC_MSG_CHECKING(DVD CSS code)
662 if test -f plugins/dvdsrc/css-auth.c
663 then
664   AC_MSG_RESULT(yes)
665   HAVE_CSSAUTH="yes"
666 else
667   AC_MSG_RESULT(no)
668   HAVE_CSSAUTH="no"
669 fi
670
671 dnl Check for SDL library
672 AC_MSG_CHECKING(SDL library)
673 HAVE_LIBSDL=yes
674 if sdl-config --libs > /dev/null 2>&1; then
675   SDL_VERSION=`sdl-config --version`
676   AC_MSG_RESULT([found (version $SDL_VERSION)])
677   SDL_LIBS="`sdl-config --libs`"
678   SDL_CFLAGS="`sdl-config --cflags`"
679   AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
680   dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
681   dnl Assume only suitable flags result from artsc-config --cflags
682   sdlcheck_save_CPPFLAGS="$CPPFLAGS"
683   CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
684   AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
685   CPPFLAGS="$sdlcheck_save_CPPFLAGS"
686   AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
687 else
688   AC_MSG_RESULT(not found)
689   HAVE_LIBSDL=no
690   SDL_LIBS=
691   SDL_CFLAGS=
692 fi
693 AC_SUBST(SDL_LIBS)
694 AC_SUBST(SDL_CFLAGS)
695
696 if test "x$HAVE_LIBSDL" = "xno"; then
697   AC_MSG_WARN(
698 ***** NOTE: These plugins won't be built: sdlvideosink
699 )
700 fi
701
702
703 dnl Check for linux/cdrom.h
704 AC_CHECK_HEADER(linux/cdrom.h,
705   HAVE_LINUX_CDROM=yes, HAVE_LINUX_CDROM=no
706 )
707
708 dnl Check for linux/videodev.h
709 AC_CHECK_HEADER(linux/videodev.h,
710   HAVE_LINUX_VIDEODEV=yes, HAVE_LINUX_VIDEODEV=no
711 )
712
713
714 dnl ######################################################################
715 dnl # Check command line parameters, and set shell variables accordingly #
716 dnl ######################################################################
717
718 AC_ARG_ENABLE(libmmx,
719 [  --enable-libmmx              use libmmx, if available],
720 [case "${enableval}" in
721   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
722   no)  USE_LIBMMX=no ;;
723   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
724 esac], 
725 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
726
727 AC_ARG_ENABLE(atomic,
728 [  --enable-atomic              use atomic reference counting header],
729 [case "${enableval}" in
730   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
731   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
732   no)  USE_ATOMIC_H=no;;
733   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
734 esac], 
735 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
736
737 AC_ARG_ENABLE(plugin-builddir,
738 [  --enable-plugin-builddir     allow tests/demos to use non-installed plugins ],
739 [case "${enableval}" in
740   yes) PLUGINS_USE_BUILDDIR=yes ;;
741   no)  PLUGINS_USE_BUILDDIR=no ;;
742   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
743 esac], 
744 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
745
746 AC_ARG_ENABLE(debug,
747 [  --enable-debug               compile with -g debugging info],
748 [case "${enableval}" in
749   yes) USE_DEBUG=yes ;;
750   no)  USE_DEBUG=no ;;
751   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
752 esac], 
753 [USE_DEBUG=no]) dnl Default value
754
755 AC_ARG_ENABLE(DEBUG,
756 [  --enable-DEBUG               compiles in a large number of debugging messages],
757 [case "${enableval}" in
758   yes) ENABLE_DEBUG=yes ;;
759   no)  ENABLE_DEBUG=no ;;
760   *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
761 esac], 
762 [ENABLE_DEBUG=no]) dnl Default value
763 if test x$ENABLE_DEBUG = xyes; then
764   AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
765 fi
766
767 AC_ARG_ENABLE(INFO,
768 [  --disable-INFO               disables compilation of informational messages],
769 [case "${enableval}" in
770   yes) ENABLE_INFO=yes ;;
771   no)  ENABLE_INFO=no ;;
772   *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
773 esac], 
774 [ENABLE_INFO=yes]) dnl Default value
775 if test x$ENABLE_INFO = xyes; then
776   AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
777 fi
778
779 AC_ARG_ENABLE(debug-color,
780 [  --disable-debug-color        disables color output of DEBUG and INFO output],
781 [case "${enableval}" in
782   yes) ENABLE_DEBUG_COLOR=yes ;;
783   no)  ENABLE_DEBUG_COLOR=no ;;
784   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
785 esac], 
786 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
787 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
788   AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
789 fi
790
791 AC_ARG_ENABLE(profiling,
792 [  --enable-profiling           adds -pg to compiler commandline, for profiling],
793 [case "${enableval}" in
794   yes) USE_PROFILING=yes ;;
795   no)  UES_PROFILING=no ;;
796   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
797 esac], 
798 [USE_PROFILING=no]) dnl Default value
799
800 dnl default to building registry in the source tree if we are enabling plugin build dir
801 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
802   GST_CONFIG_DIR=$builddir
803 else
804   GST_CONFIG_DIR=/etc/gstreamer
805 fi
806 AC_ARG_WITH(configdir,
807 [  --with-configdir             specify path to use for configdir],
808 [case "${withval}" in
809   yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
810   no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
811   *) GST_CONFIG_DIR="${withval}" ;;
812 esac], 
813 [:]) dnl Default value
814
815 dnl Default value
816 GST_WIN32_LIBDIR="/usr/lib/win32"
817 AC_ARG_WITH(win32_libdir,
818 [  --with-win32-libdir          specify location for win32 DLLs],
819 [case "${withval}" in
820   yes) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
821   no) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
822   *) GST_WIN32_LIBDIR="${withval}" ;;
823 esac],
824 [:]) dnl Default value
825
826 AC_ARG_ENABLE(docs-build,
827 [  --enable-docs-build          enable building of documentation],
828 [case "${enableval}" in
829   yes) BUILD_DOCS=yes ;;
830   no)  BUILD_DOCS=no ;;
831   *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
832 esac], 
833 [BUILD_DOCS=no]) dnl Default value
834
835 AC_ARG_ENABLE(plugin-docs,
836 [  --enable-plugin-docs         enable the building of plugin documentation
837                                (this is currently broken, so off by default)],
838 [case "${enableval}" in
839   yes) BUILD_PLUGIN_DOCS=yes ;;
840   no)  BUILD_PLUGIN_DOCS=no ;;
841   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
842 esac], 
843 [BUILD_PLUGIN_DOCS=no]) dnl Default value
844
845 AC_ARG_ENABLE(tests,
846 [  --disable-tests              disable building test apps],
847 [case "${enableval}" in
848   yes) BUILD_TESTS=yes ;;
849   no)  BUILD_TESTS=no ;;
850   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
851 esac], 
852 [BUILD_TESTS=yes]) dnl Default value
853
854 AC_ARG_ENABLE(examples,
855 [  --disable-examples           disable building examples],
856 [case "${enableval}" in
857   yes) BUILD_EXAMPLES=yes ;;
858   no)  BUILD_EXAMPLES=no ;;
859   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
860 esac], 
861 [BUILD_EXAMPLES=yes]) dnl Default value
862
863 dnl Next, check for the optional components:
864 dnl ========================================
865
866
867 AC_DEFUN(GST_SUBSYSTEM_DISABLE,
868 [dnl
869 dnl Add a subsystem --disable flag and all the necessary symbols and substitions
870 dnl
871 AC_ARG_ENABLE(translit([$1], A-Z, a-z), 
872 [  ]builtin(format, --disable-%-17s  disable %s, translit([$1], A-Z, a-z), $2),
873 [ case "${enableval}" in
874     yes) GST_DISABLE_[$1]=no ;;
875     no) GST_DISABLE_[$1]=yes ;;
876     *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
877   esac],
878 [GST_DISABLE_[$1]=no]) dnl Default value
879 if test x$GST_DISABLE_[$1] = xyes; then
880   AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
881   GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
882 fi
883 AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
884 AC_SUBST(GST_DISABLE_[$1]_DEFINE)
885 GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
886 ])
887
888 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
889 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
890 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
891 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
892 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
893 GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
894
895 GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
896
897
898 dnl ################################################
899 dnl # Set defines according to variables set above #
900 dnl ################################################
901
902
903 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
904 dnl HAVE_ and it is likely to be easier to stick with the old name
905 if test "x$USE_LIBGHTTP" = xyes; then
906   AC_DEFINE(HAVE_LIBGHTTP, 1, [Define if ghttp library is available])
907 fi
908
909 if test "x$USE_LIBMMX" = xyes; then
910   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
911 fi
912
913 if test "x$USE_ATOMIC_H" = xyes; then
914   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
915 fi
916
917 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
918   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
919 fi
920
921 if test "x$USE_DEBUG" = xyes; then
922   CFLAGS="$CFLAGS -g"
923 fi
924
925 if test "x$USE_PROFILING" = xyes; then
926   CFLAGS="$CFLAGS -pg"
927   FOMIT_FRAME_POINTER=""
928 else
929   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
930 fi
931
932 if test "x$HAVE_LIBXV" = xyes; then
933   AC_DEFINE(HAVE_LIBXV)
934 fi
935
936 if test "x$HAVE_OSS" = xyes; then
937   AC_DEFINE(HAVE_OSS)
938 fi
939
940 if test "x$HAVE_XAUDIO" = xyes; then
941   AC_DEFINE(HAVE_XAUDIO)
942 fi
943
944 if test "x$HAVE_LIBMAD" = xyes; then
945   AC_DEFINE(HAVE_LIBMAD)
946 fi
947
948 if test "x$HAVE_LIBMIKMOD" = xyes; then
949   AC_DEFINE(HAVE_LIBMIKMOD)
950 fi
951
952 if test "x$HAVE_VORBIS" = xyes; then
953   AC_DEFINE(HAVE_VORBIS)
954 fi
955
956 if test "x$HAVE_LIBJPEG" = xyes; then
957   AC_DEFINE(HAVE_LIBJPEG)
958 fi
959
960 if test "x$HAVE_LIBSDL" = xyes; then
961   AC_DEFINE(HAVE_LIBSDL)
962 fi
963
964 if test "x$HAVE_LIBHERMES" = "xyes"; then
965   AC_DEFINE(HAVE_LIBHERMES)
966 fi
967
968 if test "x$HAVE_CSSAUTH" = xyes; then
969   AC_DEFINE(HAVE_CSSAUTH)
970 fi
971
972 if test "x$HAVE_LINUX_CDROM" = xyes; then
973   AC_DEFINE(HAVE_LINUX_CDROM)
974 fi
975
976 if test "x$HAVE_LINUX_VIDEODEV" = xyes; then
977   AC_DEFINE(HAVE_LINUX_VIDEODEV)
978 fi
979
980 if test "x$HAVE_MPEG2DEC" = xyes; then
981   AC_DEFINE(HAVE_MPEG2DEC)
982 fi
983
984 if test "x$HAVE_A52DEC" = xyes; then
985   AC_DEFINE(HAVE_A52DEC)
986 fi
987
988 if test "x$HAVE_FLACLIB" = xyes; then
989   AC_DEFINE(HAVE_FLACLIB)
990 fi
991
992 if test "x$HAVE_LIBGSM" = xyes; then
993   AC_DEFINE(HAVE_LIBGSM)
994 fi
995
996 dnl #############################
997 dnl # Set automake conditionals #
998 dnl #############################
999
1000 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
1001 dnl HAVE_ and it is likely to be easier to stick with the old name
1002 AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
1003 AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
1004 AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
1005 AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
1006 AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
1007 AM_CONDITIONAL(HAVE_LIBMMX,         test "x$USE_LIBMMX" = "xyes")
1008 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
1009 AM_CONDITIONAL(HAVE_OSS,            test "x$HAVE_OSS" = "xyes")
1010 AM_CONDITIONAL(HAVE_XAUDIO,         test "x$HAVE_XAUDIO" = "xyes")
1011 AM_CONDITIONAL(HAVE_LIBMAD,         test "x$HAVE_LIBMAD" = "xyes")
1012 AM_CONDITIONAL(HAVE_LIBMIKMOD,      test "x$HAVE_LIBMIKMOD" = "xyes")
1013 AM_CONDITIONAL(HAVE_LINUX_CDROM,    test "x$HAVE_LINUX_CDROM" = "xyes")
1014 AM_CONDITIONAL(HAVE_LINUX_VIDEODEV, test "x$HAVE_LINUX_VIDEODEV" = "xyes")
1015 AM_CONDITIONAL(HAVE_CSSAUTH,        test "x$HAVE_CSSAUTH" = "xyes")
1016 AM_CONDITIONAL(HAVE_VORBIS,         test "x$HAVE_VORBIS" = "xyes")
1017 AM_CONDITIONAL(HAVE_LIBJPEG,        test "x$HAVE_LIBJPEG" = "xyes")
1018 AM_CONDITIONAL(HAVE_LIBSDL,         test "x$HAVE_LIBSDL" = "xyes")
1019 AM_CONDITIONAL(HAVE_LIBHERMES,      test "x$HAVE_LIBHERMES" = "xyes")
1020 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
1021 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
1022 AM_CONDITIONAL(HAVE_GNOME,          test "x$HAVE_GNOME" = "xyes")
1023 AM_CONDITIONAL(HAVE_LIBXV,          test "x$HAVE_LIBXV" = "xyes")
1024 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
1025 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
1026 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
1027 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
1028 AM_CONDITIONAL(BUILD_PLUGIN_DOCS,   test "x$BUILD_PLUGIN_DOCS" = "xyes")
1029 AM_CONDITIONAL(HAVE_DB2HTML,        $HAVE_DB2HTML)
1030 AM_CONDITIONAL(HAVE_DB2PS,          $HAVE_DB2PS)
1031 AM_CONDITIONAL(HAVE_PS2PDF,         $HAVE_PS2PDF)
1032 AM_CONDITIONAL(HAVE_FIG2DEV_PNG,    $HAVE_FIG2DEV_PNG)
1033 AM_CONDITIONAL(HAVE_FIG2DEV_EPS,    $HAVE_FIG2DEV_EPS)
1034 AM_CONDITIONAL(HAVE_CDPARANOIA,     test "x$HAVE_CDPARANOIA" = "xyes")
1035 AM_CONDITIONAL(HAVE_LIBLAME,        test "x$HAVE_LIBLAME" = "xyes")
1036 AM_CONDITIONAL(HAVE_LIBSHOUT,       test "x$HAVE_LIBSHOUT" = "xyes")
1037 AM_CONDITIONAL(HAVE_MPEG2DEC,       test "x$HAVE_MPEG2DEC" = "xyes")
1038 AM_CONDITIONAL(HAVE_A52DEC,         test "x$HAVE_A52DEC" = "xyes")
1039 dnl thomas : the next line gives errors, this is how it is in CVS
1040 dnl AM_CONDITIONAL(HAVE_FLAC,               test "x$HAVE_FLAC" = "xyes")
1041 dnl thomas : the next line gives errors as well, I commented it
1042 dnl AM_CONDITIONAL(HAVE_LAC,                test "x$HAVE_FAC" = "xyes")
1043 dnl thomas: the next line doesn't give errors
1044 AM_CONDITIONAL(HAVE_FLACLIB,        test "x$HAVE_FLACLIB" = "xyes")
1045 AM_CONDITIONAL(HAVE_LIBRTP,         test "x$HAVE_LIBRTP" = "xyes")
1046 AM_CONDITIONAL(HAVE_ARTS,           test "x$HAVE_ARTS" = "xyes")
1047 AM_CONDITIONAL(HAVE_RAW1394,        test "x$HAVE_RAW1394" = "xyes")
1048 AM_CONDITIONAL(HAVE_LIBDV,          test "x$HAVE_LIBDV" = "xyes")
1049 AM_CONDITIONAL(HAVE_LIBAA,          test "x$HAVE_LIBAA" = "xyes")
1050 AM_CONDITIONAL(HAVE_GNOME_VFS,      test "x$HAVE_GNOME_VFS" = "xyes")
1051 AM_CONDITIONAL(HAVE_AVIFILE,        test "x$HAVE_AVIFILE" = "xyes")
1052 AM_CONDITIONAL(HAVE_LIBOPENQUICKTIME, test "x$HAVE_LIBOPENQUICKTIME" = "xyes")
1053 AM_CONDITIONAL(HAVE_LIBGSM,         test "x$HAVE_LIBGSM" = "xyes")
1054 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
1055 AM_CONDITIONAL(HAVE_SIDPLAY,        test "x$have_sidplay" = "xyes")
1056
1057
1058 dnl ############################
1059 dnl # Set up some more defines #
1060 dnl ############################
1061
1062 dnl Set location of configuration dir.
1063 dnl AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
1064 AC_SUBST(GST_CONFIG_DIR)
1065
1066 dnl Set location of windows dll dir.
1067 AC_DEFINE_UNQUOTED(GST_WIN32_LIBDIR,"$GST_WIN32_LIBDIR")
1068 AC_SUBST(GST_WIN32_LIBDIR)
1069
1070 dnl Set location of plugin directory
1071 if test "x${prefix}" = "xNONE"; then
1072   PLUGINS_DIR=${ac_default_prefix}/lib/gst
1073 else
1074   PLUGINS_DIR=${prefix}/lib/gst
1075 fi
1076 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
1077 AC_SUBST(PLUGINS_DIR)
1078
1079 dnl Set location of uninstalled plugin directory
1080 PLUGINS_BUILDDIR=${builddir}
1081 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
1082 AC_SUBST(PLUGINS_BUILDDIR)
1083
1084
1085
1086 dnl ##############################
1087 dnl # Set up the defaults cflags #
1088 dnl ##############################
1089 dnl CC="kgcc"
1090 if test "x$USE_PROFILING" = xyes; then
1091   CFLAGS="$CORE_CFLAGS $CFLAGS -Wall"
1092 else
1093   CFLAGS="$CORE_CFLAGS $CFLAGS -O6 -Wall"
1094 fi
1095 LIBS="$CORE_LIBS $LIBS"
1096 AC_SUBST(CORE_LIBS)
1097 AC_SUBST(CORE_CFLAGS)
1098
1099 dnl Vars for everyone else
1100 GST_LIBS="\$(top_builddir)/gst/libgst.la"
1101 GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include"
1102 AC_SUBST(GST_LIBS)
1103 AC_SUBST(GST_CFLAGS)
1104
1105 dnl Private vars for libgst only
1106 LIBGST_LIBS="$LIBS"
1107 LIBGST_CFLAGS="$CFLAGS $GST_CFLAGS"
1108 AC_SUBST(LIBGST_LIBS)
1109 AC_SUBST(LIBGST_CFLAGS)
1110
1111 dnl CFLAGS for everyone else
1112 CFLAGS="$GST_CFLAGS $CFLAGS"
1113 LDFLAGS="$GST_LIBS $LDFLAGS"
1114
1115 dnl Needed to make automake 1.4g happy.
1116 dnl FIXME: find as properly, rather than just using CC
1117 AS="\$(CC)"
1118
1119 dnl Having to AC_SUBST these is messy, but doesn't seem to do any harm.
1120 dnl I'm not sure whether it's really necessary, but it removes some warnings
1121 dnl when automake 1.4g runs, and may be beneficial elsewhere.
1122 AC_SUBST(LIBS)
1123 AC_SUBST(CFLAGS)
1124 AC_SUBST(CPPFLAGS)
1125 AC_SUBST(LDFLAGS)
1126 AC_SUBST(AS)
1127 AC_SUBST(ASFLAGS)
1128
1129 AC_SUBST(GST_DEFINE_CFLAGS)
1130
1131 dnl #############################
1132 dnl # Configure the subpackages #
1133 dnl #############################
1134
1135 dnl AC_CONFIG_SUBDIRS(gist)
1136 dnl AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
1137
1138 dnl ##################################################
1139 dnl # Prepare informative messages to display at end #
1140 dnl ##################################################
1141
1142 infomessages=
1143
1144 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
1145   infomessages="$infomessages
1146 *** Warning: You have configured using the --enable-plugin-builddir option.
1147
1148 This option is for development purposes only: binaries built with
1149 it should be used with code in the build tree only.  To build an
1150 installable version, use ./configure without the --enable-plugin-builddir
1151 option.  Note that the autogen.sh script supplies the plugin builddir
1152 option automatically - it cannot be used to configure installable builds.
1153
1154 "
1155 fi
1156
1157 dnl #########################
1158 dnl # Make the output files #
1159 dnl #########################
1160
1161 SUBSTFOR configure.ac:AC_OUTPUT(
1162 SUBSTFOR configure.ac:Makefile
1163 SUBSTFOR configure.in:AC_OUTPUT([Makefile
1164 include/Makefile
1165 gst/Makefile
1166 gst/gstversion.h
1167 gst/types/Makefile
1168 gst/elements/Makefile
1169 gst/autoplug/Makefile
1170 libs/Makefile
1171 libs/riff/Makefile
1172 libs/getbits/Makefile
1173 libs/putbits/Makefile
1174 libs/idct/Makefile
1175 libs/audio/Makefile
1176 libs/control/Makefile
1177 plugins/Makefile
1178 plugins/a52dec/Makefile
1179 plugins/aasink/Makefile
1180 plugins/alsa/Makefile
1181 plugins/au/Makefile
1182 plugins/audiofile/Makefile
1183 plugins/audioscale/Makefile
1184 plugins/avi/Makefile
1185 plugins/avi/wincodec/Makefile
1186 plugins/avi/winaudio/Makefile
1187 plugins/flx/Makefile
1188 plugins/festival/Makefile
1189 plugins/flac/Makefile
1190 plugins/jpeg/Makefile
1191 plugins/mp3decode/Makefile
1192 plugins/mp3decode/types/Makefile
1193 plugins/mp3decode/xa/Makefile
1194 plugins/mp3decode/mpg123/Makefile
1195 plugins/mp3decode/mad/Makefile
1196 plugins/mp3decode/parse/Makefile
1197 plugins/mp3encode/Makefile
1198 plugins/mp3encode/lame/Makefile
1199 plugins/mikmod/Makefile
1200 plugins/mpeg2/Makefile
1201 plugins/mpeg2/parse/Makefile
1202 plugins/mpeg2/ac3parse/Makefile
1203 plugins/mpeg2/ac3dec/Makefile
1204 plugins/mpeg2/video/Makefile
1205 plugins/mpeg2/mpeg2enc/Makefile
1206 plugins/mpeg2/mpeg2dec/Makefile
1207 plugins/mpeg2/subtitles/Makefile
1208 plugins/mpeg2/videoparse/Makefile
1209 plugins/mpeg2/mpegtypes/Makefile
1210 plugins/mpeg1/Makefile
1211 plugins/mpeg1/mpegtypes/Makefile
1212 plugins/mpeg1/mpeg_play/Makefile
1213 plugins/mpeg1/mpegaudio/Makefile
1214 plugins/mpeg1/parse/Makefile
1215 plugins/mpeg1/system_encode/Makefile
1216 plugins/mpeg1/mpeg1encoder/Makefile
1217 plugins/mpeg1video/Makefile
1218 plugins/mpeg1video/parse/Makefile
1219 plugins/oss/Makefile
1220 plugins/rtp/Makefile
1221 plugins/rtp/rtpsend/Makefile
1222 plugins/mulaw/Makefile
1223 plugins/alaw/Makefile
1224 plugins/ffmpeg/Makefile
1225 plugins/filters/Makefile
1226 plugins/filters/smooth/Makefile
1227 plugins/filters/median/Makefile
1228 plugins/filters/ladspa/Makefile
1229 plugins/filters/stereo2mono/Makefile
1230 plugins/filters/mono2stereo/Makefile
1231 plugins/filters/intfloatconvert/Makefile
1232 plugins/filters/passthrough/Makefile
1233 plugins/filters/adder/Makefile
1234 plugins/filters/colorspace/Makefile
1235 plugins/filters/volenv/Makefile
1236 plugins/filters/level/Makefile
1237 plugins/filters/lav/Makefile
1238 plugins/filters/cutter/Makefile
1239 plugins/filters/deinterlace/Makefile
1240 plugins/filters/volume/Makefile
1241 plugins/filters/speed/Makefile
1242 plugins/gnomevfs/Makefile
1243 plugins/icecast/Makefile
1244 plugins/icecast/icecastsend/Makefile
1245 plugins/effects/Makefile
1246 plugins/effects/stereo/Makefile
1247 plugins/effects/volume/Makefile
1248 plugins/udp/Makefile
1249 plugins/visualization/Makefile
1250 plugins/visualization/spectrum/Makefile
1251 plugins/visualization/vumeter/Makefile
1252 plugins/visualization/synaesthesia/Makefile
1253 plugins/visualization/smoothwave/Makefile
1254 plugins/visualization/chart/Makefile
1255 plugins/videoscale/Makefile
1256 plugins/xvideosink/Makefile
1257 plugins/wav/Makefile
1258 plugins/dvdsrc/Makefile
1259 plugins/vcdsrc/Makefile
1260 plugins/rtjpeg/Makefile
1261 plugins/SID/Makefile
1262 plugins/vorbis/Makefile
1263 plugins/capture/Makefile
1264 plugins/capture/v4l/Makefile
1265 plugins/capture/qcam/Makefile
1266 plugins/cdparanoia/Makefile
1267 plugins/esd/Makefile
1268 plugins/esd/esdsink/Makefile
1269 plugins/artsd/Makefile
1270 plugins/quicktime/Makefile
1271 plugins/xmms/Makefile
1272 plugins/arts/Makefile
1273 plugins/gsm/Makefile
1274 plugins/1394/Makefile
1275 plugins/sdlsink/Makefile
1276 plugins/dv/Makefile
1277 gstplay/Makefile
1278 dnl components/bonobo-gstmediaplay/Makefile
1279 test/Makefile
1280 test/xml/Makefile
1281 test/bindings/Makefile
1282 test/misc/Makefile
1283 tests/Makefile
1284 tests/sched/Makefile
1285 tests/eos/Makefile
1286 tests/muxing/Makefile
1287 testsuite/Makefile
1288 testsuite/capsnego/Makefile
1289 testsuite/refcounting/Makefile
1290 testsuite/plugin/Makefile
1291 tests/nego/Makefile
1292 examples/Makefile
1293 examples/autoplug/Makefile
1294 examples/helloworld/Makefile
1295 examples/helloworld2/Makefile
1296 examples/launch/Makefile
1297 examples/queue/Makefile
1298 examples/queue2/Makefile
1299 examples/queue3/Makefile
1300 examples/queue4/Makefile
1301 examples/thread/Makefile
1302 examples/mixer/Makefile
1303 examples/cutter/Makefile
1304 examples/launch/Makefile
1305 examples/xml/Makefile
1306 examples/plugins/Makefile
1307 examples/typefind/Makefile
1308 examples/mixer/Makefile
1309 editor/Makefile
1310 editor/pixmaps/Makefile
1311 tools/Makefile
1312 docs/Makefile
1313 docs/gst/Makefile
1314 docs/gst/gstreamer.types
1315 docs/libs/Makefile
1316 docs/plugins/Makefile
1317 docs/plugins/gstreamer-plugins.types
1318 docs/manual/Makefile
1319 docs/fwg/Makefile
1320 debian/Makefile
1321 stamp.h
1322 gstreamer-config
1323 gstreamer.pc
1324 gstreamer-uninstalled.pc
1325 SUBSTFOR configure.in:gstreamer.spec])
1326 SUBSTFOR configure.in:AC_OUTPUT_COMMANDS([chmod +x gstreamer-config;
1327 SUBSTFOR configure.in:echo "$infomessages"], infomessages="$infomessages")
1328 SUBSTFOR configure.ac:gstreamer.spec,
1329 SUBSTFOR configure.ac:chmod +x gstreamer-config
1330 SUBSTFOR configure.ac:echo "$infomessages", infomessages="$infomessages"
1331 SUBSTFOR configure.ac:)