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