cosmetics
[platform/upstream/gstreamer.git] / configure.ac
1 dnl autoconf configuration file for plugins 
2 AC_INIT
3 dnl FIXME take something else ?
4 AC_CONFIG_SRCDIR([COPYING])
5
6 AC_CANONICAL_TARGET([])
7
8 AM_CONFIG_HEADER(config.h)
9
10 GST_VERSION_MAJOR=0
11 GST_VERSION_MINOR=3
12 GST_VERSION_MICRO=11
13
14 dnl we use a datestamped release tag during CVS development
15 GST_VERSION_RELEASE=`date +%Y%m%d`
16 dnl we use a normal release tag increased manually when releasing
17 dnl GST_VERSION_RELEASE=1
18
19 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
20
21 PACKAGE=gst-plugins
22 VERSION=$GST_VERSION
23
24 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
25 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
26 AC_SUBST(PACKAGE)
27 AC_SUBST(VERSION)
28 AC_DEFINE_UNQUOTED(GST_VERSION_RELEASE, "$GST_VERSION_RELEASE")
29 AC_SUBST(GST_VERSION_RELEASE)
30
31 dnl libtool
32 GST_CURRENT=2
33 GST_REVISION=0
34 GST_AGE=0
35 GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
36
37 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
38 dnl Add parameters for aclocal
39 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
40 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
41
42 AC_SUBST(GST_VERSION_MAJOR)
43 AC_SUBST(GST_VERSION_MINOR)
44 AC_SUBST(GST_VERSION_MICRO)
45 AC_SUBST(GST_VERSION)
46
47 AC_SUBST(GST_CURRENT)
48 AC_SUBST(GST_REVISION)
49 AC_SUBST(GST_AGE)
50 AC_SUBST(GST_LIBVERSION)
51
52 AM_MAINTAINER_MODE
53
54 AC_PROG_CC
55 AM_PROG_CC_STDC
56 AM_PROG_AS
57 AS="${CC}"
58 AC_PROG_CXX
59 AC_PROG_CXXCPP
60 AC_ISC_POSIX
61
62 dnl We disable static building for development, for time savings
63 dnl *NOTE*: dnl this line before release, so release does static too
64 AM_DISABLE_STATIC
65 AC_LIBTOOL_DLOPEN
66 AM_PROG_LIBTOOL
67
68 AC_HEADER_STDC([])
69
70 dnl ###########################################
71 dnl # Super Duper options for plugin building #
72 dnl ###########################################
73
74 dnl experimental plugins; stuff that hasn't had the dust settle yet
75 dnl read 'builds, but might not work'
76 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plugins],,
77 [HAVE_EXPERIMENTAL=yes],disabled,
78 [
79   AC_MSG_WARN(building experimental plugins)
80   USE_SMOOTHWAVE="yes"
81 ],[
82   AC_MSG_NOTICE(not building experimental plugins)
83   USE_SMOOTHWAVE="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   USE_VGA="yes"
92   USE_XMMS="yes"
93   dnl AC_MSG_NOTICE(actually there are no broken plugins at the moment)
94 ],[
95   USE_VGA="no"
96   USE_XMMS="no"
97   AC_MSG_NOTICE(not building broken plugins)
98 ])
99
100 dnl ##############################
101 dnl # Do automated configuration #
102 dnl ##############################
103
104 dnl Check for tools:
105 dnl ================
106
107 dnl modify pkg-config path
108 AC_ARG_WITH(pkg-config-path, 
109    AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
110    [export PKG_CONFIG_PATH=${withval}])
111
112 dnl Check for nasm
113 AC_PATH_PROG(NASM_PATH, nasm, no)
114 AC_SUBST(NASM_PATH)
115 if test x$NASM_PATH = xno; then
116   AC_MSG_WARN(Couldn't find nasm)
117   HAVE_NASM="no"
118 else
119   AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is available])
120   HAVE_NASM="yes"
121 fi
122
123 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
124 PKG_CHECK_MODULES(GST, gstreamer >= 0.3.1, HAVE_GST="yes", HAVE_GST="no")
125
126 if test "x$HAVE_GST" = "xno"; then
127   AC_MSG_ERROR(no GStreamer found)
128 fi
129
130 dnl Set up conditionals for (target) architecture:
131 dnl ==============================================
132
133 dnl Determine CPU
134 case "x${target_cpu}" in
135   xi?86 | k?) HAVE_CPU_I386=yes
136               AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86])
137               dnl FIXME could use some better detection
138               dnl       (ie CPUID)
139               case "x${target_cpu}" in
140                 xi386 | xi486) ;;
141                 *)             AC_DEFINE(HAVE_RDTSC) ;;
142               esac ;;
143   xpowerpc)   HAVE_CPU_PPC=yes
144               AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PPC]) ;;
145   xalpha)     HAVE_CPU_ALPHA=yes
146               AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;;
147   xarm*)      HAVE_CPU_ARM=yes
148               AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
149   xsparc*)    HAVE_CPU_SPARC=yes
150               AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
151   xmips*)     HAVE_CPU_MIPS=yes
152               AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
153   xhppa*)     HAVE_CPU_HPPA=yes
154               AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
155 esac
156
157 dnl Determine endianness
158 AC_C_BIGENDIAN
159
160 dnl Check for MMX-capable compiler
161 AC_MSG_CHECKING(for MMX-capable compiler)
162 AC_TRY_RUN([
163 #include "include/mmx.h"
164
165 main()
166 { movq_r2r(mm0, mm1); return 0; }
167 ],
168 [
169 HAVE_LIBMMX="yes"
170 AC_MSG_RESULT(yes)
171 ],
172 HAVE_LIBMMX="no"
173 AC_MSG_RESULT(no)
174 ,
175 HAVE_LIBMMX="no"
176 AC_MSG_RESULT(no)
177 )
178
179 dnl
180 dnl We should really use AC_SYS_LARGEFILE, but the problem is
181 dnl many of the plugins don't include "config.h".  To assure
182 dnl binary compatibility, it is necessary that all gstreamer
183 dnl code be compiled with the same sizeof(off_t), so we use
184 dnl the following crude hack.
185 dnl
186
187 AC_MSG_CHECKING(for large file support)
188 AC_TRY_RUN([
189 #define _LARGEFILE_SOURCE
190 #define _FILE_OFFSET_BITS 64
191 #include <sys/types.h>
192 int main () { return !(sizeof(off_t) == 8); }
193 ],
194 [
195 AC_MSG_RESULT(yes)
196 GST_CFLAGS="$GST_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
197 ],
198 [
199 AC_MSG_RESULT(no)
200 ],
201 [
202 AC_MSG_RESULT(no)
203 ])
204
205 dnl Check for essential libraries first:
206 dnl ====================================
207
208 if test -n "`echo $GST_CFLAGS | grep USE_GLIB2`"; then
209   USE_GLIB2=yes
210 else
211   USE_GLIB2=no
212 fi
213
214 dnl needed for some plugins and demos, now's a nice time to check for gtk
215 if test x$USE_GLIB2 = xno; then
216   AM_PATH_GTK(1.2.0,,
217               AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
218   HAVE_GTK=yes
219   # we have to have it
220 else
221   PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
222
223   GTK_CFLAGS=$GTK2_CFLAGS
224   GTK_LIBS=$GTK2_LIBS
225 fi
226 AC_SUBST(GTK_LIBS)
227 AC_SUBST(GTK_CFLAGS)
228
229 dnl Check for X11 extensions
230 AC_PATH_XTRA
231 if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
232   AC_MSG_ERROR(can not find X11)
233 fi
234 AC_SUBST(X_CFLAGS)
235 AC_SUBST(X_PRE_LIBS)
236 AC_SUBST(X_EXTRA_LIBS)
237 AC_SUBST(X_LIBS)
238
239 dnl ==========================================================================
240 dnl ============================= gst plugins ================================
241 dnl ==========================================================================
242
243 GST_PLUGINS_ALL="\
244         ac3parse adder audioscale auparse avi chart\
245         cutter deinterlace flx intfloat law level\
246         median mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\
247         mpegaudio mpegaudioparse mpegstream mpegtypes\
248         passthrough playondemand rtjpeg silence sine\
249         smooth spectrum speed stereo stereomono\
250         synaesthesia udp videoscale volenv volume vumeter wavparse y4m"
251
252 AC_SUBST(GST_PLUGINS_ALL)
253
254 GST_PLUGINS_SELECTED=""
255
256 AC_ARG_WITH(plugins,
257     AC_HELP_STRING([--with-plugins],[comma-separated list of plugins to compile]),
258     [for i in `echo $withval | tr , ' '`; do
259         if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
260             GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
261         else
262             echo "plugin $i not recognized, ignoring..."
263         fi
264     done],
265     [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
266
267 AC_SUBST(GST_PLUGINS_SELECTED)
268
269 dnl ==========================================================================
270 dnl ============================= sys plugins ================================
271 dnl ==========================================================================
272
273
274 dnl *** OSS audio ***
275 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
276 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
277   AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
278 ])
279
280 dnl *** QuickCam ***
281 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
282 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
283 dnl this one is for hadess, no qcam when no nasm found
284   if test "x$HAVE_NASM" = "xno";
285   then
286     HAVE_QCAM="no"
287     AC_MSG_WARN([QuickCam needs nasm])
288   else
289     HAVE_QCAM="yes"
290   fi
291 ])
292
293 dnl *** Video 4 Linux ***
294 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
295 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc, [
296   AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>])
297 ])
298
299 dnl *** Video CD ***
300 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
301 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
302   AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
303 ])
304
305 dnl *** VGA ***
306 translit(dnm, m, l) AM_CONDITIONAL(USE_VGA, true)
307 GST_CHECK_FEATURE(VGA, [VGA], vgavideosink, [
308   AC_CHECK_HEADER(asm/vga.h, HAVE_VGA="yes", HAVE_VGA="no")
309 ])
310
311 dnl *** XVideo ***
312 dnl Look for the PIC library first, Debian requires it.
313 dnl Check debian-devel archives for gory details.
314 dnl 20020110:
315 dnl At the moment XFree86 doesn't distribute shared libXv due
316 dnl to unstable API.  On many platforms you CAN NOT link a shared
317 dnl lib to a static non-PIC lib.  This is what the xvideo GStreamer
318 dnl plugin wants to do.  So Debian distributes a PIC compiled
319 dnl version of the static lib for plugins to link to when it is
320 dnl inappropriate to link the main application to libXv directly.
321 dnl FIXME: add check if this platform can support linking to a
322 dnl        non-PIC libXv, if not then don not use Xv.
323 dnl FIXME: perhaps warn user if they have a shared libXv since
324 dnl        this is an error until XFree86 starts shipping one
325 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
326 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [
327   dnl check for PIC static lib
328   GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv_pic -lXext")
329   if test x$HAVE_XVIDEO = xno; then
330     dnl PIC lib not found, check for regular lib
331     GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
332   fi
333   AC_SUBST(XVIDEO_LIBS)
334 ])
335
336 dnl Next, check for the optional libraries:
337 dnl These are all libraries used in building plugins
338 dnl ================================================
339 dnl let's try and sort them alphabetically, shall we ?
340
341 echo
342 echo
343 AC_MSG_NOTICE(Checking for plugin libraries)
344
345 dnl *** a52dec ***
346 translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
347 GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
348   GST_CHECK_LIBHEADER(A52DEC, a52, a52_init, -lm, a52dec/a52.h, A52DEC_LIBS="-la52")
349 ])
350
351 dnl *** aalib ***
352 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
353 GST_CHECK_FEATURE(AALIB, [aasink plugin], aasink, [
354   AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
355 ])
356
357 dnl *** alsa ***
358 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
359 GST_CHECK_FEATURE(ALSA, [alsa plugins], gstalsa, [
360   AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
361 ])
362
363 dnl *** arts ***
364
365 dnl if mcopidl can't be found there's no use in compiling it
366 AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
367 if test "xHAVE_MCOPIDL" = "xno";
368 then
369   USE_ARTS=no
370 fi
371
372 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTS, true)
373 GST_CHECK_FEATURE(ARTS, [arts plugins], arts, [
374   AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
375 ])
376 dnl if mcopidl can't be found there's no use in compiling it
377 AC_PATH_PROG(MCOPIDL, mcopidl, yes, no)
378 if test "xHAVE_MCOPIDL" = "xno";
379 then
380   USE_ARTS=NO
381 fi
382
383 dnl *** artsc ***
384 translit(dnm, m, l) AM_CONDITIONAL(USE_ARTSC, true)
385 GST_CHECK_FEATURE(ARTSC, [artsd plugins], artsdsink, [
386   GST_CHECK_ARTSC()
387 ])
388
389 dnl *** audiofile ***
390 dnl this check uses the GST_CHECK_CONFIGPROG macro
391 translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
392 GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
393   translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
394   translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
395   GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
396 ])
397
398 dnl *** avifile ***
399 dnl this check uses the GST_CHECK_CONFIGPROG macro
400 dnl this check needs more fixing
401 dnl translit(dnm, m, l) AC_SUBST(AVIFILE_LIBS)
402 translit(dnm, m, l) AM_CONDITIONAL(USE_AVIFILE, true)
403 GST_CHECK_FEATURE(AVIFILE, [avifile], windec winenc, [
404   translit(dnm, m, l) AC_SUBST(AVIFILE_CFLAGS)
405   GST_CHECK_CONFIGPROG(AVIFILE, avifile-config)
406   AVIFILE_LIBS="$AVIFILE_LIBS -lstdc++"
407   AC_SUBST(AVIFILE_LIBS)
408 ])
409
410 dnl *** CDParanoia ***
411 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
412 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
413   GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, cdda_open, -lm, cdda_interface.h, CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia")
414   AC_SUBST(CDPARANOIA_LIBS)
415 ])
416 dnl FIXME : add second check somehow if that is necessary
417 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
418 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
419
420 dnl *** dv ***
421 translit(dnm, m, l) AM_CONDITIONAL(USE_DV, true)
422 GST_CHECK_FEATURE(DV, [dv library], dv, [
423   GST_CHECK_LIBHEADER(DV, dv, dv_init, -lm $GST_CFLAGS $GST_LIBS, libdv/dv.h, DV_LIBS="-ldv")
424   AC_SUBST(DV_LIBS)
425 ])
426
427 dnl *** dvdread ***
428 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
429 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdsrc, [
430   GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
431   AC_SUBST(DVDREAD_LIBS)
432 ])
433
434 dnl **** ESound ****
435 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
436 GST_CHECK_FEATURE(ESD, [esound plugins], esdsrc esdsink, [
437   AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
438 ])
439
440 dnl **** festival ****
441 translit(dnm, m, l) AM_CONDITIONAL(USE_FESTIVAL, true)
442 GST_CHECK_FEATURE(FESTIVAL, [festival plugins], festivalsrc, [
443   dnl NOTE: just using local net connection now, add this lib check
444   dnl       in the future if needed
445   dnl AC_LANG_PUSH(C++)
446   dnl dnl FIXME: took out func to check for
447   dnl dnl This check puts festival_tidy_up in extern "C".
448   dnl dnl But, at least on Debian as of 20020110, it is compiled with name
449   dnl dnl mangling C++ nonsense and symbols can't resolve
450   dnl dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, festival_tidy_up, , festival/festival.h, FESTIVAL_LIBS="-lFestival")
451   dnl GST_CHECK_LIBHEADER(FESTIVAL, Festival, , , festival/festival.h, FESTIVAL_LIBS="-lFestival")
452   dnl AC_LANG_POP(C++)
453   dnl AC_SUBST(FESTIVAL_LIBS)
454   HAVE_FESTIVAL=yes
455 ])
456
457 dnl *** FLAC ***
458 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
459 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
460   GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_decoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC")
461   AC_SUBST(FLAC_LIBS)
462 ])
463
464 dnl *** Gnome VFS ***
465 dnl this check uses the GST_CHECK_CONFIGPROG macro with gnome-config vfs
466 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
467 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
468 translit(dnm, m, l) AC_SUBST(GNOME_VFS_LIBS)
469 translit(dnm, m, l) AC_SUBST(GNOME_VFS_CFLAGS)
470 GST_CHECK_CONFIGPROG(GNOME_VFS, gnome-config vfs)
471 ])
472
473 dnl *** gsm ***
474 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
475 GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
476   GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
477   if test $HAVE_GSM != "yes"; then
478     GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
479     if test $HAVE_GSM = "yes"; then 
480       AC_DEFINE(GSM_HEADER_IN_SUBDIR)
481     fi
482   fi
483   AC_SUBST(GSM_LIBS)
484 ])
485
486 dnl *** Hermes ***
487 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
488 GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
489   GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
490 ], AC_SUBST(HERMES_LIBS))
491
492 dnl *** http ***
493 translit(dnm, m, l) AM_CONDITIONAL(USE_HTTP, true)
494 GST_CHECK_FEATURE(HTTP, [http plugins], gsthttpsrc, [
495   dnl FIXME: need to check for header
496   GHTTP_LIBS=
497   GST_HTTPSRC_GET_TYPE=
498   if test x$USE_GLIB2 = xyes; then
499     AC_MSG_WARN(ghttp disabled for glib2.0)
500   else
501     AC_CHECK_LIB(ghttp, ghttp_request_new,
502       [HTTP_LIBS="-lghttp"
503        GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
504        HAVE_HTTP=yes
505       ], :, $LIBS)
506   fi
507   AC_SUBST(HTTP_LIBS)
508   AC_SUBST(GST_HTTPSRC_GET_TYPE)
509 ])
510
511 dnl *** lame ***
512 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
513 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
514 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h, LAME_LIBS="-lmp3lame")
515 ])
516 AC_SUBST(LAME_LIBS)
517
518
519 dnl FIXME : check if these CPP flags can be dealt with otherwise
520 dnl libdvcheck_save_CPPFLAGS="$CPPFLAGS"
521 dnl CPPFLAGS="$CPPFLAGS $GST_CFLAGS"
522 dnl AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
523 dnl CPPFLAGS="$libdvcheck_save_CPPFLAGS"
524
525 dnl *** jpeg ***
526 dnl FIXME: we could use header checks here as well IMO
527 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
528 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
529   AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
530   JPEG_LIBS="-ljpeg"
531   AC_SUBST(JPEG_LIBS)
532 ])
533
534 dnl *** mad ***
535 dnl FIXME: we could use header checks here as well IMO
536 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
537 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
538   AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
539 ])
540 AC_SUBST(MAD_LIBS)
541
542 dnl *** mikmod ***
543 translit(dnm, m, l) AM_CONDITIONAL(USE_MIKMOD, true)
544 GST_CHECK_FEATURE(MIKMOD, [mikmod plugin], mikmod, [
545   AM_PATH_LIBMIKMOD(, HAVE_MIKMOD=yes, HAVE_MIKMOD=no)
546   AC_SUBST(MIKMOD_LIBS, "$LIBMIKMOD_LIBS")
547   AC_SUBST(MIKMOD_CFLAGS, "$LIBMIKMODCFLAGS")
548 ])
549
550 dnl *** mjpegtools ***
551 translit(dnm, m, l) AM_CONDITIONAL(USE_MJPEGTOOLS, true)
552 GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
553   PKG_CHECK_MODULES(MJPEGTOOLS, mjpegtools, HAVE_MJPEGTOOLS="yes", HAVE_MJPEGTOOLS="no")
554   AC_SUBST(MJPEGTOOLS_LIBS)
555   AC_SUBST(MJPEGTOOLS_CFLAGS)
556 ])
557
558 dnl *** mpeg2dec ***
559 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
560 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
561   GST_CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init,, mpeg2dec/mpeg2.h, MPEG2DEC_LIBS="-lmpeg2 -lmpeg2dec")
562   AC_SUBST(MPEG2DEC_LIBS)
563 ])
564
565 dnl *** openquicktime ***
566 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENQUICKTIME, true)
567 GST_CHECK_FEATURE(OPENQUICKTIME, [Open Quicktime], quicktime_parser quicktime_decoder quicktime_demux,[
568   GST_CHECK_LIBHEADER(OPENQUICKTIME, openquicktime, quicktime_init,, openquicktime/openquicktime.h, OPENQUICKTIME_LIBS="-lopenquicktime")
569   AC_SUBST(OPENQUICKTIME_LIBS)
570 ])
571
572 dnl *** raw1394 ***
573 translit(dnm, m, l) AM_CONDITIONAL(USE_RAW1394, true)
574 GST_CHECK_FEATURE(RAW1394, [raw1394 library], dv1394src, [
575   GST_CHECK_LIBHEADER(RAW1394, raw1394, raw1394_get_handle,, libraw1394/raw1394.h, RAW1394_LIBS="-raw1394")
576   AC_SUBST(RAW1394_LIBS)
577 ])
578
579 dnl *** rtp ***
580 dnl FIXME : adapt and make it work
581 translit(dnm, m, l) AM_CONDITIONAL(USE_RTP, true)
582 GST_CHECK_FEATURE(RTP, [RTP library], rtpenc rtpdec,[
583   AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_RTP=yes, HAVE_RTP=no, $GST_CFLAGS $GST_LIBS)
584   RTP_LIBS="-lrtp"
585   AC_SUBST(RTP_LIBS)
586 ])
587
588
589 dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
590 dnl can use GST_* which should have GLIB_* info
591 dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
592 dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
593 dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
594 dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
595
596 dnl *** SDL ***
597 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
598 GST_CHECK_FEATURE(SDL, [SDL plugin], sdlvideosink, [
599  AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
600 ])
601
602 dnl *** shout ***
603 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT, true)
604 GST_CHECK_FEATURE(SHOUT, [shout plugin], icecastsend, [
605   GST_CHECK_LIBHEADER(SHOUT, shout, shout_init_connection,, shout/shout.h, SHOUT_LIBS="-lshout")
606   AC_SUBST(SHOUT_LIBS)
607 ])
608
609 dnl *** sidplay ***
610 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
611 GST_CHECK_FEATURE(SIDPLAY, [sidplay plugin], sidplay, [
612   GST_PATH_SIDPLAY()
613 ])
614
615 dnl *** smoothwave ***
616 translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHWAVE, true)
617 GST_CHECK_FEATURE(SMOOTHWAVE, [smoothwave plugin], smoothwave, [
618   if test $HAVE_GTK = "yes"; then HAVE_SMOOTHWAVE=yes; fi;
619 ])
620
621 dnl *** vorbis ***
622 dnl AM_PATH_VORBIS only takes two options
623 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
624 GST_CHECK_FEATURE(VORBIS, [vorbis plugin], vorbisenc vorbisdec, [
625   AM_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
626 ])
627
628 dnl *** XMMS ***
629 translit(dnm, m, l) AM_CONDITIONAL(USE_XMMS, true)
630 GST_CHECK_FEATURE(XMMS, [xmms plugin], xmms, [
631   AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
632 ])
633
634 dnl Check for atomic.h
635 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
636 dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H)
637 AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no)
638 dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't)
639 if test x$HAVE_ATOMIC_H = xyes; then
640   AC_TRY_RUN([
641 #include "asm/atomic.h"
642 main() { atomic_t t; atomic_set(&t,0); atomic_inc(&t); atomic_add(1,&t);return 0;}
643   ],, [
644     # Not successful
645     if test x$HAVE_ATOMIC_H = xyes; then
646       AC_MSG_WARN(Atomic reference counting is out of date: doing without.)
647     fi
648     HAVE_ATOMIC_H=no
649   ], [
650     # Cross compiling
651     AC_MSG_RESULT(yes)
652     AC_MSG_WARN(Can't check properly for atomic reference counting.  Assuming OK.)
653   ])
654 fi
655
656 dnl ######################################################################
657 dnl # Check command line parameters, and set shell variables accordingly #
658 dnl ######################################################################
659
660 AC_ARG_ENABLE(libmmx,
661 [  --enable-libmmx              use libmmx, if available],
662 [case "${enableval}" in
663   yes) USE_LIBMMX=$HAVE_LIBMMX ;;
664   no)  USE_LIBMMX=no ;;
665   *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
666 esac], 
667 [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
668
669 AC_ARG_ENABLE(atomic,
670 [  --enable-atomic              use atomic reference counting header],
671 [case "${enableval}" in
672   yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
673   noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
674   no)  USE_ATOMIC_H=no;;
675   *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
676 esac], 
677 [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
678
679 AC_ARG_ENABLE(plugin-builddir,
680 [  --enable-plugin-builddir     allow tests/demos to use non-installed plugins ],
681 [case "${enableval}" in
682   yes) PLUGINS_USE_BUILDDIR=yes ;;
683   no)  PLUGINS_USE_BUILDDIR=no ;;
684   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
685 esac], 
686 [PLUGINS_USE_BUILDDIR=no]) dnl Default value
687
688 AC_ARG_ENABLE(debug,
689 [  --enable-debug               compile with -g debugging info],
690 [case "${enableval}" in
691   yes) USE_DEBUG=yes ;;
692   no)  USE_DEBUG=no ;;
693   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
694 esac], 
695 [USE_DEBUG=yes]) dnl Default value
696
697 AC_ARG_ENABLE(DEBUG,
698 [  --enable-DEBUG               compiles in a large number of debugging messages],
699 [case "${enableval}" in
700   yes) ENABLE_DEBUG=yes ;;
701   no)  ENABLE_DEBUG=no ;;
702   *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
703 esac], 
704 [ENABLE_DEBUG=yes]) dnl Default value
705 if test x$ENABLE_DEBUG = xyes; then
706   AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
707 fi
708
709 AC_ARG_ENABLE(INFO,
710 [  --disable-INFO               disables compilation of informational messages],
711 [case "${enableval}" in
712   yes) ENABLE_INFO=yes ;;
713   no)  ENABLE_INFO=no ;;
714   *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
715 esac], 
716 [ENABLE_INFO=yes]) dnl Default value
717 if test x$ENABLE_INFO = xyes; then
718   AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
719 fi
720
721 AC_ARG_ENABLE(debug-color,
722 [  --disable-debug-color        disables color output of DEBUG and INFO output],
723 [case "${enableval}" in
724   yes) ENABLE_DEBUG_COLOR=yes ;;
725   no)  ENABLE_DEBUG_COLOR=no ;;
726   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
727 esac], 
728 [ENABLE_DEBUG_COLOR=yes]) dnl Default value
729 if test "x$ENABLE_DEBUG_COLOR" = xyes; then
730   AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
731 fi
732
733 AC_ARG_ENABLE(profiling,
734 [  --enable-profiling           adds -pg to compiler commandline, for profiling],
735 [case "${enableval}" in
736   yes) USE_PROFILING=yes ;;
737   no)  UES_PROFILING=no ;;
738   *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
739 esac], 
740 [USE_PROFILING=no]) dnl Default value
741
742 dnl default to building registry in the source tree if we are enabling plugin build dir
743 if test "x$PLUGINS_USE_BUILDDIR"="xyes"; then
744   GST_CONFIG_DIR=`pwd`
745 else
746   GST_CONFIG_DIR=/etc/gstreamer
747 fi
748 AC_ARG_WITH(configdir,
749 [  --with-configdir             specify path to use for configdir],
750 [case "${withval}" in
751   yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
752   no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
753   *) GST_CONFIG_DIR="${withval}" ;;
754 esac], 
755 [:]) dnl Default value
756
757 AC_ARG_ENABLE(docs-build,
758 [  --enable-docs-build          enable building of documentation],
759 [case "${enableval}" in
760   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; ;;
761   no)  BUILD_DOCS=no ;;
762   *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
763 esac], 
764 [BUILD_DOCS=no]) dnl Default value
765
766 AC_ARG_ENABLE(plugin-docs,
767 [  --enable-plugin-docs         enable the building of plugin documentation
768                                (this is currently broken, so off by default)],
769 [case "${enableval}" in
770   yes) BUILD_PLUGIN_DOCS=yes ;;
771   no)  BUILD_PLUGIN_DOCS=no ;;
772   *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
773 esac], 
774 [BUILD_PLUGIN_DOCS=no]) dnl Default value
775
776 AC_ARG_ENABLE(tests,
777 [  --disable-tests              disable building test apps],
778 [case "${enableval}" in
779   yes) BUILD_TESTS=yes ;;
780   no)  BUILD_TESTS=no ;;
781   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
782 esac], 
783 [BUILD_TESTS=yes]) dnl Default value
784
785 AC_ARG_ENABLE(examples,
786 [  --disable-examples           disable building examples],
787 [case "${enableval}" in
788   yes) BUILD_EXAMPLES=yes ;;
789   no)  BUILD_EXAMPLES=no ;;
790   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
791 esac], 
792 [BUILD_EXAMPLES=yes]) dnl Default value
793
794 dnl Next, check for the optional components:
795 dnl ========================================
796
797
798 AC_DEFUN(GST_SUBSYSTEM_DISABLE,
799 [dnl
800 dnl Add a subsystem --disable flag and all the necessary symbols and substitions
801 dnl
802 AC_ARG_ENABLE(translit([$1], A-Z, a-z), 
803 [  ]builtin(format, --disable-%-17s  disable %s, translit([$1], A-Z, a-z), $2),
804 [ case "${enableval}" in
805     yes) GST_DISABLE_[$1]=no ;;
806     no) GST_DISABLE_[$1]=yes ;;
807     *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
808   esac],
809 [GST_DISABLE_[$1]=no]) dnl Default value
810 if test x$GST_DISABLE_[$1] = xyes; then
811   AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
812   GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
813 fi
814 AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
815 AC_SUBST(GST_DISABLE_[$1]_DEFINE)
816 GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
817 ])
818
819 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
820 GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
821 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true)
822 GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
823 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_AUTOPLUG, true)
824 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
825 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_PARSE, true)
826 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
827 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TRACE, true)
828 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
829 translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_REGISTRY, true)
830 GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
831
832 GST_CFLAGS="$GST_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
833
834
835 dnl ################################################
836 dnl # Set defines according to variables set above #
837 dnl ################################################
838
839
840 if test "x$USE_LIBMMX" = xyes; then
841   AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
842 fi
843
844 if test "x$USE_ATOMIC_H" = xyes; then
845   AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
846 fi
847
848 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
849   AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
850 fi
851
852 dnl if test "x$USE_DEBUG" = xyes; then
853 dnl   CFLAGS="$CFLAGS -g"
854 dnl fi
855
856 if test "x$USE_PROFILING" = xyes; then
857 dnl  CFLAGS="$CFLAGS -pg -fprofile-arcs"
858   FOMIT_FRAME_POINTER=""
859 else
860   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
861 fi
862
863 dnl
864 dnl AC_SUBST(FOMIT_FRAME_POINTER)
865 dnl
866
867 if test "x$HAVE_LIBMIKMOD" = xyes; then
868   AC_DEFINE(HAVE_LIBMIKMOD)
869 fi
870
871 if test "x$HAVE_LIBGSM" = xyes; then
872   AC_DEFINE(HAVE_LIBGSM)
873 fi
874
875 dnl #############################
876 dnl # Set automake conditionals #
877 dnl #############################
878
879 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
880 dnl HAVE_ and it is likely to be easier to stick with the old name
881 AM_CONDITIONAL(HAVE_CPU_I386,       test "x$HAVE_CPU_I386" = "xyes")
882 AM_CONDITIONAL(HAVE_CPU_PPC,        test "x$HAVE_CPU_PPC" = "xyes")
883 AM_CONDITIONAL(HAVE_CPU_ALPHA,      test "x$HAVE_CPU_ALPHA" = "xyes")
884 AM_CONDITIONAL(HAVE_CPU_ARM,        test "x$HAVE_CPU_ARM" = "xyes")
885 AM_CONDITIONAL(HAVE_CPU_SPARC,      test "x$HAVE_CPU_SPARC" = "xyes")
886 AM_CONDITIONAL(HAVE_LIBMMX,         test "x$USE_LIBMMX" = "xyes")
887
888 AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
889
890 AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
891 AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
892
893 AM_CONDITIONAL(HAVE_LIBMIKMOD,      test "x$HAVE_LIBMIKMOD" = "xyes")
894 AM_CONDITIONAL(HAVE_LIBSDL,         test "x$HAVE_LIBSDL" = "xyes")
895 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
896 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
897 AM_CONDITIONAL(HAVE_GNOME,          test "x$HAVE_GNOME" = "xyes")
898 AM_CONDITIONAL(HAVE_GTK,            test "x$HAVE_GTK" = "xyes")
899 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
900 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
901 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
902 AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
903 AM_CONDITIONAL(BUILD_PLUGIN_DOCS,   test "x$BUILD_PLUGIN_DOCS" = "xyes")
904 AM_CONDITIONAL(HAVE_PDFXMLTEX,      $HAVE_PDFXMLTEX)
905 AM_CONDITIONAL(HAVE_PDFTOPS,        $HAVE_PDFTOPS)
906 AM_CONDITIONAL(HAVE_XSLTPROC,       $HAVE_XSLTPROC)
907 AM_CONDITIONAL(HAVE_FIG2DEV_PNG,    $HAVE_FIG2DEV_PNG)
908 AM_CONDITIONAL(HAVE_FIG2DEV_PDF,    $HAVE_FIG2DEV_PDF)
909 AM_CONDITIONAL(HAVE_LIBRTP,         test "x$HAVE_LIBRTP" = "xyes")
910 AM_CONDITIONAL(HAVE_ARTS,           test "x$HAVE_ARTS" = "xyes")
911 AM_CONDITIONAL(HAVE_RAW1394,        test "x$HAVE_RAW1394" = "xyes")
912 AM_CONDITIONAL(HAVE_LIBDV,          test "x$HAVE_LIBDV" = "xyes")
913 AM_CONDITIONAL(HAVE_GNOME_VFS,      test "x$HAVE_GNOME_VFS" = "xyes")
914 AM_CONDITIONAL(HAVE_LIBGSM,         test "x$HAVE_LIBGSM" = "xyes")
915 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
916
917
918 dnl ############################
919 dnl # Set up some more defines #
920 dnl ############################
921
922 dnl Set location of configuration dir.
923 AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
924 AC_SUBST(GST_CONFIG_DIR)
925
926 dnl Set location of plugin directory
927 if test "x${prefix}" = "xNONE"; then
928   PLUGINS_DIR=${ac_default_prefix}/lib/gst
929 else
930   PLUGINS_DIR=${prefix}/lib/gst
931 fi
932 AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
933 AC_SUBST(PLUGINS_DIR)
934
935 dnl Set location of uninstalled plugin directory
936 PLUGINS_BUILDDIR=`pwd`
937 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
938 AC_SUBST(PLUGINS_BUILDDIR)
939
940 GST_CFLAGS="$GST_CFLAGS -I\$(top_srcdir)/gst-libs"
941 AC_SUBST(GST_LIBS)
942 AC_SUBST(GST_CFLAGS)
943
944 dnl #############################
945 dnl # Configure the subpackages #
946 dnl #############################
947
948 dnl AC_CONFIG_SUBDIRS(gist)
949 dnl AC_CONFIG_SUBDIRS(plugins/mp3decode/xing/libxing)
950
951 dnl ##################################################
952 dnl # Prepare informative messages to display at end #
953 dnl ##################################################
954
955 infomessages=
956
957 if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
958   infomessages="$infomessages
959 *** Warning: You have configured using the --enable-plugin-builddir option.
960
961 This option is for development purposes only: binaries built with
962 it should be used with code in the build tree only.  To build an
963 installable version, use ./configure without the --enable-plugin-builddir
964 option.  Note that the autogen.sh script supplies the plugin builddir
965 option automatically - it cannot be used to configure installable builds.
966
967 "
968 fi
969
970 dnl #########################
971 dnl # Make the output files #
972 dnl #########################
973
974 AC_OUTPUT(
975 Makefile
976 gstreamer-libs.pc
977 gstreamer-libs-uninstalled.pc
978 gst-plugins.spec
979 gst/Makefile
980 gst/ac3parse/Makefile
981 gst/adder/Makefile
982 gst/audioscale/Makefile
983 gst/auparse/Makefile
984 gst/avi/Makefile
985 gst/chart/Makefile
986 gst/cutter/Makefile
987 gst/deinterlace/Makefile
988 gst/flx/Makefile
989 gst/intfloat/Makefile
990 gst/law/Makefile
991 gst/level/Makefile
992 gst/median/Makefile
993 gst/mpeg1enc/Makefile
994 gst/mpeg1sys/Makefile
995 gst/mpeg1videoparse/Makefile
996 gst/mpeg2enc/Makefile
997 gst/mpeg2sub/Makefile
998 gst/mpegaudio/Makefile
999 gst/mpegaudioparse/Makefile
1000 gst/mpegstream/Makefile
1001 gst/mpegtypes/Makefile
1002 gst/passthrough/Makefile
1003 gst/playondemand/Makefile
1004 gst/rtjpeg/Makefile
1005 gst/silence/Makefile
1006 gst/sine/Makefile
1007 gst/smooth/Makefile
1008 gst/spectrum/Makefile
1009 gst/speed/Makefile
1010 gst/stereo/Makefile
1011 gst/stereomono/Makefile
1012 gst/synaesthesia/Makefile
1013 gst/udp/Makefile
1014 gst/videoscale/Makefile
1015 gst/volenv/Makefile
1016 gst/volume/Makefile
1017 gst/vumeter/Makefile
1018 gst/wavparse/Makefile
1019 gst/y4m/Makefile
1020 sys/Makefile
1021 sys/oss/Makefile
1022 sys/qcam/Makefile
1023 sys/v4l/Makefile
1024 sys/vcd/Makefile
1025 sys/vga/Makefile
1026 sys/xvideo/Makefile
1027 ext/Makefile
1028 ext/a52dec/Makefile
1029 ext/aalib/Makefile
1030 ext/alsa/Makefile
1031 ext/arts/Makefile
1032 ext/artsd/Makefile
1033 ext/audiofile/Makefile
1034 ext/avifile/Makefile
1035 ext/cdparanoia/Makefile
1036 ext/dv/Makefile
1037 ext/dvdread/Makefile
1038 ext/esd/Makefile
1039 ext/festival/Makefile
1040 ext/flac/Makefile
1041 ext/gnomevfs/Makefile
1042 ext/gsm/Makefile
1043 ext/hermes/Makefile
1044 ext/http/Makefile
1045 ext/jpeg/Makefile
1046 ext/jpeg-mmx/Makefile
1047 ext/ladspa/Makefile
1048 ext/lame/Makefile
1049 ext/mad/Makefile
1050 ext/mikmod/Makefile
1051 ext/mpeg2dec/Makefile
1052 ext/openquicktime/Makefile
1053 ext/raw1394/Makefile
1054 ext/rtp/Makefile
1055 ext/sdl/Makefile
1056 ext/shout/Makefile
1057 ext/sidplay/Makefile
1058 ext/smoothwave/Makefile
1059 ext/vorbis/Makefile
1060 ext/xmms/Makefile
1061 gst-libs/Makefile
1062 gst-libs/gst/Makefile
1063 gst-libs/gst/audio/Makefile
1064 gst-libs/gst/idct/Makefile
1065 gst-libs/gst/resample/Makefile
1066 gst-libs/gst/riff/Makefile
1067 examples/capsfilter/Makefile
1068 examples/Makefile
1069 )
1070
1071 echo -e "configure: *** Plugins that will be built : $GST_PLUGINS_YES"
1072 echo
1073 echo -e "configure: *** Plugins that will not be built : $GST_PLUGINS_NO"
1074 echo