Removed the GST_CONFIG_DIR from config.h and made a -D CFLAG for it instead so that...
[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
172 AC_ARG_ENABLE(glib2,
173 [  --enable-glib2            enable the use of glib-2.0 and GObject if available],
174 [ case "${enableval}" in
175         yes) USE_GLIB2=yes ;;
176         no) USE_GLIB2=no ;;
177         *) AC_MSG_ERROR(bad value ${enableval} for --enable-glib2) ;;
178         esac],
179 [:])
180 HAVE_OBJECT_MODEL=no
181
182 if test x$USE_GLIB2 = xyes; then
183   AC_MSG_CHECKING(glib-2.0)
184   PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
185     HAVE_GLIB2=yes,HAVE_GLIB2=yes)
186
187   if test x$HAVE_GLIB2 = xyes; then
188     CORE_LIBS="$GLIB2_LIBS"
189     CORE_CFLAGS="$GLIB2_CFLAGS"
190     AC_SUBST(GLIB2_LIBS)
191     AC_SUBST(GLIB2_CFLAGS)
192
193     AC_DEFINE(USE_GLIB2)
194
195     HAVE_OBJECT_MODEL=yes
196   else
197     USE_GLIB2=no
198
199     HAVE_OBJECT_MODEL=no
200   fi
201 fi
202
203 AM_CONDITIONAL(USE_GLIB2, test "x$USE_GLIB2" = "xyes")
204 AC_SUBST(USE_GLIB2)
205 AM_CONDITIONAL(USE_GTK2, test "x$USE_GTK2" = "xyes")
206 AC_SUBST(USE_GTK2)
207 AM_CONDITIONAL(USE_GNOME2, test "x$USE_GNOME2" = "xyes")
208 AC_SUBST(USE_GNOME2)
209
210 if test x$HAVE_OBJECT_MODEL = xno; then
211   dnl Check for glib
212   AM_PATH_GLIB(1.2.0,,
213               AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
214               glib gmodule gthread)
215   dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
216   CORE_LIBS="$GLIB_LIBS"
217   CORE_CFLAGS="$GLIB_CFLAGS"
218
219   dnl Check for gtk
220   AM_PATH_GTK(1.2.0,,
221               AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
222   dnl Put the gtk flags into $LIBS and $CFLAGS since we always use them
223   CORE_LIBS="$CORE_LIBS $GTK_LIBS"
224   CORE_CFLAGS="$CORE_CFLAGS $GTK_CFLAGS"
225
226   HAVE_OBJECT_MODEL=yes
227 fi
228
229
230 dnl Check for libxml
231 AC_PATH_PROG(XML_CONFIG, xml-config, no)
232 if test x$XML_CONFIG = xno; then
233   AC_MSG_ERROR(Couldn't find xml-config)
234 fi
235 XML_LIBS=`xml-config --libs`
236 XML_CFLAGS=`xml-config --cflags`
237 AC_CHECK_LIB(xml, xmlDocGetRootElement, ,
238   [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
239   $XML_LIBS)
240 AC_SUBST(XML_LIBS)
241 AC_SUBST(XML_CFLAGS)
242 CORE_LIBS="$CORE_LIBS $XML_LIBS"
243 CORE_CFLAGS="$CORE_CFLAGS $XML_CFLAGS"
244
245
246 dnl ==========================================================================
247 dnl ========================= Macro definitions ==============================
248 dnl ==========================================================================
249
250 dnl These macros should be moved out to separate files (acinclude.m4?), but
251 dnl can't currently be because of the SUBSTFOR magic.
252
253 dnl Perform a check for existence of ARTS
254 dnl Richard Boulton <richard-alsa@tartarus.org>
255 dnl Last modification: 26/06/2001
256 dnl GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
257 dnl                   DEPENDENT-PLUGINS, TEST-FOR-FEATURE)
258 dnl
259 dnl This check was written for GStreamer: it should be renamed and checked
260 dnl for portability if you decide to use it elsewhere.
261 dnl
262 AC_DEFUN(GST_CHECK_ARTS,
263 [
264 dnl Set the flags
265 ARTS_LIBS="-L/usr/local/lib -L/usr/lib -lmcop -lartsflow -lartsflow_idl"
266 ARTS_CFLAGS="-I/usr/local/include/arts -I/usr/include/kde/arts -I/usr/include/arts"
267 ARTS_MCOPFLAGS=$ARTS_CFLAGS
268 dnl There's no arts-config script, so we make a guess based on the artsc-config
269 AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
270 if test x$ARTSC_CONFIG = xyes; then
271   ARTS_ARTSC_CFLAGS=`artsc-config --cflags | sed 's/artsc/arts/g'`
272   ARTS_CFLAGS="$ARTS_CFLAGS $ARTS_ARTSC_CFLAGS"
273   ARTS_MCOPFLAGS="$ARTS_MCOPFLAGS $ARTS_ARTSC_CFLAGS"
274 fi
275 AC_SUBST(ARTS_LIBS)
276 AC_SUBST(ARTS_CFLAGS)
277 AC_SUBST(ARTS_MCOPFLAGS)
278
279 dnl Now check if it exists
280 SUBSTFOR configure.ac:AC_LANG_PUSH(C++)
281 SUBSTFOR configure.in:AC_LANG_SAVE
282 SUBSTFOR configure.in:AC_LANG_CPLUSPLUS
283 HAVE_ARTS=yes
284 dnl FIXME: Can't get this test to pass, so commented it out.  Rely on header check.
285 dnl AC_CHECK_LIB(artsflow, convert_stereo_2float_i16le, :, HAVE_ARTS=no, $LIBS)
286
287 dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
288 dnl FIXME: ensure only suitable flags result from artsc-config --cflags
289 CPPFLAGS="$CPPFLAGS $ARTS_CFLAGS"
290 AC_CHECK_HEADER(artsflow.h, :, HAVE_ARTS=no)
291
292 SUBSTFOR configure.ac:AC_LANG_POP(C++)
293 SUBSTFOR configure.in:AC_LANG_RESTORE
294 dnl Check for the idl generator
295 AC_CHECK_PROG(HAVE_MCOPIDL, mcopidl, yes, no)
296 if test x$HAVE_MCOPIDL = xno; then
297   HAVE_ARTS=no
298 fi
299 ])
300
301 dnl ==========================================================================
302 dnl ========================= End macro definitions ==========================
303 dnl ==========================================================================
304
305
306 dnl Next, check for the optional libraries:
307 dnl =======================================
308
309
310 dnl ***** ESound *****
311 GST_CHECK_FEATURE(LIBESD, [esound plugins], esdsrc esdsink, [
312   AM_PATH_ESD(0.2.12, HAVE_LIBESD=yes, HAVE_LIBESD=no)
313 ])
314
315 dnl Check for artsc
316 GST_CHECK_FEATURE(ARTSC, [artsd plugins], artsdsink, [GST_CHECK_ARTSC()])
317
318 dnl Check for artsc
319 GST_CHECK_FEATURE(ARTS, [arts plugins], arts, [GST_CHECK_ARTS()])
320
321 dnl Check for xmms
322 dnl FIXME: change this check so that it is disabled by default, in a neater way
323 GST_CHECK_FEATURE(LIBXMMS, [xmms plugin], xmms, [
324   AM_PATH_XMMS(0.1.0, HAVE_LIBXMMS=yes, HAVE_LIBXMMS=no)
325   HAVE_LIBXMMS=no
326 ])
327
328 dnl Check for alsa
329 GST_CHECK_FEATURE(ALSA, [alsa plugins], gstalsa, [
330   AM_PATH_ALSA(0.5.0, HAVE_ALSA=yes, HAVE_ALSA=no)
331   AM_PATH_ALSA(0.9.0, HAVE_ALSA=no; AC_MSG_WARN(Alsa 0.9.x not yet supported),:)
332 ])
333
334 dnl Check for libaudiofile
335 AC_PATH_PROG(AUDIOFILE_CONFIG, audiofile-config, no)
336 if test x$AUDIOFILE_CONFIG = xno; then
337   AC_MSG_WARN(Couldn't find audiofile-config: can't build afsink)
338   AUDIOFILE_LIBS=
339   HAVE_LIBAUDIOFILE=no
340 else
341   AUDIOFILE_LIBS=`audiofile-config --libs`
342   HAVE_LIBAUDIOFILE=yes
343 fi
344 AC_SUBST(AUDIOFILE_LIBS)
345
346
347 dnl Check for libgdk-pixbuf
348 AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
349 if test x$GDK_PIXBUF_CONFIG = xno; then
350   AC_MSG_WARN(Couldn't find gdk-pixbuf-config)
351   GDK_PIXBUF_LIBS=
352   GDK_PIXBUF_CFLAGS=
353   HAVE_GDK_PIXBUF=no
354 else
355   GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
356   GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
357   HAVE_GDK_PIXBUF=yes
358 fi
359 AC_SUBST(GDK_PIXBUF_LIBS)
360 AC_SUBST(GDK_PIXBUF_CFLAGS)
361
362
363 if test x$USE_GLIB2 = xyes; then
364   dnl we don't support gnome/gtk with glib2.0 yet
365   GNOME_LIBS=
366   GNOME_CFLAGS=
367   HAVE_GNOME=no
368   AC_MSG_WARN(gnome disabled for glib2.0)
369 else
370   dnl Check for libgnome
371   AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
372   if test x$GNOME_CONFIG = xno; then
373     AC_MSG_WARN(Couldn't find gnome-config: can't build editor or gstplay)
374     GNOME_LIBS=
375     GNOME_CFLAGS=
376     HAVE_GNOME=no
377   else
378     GNOME_LIBS=`gnome-config --libs gnome gnomeui`
379     GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
380     HAVE_GNOME=yes
381   fi
382 fi
383 AC_SUBST(GNOME_LIBS)
384 AC_SUBST(GNOME_CFLAGS)
385
386 dnl Check for libghttp
387 GST_CHECK_FEATURE(LIBGHTTP, [libghttp plugins], gsthttpsrc, [
388   dnl FIXME: need to check for header
389   GHTTP_LIBS=
390   GST_HTTPSRC_GET_TYPE=
391   if test x$USE_GLIB2 = xyes; then
392     AC_MSG_WARN(ghttp disabled for glib2.0)
393   else
394     AC_CHECK_LIB(ghttp, ghttp_request_new,
395       [GHTTP_LIBS="-lghttp"
396        GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
397        HAVE_LIBGHTTP=yes
398       ], :, $LIBS)
399   fi
400   AC_SUBST(GHTTP_LIBS)
401   AC_SUBST(GST_HTTPSRC_GET_TYPE)
402 ])
403
404 dnl Check for libglade
405 HAVE_LIBGLADE_GNOME="no"
406 if test x$USE_GLIB2 = xyes; then
407   dnl no glade for glib2.0
408   LIBGLADE_GNOME_LIBS=
409   LIBGLADE_GNOME_CFLAGS=
410   AC_MSG_WARN(libglade disabled for glib2.0)
411 else
412   AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no)
413   if test x$LIBGLADE_CONFIG_PATH = xno; then
414     AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
415     LIBGLADE_GNOME_LIBS=
416     LIBGLADE_GNOME_CFLAGS=
417   else
418     LIBGLADE_GNOME_LIBS=`libglade-config --libs gnome`
419     LIBGLADE_GNOME_CFLAGS=`libglade-config --cflags gnome`
420     libglade_save_CFLAGS="$CFLAGS"
421     libglade_save_LIBS="$LIBS"
422     CFLAGS="$CFLAGS $LIBGLADE_GNOME_CFLAGS $GTK_CFLAGS"
423     LIBS="$LIBS $LIBGLADE_GNOME_LIBS $GTK_LIBS"
424     AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
425                 HAVE_LIBGLADE_GNOME="yes",
426                 AC_MSG_WARN(
427       [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
428              )
429     CFLAGS="$libglade_save_CFLAGS"
430     LIBS="$libglade_save_LIBS"
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 libvorbis
542 AC_MSG_CHECKING(Vorbis library)
543 AC_CHECK_LIB(vorbis, ogg_sync_init,
544   HAVE_VORBIS=yes
545   AC_DEFINE(HAVE_VORBIS, 1, [Define if vorbis library is available]),
546   AC_MSG_WARN(
547 ***** NOTE: These plugins won't be built: vorbisdec vorbisenc
548 )
549   HAVE_VORBIS=no,
550 )
551
552 dnl Check for libjpeg
553 AC_MSG_CHECKING(libjpeg library)
554 AC_CHECK_LIB(jpeg, jpeg_set_defaults,
555   HAVE_LIBJPEG=yes
556   AC_DEFINE(HAVE_LIBJPEG, 1, [Define if libjpeg is available]),
557   AC_MSG_WARN(
558 ***** NOTE: These plugins won't be built: jpegdec jpegenc
559 )
560   HAVE_LIBJPEG=no,
561 )
562
563 dnl Check for libHermes
564 AC_MSG_CHECKING(Hermes library)
565 AC_CHECK_LIB(Hermes, Hermes_ConverterInstance,
566   HAVE_LIBHERMES=yes
567   AC_DEFINE(HAVE_LIBHERMES, 1, [Define if Hermes library is available]),
568   AC_MSG_WARN(
569 ***** NOTE: These plugins won't be built: colorspace
570 )
571   HAVE_LIBHERMES=no,
572 )
573 AC_CHECK_HEADER(Hermes/Hermes.h, :, HAVE_LIBHERMES=no)
574
575 dnl Check for libgsm
576 AC_MSG_CHECKING(GSM library)
577 AC_CHECK_LIB(gsm, gsm_create, HAVE_LIBGSM=yes, HAVE_LIBGSM=no,)
578 GSM_CFLAGS=
579 GSM_LIBS=-lgsm
580 AC_CHECK_HEADER(gsm.h, :, 
581   GSM_CFLAGS="$GSM_CFLAGS -DGSM_HEADER_IN_SUBDIR"
582   AC_CHECK_HEADER(gsm/gsm.h, :, HAVE_LIBGSM=no)
583 )
584 AC_SUBST(GSM_CFLAGS)
585 AC_SUBST(GSM_LIBS)
586
587 if test "x$HAVE_LIBGSM" == "xyes"; then
588   AC_DEFINE(HAVE_LIBGSM, 1, [Define if GSM library is available])
589 else
590   AC_MSG_WARN(
591 ***** NOTE: These plugins won't be built: gsmdec, gsmenc
592 )
593 fi
594
595 dnl Check for cdparanoia
596 AC_MSG_CHECKING(CDparanoia library)
597 HAVE_CDPARANOIA=yes
598 AC_CHECK_LIB(cdda_interface, cdda_open, : , HAVE_CDPARANOIA=no, )
599 AC_CHECK_HEADER(cdda_interface.h, :, HAVE_CDPARANOIA=no)
600 AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
601 AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
602
603 dnl Check for liblame
604 AC_MSG_CHECKING(LAME library)
605 AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
606 AC_CHECK_HEADER(lame/lame.h, :, HAVE_LIBLAME=no)
607
608 dnl Check for libshout
609 AC_MSG_CHECKING(Shout library)
610 AC_CHECK_LIB(shout, shout_init_connection, HAVE_LIBSHOUT=yes, HAVE_LIBSHOUT=no, )
611 AC_CHECK_HEADER(shout/shout.h, :, HAVE_LIBSHOUT=no)
612
613 dnl Check for mpeg2dec
614 AC_MSG_CHECKING(mpeg2dec library)
615 AC_CHECK_LIB(mpeg2, mpeg2_init, HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no, )
616 AC_CHECK_HEADER(mpeg2dec/mpeg2.h, :, HAVE_MPEG2DEC=no)
617
618 dnl Check for librtp
619 AC_MSG_CHECKING(rtp library)
620 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
621 AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
622 AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
623 AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
624
625 dnl Check for libraw1394
626 AC_MSG_CHECKING(raw1394 library)
627 AC_CHECK_LIB(raw1394, raw1394_get_handle, HAVE_RAW1394=yes, HAVE_RAW1394=no, )
628 AC_CHECK_HEADER(libraw1394/raw1394.h, :, HAVE_RAW1394=no)
629
630 dnl Check for libdv
631 AC_MSG_CHECKING(libdv)
632 AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
633 libdvcheck_save_CPPFLAGS="$CPPFLAGS"
634 CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
635 AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
636 CPPFLAGS="$libdvcheck_save_CPPFLAGS"
637
638 dnl Check for aalib
639 AC_MSG_CHECKING(aalib)
640 AC_CHECK_LIB(aa, aa_init, HAVE_LIBAA=yes, HAVE_LIBAA=no, )
641 AC_CHECK_HEADER(aalib.h, :, HAVE_LIBAA=no)
642
643 dnl Check for quicktime
644 AC_MSG_CHECKING(openquicktime)
645 AC_CHECK_LIB(openquicktime, quicktime_init, HAVE_LIBOPENQUICKTIME=yes, HAVE_LIBOPENQUICKTIME=no, )
646 AC_CHECK_HEADER(openquicktime/openquicktime.h, :, HAVE_LIBOPENQUICKTIME=no)
647
648
649 dnl check if css-auth.c exists (FIXME)
650 AC_MSG_CHECKING(DVD CSS code)
651 if test -f plugins/dvdsrc/css-auth.c
652 then
653   AC_MSG_RESULT(yes)
654   HAVE_CSSAUTH="yes"
655 else
656   AC_MSG_RESULT(no)
657   HAVE_CSSAUTH="no"
658 fi
659
660 dnl Check for SDL library
661 AC_MSG_CHECKING(SDL library)
662 HAVE_LIBSDL=yes
663 if sdl-config --libs > /dev/null 2>&1; then
664   SDL_VERSION=`sdl-config --version`
665   AC_MSG_RESULT([found (version $SDL_VERSION)])
666   SDL_LIBS="`sdl-config --libs`"
667   SDL_CFLAGS="`sdl-config --cflags`"
668   AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
669   dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
670   dnl Assume only suitable flags result from artsc-config --cflags
671   sdlcheck_save_CPPFLAGS="$CPPFLAGS"
672   CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
673   AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
674   CPPFLAGS="$sdlcheck_save_CPPFLAGS"
675   AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
676 else
677   AC_MSG_RESULT(not found)
678   HAVE_LIBSDL=no
679   SDL_LIBS=
680   SDL_CFLAGS=
681 fi
682 AC_SUBST(SDL_LIBS)
683 AC_SUBST(SDL_CFLAGS)
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(gdk-pixbuf,
708 [  --enable-gdk-pixbuf          use gdk pixbuf, if available],
709 [case "${enableval}" in
710   yes) USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF ;;
711   no)  USE_GDK_PIXBUF=no ;;
712   *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdk-pixbuf) ;;
713 esac], 
714 [USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF]) dnl Default value
715
716 AC_ARG_ENABLE(libmmx,
717 [  --enable-libmmx              use libmmx, if available],
718 [case "${enableval}" in
719   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
720   no)  USE_LIBMMX=no ;;
721   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
722 esac], 
723 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
724
725 AC_ARG_ENABLE(atomic,
726 [  --enable-atomic              use atomic reference counting header],
727 [case "${enableval}" in
728   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
729   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
730   no)  USE_ATOMIC_H=no;;
731   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
732 esac], 
733 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
734
735 AC_ARG_ENABLE(plugin-builddir,
736 [  --enable-plugin-builddir     allow tests/demos to use non-installed plugins ],
737 [case "${enableval}" in
738   yes) PLUGINS_USE_BUILDDIR=yes ;;
739   no)  PLUGINS_USE_BUILDDIR=no ;;
740   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
741 esac], 
742 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
743
744 AC_ARG_ENABLE(debug,
745 [  --enable-debug               compile with -g debugging info],
746 [case "${enableval}" in
747   yes) USE_DEBUG=yes ;;
748   no)  USE_DEBUG=no ;;
749   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
750 esac], 
751 [USE_DEBUG=no]) dnl Default value
752
753 AC_ARG_ENABLE(DEBUG,
754 [  --enable-DEBUG               compiles in a large number of debugging messages],
755 [case "${enableval}" in
756   yes) ENABLE_DEBUG=yes ;;
757   no)  ENABLE_DEBUG=no ;;
758   *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
759 esac], 
760 [ENABLE_DEBUG=no]) dnl Default value
761 if test x$ENABLE_DEBUG = xyes; then
762   AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
763 fi
764
765 AC_ARG_ENABLE(INFO,
766 [  --disable-INFO               disables compilation of informational messages],
767 [case "${enableval}" in
768   yes) ENABLE_INFO=yes ;;
769   no)  ENABLE_INFO=no ;;
770   *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
771 esac], 
772 [ENABLE_INFO=yes]) dnl Default value
773 if test x$ENABLE_INFO = xyes; then
774   AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
775 fi
776
777 AC_ARG_ENABLE(debug-color,
778 [  --disable-debug-color        disables color output of DEBUG and INFO output],
779 [case "${enableval}" in
780   yes) ENABLE_DEBUG_COLOR=yes ;;
781   no)  ENABLE_DEBUG_COLOR=no ;;
782   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
783 esac], 
784 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
785 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
786   AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
787 fi
788
789 AC_ARG_ENABLE(profiling,
790 [  --enable-profiling           adds -pg to compiler commandline, for profiling],
791 [case "${enableval}" in
792   yes) USE_PROFILING=yes ;;
793   no)  UES_PROFILING=no ;;
794   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
795 esac], 
796 [USE_PROFILING=no]) dnl Default value
797
798 dnl Default value
799 GST_CONFIG_DIR=${sysconfdir}/gstreamer
800 AC_ARG_WITH(configdir,
801 [  --with-configdir             specify path to use for configdir],
802 [case "${withval}" in
803   yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
804   no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
805   *) GST_CONFIG_DIR="${withval}" ;;
806 esac], 
807 [:]) dnl Default value
808
809 dnl Default value
810 GST_WIN32_LIBDIR="/usr/lib/win32"
811 AC_ARG_WITH(win32_libdir,
812 [  --with-win32-libdir          specify location for win32 DLLs],
813 [case "${withval}" in
814   yes) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
815   no) AC_MSG_ERROR(bad value ${withval} for --with-win32-libdir) ;;
816   *) GST_WIN32_LIBDIR="${withval}" ;;
817 esac],
818 [:]) dnl Default value
819
820 AC_ARG_ENABLE(docs-build,
821 [  --enable-docs-build          enable building of documentation],
822 [case "${enableval}" in
823   yes) BUILD_DOCS=yes ;;
824   no)  BUILD_DOCS=no ;;
825   *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
826 esac], 
827 [BUILD_DOCS=no]) dnl Default value
828
829 AC_ARG_ENABLE(plugin-docs,
830 [  --enable-plugin-docs         enable the building of plugin documentation
831                                (this is currently broken, so off by default)],
832 [case "${enableval}" in
833   yes) BUILD_PLUGIN_DOCS=yes ;;
834   no)  BUILD_PLUGIN_DOCS=no ;;
835   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
836 esac], 
837 [BUILD_PLUGIN_DOCS=no]) dnl Default value
838
839 AC_ARG_ENABLE(tests,
840 [  --disable-tests              disable building test apps],
841 [case "${enableval}" in
842   yes) BUILD_TESTS=yes ;;
843   no)  BUILD_TESTS=no ;;
844   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
845 esac], 
846 [BUILD_TESTS=yes]) dnl Default value
847
848 AC_ARG_ENABLE(examples,
849 [  --disable-examples           disable building examples],
850 [case "${enableval}" in
851   yes) BUILD_EXAMPLES=yes ;;
852   no)  BUILD_EXAMPLES=no ;;
853   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
854 esac], 
855 [BUILD_EXAMPLES=yes]) dnl Default value
856
857 dnl Next, check for the optional components:
858 dnl ========================================
859
860
861 AC_DEFUN(GST_SUBSYSTEM_DISABLE,
862 [dnl
863 dnl Add a subsystem --disable flag and all the necessary symbols and substitions
864 dnl
865 AC_ARG_ENABLE(translit([$1], A-Z, a-z), 
866 [  --disable-translit([$1], A-Z, a-z)           disable $2],
867 [ case "${enableval}" in
868     yes) GST_DISABLE_[$1]=no ;;
869     no) GST_DISABLE_[$1]=yes ;;
870     *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
871   esac],
872 [GST_DISABLE_[$1]=no]) dnl Default value
873 if test x$GST_DISABLE_[$1] = xyes; then
874   AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
875   GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
876 fi
877 AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
878 AC_SUBST(GST_DISABLE_[$1]_DEFINE)
879 GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
880 ])
881
882 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
883 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
884 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
885 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
886 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
887 AC_SUBST(GST_SUBSYSTEM_DISABLE_DEFINES)
888
889
890 dnl ################################################
891 dnl # Set defines according to variables set above #
892 dnl ################################################
893
894
895 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
896 dnl HAVE_ and it is likely to be easier to stick with the old name
897 if test "x$USE_GDK_PIXBUF" = xyes; then
898   AC_DEFINE(HAVE_GDK_PIXBUF, 1, [Define if GDK pixbuf library is available])
899 fi
900
901 if test "x$USE_LIBGHTTP" = xyes; then
902   AC_DEFINE(HAVE_LIBGHTTP, 1, [Define if ghttp library is available])
903 fi
904
905 if test "x$USE_LIBMMX" = xyes; then
906   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
907 fi
908
909 if test "x$USE_ATOMIC_H" = xyes; then
910   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
911 fi
912
913 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
914   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
915 fi
916
917 if test "x$USE_DEBUG" = xyes; then
918   CFLAGS="$CFLAGS -g"
919 fi
920
921 if test "x$USE_PROFILING" = xyes; then
922   CFLAGS="$CFLAGS -pg"
923   FOMIT_FRAME_POINTER=""
924 else
925   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
926 fi
927
928 if test "x$HAVE_LIBXV" = xyes; then
929   AC_DEFINE(HAVE_LIBXV)
930 fi
931
932 if test "x$HAVE_OSS" = xyes; then
933   AC_DEFINE(HAVE_OSS)
934 fi
935
936 if test "x$HAVE_XAUDIO" = xyes; then
937   AC_DEFINE(HAVE_XAUDIO)
938 fi
939
940 if test "x$HAVE_LIBMAD" = xyes; then
941   AC_DEFINE(HAVE_LIBMAD)
942 fi
943
944 if test "x$HAVE_VORBIS" = xyes; then
945   AC_DEFINE(HAVE_VORBIS)
946 fi
947
948 if test "x$HAVE_LIBJPEG" = xyes; then
949   AC_DEFINE(HAVE_LIBJPEG)
950 fi
951
952 if test "x$HAVE_LIBSDL" = xyes; then
953   AC_DEFINE(HAVE_LIBSDL)
954 fi
955
956 if test "x$HAVE_LIBHERMES" = "xyes"; then
957   AC_DEFINE(HAVE_LIBHERMES)
958 fi
959
960 if test "x$HAVE_CSSAUTH" = xyes; then
961   AC_DEFINE(HAVE_CSSAUTH)
962 fi
963
964 if test "x$HAVE_LINUX_CDROM" = xyes; then
965   AC_DEFINE(HAVE_LINUX_CDROM)
966 fi
967
968 if test "x$HAVE_LINUX_VIDEODEV" = xyes; then
969   AC_DEFINE(HAVE_LINUX_VIDEODEV)
970 fi
971
972 if test "x$HAVE_MPEG2DEC" = xyes; then
973   AC_DEFINE(HAVE_MPEG2DEC)
974 fi
975
976 if test "x$HAVE_LIBAUDIOFILE" = xyes; then
977   AC_DEFINE(HAVE_LIBAUDIOFILE)
978 fi
979
980 if test "x$HAVE_LIBGSM" = xyes; then
981   AC_DEFINE(HAVE_LIBGSM)
982 fi
983
984 dnl #############################
985 dnl # Set automake conditionals #
986 dnl #############################
987
988 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
989 dnl HAVE_ and it is likely to be easier to stick with the old name
990 AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
991 AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
992 AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
993 AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
994 AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
995 AM_CONDITIONAL(HAVE_GDK_PIXBUF,     test "x$USE_GDK_PIXBUF" = "xyes")
996 AM_CONDITIONAL(HAVE_LIBAUDIOFILE,   test "x$HAVE_LIBAUDIOFILE" = "xyes")
997 AM_CONDITIONAL(HAVE_LIBMMX,         test "x$USE_LIBMMX" = "xyes")
998 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
999 AM_CONDITIONAL(HAVE_OSS,            test "x$HAVE_OSS" = "xyes")
1000 AM_CONDITIONAL(HAVE_XAUDIO,         test "x$HAVE_XAUDIO" = "xyes")
1001 AM_CONDITIONAL(HAVE_LIBMAD,         test "x$HAVE_LIBMAD" = "xyes")
1002 AM_CONDITIONAL(HAVE_LINUX_CDROM,    test "x$HAVE_LINUX_CDROM" = "xyes")
1003 AM_CONDITIONAL(HAVE_LINUX_VIDEODEV, test "x$HAVE_LINUX_VIDEODEV" = "xyes")
1004 AM_CONDITIONAL(HAVE_CSSAUTH,        test "x$HAVE_CSSAUTH" = "xyes")
1005 AM_CONDITIONAL(HAVE_VORBIS,         test "x$HAVE_VORBIS" = "xyes")
1006 AM_CONDITIONAL(HAVE_LIBJPEG,        test "x$HAVE_LIBJPEG" = "xyes")
1007 AM_CONDITIONAL(HAVE_LIBSDL,         test "x$HAVE_LIBSDL" = "xyes")
1008 AM_CONDITIONAL(HAVE_LIBHERMES,      test "x$HAVE_LIBHERMES" = "xyes")
1009 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
1010 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
1011 AM_CONDITIONAL(HAVE_GNOME,          test "x$HAVE_GNOME" = "xyes")
1012 AM_CONDITIONAL(HAVE_LIBXV,          test "x$HAVE_LIBXV" = "xyes")
1013 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
1014 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
1015 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
1016 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
1017 AM_CONDITIONAL(BUILD_PLUGIN_DOCS,   test "x$BUILD_PLUGIN_DOCS" = "xyes")
1018 AM_CONDITIONAL(HAVE_DB2HTML,        $HAVE_DB2HTML)
1019 AM_CONDITIONAL(HAVE_DB2PS,          $HAVE_DB2PS)
1020 AM_CONDITIONAL(HAVE_PS2PDF,         $HAVE_PS2PDF)
1021 AM_CONDITIONAL(HAVE_FIG2DEV_PNG,    $HAVE_FIG2DEV_PNG)
1022 AM_CONDITIONAL(HAVE_FIG2DEV_EPS,    $HAVE_FIG2DEV_EPS)
1023 AM_CONDITIONAL(HAVE_CDPARANOIA,     test "x$HAVE_CDPARANOIA" = "xyes")
1024 AM_CONDITIONAL(HAVE_LIBLAME,        test "x$HAVE_LIBLAME" = "xyes")
1025 AM_CONDITIONAL(HAVE_LIBSHOUT,       test "x$HAVE_LIBSHOUT" = "xyes")
1026 AM_CONDITIONAL(HAVE_MPEG2DEC,       test "x$HAVE_MPEG2DEC" = "xyes")
1027 AM_CONDITIONAL(HAVE_LIBRTP,         test "x$HAVE_LIBRTP" = "xyes")
1028 AM_CONDITIONAL(HAVE_ARTS,           test "x$HAVE_ARTS" = "xyes")
1029 AM_CONDITIONAL(HAVE_RAW1394,        test "x$HAVE_RAW1394" = "xyes")
1030 AM_CONDITIONAL(HAVE_LIBDV,          test "x$HAVE_LIBDV" = "xyes")
1031 AM_CONDITIONAL(HAVE_LIBAA,          test "x$HAVE_LIBAA" = "xyes")
1032 AM_CONDITIONAL(HAVE_GNOME_VFS,      test "x$HAVE_GNOME_VFS" = "xyes")
1033 AM_CONDITIONAL(HAVE_AVIFILE,        test "x$HAVE_AVIFILE" = "xyes")
1034 AM_CONDITIONAL(HAVE_LIBOPENQUICKTIME, test "x$HAVE_LIBOPENQUICKTIME" = "xyes")
1035 AM_CONDITIONAL(HAVE_LIBGSM,         test "x$HAVE_LIBGSM" = "xyes")
1036 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
1037
1038
1039 dnl ############################
1040 dnl # Set up some more defines #
1041 dnl ############################
1042
1043 dnl Set location of configuration dir.
1044 dnl AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
1045 AC_SUBST(GST_CONFIG_DIR)
1046
1047 dnl Set location of windows dll dir.
1048 AC_DEFINE_UNQUOTED(GST_WIN32_LIBDIR,"$GST_WIN32_LIBDIR")
1049 AC_SUBST(GST_WIN32_LIBDIR)
1050
1051 dnl Set location of plugin directory
1052 if test "x${prefix}" = "xNONE"; then
1053   PLUGINS_DIR=${ac_default_prefix}/lib/gst
1054 else
1055   PLUGINS_DIR=${prefix}/lib/gst
1056 fi
1057 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
1058 AC_SUBST(PLUGINS_DIR)
1059
1060 dnl Set location of uninstalled plugin directory
1061 PLUGINS_BUILDDIR=${builddir}
1062 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
1063 AC_SUBST(PLUGINS_BUILDDIR)
1064
1065
1066
1067 dnl ##############################
1068 dnl # Set up the defaults cflags #
1069 dnl ##############################
1070 dnl CC="kgcc"
1071 if test "x$USE_PROFILING" = xyes; then
1072   CFLAGS="$CORE_CFLAGS $CFLAGS -Wall"
1073 else
1074   CFLAGS="$CORE_CFLAGS $CFLAGS -O6 -Wall"
1075 fi
1076 LIBS="$CORE_LIBS $LIBS"
1077 AC_SUBST(CORE_LIBS)
1078 AC_SUBST(CORE_CFLAGS)
1079
1080 dnl Vars for everyone else
1081 GST_LIBS="\$(top_builddir)/gst/libgst.la"
1082 GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include"
1083 AC_SUBST(GST_LIBS)
1084 AC_SUBST(GST_CFLAGS)
1085
1086 dnl Private vars for libgst only
1087 LIBGST_LIBS="$LIBS"
1088 LIBGST_CFLAGS="$CFLAGS $GST_CFLAGS"
1089 AC_SUBST(LIBGST_LIBS)
1090 AC_SUBST(LIBGST_CFLAGS)
1091
1092 dnl CFLAGS for everyone else
1093 CFLAGS="$CFLAGS $GST_CFLAGS"
1094
1095 dnl Needed to make automake 1.4g happy.
1096 dnl FIXME: find as properly, rather than just using CC
1097 AS="\$(CC)"
1098
1099 dnl Having to AC_SUBST these is messy, but doesn't seem to do any harm.
1100 dnl I'm not sure whether it's really necessary, but it removes some warnings
1101 dnl when automake 1.4g runs, and may be beneficial elsewhere.
1102 AC_SUBST(LIBS)
1103 AC_SUBST(CFLAGS)
1104 AC_SUBST(CPPFLAGS)
1105 AC_SUBST(LDFLAGS)
1106 AC_SUBST(AS)
1107 AC_SUBST(ASFLAGS)
1108
1109
1110 dnl #############################
1111 dnl # Configure the subpackages #
1112 dnl #############################
1113
1114 dnl AC_CONFIG_SUBDIRS(gist)
1115 dnl AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
1116
1117 dnl ##################################################
1118 dnl # Prepare informative messages to display at end #
1119 dnl ##################################################
1120
1121 infomessages=
1122
1123 if test "x$PLUGINS_USE_SRCDIR" = xyes; then
1124   infomessages="$infomessages
1125 *** Warning: You have configured using the --enable-plugin-srcdir option.
1126
1127 This option is for development purposes only: binaries built with
1128 it should be used with code in the build tree only.  To build an
1129 installable version, use ./configure without the --enable-plugin-srcdir
1130 option.  Note that the autogen.sh script supplies the plugin srcdir
1131 option automatically - it cannot be used to configure installable builds.
1132
1133 "
1134 fi
1135
1136 dnl #########################
1137 dnl # Make the output files #
1138 dnl #########################
1139
1140 SUBSTFOR configure.ac:AC_OUTPUT(
1141 SUBSTFOR configure.ac:Makefile
1142 SUBSTFOR configure.in:AC_OUTPUT([Makefile
1143 include/Makefile
1144 gst/Makefile
1145 gst/gstversion.h
1146 gst/types/Makefile
1147 gst/elements/Makefile
1148 gst/autoplug/Makefile
1149 libs/Makefile
1150 libs/riff/Makefile
1151 libs/getbits/Makefile
1152 libs/putbits/Makefile
1153 libs/idct/Makefile
1154 libs/audio/Makefile
1155 plugins/Makefile
1156 plugins/aasink/Makefile
1157 plugins/alsa/Makefile
1158 plugins/au/Makefile
1159 plugins/audiofile/Makefile
1160 plugins/audioscale/Makefile
1161 plugins/avi/Makefile
1162 plugins/avi/wincodec/Makefile
1163 plugins/avi/winaudio/Makefile
1164 plugins/flx/Makefile
1165 plugins/festival/Makefile
1166 plugins/flac/Makefile
1167 plugins/jpeg/Makefile
1168 plugins/mp3decode/Makefile
1169 plugins/mp3decode/types/Makefile
1170 plugins/mp3decode/xa/Makefile
1171 plugins/mp3decode/mpg123/Makefile
1172 plugins/mp3decode/mad/Makefile
1173 plugins/mp3decode/parse/Makefile
1174 plugins/mp3encode/Makefile
1175 plugins/mp3encode/lame/Makefile
1176 plugins/mpeg2/Makefile
1177 plugins/mpeg2/parse/Makefile
1178 plugins/mpeg2/ac3parse/Makefile
1179 plugins/mpeg2/ac3dec/Makefile
1180 plugins/mpeg2/video/Makefile
1181 plugins/mpeg2/mpeg2enc/Makefile
1182 plugins/mpeg2/mpeg2dec/Makefile
1183 plugins/mpeg2/subtitles/Makefile
1184 plugins/mpeg2/videoparse/Makefile
1185 plugins/mpeg2/mpegtypes/Makefile
1186 plugins/mpeg1/Makefile
1187 plugins/mpeg1/mpegtypes/Makefile
1188 plugins/mpeg1/mpeg_play/Makefile
1189 plugins/mpeg1/mpegaudio/Makefile
1190 plugins/mpeg1/parse/Makefile
1191 plugins/mpeg1/system_encode/Makefile
1192 plugins/mpeg1/mpeg1encoder/Makefile
1193 plugins/mpeg1video/Makefile
1194 plugins/mpeg1video/parse/Makefile
1195 plugins/oss/Makefile
1196 plugins/rtp/Makefile
1197 plugins/rtp/rtpsend/Makefile
1198 plugins/mulaw/Makefile
1199 plugins/alaw/Makefile
1200 plugins/filters/Makefile
1201 plugins/filters/smooth/Makefile
1202 plugins/filters/median/Makefile
1203 plugins/filters/ladspa/Makefile
1204 plugins/filters/stereo2mono/Makefile
1205 plugins/filters/mono2stereo/Makefile
1206 plugins/filters/intfloatconvert/Makefile
1207 plugins/filters/passthrough/Makefile
1208 plugins/filters/adder/Makefile
1209 plugins/filters/colorspace/Makefile
1210 plugins/filters/volenv/Makefile
1211 plugins/filters/level/Makefile
1212 plugins/filters/lav/Makefile
1213 plugins/filters/cutter/Makefile
1214 plugins/filters/deinterlace/Makefile
1215 plugins/gnomevfs/Makefile
1216 plugins/icecast/Makefile
1217 plugins/icecast/icecastsend/Makefile
1218 plugins/effects/Makefile
1219 plugins/effects/stereo/Makefile
1220 plugins/effects/volume/Makefile
1221 plugins/udp/Makefile
1222 plugins/visualization/Makefile
1223 plugins/visualization/spectrum/Makefile
1224 plugins/visualization/vumeter/Makefile
1225 plugins/visualization/synaesthesia/Makefile
1226 plugins/visualization/smoothwave/Makefile
1227 plugins/visualization/chart/Makefile
1228 plugins/videoscale/Makefile
1229 plugins/xvideosink/Makefile
1230 plugins/wav/Makefile
1231 plugins/dvdsrc/Makefile
1232 plugins/vcdsrc/Makefile
1233 plugins/rtjpeg/Makefile
1234 plugins/vorbis/Makefile
1235 plugins/capture/Makefile
1236 plugins/capture/v4l/Makefile
1237 plugins/cdparanoia/Makefile
1238 plugins/esd/Makefile
1239 plugins/esd/esdsink/Makefile
1240 plugins/artsd/Makefile
1241 plugins/quicktime/Makefile
1242 plugins/xmms/Makefile
1243 plugins/arts/Makefile
1244 plugins/gsm/Makefile
1245 plugins/1394/Makefile
1246 plugins/sdlsink/Makefile
1247 plugins/dv/Makefile
1248 gstplay/Makefile
1249 dnl components/bonobo-gstmediaplay/Makefile
1250 test/Makefile
1251 test/xml/Makefile
1252 test/bindings/Makefile
1253 tests/Makefile
1254 tests/sched/Makefile
1255 tests/eos/Makefile
1256 testsuite/Makefile
1257 testsuite/capsnego/Makefile
1258 testsuite/refcounting/Makefile
1259 tests/nego/Makefile
1260 examples/Makefile
1261 examples/autoplug/Makefile
1262 examples/helloworld/Makefile
1263 examples/helloworld2/Makefile
1264 examples/launch/Makefile
1265 examples/queue/Makefile
1266 examples/queue2/Makefile
1267 examples/queue3/Makefile
1268 examples/queue4/Makefile
1269 examples/thread/Makefile
1270 examples/mixer/Makefile
1271 examples/cutter/Makefile
1272 examples/launch/Makefile
1273 examples/xml/Makefile
1274 examples/plugins/Makefile
1275 examples/typefind/Makefile
1276 examples/mixer/Makefile
1277 editor/Makefile
1278 editor/pixmaps/Makefile
1279 tools/Makefile
1280 docs/Makefile
1281 docs/gst/Makefile
1282 docs/gst/gstreamer.types
1283 docs/libs/Makefile
1284 docs/plugins/Makefile
1285 docs/plugins/gstreamer-plugins.types
1286 docs/manual/Makefile
1287 docs/fwg/Makefile
1288 debian/Makefile
1289 stamp.h
1290 gstreamer-config
1291 gstreamer.pc
1292 gstreamer-uninstalled.pc
1293 SUBSTFOR configure.in:gstreamer.spec])
1294 SUBSTFOR configure.in:AC_OUTPUT_COMMANDS([chmod +x gstreamer-config;
1295 SUBSTFOR configure.in:echo "$infomessages"])
1296 SUBSTFOR configure.ac:gstreamer.spec,
1297 SUBSTFOR configure.ac:chmod +x gstreamer-config
1298 SUBSTFOR configure.ac:echo "$infomessages"
1299 SUBSTFOR configure.ac:)