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