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