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