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