added swig/Makefile.PL
[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 dnl thomas : checking for compile with main instead of actual function,
579 dnl since that made autoconf break (for version 2.13)
580 AC_MSG_CHECKING(FLAC library)
581 AC_CHECK_LIB(FLAC, main, HAVE_FLACLIB=yes, HAVE_FLACLIB=no, -lm)
582 AC_CHECK_HEADER(FLAC/all.h, :, HAVE_FLACLIB=no)
583
584 dnl Check for librtp
585 AC_MSG_CHECKING(rtp library)
586 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
587 AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
588 AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
589 AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
590
591 dnl Check for libraw1394
592 AC_MSG_CHECKING(raw1394 library)
593 AC_CHECK_LIB(raw1394, raw1394_get_handle, HAVE_RAW1394=yes, HAVE_RAW1394=no, )
594 AC_CHECK_HEADER(libraw1394/raw1394.h, :, HAVE_RAW1394=no)
595
596 dnl Check for libdv
597 AC_MSG_CHECKING(libdv)
598 AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
599 libdvcheck_save_CPPFLAGS="$CPPFLAGS"
600 CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
601 AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
602 CPPFLAGS="$libdvcheck_save_CPPFLAGS"
603
604 dnl Check for aalib
605 AC_MSG_CHECKING(aalib)
606 AC_CHECK_LIB(aa, aa_init, HAVE_LIBAA=yes, HAVE_LIBAA=no, )
607 AC_CHECK_HEADER(aalib.h, :, HAVE_LIBAA=no)
608
609 dnl Check for quicktime
610 AC_MSG_CHECKING(openquicktime)
611 AC_CHECK_LIB(openquicktime, quicktime_init, HAVE_LIBOPENQUICKTIME=yes, HAVE_LIBOPENQUICKTIME=no, )
612 AC_CHECK_HEADER(openquicktime/openquicktime.h, :, HAVE_LIBOPENQUICKTIME=no)
613
614
615 dnl check if css-auth.c exists (FIXME)
616 AC_MSG_CHECKING(DVD CSS code)
617 if test -f plugins/dvdsrc/css-auth.c
618 then
619   AC_MSG_RESULT(yes)
620   HAVE_CSSAUTH="yes"
621 else
622   AC_MSG_RESULT(no)
623   HAVE_CSSAUTH="no"
624 fi
625
626 dnl Check for SDL library
627 AC_MSG_CHECKING(SDL library)
628 HAVE_LIBSDL=yes
629 if sdl-config --libs > /dev/null 2>&1; then
630   SDL_VERSION=`sdl-config --version`
631   AC_MSG_RESULT([found (version $SDL_VERSION)])
632   SDL_LIBS="`sdl-config --libs`"
633   SDL_CFLAGS="`sdl-config --cflags`"
634   AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
635   dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
636   dnl Assume only suitable flags result from artsc-config --cflags
637   sdlcheck_save_CPPFLAGS="$CPPFLAGS"
638   CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
639   AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
640   CPPFLAGS="$sdlcheck_save_CPPFLAGS"
641   AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
642 else
643   AC_MSG_RESULT(not found)
644   HAVE_LIBSDL=no
645   SDL_LIBS=
646   SDL_CFLAGS=
647 fi
648 AC_SUBST(SDL_LIBS)
649 AC_SUBST(SDL_CFLAGS)
650
651 if test "x$HAVE_LIBSDL" = "xno"; then
652   AC_MSG_WARN(
653 ***** NOTE: These plugins won't be built: sdlvideosink
654 )
655 fi
656
657
658 dnl Check for linux/cdrom.h
659 AC_CHECK_HEADER(linux/cdrom.h,
660   HAVE_LINUX_CDROM=yes, HAVE_LINUX_CDROM=no
661 )
662
663 dnl Check for linux/videodev.h
664 AC_CHECK_HEADER(linux/videodev.h,
665   HAVE_LINUX_VIDEODEV=yes, HAVE_LINUX_VIDEODEV=no
666 )
667
668
669 dnl ######################################################################
670 dnl # Check command line parameters, and set shell variables accordingly #
671 dnl ######################################################################
672
673 AC_ARG_ENABLE(libmmx,
674 [  --enable-libmmx              use libmmx, if available],
675 [case "${enableval}" in
676   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
677   no)  USE_LIBMMX=no ;;
678   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
679 esac], 
680 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
681
682 AC_ARG_ENABLE(atomic,
683 [  --enable-atomic              use atomic reference counting header],
684 [case "${enableval}" in
685   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
686   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
687   no)  USE_ATOMIC_H=no;;
688   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
689 esac], 
690 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
691
692 AC_ARG_ENABLE(plugin-builddir,
693 [  --enable-plugin-builddir     allow tests/demos to use non-installed plugins ],
694 [case "${enableval}" in
695   yes) PLUGINS_USE_BUILDDIR=yes ;;
696   no)  PLUGINS_USE_BUILDDIR=no ;;
697   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
698 esac], 
699 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
700
701 AC_ARG_ENABLE(debug,
702 [  --enable-debug               compile with -g debugging info],
703 [case "${enableval}" in
704   yes) USE_DEBUG=yes ;;
705   no)  USE_DEBUG=no ;;
706   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
707 esac], 
708 [USE_DEBUG=no]) dnl Default value
709
710 AC_ARG_ENABLE(DEBUG,
711 [  --enable-DEBUG               compiles in a large number of debugging messages],
712 [case "${enableval}" in
713   yes) ENABLE_DEBUG=yes ;;
714   no)  ENABLE_DEBUG=no ;;
715   *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
716 esac], 
717 [ENABLE_DEBUG=no]) dnl Default value
718 if test x$ENABLE_DEBUG = xyes; then
719   AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
720 fi
721
722 AC_ARG_ENABLE(INFO,
723 [  --disable-INFO               disables compilation of informational messages],
724 [case "${enableval}" in
725   yes) ENABLE_INFO=yes ;;
726   no)  ENABLE_INFO=no ;;
727   *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
728 esac], 
729 [ENABLE_INFO=yes]) dnl Default value
730 if test x$ENABLE_INFO = xyes; then
731   AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
732 fi
733
734 AC_ARG_ENABLE(debug-color,
735 [  --disable-debug-color        disables color output of DEBUG and INFO output],
736 [case "${enableval}" in
737   yes) ENABLE_DEBUG_COLOR=yes ;;
738   no)  ENABLE_DEBUG_COLOR=no ;;
739   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
740 esac], 
741 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
742 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
743   AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
744 fi
745
746 AC_ARG_ENABLE(profiling,
747 [  --enable-profiling           adds -pg to compiler commandline, for profiling],
748 [case "${enableval}" in
749   yes) USE_PROFILING=yes ;;
750   no)  UES_PROFILING=no ;;
751   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
752 esac], 
753 [USE_PROFILING=no]) dnl Default value
754
755 dnl Default value
756 GST_CONFIG_DIR=${sysconfdir}/gstreamer
757 AC_ARG_WITH(configdir,
758 [  --with-configdir             specify path to use for configdir],
759 [case "${withval}" in
760   yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
761   no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
762   *) GST_CONFIG_DIR="${withval}" ;;
763 esac], 
764 [:]) dnl Default value
765
766 dnl Default value
767 GST_WIN32_LIBDIR="/usr/lib/win32"
768 AC_ARG_WITH(win32_libdir,
769 [  --with-win32-libdir          specify location for win32 DLLs],
770 [case "${withval}" in
771   yes) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
772   no) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
773   *) GST_WIN32_LIBDIR="${withval}" ;;
774 esac],
775 [:]) dnl Default value
776
777 AC_ARG_ENABLE(docs-build,
778 [  --enable-docs-build          enable building of documentation],
779 [case "${enableval}" in
780   yes) BUILD_DOCS=yes ;;
781   no)  BUILD_DOCS=no ;;
782   *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
783 esac], 
784 [BUILD_DOCS=no]) dnl Default value
785
786 AC_ARG_ENABLE(plugin-docs,
787 [  --enable-plugin-docs         enable the building of plugin documentation
788                                (this is currently broken, so off by default)],
789 [case "${enableval}" in
790   yes) BUILD_PLUGIN_DOCS=yes ;;
791   no)  BUILD_PLUGIN_DOCS=no ;;
792   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
793 esac], 
794 [BUILD_PLUGIN_DOCS=no]) dnl Default value
795
796 AC_ARG_ENABLE(tests,
797 [  --disable-tests              disable building test apps],
798 [case "${enableval}" in
799   yes) BUILD_TESTS=yes ;;
800   no)  BUILD_TESTS=no ;;
801   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
802 esac], 
803 [BUILD_TESTS=yes]) dnl Default value
804
805 AC_ARG_ENABLE(examples,
806 [  --disable-examples           disable building examples],
807 [case "${enableval}" in
808   yes) BUILD_EXAMPLES=yes ;;
809   no)  BUILD_EXAMPLES=no ;;
810   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
811 esac], 
812 [BUILD_EXAMPLES=yes]) dnl Default value
813
814 dnl Next, check for the optional components:
815 dnl ========================================
816
817
818 AC_DEFUN(GST_SUBSYSTEM_DISABLE,
819 [dnl
820 dnl Add a subsystem --disable flag and all the necessary symbols and substitions
821 dnl
822 AC_ARG_ENABLE(translit([$1], A-Z, a-z), 
823 [  ]builtin(format, --disable-%-17s  disable %s, translit([$1], A-Z, a-z), $2),
824 [ case "${enableval}" in
825     yes) GST_DISABLE_[$1]=no ;;
826     no) GST_DISABLE_[$1]=yes ;;
827     *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
828   esac],
829 [GST_DISABLE_[$1]=no]) dnl Default value
830 if test x$GST_DISABLE_[$1] = xyes; then
831   AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
832   GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
833 fi
834 AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
835 AC_SUBST(GST_DISABLE_[$1]_DEFINE)
836 GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
837 ])
838
839 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
840 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
841 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
842 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
843 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
844
845 GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
846
847
848 dnl ################################################
849 dnl # Set defines according to variables set above #
850 dnl ################################################
851
852
853 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
854 dnl HAVE_ and it is likely to be easier to stick with the old name
855 if test "x$USE_LIBGHTTP" = xyes; then
856   AC_DEFINE(HAVE_LIBGHTTP, 1, [Define if ghttp library is available])
857 fi
858
859 if test "x$USE_LIBMMX" = xyes; then
860   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
861 fi
862
863 if test "x$USE_ATOMIC_H" = xyes; then
864   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
865 fi
866
867 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
868   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
869 fi
870
871 if test "x$USE_DEBUG" = xyes; then
872   CFLAGS="$CFLAGS -g"
873 fi
874
875 if test "x$USE_PROFILING" = xyes; then
876   CFLAGS="$CFLAGS -pg"
877   FOMIT_FRAME_POINTER=""
878 else
879   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
880 fi
881
882 if test "x$HAVE_LIBXV" = xyes; then
883   AC_DEFINE(HAVE_LIBXV)
884 fi
885
886 if test "x$HAVE_OSS" = xyes; then
887   AC_DEFINE(HAVE_OSS)
888 fi
889
890 if test "x$HAVE_XAUDIO" = xyes; then
891   AC_DEFINE(HAVE_XAUDIO)
892 fi
893
894 if test "x$HAVE_LIBMAD" = xyes; then
895   AC_DEFINE(HAVE_LIBMAD)
896 fi
897
898 if test "x$HAVE_VORBIS" = xyes; then
899   AC_DEFINE(HAVE_VORBIS)
900 fi
901
902 if test "x$HAVE_LIBJPEG" = xyes; then
903   AC_DEFINE(HAVE_LIBJPEG)
904 fi
905
906 if test "x$HAVE_LIBSDL" = xyes; then
907   AC_DEFINE(HAVE_LIBSDL)
908 fi
909
910 if test "x$HAVE_LIBHERMES" = "xyes"; then
911   AC_DEFINE(HAVE_LIBHERMES)
912 fi
913
914 if test "x$HAVE_CSSAUTH" = xyes; then
915   AC_DEFINE(HAVE_CSSAUTH)
916 fi
917
918 if test "x$HAVE_LINUX_CDROM" = xyes; then
919   AC_DEFINE(HAVE_LINUX_CDROM)
920 fi
921
922 if test "x$HAVE_LINUX_VIDEODEV" = xyes; then
923   AC_DEFINE(HAVE_LINUX_VIDEODEV)
924 fi
925
926 if test "x$HAVE_MPEG2DEC" = xyes; then
927   AC_DEFINE(HAVE_MPEG2DEC)
928 fi
929
930 if test "x$HAVE_FLACLIB" = xyes; then
931   AC_DEFINE(HAVE_FLACLIB)
932 fi
933
934 if test "x$HAVE_LIBGSM" = xyes; then
935   AC_DEFINE(HAVE_LIBGSM)
936 fi
937
938 dnl #############################
939 dnl # Set automake conditionals #
940 dnl #############################
941
942 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
943 dnl HAVE_ and it is likely to be easier to stick with the old name
944 AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
945 AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
946 AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
947 AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
948 AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
949 AM_CONDITIONAL(HAVE_LIBMMX,         test "x$USE_LIBMMX" = "xyes")
950 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
951 AM_CONDITIONAL(HAVE_OSS,            test "x$HAVE_OSS" = "xyes")
952 AM_CONDITIONAL(HAVE_XAUDIO,         test "x$HAVE_XAUDIO" = "xyes")
953 AM_CONDITIONAL(HAVE_LIBMAD,         test "x$HAVE_LIBMAD" = "xyes")
954 AM_CONDITIONAL(HAVE_LINUX_CDROM,    test "x$HAVE_LINUX_CDROM" = "xyes")
955 AM_CONDITIONAL(HAVE_LINUX_VIDEODEV, test "x$HAVE_LINUX_VIDEODEV" = "xyes")
956 AM_CONDITIONAL(HAVE_CSSAUTH,        test "x$HAVE_CSSAUTH" = "xyes")
957 AM_CONDITIONAL(HAVE_VORBIS,         test "x$HAVE_VORBIS" = "xyes")
958 AM_CONDITIONAL(HAVE_LIBJPEG,        test "x$HAVE_LIBJPEG" = "xyes")
959 AM_CONDITIONAL(HAVE_LIBSDL,         test "x$HAVE_LIBSDL" = "xyes")
960 AM_CONDITIONAL(HAVE_LIBHERMES,      test "x$HAVE_LIBHERMES" = "xyes")
961 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
962 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
963 AM_CONDITIONAL(HAVE_GNOME,          test "x$HAVE_GNOME" = "xyes")
964 AM_CONDITIONAL(HAVE_LIBXV,          test "x$HAVE_LIBXV" = "xyes")
965 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
966 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
967 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
968 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
969 AM_CONDITIONAL(BUILD_PLUGIN_DOCS,   test "x$BUILD_PLUGIN_DOCS" = "xyes")
970 AM_CONDITIONAL(HAVE_DB2HTML,        $HAVE_DB2HTML)
971 AM_CONDITIONAL(HAVE_DB2PS,          $HAVE_DB2PS)
972 AM_CONDITIONAL(HAVE_PS2PDF,         $HAVE_PS2PDF)
973 AM_CONDITIONAL(HAVE_FIG2DEV_PNG,    $HAVE_FIG2DEV_PNG)
974 AM_CONDITIONAL(HAVE_FIG2DEV_EPS,    $HAVE_FIG2DEV_EPS)
975 AM_CONDITIONAL(HAVE_CDPARANOIA,     test "x$HAVE_CDPARANOIA" = "xyes")
976 AM_CONDITIONAL(HAVE_LIBLAME,        test "x$HAVE_LIBLAME" = "xyes")
977 AM_CONDITIONAL(HAVE_LIBSHOUT,       test "x$HAVE_LIBSHOUT" = "xyes")
978 AM_CONDITIONAL(HAVE_MPEG2DEC,       test "x$HAVE_MPEG2DEC" = "xyes")
979 dnl thomas : the next line gives errors, this is how it is in CVS
980 dnl AM_CONDITIONAL(HAVE_FLAC,               test "x$HAVE_FLAC" = "xyes")
981 dnl thomas : the next line gives errors as well, I commented it
982 dnl AM_CONDITIONAL(HAVE_LAC,                test "x$HAVE_FAC" = "xyes")
983 dnl thomas: the next line doesn't give errors
984 AM_CONDITIONAL(HAVE_FLACLIB,        test "x$HAVE_FLACLIB" = "xyes")
985 AM_CONDITIONAL(HAVE_LIBRTP,         test "x$HAVE_LIBRTP" = "xyes")
986 AM_CONDITIONAL(HAVE_ARTS,           test "x$HAVE_ARTS" = "xyes")
987 AM_CONDITIONAL(HAVE_RAW1394,        test "x$HAVE_RAW1394" = "xyes")
988 AM_CONDITIONAL(HAVE_LIBDV,          test "x$HAVE_LIBDV" = "xyes")
989 AM_CONDITIONAL(HAVE_LIBAA,          test "x$HAVE_LIBAA" = "xyes")
990 AM_CONDITIONAL(HAVE_GNOME_VFS,      test "x$HAVE_GNOME_VFS" = "xyes")
991 AM_CONDITIONAL(HAVE_AVIFILE,        test "x$HAVE_AVIFILE" = "xyes")
992 AM_CONDITIONAL(HAVE_LIBOPENQUICKTIME, test "x$HAVE_LIBOPENQUICKTIME" = "xyes")
993 AM_CONDITIONAL(HAVE_LIBGSM,         test "x$HAVE_LIBGSM" = "xyes")
994 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
995 AM_CONDITIONAL(HAVE_SIDPLAY,        test "x$have_sidplay" = "xyes")
996
997
998 dnl ############################
999 dnl # Set up some more defines #
1000 dnl ############################
1001
1002 dnl Set location of configuration dir.
1003 dnl AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
1004 AC_SUBST(GST_CONFIG_DIR)
1005
1006 dnl Set location of windows dll dir.
1007 AC_DEFINE_UNQUOTED(GST_WIN32_LIBDIR,"$GST_WIN32_LIBDIR")
1008 AC_SUBST(GST_WIN32_LIBDIR)
1009
1010 dnl Set location of plugin directory
1011 if test "x${prefix}" = "xNONE"; then
1012   PLUGINS_DIR=${ac_default_prefix}/lib/gst
1013 else
1014   PLUGINS_DIR=${prefix}/lib/gst
1015 fi
1016 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
1017 AC_SUBST(PLUGINS_DIR)
1018
1019 dnl Set location of uninstalled plugin directory
1020 PLUGINS_BUILDDIR=${builddir}
1021 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
1022 AC_SUBST(PLUGINS_BUILDDIR)
1023
1024
1025
1026 dnl ##############################
1027 dnl # Set up the defaults cflags #
1028 dnl ##############################
1029 dnl CC="kgcc"
1030 if test "x$USE_PROFILING" = xyes; then
1031   CFLAGS="$CORE_CFLAGS $CFLAGS -Wall"
1032 else
1033   CFLAGS="$CORE_CFLAGS $CFLAGS -O6 -Wall"
1034 fi
1035 LIBS="$CORE_LIBS $LIBS"
1036 AC_SUBST(CORE_LIBS)
1037 AC_SUBST(CORE_CFLAGS)
1038
1039 dnl Vars for everyone else
1040 GST_LIBS="\$(top_builddir)/gst/libgst.la"
1041 GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include"
1042 AC_SUBST(GST_LIBS)
1043 AC_SUBST(GST_CFLAGS)
1044
1045 dnl Private vars for libgst only
1046 LIBGST_LIBS="$LIBS"
1047 LIBGST_CFLAGS="$CFLAGS $GST_CFLAGS"
1048 AC_SUBST(LIBGST_LIBS)
1049 AC_SUBST(LIBGST_CFLAGS)
1050
1051 dnl CFLAGS for everyone else
1052 CFLAGS="$GST_CFLAGS $CFLAGS"
1053
1054 dnl Needed to make automake 1.4g happy.
1055 dnl FIXME: find as properly, rather than just using CC
1056 AS="\$(CC)"
1057
1058 dnl Having to AC_SUBST these is messy, but doesn't seem to do any harm.
1059 dnl I'm not sure whether it's really necessary, but it removes some warnings
1060 dnl when automake 1.4g runs, and may be beneficial elsewhere.
1061 AC_SUBST(LIBS)
1062 AC_SUBST(CFLAGS)
1063 AC_SUBST(CPPFLAGS)
1064 AC_SUBST(LDFLAGS)
1065 AC_SUBST(AS)
1066 AC_SUBST(ASFLAGS)
1067
1068 AC_SUBST(GST_DEFINE_CFLAGS)
1069
1070 dnl #############################
1071 dnl # Configure the subpackages #
1072 dnl #############################
1073
1074 dnl AC_CONFIG_SUBDIRS(gist)
1075 dnl AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
1076
1077 dnl ##################################################
1078 dnl # Prepare informative messages to display at end #
1079 dnl ##################################################
1080
1081 infomessages=
1082
1083 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
1084   infomessages="$infomessages
1085 *** Warning: You have configured using the --enable-plugin-builddir option.
1086
1087 This option is for development purposes only: binaries built with
1088 it should be used with code in the build tree only.  To build an
1089 installable version, use ./configure without the --enable-plugin-builddir
1090 option.  Note that the autogen.sh script supplies the plugin builddir
1091 option automatically - it cannot be used to configure installable builds.
1092
1093 "
1094 fi
1095
1096 dnl #########################
1097 dnl # Make the output files #
1098 dnl #########################
1099
1100 SUBSTFOR configure.ac:AC_OUTPUT(
1101 SUBSTFOR configure.ac:Makefile
1102 SUBSTFOR configure.in:AC_OUTPUT([Makefile
1103 include/Makefile
1104 gst/Makefile
1105 gst/gstversion.h
1106 gst/types/Makefile
1107 gst/elements/Makefile
1108 gst/autoplug/Makefile
1109 swig/Makefile.PL
1110 libs/Makefile
1111 libs/riff/Makefile
1112 libs/getbits/Makefile
1113 libs/putbits/Makefile
1114 libs/idct/Makefile
1115 libs/audio/Makefile
1116 plugins/Makefile
1117 plugins/aasink/Makefile
1118 plugins/alsa/Makefile
1119 plugins/au/Makefile
1120 plugins/audiofile/Makefile
1121 plugins/audioscale/Makefile
1122 plugins/avi/Makefile
1123 plugins/avi/wincodec/Makefile
1124 plugins/avi/winaudio/Makefile
1125 plugins/flx/Makefile
1126 plugins/festival/Makefile
1127 plugins/flac/Makefile
1128 plugins/jpeg/Makefile
1129 plugins/mp3decode/Makefile
1130 plugins/mp3decode/types/Makefile
1131 plugins/mp3decode/xa/Makefile
1132 plugins/mp3decode/mpg123/Makefile
1133 plugins/mp3decode/mad/Makefile
1134 plugins/mp3decode/parse/Makefile
1135 plugins/mp3encode/Makefile
1136 plugins/mp3encode/lame/Makefile
1137 plugins/mpeg2/Makefile
1138 plugins/mpeg2/parse/Makefile
1139 plugins/mpeg2/ac3parse/Makefile
1140 plugins/mpeg2/ac3dec/Makefile
1141 plugins/mpeg2/video/Makefile
1142 plugins/mpeg2/mpeg2enc/Makefile
1143 plugins/mpeg2/mpeg2dec/Makefile
1144 plugins/mpeg2/subtitles/Makefile
1145 plugins/mpeg2/videoparse/Makefile
1146 plugins/mpeg2/mpegtypes/Makefile
1147 plugins/mpeg1/Makefile
1148 plugins/mpeg1/mpegtypes/Makefile
1149 plugins/mpeg1/mpeg_play/Makefile
1150 plugins/mpeg1/mpegaudio/Makefile
1151 plugins/mpeg1/parse/Makefile
1152 plugins/mpeg1/system_encode/Makefile
1153 plugins/mpeg1/mpeg1encoder/Makefile
1154 plugins/mpeg1video/Makefile
1155 plugins/mpeg1video/parse/Makefile
1156 plugins/oss/Makefile
1157 plugins/rtp/Makefile
1158 plugins/rtp/rtpsend/Makefile
1159 plugins/mulaw/Makefile
1160 plugins/alaw/Makefile
1161 plugins/ffmpeg/Makefile
1162 plugins/filters/Makefile
1163 plugins/filters/smooth/Makefile
1164 plugins/filters/median/Makefile
1165 plugins/filters/ladspa/Makefile
1166 plugins/filters/stereo2mono/Makefile
1167 plugins/filters/mono2stereo/Makefile
1168 plugins/filters/intfloatconvert/Makefile
1169 plugins/filters/passthrough/Makefile
1170 plugins/filters/adder/Makefile
1171 plugins/filters/colorspace/Makefile
1172 plugins/filters/volenv/Makefile
1173 plugins/filters/level/Makefile
1174 plugins/filters/lav/Makefile
1175 plugins/filters/cutter/Makefile
1176 plugins/filters/deinterlace/Makefile
1177 plugins/filters/volume/Makefile
1178 plugins/filters/speed/Makefile
1179 plugins/gnomevfs/Makefile
1180 plugins/icecast/Makefile
1181 plugins/icecast/icecastsend/Makefile
1182 plugins/effects/Makefile
1183 plugins/effects/stereo/Makefile
1184 plugins/effects/volume/Makefile
1185 plugins/udp/Makefile
1186 plugins/visualization/Makefile
1187 plugins/visualization/spectrum/Makefile
1188 plugins/visualization/vumeter/Makefile
1189 plugins/visualization/synaesthesia/Makefile
1190 plugins/visualization/smoothwave/Makefile
1191 plugins/visualization/chart/Makefile
1192 plugins/videoscale/Makefile
1193 plugins/xvideosink/Makefile
1194 plugins/wav/Makefile
1195 plugins/dvdsrc/Makefile
1196 plugins/vcdsrc/Makefile
1197 plugins/rtjpeg/Makefile
1198 plugins/SID/Makefile
1199 plugins/vorbis/Makefile
1200 plugins/capture/Makefile
1201 plugins/capture/v4l/Makefile
1202 plugins/capture/qcam/Makefile
1203 plugins/cdparanoia/Makefile
1204 plugins/esd/Makefile
1205 plugins/esd/esdsink/Makefile
1206 plugins/artsd/Makefile
1207 plugins/quicktime/Makefile
1208 plugins/xmms/Makefile
1209 plugins/arts/Makefile
1210 plugins/gsm/Makefile
1211 plugins/1394/Makefile
1212 plugins/sdlsink/Makefile
1213 plugins/dv/Makefile
1214 gstplay/Makefile
1215 dnl components/bonobo-gstmediaplay/Makefile
1216 test/Makefile
1217 test/xml/Makefile
1218 test/bindings/Makefile
1219 test/misc/Makefile
1220 tests/Makefile
1221 tests/sched/Makefile
1222 tests/eos/Makefile
1223 tests/muxing/Makefile
1224 testsuite/Makefile
1225 testsuite/capsnego/Makefile
1226 testsuite/refcounting/Makefile
1227 tests/nego/Makefile
1228 examples/Makefile
1229 examples/autoplug/Makefile
1230 examples/helloworld/Makefile
1231 examples/helloworld2/Makefile
1232 examples/launch/Makefile
1233 examples/queue/Makefile
1234 examples/queue2/Makefile
1235 examples/queue3/Makefile
1236 examples/queue4/Makefile
1237 examples/thread/Makefile
1238 examples/mixer/Makefile
1239 examples/cutter/Makefile
1240 examples/launch/Makefile
1241 examples/xml/Makefile
1242 examples/plugins/Makefile
1243 examples/typefind/Makefile
1244 examples/mixer/Makefile
1245 editor/Makefile
1246 editor/pixmaps/Makefile
1247 tools/Makefile
1248 docs/Makefile
1249 docs/gst/Makefile
1250 docs/gst/gstreamer.types
1251 docs/libs/Makefile
1252 docs/plugins/Makefile
1253 docs/plugins/gstreamer-plugins.types
1254 docs/manual/Makefile
1255 docs/fwg/Makefile
1256 debian/Makefile
1257 stamp.h
1258 gstreamer-config
1259 gstreamer.pc
1260 gstreamer-uninstalled.pc
1261 SUBSTFOR configure.in:gstreamer.spec])
1262 SUBSTFOR configure.in:AC_OUTPUT_COMMANDS([chmod +x gstreamer-config;
1263 SUBSTFOR configure.in:echo "$infomessages"], infomessages="$infomessages")
1264 SUBSTFOR configure.ac:gstreamer.spec,
1265 SUBSTFOR configure.ac:chmod +x gstreamer-config
1266 SUBSTFOR configure.ac:echo "$infomessages", infomessages="$infomessages"
1267 SUBSTFOR configure.ac:)