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