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