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