subparse needs regex.h - might need to move to sys/
[platform/upstream/gstreamer.git] / configure.ac
1 AC_PREREQ(2.52)
2
3 dnl initialize autoconf
4 dnl we don't specify PACKAGE and VERSION because AS_VERSION puts it together
5 AC_INIT
6
7 dnl when going to/from release please set the nano (fourth number) right !
8 dnl releases only do Wall, cvs and prerelease does Werror too
9 AS_VERSION(gst-plugins-base, GST_PLUGINS_BASE_VERSION, 0, 9, 4, 1,
10     GST_CVS="no", GST_CVS="yes")
11
12 dnl can autoconf find the source ?
13 AC_CONFIG_SRCDIR([gst/sine/gstsinesrc.c])
14
15 dnl define the output header for config
16 AM_CONFIG_HEADER([config.h])
17
18 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
19 AM_MAINTAINER_MODE
20
21 dnl sets host_* variables
22 AC_CANONICAL_HOST
23
24 dnl initialize automake
25 dnl FIXME: this is deprecated use, we should move PACKAGE and VERSION to
26 dnl AC_INIT, but then we need to parse the version to pass to AS_VERSION
27 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
28
29 dnl our libraries and install dirs use major.minor as a version
30 GST_MAJORMINOR=$GST_PLUGINS_BASE_VERSION_MAJOR.$GST_PLUGINS_BASE_VERSION_MINOR
31 dnl we override it here if we need to for the release candidate of new series
32 # GST_MAJORMINOR=0.9
33 AC_SUBST(GST_MAJORMINOR)
34
35 dnl CURRENT, REVISION, AGE
36 dnl - library source changed -> increment REVISION
37 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
38 dnl - interfaces added -> increment AGE
39 dnl - interfaces removed -> AGE = 0
40 dnl sets GST_LT_LDFLAGS
41 AS_LIBTOOL(GST, 2, 0, 0)
42 AS_LIBTOOL_TAGS
43 AM_PROG_LIBTOOL
44
45 dnl *** autotools stuff ****
46
47 dnl allow for different autotools
48 AS_AUTOTOOLS_ALTERNATE
49
50 dnl Add parameters for aclocal
51 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
52
53 dnl set up gettext
54 dnl the version check needs to stay here because autopoint greps for it
55 AM_GNU_GETTEXT_VERSION([0.11.5])
56 AM_GNU_GETTEXT([external])
57 GST_GETTEXT([gst-plugins-base-$GST_MAJORMINOR])
58
59 dnl *** check for arguments to configure ***
60
61 GST_ARG_DEBUG
62 GST_ARG_PROFILING
63 GST_ARG_VALGRIND
64 GST_ARG_GCOV
65
66 GST_ARG_EXAMPLES
67
68 GST_ARG_WITH_PKG_CONFIG_PATH
69 GST_ARG_WITH_PACKAGE_NAME([GStreamer Base Plug-ins])
70 GST_ARG_WITH_PACKAGE_ORIGIN
71
72 dnl these are all the gst plug-ins, compilable without additional libs
73 GST_PLUGINS_ALL="\
74         adder \
75         audioconvert \
76         audiorate \
77         audioresample \
78         audiotestsrc \
79         ffmpegcolorspace \
80         playback \
81         sine \
82         tcp \
83         typefind \
84         videotestsrc \
85         videorate \
86         videoscale \
87         volume \
88         "
89 AC_SUBST(GST_PLUGINS_ALL)
90
91 GST_PLUGINS_SELECTED=""
92
93 AC_ARG_WITH(plugins,
94     AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
95     [for i in `echo $withval | tr , ' '`; do
96         if echo $GST_PLUGINS_ALL | grep $i > /dev/null
97         then
98             GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
99         else
100             echo "plug-in $i not recognized, ignoring..."
101         fi
102     done],
103     [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
104
105 AC_SUBST(GST_PLUGINS_SELECTED)
106
107
108 dnl ext plug-ins; plug-ins that have external dependencies
109 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
110   [HAVE_EXTERNAL=yes], enabled,
111   [
112     AC_MSG_NOTICE(building external plug-ins)
113     BUILD_EXTERNAL="yes"
114   ],[
115     AC_MSG_NOTICE(all plug-ins with external dependencies will not be built)
116     BUILD_EXTERNAL="no"
117   ])
118 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
119
120 dnl *** checks for platform ***
121
122 dnl * hardware/architecture *
123
124 dnl common/m4/gst-arch.m4
125 dnl check CPU type
126 GST_ARCH
127
128 dnl *** checks for programs ***
129
130 dnl find a compiler
131 AC_PROG_CC
132
133 dnl determine c++ compiler
134 AC_PROG_CXX
135 dnl determine if c++ is available on this system
136 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
137
138 dnl determine c++ preprocessor
139 dnl FIXME: do we need this ?
140 AC_PROG_CXXCPP
141
142 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
143 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
144
145 dnl check for documentation tools
146 GTK_DOC_CHECK([1.3])
147 AS_PATH_PYTHON([2.1])
148
149 dnl *** checks for libraries ***
150
151 dnl For interactive UNIX (a Sun thing)
152 dnl FIXME: this adds -lcposix to LIBS, but I doubt we use LIBS
153 AC_ISC_POSIX
154
155 dnl *** checks for header files ***
156
157 dnl check if we have ANSI C header files
158 AC_HEADER_STDC
159
160 dnl used in gst/ffmpegcolorspace/mem.c
161 dnl FIXME: could be fixed by redefining av_malloc and av_free to GLib's
162 AC_CHECK_HEADERS([malloc.h])
163
164 dnl used in gst/subparse/gstsubparse.c
165 AC_CHECK_HEADERS([regex.h], HAVE_REGEX_H="yes", HAVE_REGEX_H="no")
166 AM_CONDITIONAL(HAVE_REGEX_H, test "x$HAVE_REGEX_H" = "xyes")
167
168 dnl ffmpegcolorspace includes _stdint.h
169 AX_CREATE_STDINT_H
170
171 dnl *** checks for types/defines ***
172
173 dnl Check for FIONREAD ioctl declaration
174 dnl used in gst/tcp
175 GST_CHECK_FIONREAD
176
177 dnl *** checks for structures ***
178
179 dnl *** checks for compiler characteristics ***
180
181 dnl make sure we can use "inline" from C code
182 AC_C_INLINE
183
184 dnl *** checks for library functions ***
185
186 dnl Check for fast float to int casting as defined in C99
187 dnl used in gst-libs/gst/floatcast/floatcast.h
188 AC_C99_FUNC_LRINT
189 AC_C99_FUNC_LRINTF
190
191 dnl Check for a way to display the function name in debug output
192 GST_CHECK_FUNCTION
193
194 dnl *** checks for dependancy libraries ***
195
196 dnl GLib is required
197 GST_GLIB_CHECK([2.6])
198
199 dnl liboil is required
200 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
201 if test "x${HAVE_LIBOIL}" != xyes ; then
202   AC_ERROR([liboil-0.3 is required])
203 fi
204
205 dnl checks for gstreamer
206 dnl uninstalled is selected preferentially -- see pkg-config(1)
207 GST_REQ=0.9.3
208 GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
209 GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
210 GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
211 GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
212 GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
213
214 dnl FIXME: get rid of this by making sure gstreamer-check brings it in
215 dnl check for "check", unit testing library/header
216 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
217 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
218
219
220 dnl GTK is optional and used in examples
221 HAVE_GTK=NO
222 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
223 if test "x$HAVE_GTK_22" = "xyes"; then
224   HAVE_GTK=yes
225   GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
226   AC_SUBST(GTK_VERSION)
227   GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
228   AC_SUBST(GTK_BASE_DIR)
229 else
230   PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
231 fi
232 if test "x$HAVE_GTK_20" = "xyes"; then
233   HAVE_GTK=yes
234 fi
235 GTK_CFLAGS=$GTK2_CFLAGS
236 GTK_LIBS=$GTK2_LIBS
237 AC_SUBST(GTK_LIBS)
238 AC_SUBST(GTK_CFLAGS)
239 AC_SUBST(HAVE_GTK)
240 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
241
242 dnl *** set variables based on configure arguments ***
243
244 dnl set license and copyright notice
245 GST_LICENSE="LGPL"
246 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
247 AC_SUBST(GST_LICENSE)
248
249 dnl set location of plugin directory
250 GST_SET_PLUGINDIR
251
252 dnl define an ERROR_CFLAGS Makefile variable
253 GST_SET_ERROR_CFLAGS($GST_CVS)
254
255 dnl define correct level for debugging messages
256 GST_SET_LEVEL_DEFAULT($GST_CVS)
257
258 dnl decide on default elements
259 dnl FIXME: provide configure-time options for this
260 dnl FIXME: describe where exactly this gets used
261 dnl FIXME: decide if it's a problem that this could point to sinks from
262 dnl        depending plugin modules
263 DEFAULT_AUDIOSINK="alsasink"
264 DEFAULT_VIDEOSINK="xvimagesink"
265 DEFAULT_AUDIOSRC="alsasrc"
266 DEFAULT_VIDEOSRC="v4lsrc"
267 DEFAULT_VISUALIZER="goom"
268 case "$host" in 
269   *-sun-* | *pc-solaris* )
270     DEFAULT_AUDIOSINK="sunaudiosink"
271     DEFAULT_VIDEOSINK="ximagesink"
272     DEFAULT_AUDIOSRC="sunaudiosrc"
273     ;;
274   *-darwin* )
275     DEFAULT_AUDIOSINK="osxaudiosink"
276     DEFAULT_AUDIOSRC="osxaudiosrc"
277     DEFAULT_VIDEOSINK="osxvideosink"
278     ;;
279 esac
280
281 AC_SUBST(DEFAULT_AUDIOSINK)
282 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK, "$DEFAULT_AUDIOSINK",
283   [Default audio sink])
284 AC_SUBST(DEFAULT_AUDIOSRC)
285 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC, "$DEFAULT_AUDIOSRC",
286   [Default audio source])
287 AC_SUBST(DEFAULT_VIDEOSINK)
288 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK, "$DEFAULT_VIDEOSINK",
289   [Default video sink])
290 AC_SUBST(DEFAULT_VIDEOSRC)
291 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC, "$DEFAULT_VIDEOSRC",
292   [Default video source])
293 AC_SUBST(DEFAULT_VISUALIZER)
294 AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER, "$DEFAULT_VISUALIZER",
295   [Default visualizer])
296
297 dnl *** sys plug-ins ***
298
299 echo
300 AC_MSG_NOTICE([Checking libraries for plugins in sys/])
301 echo
302
303 dnl *** X11 ***
304 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
305 GST_CHECK_FEATURE(X, [X libraries and plugins],
306                   [ximagesink], [
307   AC_PATH_XTRA
308   ac_cflags_save="$CFLAGS"
309   ac_cppflags_save="$CPPFLAGS"
310   CFLAGS="$CFLAGS $X_CFLAGS"
311   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
312
313   dnl now try to find the HEADER
314   AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no")
315
316   if test "x$HAVE_X" = "xno"
317   then
318     AC_MSG_NOTICE([cannot find X11 development files])
319   else
320     dnl this is much more than we want
321     X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
322     dnl AC_PATH_XTRA only defines the path needed to find the X libs,
323     dnl it does not add the libs; therefore we add them here
324     X_LIBS="$X_LIBS -lX11"
325     AC_SUBST(X_CFLAGS)
326     AC_SUBST(X_LIBS)
327   fi
328   AC_SUBST(HAVE_X)
329   CFLAGS="$ac_cflags_save"
330   CPPFLAGS="$ac_cppflags_save"
331 ])
332   
333 dnl *** XVideo ***
334 dnl Look for the PIC library first, Debian requires it.
335 dnl Check debian-devel archives for gory details.
336 dnl 20020110:
337 dnl At the moment XFree86 doesn't distribute shared libXv due
338 dnl to unstable API.  On many platforms you CAN NOT link a shared
339 dnl lib to a static non-PIC lib.  This is what the xvideo GStreamer
340 dnl plug-in wants to do.  So Debian distributes a PIC compiled
341 dnl version of the static lib for plug-ins to link to when it is
342 dnl inappropriate to link the main application to libXv directly.
343 dnl FIXME: add check if this platform can support linking to a
344 dnl        non-PIC libXv, if not then don not use Xv.
345 dnl FIXME: perhaps warn user if they have a shared libXv since
346 dnl        this is an error until XFree86 starts shipping one
347    
348 dnl Check for Xv extension
349 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
350 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions],
351                   [xvimagesink], [
352   if test x$HAVE_X = xyes; then
353     AC_CHECK_LIB(Xv_pic, XvQueryExtension,
354                  HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
355                  $X_LIBS -lXext)
356
357     if test x$HAVE_XVIDEO = xyes; then
358       XVIDEO_LIBS="-lXv_pic -lXext"
359       AC_SUBST(XVIDEO_LIBS)
360     else
361       dnl try again using something else if we didn't find it first
362       if test x$HAVE_XVIDEO = xno; then
363         AC_CHECK_LIB(Xv, XvQueryExtension,
364                    HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
365                    $X_LIBS -lXext)
366
367         if test x$HAVE_XVIDEO = xyes; then
368           XVIDEO_LIBS="-lXv -lXext"
369           AC_SUBST(XVIDEO_LIBS)
370         fi
371       fi
372     fi
373   fi
374 ])
375
376 dnl check for X Shm
377 translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
378 GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], xshm, [
379   if test x$HAVE_X = xyes; then
380     AC_CHECK_LIB(Xext, XShmAttach, 
381                  HAVE_XSHM="yes", HAVE_XSHM="no",
382                  $X_LIBS) 
383     if test "x$HAVE_XSHM" = "xyes"; then
384       XSHM_LIBS="-lXext"
385     else
386       dnl On AIX, it is in XextSam instead, but we still need -lXext
387       AC_CHECK_LIB(XextSam, XShmAttach, 
388                    HAVE_XSHM="yes", HAVE_XSHM="no",
389                    $X_LIBS) 
390       if test "x$HAVE_XSHM" = "xyes"; then
391         XSHM_LIBS="-lXext -lXextSam"
392       fi
393     fi
394   fi
395 ], , [ 
396   AC_SUBST(HAVE_XSHM) 
397   AC_SUBST(XSHM_LIBS) 
398 ] )
399
400 dnl v4l/v4l2 checks have been moved down because they require X
401
402 dnl *** Video 4 Linux ***
403 dnl for information about the header/define, see sys/v4l/gstv4lelement.h
404 dnl renamed to GST_V4L in accordance with V4L2 below
405 translit(dnm, m, l) AM_CONDITIONAL(USE_GST_V4L, true)
406 GST_CHECK_FEATURE(GST_V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
407   # first check X
408   HAVE_GST_V4L="no"
409   if test "$HAVE_X" = "yes"
410   then
411     AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_GST_V4L="yes", HAVE_GST_V4L="no", [
412 #include <sys/types.h>
413 #define _LINUX_TIME_H
414 #define __user
415 #include <linux/videodev.h>
416     ])
417   fi
418 ])
419
420 dnl *** ext plug-ins ***
421 dnl keep this list sorted alphabetically !
422
423 if test "x$BUILD_EXTERNAL" = "xyes"; then
424
425 echo
426 AC_MSG_NOTICE([Checking libraries for plugins in ext/])
427 echo
428
429 dnl *** alsa ***
430 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
431 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
432   PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
433     HAVE_ALSA="yes"
434     AC_SUBST(ALSA_CFLAGS)
435     AC_SUBST(ALSA_LIBS)
436   ], [
437     AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
438   ])
439 ])
440
441 dnl *** CDParanoia ***
442 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
443 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
444   GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, 
445                       cdda_open, -lm, 
446                       cdda_interface.h, 
447                       CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
448                       HEADER_DIR="no"
449                       FOUND_CDPARANOIA="yes")
450   if test "x$FOUND_CDPARANOIA" != "xyes";
451   then
452     GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, 
453                         cdda_open, -lm, 
454                         cdda/cdda_interface.h, 
455                         CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
456                         HEADER_DIR="yes"
457                         FOUND_CDPARANOIA="yes")
458   fi
459   if test "x$HEADER_DIR" = "xyes";
460   then
461     AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, ,
462                        defined if cdda headers are in a cdda/ directory)
463   fi
464   AC_SUBST(CDPARANOIA_LIBS)
465 ])
466 dnl FIXME : add second check somehow if that is necessary
467 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
468 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
469
470 dnl *** Gnome VFS ***
471 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
472 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
473   PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
474   AC_SUBST(GNOME_VFS_CFLAGS)
475   AC_SUBST(GNOME_VFS_LIBS)
476 ])
477
478 dnl *** libvisual ***
479 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
480 GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization plugins], libvisual, [
481   PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0, HAVE_LIBVISUAL="yes", HAVE_LIBVISUAL="no")
482   AC_SUBST(LIBVISUAL_CFLAGS)
483   AC_SUBST(LIBVISUAL_LIBS)
484 ])
485
486 dnl *** ogg ***
487 translit(dnm, m, l) AM_CONDITIONAL(USE_OGG, true)
488 GST_CHECK_FEATURE(OGG, [ogg de/encoder], oggdemux oggmux, [
489   PKG_CHECK_MODULES(OGG, ogg >= 1.0, [
490     HAVE_OGG="yes"
491     AC_SUBST(OGG_CFLAGS)
492     AC_SUBST(OGG_LIBS)
493   ], [
494     XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no")
495     AS_SCRUB_INCLUDE(OGG_CFLAGS)
496   ])
497 ])
498
499 dnl *** theora ***
500 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORA, true)
501 GST_CHECK_FEATURE(THEORA, [ogg theora codec], theoradec theoraenc, [
502   PKG_CHECK_MODULES(THEORA, theora, [
503     HAVE_THEORA="yes"
504     AC_SUBST(THEORA_LIBS)
505     AC_SUBST(THEORA_CFLAGS)
506   ], [
507     GST_CHECK_LIBHEADER(THEORA, theora, theora_version_string, "-logg", theora/theora.h, THEORA_LIBS="-ltheora -logg")
508     AC_SUBST(THEORA_LIBS)
509   ])
510 ])
511
512 dnl *** vorbis ***
513 dnl AM_PATH_VORBIS only takes two options
514 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
515 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
516   PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0 vorbisenc >= 1.0, [
517     HAVE_VORBIS="yes"
518   ], [
519     XIPH_PATH_VORBIS(HAVE_VORBIS="yes", HAVE_VORBIS="no")
520     AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
521   ])
522 ])
523 if test "x$HAVE_VORBIS" = "xyes"; then
524   ac_cflags_save="$CFLAGS"
525   dnl FIXME: does this work on non-gcc? -- Company
526   dnl FIXME: no, it doesn't.  Why is this here in the first place ? -- thomasvs
527   CFLAGS="-Wall -Werror"
528   AC_COMPILE_IFELSE(
529     AC_LANG_PROGRAM([
530 #include <vorbis/codec.h>
531                      ],[
532 vorbis_dsp_state *v;
533
534 vorbis_synthesis_restart (v);
535                      ]), HAVE_VSR=yes, HAVE_VSR=no)
536   if test "x$HAVE_VSR" = "xyes"; then
537     AC_DEFINE_UNQUOTED(HAVE_VORBIS_SYNTHESIS_RESTART, 1,
538                        [defined if vorbis_synthesis_restart is present])
539   fi
540   CFLAGS="$ac_cflags_save"
541 fi
542
543 fi dnl of EXT plugins
544
545 dnl ######################################################################
546 dnl # Check command line parameters, and set shell variables accordingly #
547 dnl ######################################################################
548
549 dnl seeking needs freetype, so check for it here
550 PKG_CHECK_MODULES(FT2, freetype2 >= 2.0.9, HAVE_FT2="yes", [
551   AC_CHECK_FT2(2.0.9, HAVE_FT2="yes", HAVE_FT2="no")
552 ])
553 dnl make the HAVE_FT2 variable available to automake and Makefile.am
554 AM_CONDITIONAL(HAVE_FT2, test "x$HAVE_FT2" = "xyes")
555 AC_SUBST(FT2_CFLAGS)
556 AC_SUBST(FT2_LIBS)
557
558 dnl *** finalize CFLAGS, LDFLAGS, LIBS
559
560 dnl Overview:
561 dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
562 dnl GST_*:              flags shared by all built objects
563 dnl GST_LT_LDFLAGS:     library versioning of our libraries
564 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
565
566 dnl GST_OPTION_CFLAGS
567 if test "x$USE_DEBUG" = xyes; then
568    PROFILE_CFLAGS="-g"
569 fi
570 AC_SUBST(PROFILE_CFLAGS)
571
572 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
573 AC_SUBST(DEPRECATED_CFLAGS)
574
575 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
576 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
577 AC_SUBST(GST_OPTION_CFLAGS)
578
579 dnl our libraries need to be versioned correctly
580 AC_SUBST(GST_LT_LDFLAGS)
581
582 dnl FIXME: do we want to rename to GST_ALL_* ?
583 dnl prefer internal headers to already installed ones
584 dnl also add builddir include for enumtypes and marshal
585 dnl add ERROR_CFLAGS, but overridable
586 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
587 AC_SUBST(GST_CFLAGS)
588 AC_SUBST(GST_LIBS)
589
590 dnl this really should only contain flags, not libs - they get added before
591 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
592 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' -no-undefined"
593 AC_SUBST(GST_PLUGIN_LDFLAGS)
594
595 dnl *** output files ***
596
597 AC_CONFIG_FILES(
598 Makefile
599 gst-plugins-base.spec
600 gst/Makefile
601 gst/adder/Makefile
602 gst/audioconvert/Makefile
603 gst/audiorate/Makefile
604 gst/audioresample/Makefile
605 gst/audiotestsrc/Makefile
606 gst/ffmpegcolorspace/Makefile
607 gst/playback/Makefile
608 gst/sine/Makefile
609 gst/subparse/Makefile
610 gst/tcp/Makefile
611 gst/typefind/Makefile
612 gst/videotestsrc/Makefile
613 gst/videorate/Makefile
614 gst/videoscale/Makefile
615 gst/volume/Makefile
616 sys/Makefile
617 sys/ximage/Makefile
618 sys/xvimage/Makefile
619 sys/v4l/Makefile
620 ext/Makefile
621 ext/alsa/Makefile
622 ext/cdparanoia/Makefile
623 ext/gnomevfs/Makefile
624 ext/libvisual/Makefile
625 ext/ogg/Makefile
626 ext/theora/Makefile
627 ext/vorbis/Makefile
628 gst-libs/Makefile
629 gst-libs/gst/Makefile
630 gst-libs/gst/audio/Makefile
631 gst-libs/gst/floatcast/Makefile
632 gst-libs/gst/interfaces/Makefile
633 gst-libs/gst/net/Makefile
634 gst-libs/gst/riff/Makefile
635 gst-libs/gst/rtp/Makefile
636 gst-libs/gst/tag/Makefile
637 gst-libs/gst/video/Makefile
638 gst-libs/ext/Makefile
639 examples/seeking/Makefile
640 examples/Makefile
641 tools/Makefile
642 pkgconfig/Makefile
643 pkgconfig/gstreamer-plugins-base.pc
644 pkgconfig/gstreamer-plugins-base-uninstalled.pc
645 check/Makefile
646 docs/Makefile
647 docs/libs/Makefile
648 docs/plugins/Makefile
649 docs/version.entities
650 po/Makefile.in
651 common/Makefile
652 common/m4/Makefile
653 m4/Makefile
654 )
655 AC_OUTPUT
656
657 echo "configure: *** Core plug-ins, always built:"
658 ( for i in $GST_PLUGINS_ALL; do echo -e '\t'$i; done ) | sort
659 echo
660 echo -n "configure: *** Plug-ins relying on libraries that will be built:"
661 echo -e "$GST_PLUGINS_YES" | sort
662 echo
663 echo -n "configure: *** Plug-ins relying on libraries that will NOT be built:"
664 echo -e "$GST_PLUGINS_NO" | sort
665 echo
666 if test "x$BUILD_EXTERNAL" = "xno"; then
667   echo "configure: *** No external plug-ins will be built"
668 fi