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