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