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