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