Add support for libsoundtouch 1.3.1 and add an ugly workaround for the header definin...
[platform/upstream/gstreamer.git] / configure.ac
1 AC_PREREQ(2.52)
2
3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AC_INIT(GStreamer Bad Plug-ins, 0.10.5.1,
7     http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
8     gst-plugins-bad)
9
10 AG_GST_INIT
11
12 dnl initialize automake
13 AM_INIT_AUTOMAKE
14
15 dnl define PACKAGE_VERSION_* variables
16 AS_VERSION
17
18 dnl check if this is a release version
19 AS_NANO(GST_CVS="no", GST_CVS="yes")
20
21 dnl can autoconf find the source ?
22 AC_CONFIG_SRCDIR([docs/plugins/gst-plugins-bad-plugins-docs.sgml])
23
24 dnl define the output header for config
25 AM_CONFIG_HEADER([config.h])
26
27 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
28 AM_MAINTAINER_MODE
29
30 dnl sets host_* variables
31 AC_CANONICAL_HOST
32
33 dnl our libraries and install dirs use major.minor as a version
34 GST_MAJORMINOR=$GST_PLUGINS_BAD_VERSION_MAJOR.$GST_PLUGINS_BAD_VERSION_MINOR
35 dnl we override it here if we need to for the release candidate of new series
36 GST_MAJORMINOR=0.10
37 AC_SUBST(GST_MAJORMINOR)
38
39 dnl FIXME: this macro doesn't actually work;
40 dnl the generated libtool script has no support for the listed tags.
41 dnl So this needs to be fixed first if we want to use this
42 dnl AS_LIBTOOL_TAGS([CXX])
43
44 AM_PROG_LIBTOOL
45
46 dnl *** required versions of GStreamer stuff ***
47 dnl *** remove rtpmanager/equalizer stuff below when this is updated
48 GST_REQ=0.10.15.1
49 GSTPB_REQ=0.10.15.1
50
51 dnl *** autotools stuff ****
52
53 dnl allow for different autotools
54 AS_AUTOTOOLS_ALTERNATE
55
56 dnl Add parameters for aclocal
57 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
58
59 dnl set up gettext
60 dnl the version check needs to stay here because autopoint greps for it
61 AM_GNU_GETTEXT_VERSION([0.11.5])
62 AM_GNU_GETTEXT([external])
63 AG_GST_GETTEXT([gst-plugins-bad-$GST_MAJORMINOR])
64
65 dnl *** check for arguments to configure ***
66
67 AG_GST_ARG_DEBUG
68 AG_GST_ARG_PROFILING
69 AG_GST_ARG_VALGRIND
70 AG_GST_ARG_GCOV
71
72 AG_GST_ARG_EXAMPLES
73
74 AG_GST_ARG_WITH_PKG_CONFIG_PATH
75 AG_GST_ARG_WITH_PACKAGE_NAME
76 AG_GST_ARG_WITH_PACKAGE_ORIGIN
77
78 AG_GST_ARG_EXAMPLES
79
80 dnl these are all the gst plug-ins, compilable without additional libs
81 GST_PLUGINS_ALL="\
82   app \
83   bayer \
84   cdxaparse \
85   deinterlace \
86   dvdspu \
87   equalizer \
88   festival \
89   filter \
90   flv \
91   freeze \
92   h264parse \
93   interleave \
94   librfb \
95   modplug \
96   mpegtsparse \
97   mpeg4videoparse \
98   mpegvideoparse \
99   multifile \
100   mve \
101   nsf \
102   nuvdemux \
103   rawparse \
104   real \
105   replaygain \
106   rtpmanager \
107   sdp \
108   spectrum \
109   speexresample \
110   speed \
111   stereo \
112   switch \
113   tta \
114   videosignal \
115   vmnc \
116   xingheader \
117   y4m \
118   "
119
120 AC_SUBST(GST_PLUGINS_ALL)
121
122 AG_GST_ARG_WITH_PLUGINS
123
124 AG_GST_ARG_ENABLE_EXTERNAL
125
126 AG_GST_ARG_ENABLE_EXPERIMENTAL
127
128 USE_GIO=$BUILD_EXPERIMENTAL
129
130 dnl *** checks for platform ***
131
132 dnl * hardware/architecture *
133
134 dnl common/m4/gst-arch.m4
135 dnl check CPU type
136 AG_GST_ARCH
137
138 dnl Determine endianness
139 AC_C_BIGENDIAN
140
141 dnl *** checks for programs ***
142
143 dnl find a compiler
144 AC_PROG_CC
145
146 dnl determine c++ compiler
147 AC_PROG_CXX
148 dnl determine if c++ is available on this system
149 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
150
151 AS_PROG_OBJC
152
153 dnl check if the compiler supports '-c' and '-o' options
154 AM_PROG_CC_C_O
155
156 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
157 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
158
159 dnl check for documentation tools
160 GTK_DOC_CHECK([1.3])
161 AS_PATH_PYTHON([2.1])
162 AG_GST_PLUGIN_DOCS([1.3],[2.1])
163
164 dnl *** checks for libraries ***
165
166 dnl check for libm, for sin() etc.
167 AC_CHECK_LIBM
168 AC_SUBST(LIBM)
169
170 dnl *** checks for header files ***
171
172 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
173 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
174
175 if test "x$HAVE_UNISTD_H" != "xyes"; then
176   GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
177 fi
178
179 dnl used by ext/dts
180 AX_CREATE_STDINT_H
181
182 dnl *** checks for types/defines ***
183
184 dnl *** checks for structures ***
185
186 dnl *** checks for compiler characteristics ***
187
188 dnl *** checks for library functions ***
189
190 dnl *** checks for dependency libraries ***
191
192 dnl GLib is required
193 AG_GST_GLIB_CHECK([2.6])
194
195 dnl liboil is required
196 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.8, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
197 if test "x${HAVE_LIBOIL}" != xyes ; then
198   AC_ERROR([liboil-0.3.8 or later is required])
199 fi
200
201 dnl checks for gstreamer
202 dnl uninstalled is selected preferentially -- see pkg-config(1)
203 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
204 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
205 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
206 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
207 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
208 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], no)
209 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
210
211 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
212 AC_SUBST(GSTPB_PLUGINS_DIR)
213 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
214
215 dnl Check for documentation xrefs
216 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
217 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
218 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
219 AC_SUBST(GLIB_PREFIX)
220 AC_SUBST(GST_PREFIX)
221 AC_SUBST(GSTPB_PREFIX)
222
223 dnl GTK is optional and used in examples
224 HAVE_GTK=NO
225 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
226 if test "x$HAVE_GTK_22" = "xyes"; then
227   HAVE_GTK=yes
228   GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
229   AC_SUBST(GTK_VERSION)
230   GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
231   AC_SUBST(GTK_BASE_DIR)
232   GDK_PIXBUF_LIBDIR=`$PKG_CONFIG --variable=libdir gdk-pixbuf-2.0`
233   GDK_PIXBUF_PREFIXDIR=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
234   AC_SUBST(GTK_BASE_DIR)
235 else
236   PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
237 fi
238 if test "x$HAVE_GTK_20" = "xyes"; then
239   HAVE_GTK=yes
240 fi
241 GTK_CFLAGS=$GTK2_CFLAGS
242 GTK_LIBS=$GTK2_LIBS
243 AC_SUBST(GTK_LIBS)
244 AC_SUBST(GTK_CFLAGS)
245 AC_SUBST(HAVE_GTK)
246 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
247
248 dnl libglade is optional and only used in examples
249 HAVE_GLADE=NO
250 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0, HAVE_GLADE=yes, HAVE_GLADE=no)
251 AC_SUBST(GLADE_LIBS)
252 AC_SUBST(GLADE_CFLAGS)
253 AC_SUBST(HAVE_GLADE)
254 AM_CONDITIONAL(HAVE_GLADE, test "x$HAVE_GLADE" = "xyes")
255
256 dnl set license and copyright notice
257 GST_LICENSE="LGPL"
258 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
259 AC_SUBST(GST_LICENSE)
260
261 dnl set location of plugin directory
262 AG_GST_SET_PLUGINDIR
263
264 dnl define an ERROR_CFLAGS Makefile variable
265 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
266
267 dnl define correct level for debugging messages
268 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
269
270 dnl *** plug-ins to exclude ***
271
272 dnl see if we can build C++ plug-ins
273 if test "x$HAVE_CXX" != "xyes"; then
274   AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
275   GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/modplug//g'`
276 fi
277
278 dnl real plugin only works on i386 and x86_64 for the time being.
279 if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
280   AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
281   GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | sed 's/real//g'`
282 fi
283
284 dnl disable gst plugins we might not be able to build on this
285 dnl platform: librfb (ugly but minimally invasive)
286 dnl FIXME: maybe move to sys, or make work with winsock2
287 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
288 AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
289
290 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
291   GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/librfb//`
292 fi
293
294 AC_SUBST(GST_PLUGINS_SELECTED)
295
296 dnl *** sys plug-ins ***
297
298 dnl OpenGL
299 translit(dnm, m, l) AM_CONDITIONAL(USE_OPENGL, true)
300 AG_GST_CHECK_FEATURE(OPENGL, [Open GL], glsink, [
301   PKG_CHECK_MODULES(GL, gl >= 7.1.0, [
302     HAVE_GL="yes"
303     AC_SUBST(GL_CFLAGS)
304     AC_SUBST(GL_LIBS)
305   ],[
306     HAVE_GL=no
307     AC_MSG_RESULT(no)
308   ])
309 ])
310
311 dnl check for QuickTime
312 translit(dnm, m, l) AM_CONDITIONAL(USE_QUICKTIME, true)
313 AG_GST_CHECK_FEATURE(QUICKTIME, [QuickTime wrapper], qtwrapper, [
314   AC_CHECK_HEADER(QuickTime/Movies.h, HAVE_QUICKTIME="yes", HAVE_QUICKTIME="no")
315 ])
316
317 dnl check for Video CD
318 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
319 AG_GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
320   AC_CHECK_HEADER(linux/cdrom.h, HAVE_VCD="yes", HAVE_VCD="no")
321 ])
322
323 dnl Check for X11
324 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
325 AG_GST_CHECK_FEATURE(X, [X libraries and plugins],
326                   [ximagesrc], [
327   AC_PATH_XTRA
328
329   dnl now try to find the HEADER
330   ac_cflags_save="$CFLAGS"
331   ac_cppflags_save="$CPPFLAGS"
332   CFLAGS="$CFLAGS $X_CFLAGS"
333   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
334   AC_CHECK_HEADER(X11/X.h, HAVE_X="yes", HAVE_X="no")
335
336   if test "x$HAVE_X" = "xno"
337   then
338     AC_MSG_NOTICE([cannot find X11 development files])
339   else
340     dnl this is much more than we want
341     X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
342     dnl AC_PATH_XTRA only defines the path needed to find the X libs,
343     dnl it does not add the libs; therefore we add them here
344     X_LIBS="$X_LIBS -lX11"
345     AC_SUBST(X_CFLAGS)
346     AC_SUBST(X_LIBS)
347   fi
348   AC_SUBST(HAVE_X)
349   CFLAGS="$ac_cflags_save"
350   CPPFLAGS="$ac_cppflags_save"
351 ])
352
353 dnl *** ext plug-ins ***
354 dnl keep this list sorted alphabetically !
355
356 if test "x$BUILD_EXTERNAL" = "xyes"; then
357
358 dnl *** alsa ***
359 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
360 AG_GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
361   PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
362     HAVE_ALSA="yes"
363     AC_SUBST(ALSA_CFLAGS)
364     AC_SUBST(ALSA_LIBS)
365   ], [
366     AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
367   ])
368 ])
369
370 dnl *** amrwb ***
371 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
372 AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwb, [
373   AG_GST_CHECK_LIBHEADER(AMRWB, amrwb,
374                         GP3D_IF_decode, ,
375                         amrwb/dec.h,
376                         AMRWB_LIBS="-lamrwb"
377                         AC_SUBST(AMRWB_LIBS))
378 ])
379
380 dnl *** BZ2 ***
381 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
382 AG_GST_CHECK_FEATURE(BZ2, [bz2 library], bz2, [
383   AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
384   AC_SUBST(BZ2_LIBS)
385 ])
386
387 #dnl *** cairo ***
388 #translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
389 #AG_GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
390 #  PKG_CHECK_MODULES(CAIRO, cairo >= 1.0 glitz-glx, HAVE_CAIRO=yes, [
391 #    HAVE_CAIRO=no
392 #    AC_MSG_RESULT(no)
393 #  ])
394 #  AC_SUBST(CAIRO_CFLAGS)
395 #  AC_SUBST(CAIRO_LIBS)
396 #])
397
398 dnl *** cdaudio ***
399 translit(dnm, m, l) AM_CONDITIONAL(USE_CDAUDIO, true)
400 AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
401   AG_GST_CHECK_CONFIGPROG(CDAUDIO, libcdaudio-config)
402   AC_SUBST(CDAUDIO_CFLAGS)
403   AC_SUBST(CDAUDIO_LIBS)
404 ])
405
406
407 dnl *** dc1394  ***
408 translit(dnm, m, l) AM_CONDITIONAL(USE_DC1394, true)
409 AG_GST_CHECK_FEATURE(DC1394, [libdc1394], dc1394, [
410    PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.0-rc5, HAVE_DC1394="yes", [
411         HAVE_DC1394="no"
412         AC_MSG_RESULT(no)
413    ])
414    AC_SUBST(LIBDC1394_CFLAGS)
415    AC_SUBST(LIBDC1394_LIBS)
416 ])
417
418
419 dnl **** DirectFB ****
420 translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
421 AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
422   PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.24, HAVE_DIRECTFB="yes", [
423     HAVE_DIRECTFB="no"
424     AC_MSG_RESULT(no)
425   ])
426 ])
427
428 dnl *** DTS ***
429 translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
430 AG_GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
431   HAVE_DTS="yes"
432   AG_GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h,
433     DTS_LIBS="-ldts_pic -lm", HAVE_DTS="no")
434   if test $HAVE_DTS = "no"; then
435     AG_GST_CHECK_LIBHEADER(DTS, dca, dca_init, -lm, dts.h,
436       DTS_LIBS="-ldca -lm")
437   fi
438   AC_SUBST(DTS_LIBS)
439 ])
440
441 dnl *** DIVX ***
442 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
443 AG_GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
444   HAVE_DIVX=yes
445   AC_CHECK_HEADER(encore2.h, , [
446     AC_MSG_WARN([Divx4linux encore headers not found])
447     HAVE_DIVX=no
448   ])
449   if [ test x$HAVE_DIVX = xyes ]; then
450     AC_MSG_CHECKING([Checking for valid divx4linux encore version])
451     AC_TRY_COMPILE([
452 #include <encore2.h>
453 #if ENCORE_VERSION != 20021024
454 #error Wrong version of divx encore libraries
455 #endif
456     ], [
457 return 0;
458     ], [
459       HAVE_DIVX=yes
460       AC_MSG_RESULT(yes)
461     ], [
462       HAVE_DIVX=no
463       AC_MSG_RESULT(no)
464       AC_MSG_WARN([Wrong version of divx4linux installed])
465     ])
466   fi
467   if [ test x$HAVE_DIVX = xyes ]; then
468     AC_CHECK_HEADER(decore.h, , [
469       AC_MSG_WARN([Divx4linux decoder headers not found])
470       HAVE_DIVX=no
471     ])
472   fi
473   if [ test x$HAVE_DIVX = xyes ]; then
474     AC_MSG_CHECKING([Checking for valid divx4linux decore version])
475     AC_TRY_COMPILE([
476 #include <decore.h>
477 #if DECORE_VERSION != 20021112
478 #error Wrong version of divx decore libraries
479 #endif
480     ], [
481 return 0;
482     ], [
483       HAVE_DIVX=yes
484       AC_MSG_RESULT(yes)
485     ], [
486       HAVE_DIVX=no
487       AC_MSG_RESULT(no)
488       AC_MSG_WARN([Wrong version of divx4linux installed])
489     ])
490   fi
491   LIBS="-lm"
492   if test x$HAVE_DIVX = xyes; then
493     AC_CHECK_LIB(divxencore, encore, , [
494       AC_MSG_WARN([Divx4linux encore libs not found])
495       HAVE_DIVX=no
496     ])
497   fi
498   if test x$HAVE_DIVX = xyes; then
499     AC_CHECK_LIB(divxdecore, decore, , [
500       AC_MSG_WARN([Divx4linux decore libs not found])
501       HAVE_DIVX=no
502   ])
503   fi
504   if test x$HAVE_DIVX = xyes; then
505     DIVXENC_LIBS="-ldivxencore -lm"
506     DIVXDEC_LIBS="-ldivxdecore -lm"
507     AC_SUBST(DIVXENC_LIBS)
508     AC_SUBST(DIVXDEC_LIBS)
509   fi
510 ])
511
512 dnl *** METADATA ***
513 translit(dnm, m, l) AM_CONDITIONAL(USE_METADATA, true)
514 AG_GST_CHECK_FEATURE(METADATA, [METADATA muxer and demuxer], metadata, [
515   HAVE_METADATA="no"
516   PKG_CHECK_MODULES(EXIF, libexif >= 0.6.16, HAVE_EXIF="yes", [
517     HAVE_EXIF="no"
518   ])
519   PKG_CHECK_MODULES(IPTC, libiptcdata >= 1.0.2, HAVE_IPTC="yes", [
520     HAVE_IPTC="no"
521   ])
522   AC_CHECK_HEADER(exempi-2.0/exempi/xmp.h, 
523     [
524     AC_CHECK_LIB(exempi, xmp_init, 
525       [
526       HAVE_XMP="yes"
527       XMP_CFLAGS="-I/usr/local/include/exempi-2.0/exempi/"
528       XMP_LIBS="-lexempi"
529       ], HAVE_XMP="no")
530     ], HAVE_XMP="no")
531   if test x$HAVE_EXIF = xyes; then
532     METADATA_CFLAGS="-DHAVE_EXIF $EXIF_CFLAGS $METADATA_CFLAGS"
533     METADATA_LIBS="$EXIF_LIBS $METADATA_LIBS -lm"
534     HAVE_METADATA="yes"
535   fi
536   if test x$HAVE_IPTC = xyes; then
537     METADATA_CFLAGS="-DHAVE_IPTC $IPTC_CFLAGS $METADATA_CFLAGS"
538     METADATA_LIBS="$IPTC_LIBS $METADATA_LIBS"
539     HAVE_METADATA="yes"
540   fi
541   if test x$HAVE_XMP = xyes; then
542     METADATA_CFLAGS="-DHAVE_XMP $XMP_CFLAGS $METADATA_CFLAGS"
543     METADATA_LIBS="$XMP_LIBS $METADATA_LIBS"
544     HAVE_METADATA="yes"
545   fi
546   if test x$HAVE_METADATA = xno; then
547     AC_MSG_WARN(no of metadata libraries (exif, iptc or xmp) found)
548   fi
549   dnl metadata plugin will parse whole chunks anyway
550   HAVE_METADATA="yes"
551   AC_SUBST(METADATA_CFLAGS)
552   AC_SUBST(METADATA_LIBS)
553 ])
554
555 dnl **** Free AAC Encoder (FAAC) ****
556 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
557 AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
558   AG_GST_CHECK_LIBHEADER(FAAC, faac, faacEncOpen, -lm, faac.h,
559     FAAC_LIBS="-lfaac -lm")
560   AS_SCRUB_INCLUDE(FAAC_CFLAGS)
561   AC_SUBST(FAAC_LIBS)
562 ])
563
564 dnl **** Free AAC Decoder (FAAD) ****
565 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
566 AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
567   HAVE_FAAD="yes"
568   AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h,
569     FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
570   if test $HAVE_FAAD = "no"; then
571     AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h,
572       [ FAAD_LIBS="-lfaad -lm"
573                 AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
574           ],
575           HAVE_FAAD="no",)
576   fi
577   if test $HAVE_FAAD = "yes"; then
578     AC_MSG_CHECKING([Checking for FAAD >= 2.0])
579     AC_TRY_COMPILE([#include <faad.h>], [
580         #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
581         #error Not faad2
582         #else
583         /* Release candidate of 2.0 is not good enough for us. This field
584          * was added only in 2.0 final and does not exist in 2.0-RC3 */
585         faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
586         #endif
587     ], [
588       HAVE_FAAD="yes"
589       AC_MSG_RESULT(yes)
590     ], [
591       HAVE_FAAD="no"
592       AC_MSG_RESULT(no)
593     ])
594   fi
595   AS_SCRUB_INCLUDE(FAAD_CFLAGS)
596   AC_SUBST(FAAD_LIBS)
597   AC_SUBST(FAAD_IS_NEAAC)
598 ])
599
600 dnl *** fbdev ***
601 translit(dnm, m, l) AM_CONDITIONAL(USE_FBDEV, true)
602 AG_GST_CHECK_FEATURE(FBDEV, [linux framebuffer], fbdevsink, [
603   if test "x$HAVE_FBDEV" != "xyes"; then
604     AC_CHECK_HEADER([linux/fb.h], HAVE_FBDEV=yes, HAVE_FBDEV=no)
605   fi
606 ])
607
608 dnl *** libgio ***
609 translit(dnm, m, l) AM_CONDITIONAL(USE_GIO, true)
610 AG_GST_CHECK_FEATURE(GIO, [GIO library], gio, [
611   PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.15.2, HAVE_GIO="yes", [
612     HAVE_GIO="no"
613     AC_MSG_RESULT(no)
614   ])
615   AC_SUBST(GIO_CFLAGS)
616   AC_SUBST(GIO_LIBS)
617 ])
618
619 dnl *** gsm ***
620 translit(dnm, m, l) AM_CONDITIONAL(USE_GSM, true)
621 AG_GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
622   AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm.h, GSM_LIBS="-lgsm")
623   if test $HAVE_GSM != "yes"; then
624     AG_GST_CHECK_LIBHEADER(GSM, gsm, gsm_create, , gsm/gsm.h, GSM_LIBS="-lgsm")
625     if test $HAVE_GSM = "yes"; then
626       AC_DEFINE(GSM_HEADER_IN_SUBDIR, 1, [Define if GSM header in gsm/ subdir])
627     fi
628   fi
629   AC_SUBST(GSM_LIBS)
630 ])
631
632 dnl *** ivorbis ***
633 dnl AM_PATH_IVORBIS only takes two options
634 translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
635 AG_GST_CHECK_FEATURE(IVORBIS, [integer vorbis plug-in], ivorbisdec, [
636   IVORBIS_LIBS=
637   IVORBIS_CFLAGS=
638   AC_CHECK_LIB(vorbisidec, vorbis_block_init,
639     [IVORBIS_LIBS=-lvorbisidec
640      HAVE_IVORBIS=yes
641      case $host in
642      arm-*-*)
643        IVORBIS_CFLAGS="-D_ARM_ASSEM_ $IVORBIS_CFLAGS"
644      esac
645     ],
646     HAVE_IVORBIS=no)
647   AC_SUBST(IVORBIS_LIBS)
648   AC_SUBST(IVORBIS_CFLAGS)
649 ])
650
651 dnl *** Jack ***
652 translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
653 AG_GST_CHECK_FEATURE(JACK, Jack, jack, [
654   PKG_CHECK_MODULES(JACK, jack >= 0.99.10, HAVE_JACK="yes", HAVE_JACK="no")
655   AC_SUBST(JACK_CFLAGS)
656   AC_SUBST(JACK_LIBS)
657 ])
658
659 dnl *** ladspa ***
660 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
661 AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
662   AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
663 ])
664
665 dnl *** libmms ***
666 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBMMS, true)
667 AG_GST_CHECK_FEATURE(LIBMMS, [mms protocol library], libmms, [
668   dnl check with pkg-config first
669   PKG_CHECK_MODULES(LIBMMS, libmms >= 0.2, HAVE_LIBMMS="yes", [
670     HAVE_LIBMMS="no"
671     AC_MSG_RESULT(no)
672   ])
673 ])
674 AC_SUBST(LIBMMS_LIBS)
675
676 dnl *** mjpegtools version info ***
677 dnl some may prefer older version (given quirks above)
678 dnl hm, no version info seems available within mjpegtools headers
679 PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
680   AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
681   have_mpjegtools_18x=yes
682   ], [
683   have_mpjegtools_18x=no])
684
685 dnl *** mpeg2enc ***
686 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
687 AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
688   HAVE_MPEG2ENC="no"
689   dnl we require a c++ compiler for this one
690   if [ test x$HAVE_CXX = xyes ]; then
691     dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
692     dnl since many distros include mjpegtools specifically without mplex
693     dnl and mpeg2enc, we check for mpeg2enc on its own, too.
694     PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.93, [
695       dnl HACK because mpeg2enc 1.8.0 header files have a spurious 'include config.h'
696       touch config.h
697       dnl switch over to c++ to test things
698       AC_LANG_CPLUSPLUS
699       OLD_CPPFLAGS="$CPPFLAGS"
700       dnl HACK as above
701       CPPFLAGS_GOOD="$CPPFLAGS $MPEG2ENC_CFLAGS"
702       CPPFLAGS="$CPPFLAGS_GOOD -I."
703       dnl check headers
704       mpeg2enc_headers_ok=no
705       AC_CHECK_HEADER([mpeg2encoder.hh], [
706         MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
707         OLD_LIBS="$LIBS"
708         LIBS="$LIBS $MPEG2ENC_LIBS"
709         AC_MSG_CHECKING([for valid mpeg2enc objects])
710         AC_TRY_RUN([
711           #include <mpeg2encoder.hh>
712           #include <mpeg2encoptions.hh>
713
714           int
715           main (int   argc,
716                 char *argv[])
717           {
718             MPEG2EncOptions *options = new MPEG2EncOptions ();
719             MPEG2Encoder *encoder = new MPEG2Encoder (*options);
720             return 0;
721           }
722         ],[
723           AC_MSG_RESULT(yes)
724           dnl so far so good, let's check more things:
725           dnl mjpegtools-1.8.0 does not install the required
726           dnl mpeg2syntaxcodes.h header by default, and a new release
727           dnl is not in sight, so check for this oversight in case
728           dnl distros or folks have fixed this themselves
729           if test "x$have_mpjegtools_18x" = "xyes"; then
730             AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
731                 mpeg2enc_headers_ok=yes
732               ], [
733                 mpeg2enc_headers_ok=no
734               ])
735           fi
736           if test "x$mpeg2enc_headers_ok" = "xyes"; then
737             HAVE_MPEG2ENC="yes"
738           fi
739           CPP_FLAGS="$CPPFLAGS_GOOD"
740           AC_SUBST(MPEG2ENC_CFLAGS)
741           AC_SUBST(MPEG2ENC_LIBS)
742         ], [
743           AC_MSG_RESULT(no)
744         ])
745         LIBS="$OLD_LIBS"
746       ])
747
748       CPPFLAGS="$OLD_CPPFLAGS"
749       AC_LANG_C
750     ], [
751       HAVE_MPEG2ENC="no"
752     ])
753   fi
754 ])
755
756 dnl *** musepack ***
757 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSEPACK, true)
758 AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [
759   AC_LANG_CPLUSPLUS
760   AC_CHECK_HEADER([mpcdec/mpcdec.h], [
761     HAVE_MUSEPACK="yes"
762     MUSEPACK_LIBS="-lmpcdec"
763     AC_SUBST(MUSEPACK_LIBS)
764     ], [HAVE_MUSEPACK="no"])
765   AC_LANG_C
766 ])
767
768 dnl *** musicbrainz ***
769 translit(dnm, m, l) AM_CONDITIONAL(USE_MUSICBRAINZ, true)
770 AG_GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
771   PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.0, HAVE_MUSICBRAINZ="yes", HAVE_MUSICBRAINZ="no")
772   AC_SUBST(MUSICBRAINZ_CFLAGS)
773   AC_SUBST(MUSICBRAINZ_LIBS)
774 ])
775
776 dnl *** MythTV ***
777 translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
778 AG_GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
779   PKG_CHECK_MODULES(GMYTH, gmyth >= 0.4 gmyth <= 0.4.99, HAVE_MYTHTV="yes", [
780     HAVE_MYTHTV="no"
781     AC_MSG_RESULT(no)
782   ])
783   AC_SUBST(GMYTH_CFLAGS)
784   AC_SUBST(GMYTH_LIBS)
785 ])
786
787 dnl *** nas ***
788 translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true)
789 AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [
790   HAVE_NAS="no"
791   if test "x$HAVE_X" = "xyes"; then
792     save_cppflags=$CFLAGS
793     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
794     AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h,
795       NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS")
796     CPPFLAGS="$save_cppflags"
797   fi
798   AC_SUBST(NAS_CFLAGS)
799   AC_SUBST(NAS_LIBS)
800 ])
801
802 dnl *** neon ***
803 translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
804 AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
805   PKG_CHECK_MODULES(NEON, neon >= 0.26.0  neon <= 0.27.99, HAVE_NEON="yes", [
806     HAVE_NEON="no"
807     AC_MSG_RESULT(no)
808   ])
809   AC_SUBST(NEON_CFLAGS)
810   AC_SUBST(NEON_LIBS)
811 ])
812
813 dnl *** soup ***
814 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
815 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugins], souphttpsrc, [
816   PKG_CHECK_MODULES(SOUP, libsoup-2.2 >= 2.2.104, HAVE_SOUP="yes", [
817     HAVE_SOUP="no"
818     AC_MSG_RESULT(no)
819   ])
820   AC_SUBST(SOUP_CFLAGS)
821   AC_SUBST(SOUP_LIBS)
822 ])
823
824 dnl *** timidity ***
825 translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
826 AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
827   PKG_CHECK_MODULES(TIMIDITY, libtimidity, [
828     HAVE_TIMIDITY="yes",
829         AC_MSG_CHECKING([for timidity.cfg])
830         timidity_cfg=""
831         if test -r /etc/timidity.cfg; then
832           timidity_cfg=/etc/timidity.cfg
833         elif test -r /etc/timidity/timidity.cfg; then
834           timidity_cfg=/etc/timidity/timidity.cfg
835         elif test -r /usr/share/timidity/timidity.cfg; then
836           timidity_cfg=/usr/share/timidity/timidity.cfg
837         elif test -r /usr/local/share/timidity/timidity.cfg; then
838           timidity_cfg=/usr/local/share/timidity/timidity.cfg
839         fi
840         if test "x$timidity_cfg" != "x"; then
841           AC_MSG_RESULT($timidity_cfg)
842       AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg])
843         else
844           AC_MSG_RESULT([not found])
845         fi
846   ], [
847     HAVE_TIMIDITY="no"
848     AC_MSG_RESULT(no)
849   ])
850   AC_SUBST(TIMIDITY_CFLAGS)
851   AC_SUBST(TIMIDITY_LIBS)
852 ])
853
854 dnl *** wildmidi ***
855 translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
856 AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
857   AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
858   if test "x$HAVE_WILDMIDI" = "xyes"; then
859          WILDMIDI_CFLAGS=
860          WILDMIDI_LIBS=-lWildMidi
861          AC_MSG_NOTICE(compiling gstWildMidi)
862   else
863          WILDMIDI_CFLAGS=
864          WILDMIDI_LIBS=
865          AC_MSG_WARN(no WildMidi library found (libWildMidi))
866   fi
867   AC_SUBST(WILDMIDI_CFLAGS)
868   AC_SUBST(WILDMIDI_LIBS)
869 ])
870
871 dnl *** SDL ***
872 translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true)
873 AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [
874     AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no)
875 ])
876
877 dnl *** sndfile ***
878 translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
879 AG_GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
880   PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.16, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
881   AC_SUBST(SNDFILE_CFLAGS)
882   AC_SUBST(SNDFILE_LIBS)
883 ])
884
885 dnl *** soundtouch ***
886 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUNDTOUCH, true)
887 AG_GST_CHECK_FEATURE(SOUNDTOUCH, [soundtouch plug-in], soundtouch, [
888   PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0,
889     HAVE_SOUNDTOUCH=yes, 
890     PKG_CHECK_MODULES(SOUNDTOUCH, libSoundTouch,
891       HAVE_SOUNDTOUCH=yes,
892       HAVE_SOUNDTOUCH=no))
893   AC_SUBST(SOUNDTOUCH_CFLAGS)
894   AC_SUBST(SOUNDTOUCH_LIBS)
895   if test "x$HAVE_CXX" != "xyes"; then
896     USE_SOUNDTOUCH=false
897     AC_MSG_NOTICE([Not building soundtouch plugin: no C++ compiler found])
898   fi
899 ])
900
901 dnl *** spc ***
902 translit(dnm, m, l) AM_CONDITIONAL(USE_SPC, true)
903 AG_GST_CHECK_FEATURE(SPC, [spc decoder], spc, [
904   AC_CHECK_HEADER(openspc.h, [
905     AC_CHECK_LIB(openspc, OSPC_Init, [
906       SPC_LIBS="-lopenspc"
907       AC_SUBST(SPC_LIBS)
908       HAVE_SPC=yes
909     ], [
910       HAVE_SPC=no
911     ])
912   ], [
913     HAVE_SPC=no
914   ])
915 ])
916
917 dnl *** swfdec ***
918 translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
919 AG_GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
920   PKG_CHECK_MODULES(SWFDEC, swfdec-0.3 >= 0.3.6, HAVE_SWFDEC=yes, [
921     HAVE_SWFDEC=no
922     AC_MSG_RESULT(no)
923   ])
924   AC_SUBST(SWFDEC_CFLAGS)
925   AC_SUBST(SWFDEC_LIBS)
926 ])
927
928 dnl *** theora ***
929 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORADEC, true)
930 AG_GST_CHECK_FEATURE(THEORADEC, [ogg theora codec], theoraexpdec, [
931   PKG_CHECK_MODULES(THEORADEC, theoradec, HAVE_THEORADEC="yes", [
932     HAVE_THEORADEC="no"
933     AC_MSG_RESULT(no)
934   ])
935   AC_SUBST(THEORADEC_LIBS)
936   AC_SUBST(THEORADEC_CFLAGS)
937 ])
938
939 dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
940 translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
941 AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
942   AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h,
943       X264_LIBS="$LDFLAGS -lx264 -lm"
944       X264_CFLAGS="$CFLAGS"
945       AC_SUBST(X264_LIBS)
946       AC_SUBST(X264_CFLAGS))
947 ])
948
949 dnl *** XVID ***
950 translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
951 AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
952   HAVE_XVID=no
953   AC_CHECK_HEADER(xvid.h, [
954     OLD_LIBS="$LIBS"
955     LIBS="-lm"
956     AC_CHECK_LIB(xvidcore, xvid_encore, [
957       AC_CHECK_LIB(xvidcore, xvid_decore, [
958         AC_CHECK_LIB(xvidcore, xvid_global, [
959           AC_MSG_CHECKING([for uptodate XviD API version])
960           AC_TRY_COMPILE([#include <xvid.h>], [
961               #if XVID_API_MAJOR(XVID_API) != 4
962               #error "Incompatible XviD API version"
963               #endif
964           ],[ AC_MSG_RESULT(yes)
965             XVID_LIBS="-lxvidcore -lm"
966             AC_SUBST(XVID_LIBS)
967             HAVE_XVID=yes
968           ], AC_MSG_RESULT(no) )
969         ], )
970       ], )
971     ], )
972     LIBS="$OLD_LIBS"
973   ], )
974 ])
975
976 dnl *** dvb ***
977 translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true)
978 AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
979   AC_MSG_CHECKING([Checking for up to date dvb installation])
980   AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
981 ])
982
983 else
984
985 dnl not building plugins with external dependencies,
986 dnl but we still need to set the conditionals
987
988 AM_CONDITIONAL(USE_OPENGL, false)
989 AM_CONDITIONAL(USE_QUICKTIME, false)
990 AM_CONDITIONAL(USE_VCD, false)
991 AM_CONDITIONAL(USE_X, false)
992 AM_CONDITIONAL(USE_ALSA, false)
993 AM_CONDITIONAL(USE_AMRWB, false)
994 AM_CONDITIONAL(USE_BZ2, false)
995 AM_CONDITIONAL(USE_CDAUDIO, false)
996 AM_CONDITIONAL(USE_DIRECTFB, false)
997 AM_CONDITIONAL(USE_DTS, false)
998 AM_CONDITIONAL(USE_DIVX, false)
999 AM_CONDITIONAL(USE_FAAC, false)
1000 AM_CONDITIONAL(USE_FAAD, false)
1001 AM_CONDITIONAL(USE_FBDEV, false)
1002 AM_CONDITIONAL(USE_GIO, false)
1003 AM_CONDITIONAL(USE_GSM, false)
1004 AM_CONDITIONAL(USE_IVORBIS, false)
1005 AM_CONDITIONAL(USE_JACK, false)
1006 AM_CONDITIONAL(USE_LADSPA, false)
1007 AM_CONDITIONAL(USE_LIBMMS, false)
1008 AM_CONDITIONAL(USE_MPEG2ENC, false)
1009 AM_CONDITIONAL(USE_MUSEPACK, false)
1010 AM_CONDITIONAL(USE_MUSICBRAINZ, false)
1011 AM_CONDITIONAL(USE_MYTHTV, false)
1012 AM_CONDITIONAL(USE_NAS, false)
1013 AM_CONDITIONAL(USE_NEON, false)
1014 AM_CONDITIONAL(USE_SOUP, false)
1015 AM_CONDITIONAL(USE_SDL, false)
1016 AM_CONDITIONAL(USE_SNDFILE, false)
1017 AM_CONDITIONAL(USE_SOUNDTOUCH, false)
1018 AM_CONDITIONAL(USE_SPC, false)
1019 AM_CONDITIONAL(USE_SWFDEC, false)
1020 AM_CONDITIONAL(USE_THEORADEC, false)
1021 AM_CONDITIONAL(USE_TIMIDITY, false)
1022 AM_CONDITIONAL(USE_X264, false)
1023 AM_CONDITIONAL(USE_XVID, false)
1024 AM_CONDITIONAL(USE_WILDMIDI, false)
1025 AM_CONDITIONAL(USE_DVB, false)
1026
1027 fi dnl of EXT plugins
1028
1029 dnl *** finalize CFLAGS, LDFLAGS, LIBS
1030
1031 dnl Overview:
1032 dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
1033 dnl GST_*:              flags shared by built objects to link against GStreamer
1034 dnl GST_ALL_LDFLAGS:    linker flags shared by all
1035 dnl GST_LIB_LDFLAGS:    additional linker flags for all libaries
1036 dnl GST_LT_LDFLAGS:     library versioning of our libraries
1037 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
1038
1039 dnl GST_OPTION_CFLAGS
1040 if test "x$USE_DEBUG" = xyes; then
1041    PROFILE_CFLAGS="-g"
1042 fi
1043 AC_SUBST(PROFILE_CFLAGS)
1044
1045 if test "x$GST_CVS" = "xyes"; then
1046   DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
1047 else
1048   DEPRECATED_CFLAGS=""
1049 fi
1050 AC_SUBST(DEPRECATED_CFLAGS)
1051
1052 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
1053 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
1054 AC_SUBST(GST_OPTION_CFLAGS)
1055
1056 dnl FIXME: do we want to rename to GST_ALL_* ?
1057 dnl prefer internal headers to already installed ones
1058 dnl also add builddir include for enumtypes and marshal
1059 dnl add GST_OPTION_CFLAGS, but overridable
1060 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
1061 AC_SUBST(GST_CFLAGS)
1062 AC_SUBST(GST_LIBS)
1063
1064 dnl LDFLAGS really should only contain flags, not libs - they get added before
1065 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1066 GST_ALL_LDFLAGS="-no-undefined"
1067 AC_SUBST(GST_ALL_LDFLAGS)
1068
1069 dnl this really should only contain flags, not libs - they get added before
1070 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
1071 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
1072 AC_SUBST(GST_PLUGIN_LDFLAGS)
1073
1074 dnl *** output files ***
1075
1076 dnl po/Makefile.in
1077
1078
1079 AC_CONFIG_FILES(
1080 Makefile
1081 gst-plugins-bad.spec
1082 gst/Makefile
1083 gst/app/Makefile
1084 gst/bayer/Makefile
1085 gst/cdxaparse/Makefile
1086 gst/deinterlace/Makefile
1087 gst/dvdspu/Makefile
1088 gst/equalizer/Makefile
1089 gst/festival/Makefile
1090 gst/filter/Makefile
1091 gst/flv/Makefile
1092 gst/freeze/Makefile
1093 gst/h264parse/Makefile
1094 gst/interleave/Makefile
1095 gst/librfb/Makefile
1096 gst/modplug/Makefile
1097 gst/modplug/libmodplug/Makefile
1098 gst/mpegtsparse/Makefile
1099 gst/mpeg4videoparse/Makefile
1100 gst/mpegvideoparse/Makefile
1101 gst/multifile/Makefile
1102 gst/mve/Makefile
1103 gst/nsf/Makefile
1104 gst/nuvdemux/Makefile
1105 gst/rawparse/Makefile
1106 gst/replaygain/Makefile
1107 gst/rtpmanager/Makefile
1108 gst/sdp/Makefile
1109 gst/spectrum/Makefile
1110 gst/speed/Makefile
1111 gst/speexresample/Makefile
1112 gst/stereo/Makefile
1113 gst/switch/Makefile
1114 gst/tta/Makefile
1115 gst/videosignal/Makefile
1116 gst/vmnc/Makefile
1117 gst/xingheader/Makefile
1118 gst/real/Makefile
1119 gst/y4m/Makefile
1120 gst-libs/Makefile
1121 gst-libs/gst/Makefile
1122 gst-libs/gst/app/Makefile
1123 sys/Makefile
1124 sys/fbdev/Makefile
1125 sys/glsink/Makefile
1126 sys/dvb/Makefile
1127 sys/qtwrapper/Makefile
1128 sys/vcd/Makefile
1129 examples/Makefile
1130 examples/app/Makefile
1131 examples/directfb/Makefile
1132 examples/switch/Makefile
1133 ext/amrwb/Makefile
1134 ext/alsaspdif/Makefile
1135 ext/bz2/Makefile
1136 ext/cdaudio/Makefile
1137 ext/dc1394/Makefile
1138 ext/directfb/Makefile
1139 ext/divx/Makefile
1140 ext/dts/Makefile
1141 ext/metadata/Makefile
1142 ext/faac/Makefile
1143 ext/faad/Makefile
1144 ext/gio/Makefile
1145 ext/gsm/Makefile
1146 ext/ivorbis/Makefile
1147 ext/jack/Makefile
1148 ext/ladspa/Makefile
1149 ext/libmms/Makefile
1150 ext/Makefile
1151 ext/nas/Makefile
1152 ext/mpeg2enc/Makefile
1153 ext/musepack/Makefile
1154 ext/musicbrainz/Makefile
1155 ext/mythtv/Makefile
1156 ext/neon/Makefile
1157 ext/soup/Makefile
1158 ext/sdl/Makefile
1159 ext/sndfile/Makefile
1160 ext/soundtouch/Makefile
1161 ext/spc/Makefile
1162 ext/swfdec/Makefile
1163 ext/theora/Makefile
1164 ext/timidity/Makefile
1165 ext/x264/Makefile
1166 ext/xvid/Makefile
1167 po/Makefile.in
1168 docs/Makefile
1169 docs/plugins/Makefile
1170 docs/version.entities
1171 common/Makefile
1172 common/m4/Makefile
1173 m4/Makefile
1174 tests/Makefile
1175 tests/check/Makefile
1176 tests/icles/Makefile
1177 win32/common/config.h
1178 )
1179 AC_OUTPUT
1180
1181 AG_GST_OUTPUT_PLUGINS