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