Releasing 0.10.3
[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, 10, 3, 0,
10     GST_CVS="no", GST_CVS="yes")
11
12 dnl can autoconf find the source ?
13 AC_CONFIG_SRCDIR([gst/audiotestsrc/gstaudiotestsrc.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.10
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, 2)
42 AS_LIBTOOL_TAGS
43 AM_PROG_LIBTOOL
44
45 dnl *** required versions of GStreamer stuff ***
46 GST_REQ=0.10.2.2
47
48 dnl *** autotools stuff ****
49
50 dnl allow for different autotools
51 AS_AUTOTOOLS_ALTERNATE
52
53 dnl Add parameters for aclocal
54 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
55
56 dnl set up gettext
57 dnl the version check needs to stay here because autopoint greps for it
58 AM_GNU_GETTEXT_VERSION([0.11.5])
59 AM_GNU_GETTEXT([external])
60 GST_GETTEXT([gst-plugins-base-$GST_MAJORMINOR])
61
62 dnl *** check for arguments to configure ***
63
64 GST_ARG_DEBUG
65 GST_ARG_PROFILING
66 GST_ARG_VALGRIND
67 GST_ARG_GCOV
68
69 GST_ARG_EXAMPLES
70
71 GST_ARG_WITH_PKG_CONFIG_PATH
72 GST_ARG_WITH_PACKAGE_NAME([GStreamer Base Plug-ins])
73 GST_ARG_WITH_PACKAGE_ORIGIN
74
75 dnl these are all the gst plug-ins, compilable without additional libs
76 GST_PLUGINS_ALL="\
77         adder \
78         audioconvert \
79         audiorate \
80         audioresample \
81         audiotestsrc \
82         ffmpegcolorspace \
83         playback \
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],
96       [comma-separated list of plug-ins to compile]),
97     [for i in `echo $withval | tr , ' '`; do
98         if echo $GST_PLUGINS_ALL | grep $i > /dev/null
99         then
100             GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
101         else
102             echo "plug-in $i not recognized, ignoring..."
103         fi
104     done],
105     [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
106
107 AC_SUBST(GST_PLUGINS_SELECTED)
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_HEADERS([malloc.h])
164
165 dnl used in gst/subparse/gstsubparse.c
166 AC_CHECK_HEADERS([regex.h], HAVE_REGEX_H="yes", HAVE_REGEX_H="no")
167 AM_CONDITIONAL(HAVE_REGEX_H, test "x$HAVE_REGEX_H" = "xyes")
168
169 dnl used in gst/tcp
170 AC_CHECK_HEADERS([sys/socket.h], 
171   HAVE_SYS_SOCKET_H="yes", HAVE_SYS_SOCKET_H="no")
172 AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
173
174 dnl ffmpegcolorspace includes _stdint.h
175 AX_CREATE_STDINT_H
176
177 dnl *** checks for types/defines ***
178
179 dnl Check for FIONREAD ioctl declaration
180 dnl used in gst/tcp
181 GST_CHECK_FIONREAD
182
183 dnl *** checks for structures ***
184
185 dnl *** checks for compiler characteristics ***
186
187 dnl make sure we can use "inline" from C code
188 AC_C_INLINE
189
190 dnl *** checks for library functions ***
191
192 dnl Check for fast float to int casting as defined in C99
193 dnl used in gst-libs/gst/floatcast/floatcast.h
194 AC_C99_FUNC_LRINT
195 AC_C99_FUNC_LRINTF
196
197 dnl Check for a way to display the function name in debug output
198 GST_CHECK_FUNCTION
199
200 dnl *** checks for dependancy libraries ***
201
202 dnl GLib is required
203 GST_GLIB_CHECK([2.6])
204
205 dnl liboil is required
206 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.6, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
207 if test "x${HAVE_LIBOIL}" != xyes ; then
208   AC_ERROR([liboil-0.3.6 or later is required])
209 fi
210
211 dnl checks for gstreamer
212 dnl uninstalled is selected preferentially -- see pkg-config(1)
213 GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
214 GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
215 GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
216 GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
217 GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
218
219 dnl FIXME: get rid of this by making sure gstreamer-check brings it in
220 dnl check for "check", unit testing library/header
221 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
222 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
223
224 dnl GTK is optional and used in examples
225 HAVE_GTK=NO
226 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0, HAVE_GTK_22=yes, HAVE_GTK_22=no)
227 if test "x$HAVE_GTK_22" = "xyes"; then
228   HAVE_GTK=yes
229   GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
230   AC_SUBST(GTK_VERSION)
231   GTK_PREFIX=`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`
232   AC_SUBST(GTK_BASE_DIR)
233 else
234   PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK_20=yes, HAVE_GTK_20=no)
235 fi
236 if test "x$HAVE_GTK_20" = "xyes"; then
237   HAVE_GTK=yes
238 fi
239 GTK_CFLAGS=$GTK2_CFLAGS
240 GTK_LIBS=$GTK2_LIBS
241 AC_SUBST(GTK_LIBS)
242 AC_SUBST(GTK_CFLAGS)
243 AC_SUBST(HAVE_GTK)
244 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
245
246 dnl *** set variables based on configure arguments ***
247
248 dnl set license and copyright notice
249 GST_LICENSE="LGPL"
250 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
251 AC_SUBST(GST_LICENSE)
252
253 dnl set location of plugin directory
254 GST_SET_PLUGINDIR
255
256 dnl define an ERROR_CFLAGS Makefile variable
257 GST_SET_ERROR_CFLAGS($GST_CVS)
258
259 dnl define correct level for debugging messages
260 GST_SET_LEVEL_DEFAULT($GST_CVS)
261
262 dnl used in examples
263 GST_DEFAULT_ELEMENTS
264
265 dnl *** sys plug-ins ***
266
267 echo
268 AC_MSG_NOTICE([Checking libraries for plugins in sys/])
269 echo
270
271 dnl *** X11 ***
272 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
273 GST_CHECK_FEATURE(X, [X libraries and plugins],
274                   [ximagesink], [
275   AC_PATH_XTRA
276   ac_cflags_save="$CFLAGS"
277   ac_cppflags_save="$CPPFLAGS"
278   CFLAGS="$CFLAGS $X_CFLAGS"
279   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
280
281   dnl now try to find the HEADER
282   AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no")
283
284   if test "x$HAVE_X" = "xno"
285   then
286     AC_MSG_NOTICE([cannot find X11 development files])
287   else
288     dnl this is much more than we want
289     X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
290     dnl AC_PATH_XTRA only defines the path needed to find the X libs,
291     dnl it does not add the libs; therefore we add them here
292     X_LIBS="$X_LIBS -lX11"
293     AC_SUBST(X_CFLAGS)
294     AC_SUBST(X_LIBS)
295   fi
296   AC_SUBST(HAVE_X)
297   CFLAGS="$ac_cflags_save"
298   CPPFLAGS="$ac_cppflags_save"
299 ])
300   
301 dnl *** XVideo ***
302 dnl Look for the PIC library first, Debian requires it.
303 dnl Check debian-devel archives for gory details.
304 dnl 20020110:
305 dnl At the moment XFree86 doesn't distribute shared libXv due
306 dnl to unstable API.  On many platforms you CAN NOT link a shared
307 dnl lib to a static non-PIC lib.  This is what the xvideo GStreamer
308 dnl plug-in wants to do.  So Debian distributes a PIC compiled
309 dnl version of the static lib for plug-ins to link to when it is
310 dnl inappropriate to link the main application to libXv directly.
311 dnl FIXME: add check if this platform can support linking to a
312 dnl        non-PIC libXv, if not then don not use Xv.
313 dnl FIXME: perhaps warn user if they have a shared libXv since
314 dnl        this is an error until XFree86 starts shipping one
315    
316 dnl Check for Xv extension
317 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
318 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions],
319                   [xvimagesink], [
320   if test x$HAVE_X = xyes; then
321     AC_CHECK_LIB(Xv_pic, XvQueryExtension,
322                  HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
323                  $X_LIBS -lXext)
324
325     if test x$HAVE_XVIDEO = xyes; then
326       XVIDEO_LIBS="-lXv_pic -lXext"
327       AC_SUBST(XVIDEO_LIBS)
328     else
329       dnl try again using something else if we didn't find it first
330       if test x$HAVE_XVIDEO = xno; then
331         AC_CHECK_LIB(Xv, XvQueryExtension,
332                    HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
333                    $X_LIBS -lXext)
334
335         if test x$HAVE_XVIDEO = xyes; then
336           XVIDEO_LIBS="-lXv -lXext"
337           AC_SUBST(XVIDEO_LIBS)
338         fi
339       fi
340     fi
341   fi
342 ])
343
344 dnl check for X Shm
345 translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
346 GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], xshm, [
347   if test x$HAVE_X = xyes; then
348     AC_CHECK_LIB(Xext, XShmAttach, 
349                  HAVE_XSHM="yes", HAVE_XSHM="no",
350                  $X_LIBS) 
351     if test "x$HAVE_XSHM" = "xyes"; then
352       XSHM_LIBS="-lXext"
353     else
354       dnl On AIX, it is in XextSam instead, but we still need -lXext
355       AC_CHECK_LIB(XextSam, XShmAttach, 
356                    HAVE_XSHM="yes", HAVE_XSHM="no",
357                    $X_LIBS) 
358       if test "x$HAVE_XSHM" = "xyes"; then
359         XSHM_LIBS="-lXext -lXextSam"
360       fi
361     fi
362   fi
363 ], , [ 
364   AC_SUBST(HAVE_XSHM) 
365   AC_SUBST(XSHM_LIBS) 
366 ] )
367
368 dnl v4l/v4l2 checks have been moved down because they require X
369
370 dnl *** Video 4 Linux ***
371 dnl for information about the header/define, see sys/v4l/gstv4lelement.h
372 dnl renamed to GST_V4L in accordance with V4L2 below
373 translit(dnm, m, l) AM_CONDITIONAL(USE_GST_V4L, true)
374 GST_CHECK_FEATURE(GST_V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
375   # first check X
376   HAVE_GST_V4L="no"
377   if test "$HAVE_X" = "yes"
378   then
379     AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_GST_V4L="yes", HAVE_GST_V4L="no", [
380 #include <sys/types.h>
381 #define _LINUX_TIME_H
382 #define __user
383 #include <linux/videodev.h>
384     ])
385   fi
386 ])
387
388 dnl *** ext plug-ins ***
389 dnl keep this list sorted alphabetically !
390
391 if test "x$BUILD_EXTERNAL" = "xyes"; then
392
393 echo
394 AC_MSG_NOTICE([Checking libraries for plugins in ext/])
395 echo
396
397 dnl *** alsa ***
398 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
399 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
400   PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
401     HAVE_ALSA="yes"
402     AC_SUBST(ALSA_CFLAGS)
403     AC_SUBST(ALSA_LIBS)
404   ], [
405     AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
406   ])
407 ])
408
409 dnl *** CDParanoia ***
410 translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
411 GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [
412   GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, 
413                       cdda_open, -lm, 
414                       cdda_interface.h, 
415                       CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
416                       HEADER_DIR="no"
417                       FOUND_CDPARANOIA="yes")
418   if test "x$FOUND_CDPARANOIA" != "xyes";
419   then
420     GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, 
421                         cdda_open, -lm, 
422                         cdda/cdda_interface.h, 
423                         CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia"
424                         HEADER_DIR="yes"
425                         FOUND_CDPARANOIA="yes")
426   fi
427   if test "x$HEADER_DIR" = "xyes";
428   then
429     AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, ,
430                        defined if cdda headers are in a cdda/ directory)
431   fi
432   AC_SUBST(CDPARANOIA_LIBS)
433 ])
434 dnl FIXME : add second check somehow if that is necessary
435 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
436 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
437 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
438   [HAVE_EXTERNAL=yes], enabled,
439   [
440     AC_MSG_NOTICE(building external plug-ins)
441     BUILD_EXTERNAL="yes"
442   ],[
443     AC_MSG_NOTICE(all plug-ins with external dependencies will not be built)
444     BUILD_EXTERNAL="no"
445   ])
446
447
448 dnl *** Gnome VFS ***
449 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
450 GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
451   PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
452   AC_SUBST(GNOME_VFS_CFLAGS)
453   AC_SUBST(GNOME_VFS_LIBS)
454 ])
455
456 dnl *** libvisual ***
457 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
458 GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization plugins], libvisual, [
459   PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0, HAVE_LIBVISUAL="yes", HAVE_LIBVISUAL="no")
460   AC_SUBST(LIBVISUAL_CFLAGS)
461   AC_SUBST(LIBVISUAL_LIBS)
462 ])
463
464 dnl *** ogg ***
465 translit(dnm, m, l) AM_CONDITIONAL(USE_OGG, true)
466 GST_CHECK_FEATURE(OGG, [ogg de/encoder], oggdemux oggmux, [
467   PKG_CHECK_MODULES(OGG, ogg >= 1.0, [
468     HAVE_OGG="yes"
469     AC_SUBST(OGG_CFLAGS)
470     AC_SUBST(OGG_LIBS)
471   ], [
472     XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no")
473     AS_SCRUB_INCLUDE(OGG_CFLAGS)
474   ])
475 ])
476
477 dnl *** pango ***
478 translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
479 GST_CHECK_FEATURE(PANGO, [pango], pango, [
480   PKG_CHECK_MODULES(PANGO, pango pangoft2,
481       HAVE_PANGO="yes", HAVE_PANGO="no")
482   AC_SUBST(PANGO_CFLAGS)
483   AC_SUBST(PANGO_LIBS)
484 ])
485
486 dnl *** theora ***
487 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORA, true)
488 GST_CHECK_FEATURE(THEORA, [ogg theora codec], theoradec theoraenc, [
489   PKG_CHECK_MODULES(THEORA, theora, [
490     HAVE_THEORA="yes"
491     AC_SUBST(THEORA_LIBS)
492     AC_SUBST(THEORA_CFLAGS)
493   ], [
494     GST_CHECK_LIBHEADER(THEORA, theora, theora_version_string, "-logg", theora/theora.h, THEORA_LIBS="-ltheora -logg")
495     AC_SUBST(THEORA_LIBS)
496   ])
497 ])
498
499 dnl *** vorbis ***
500 dnl AM_PATH_VORBIS only takes two options
501 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
502 GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
503   PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0 vorbisenc >= 1.0, [
504     HAVE_VORBIS="yes"
505   ], [
506     XIPH_PATH_VORBIS(HAVE_VORBIS="yes", HAVE_VORBIS="no")
507     AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
508   ])
509 ])
510 if test "x$HAVE_VORBIS" = "xyes"; then
511   ac_cflags_save="$CFLAGS"
512   dnl FIXME: does this work on non-gcc? -- Company
513   dnl FIXME: no, it doesn't.  Why is this here in the first place ? -- thomasvs
514   CFLAGS="-Wall -Werror"
515   AC_COMPILE_IFELSE(
516     AC_LANG_PROGRAM([
517 #include <vorbis/codec.h>
518                      ],[
519 vorbis_dsp_state *v;
520
521 vorbis_synthesis_restart (v);
522                      ]), HAVE_VSR=yes, HAVE_VSR=no)
523   if test "x$HAVE_VSR" = "xyes"; then
524     AC_DEFINE_UNQUOTED(HAVE_VORBIS_SYNTHESIS_RESTART, 1,
525                        [defined if vorbis_synthesis_restart is present])
526   fi
527   CFLAGS="$ac_cflags_save"
528 fi
529
530 fi dnl of EXT plugins
531
532 dnl seeking needs freetype, so check for it here
533 PKG_CHECK_MODULES(FT2, freetype2 >= 2.0.9, HAVE_FT2="yes", [
534   AC_CHECK_FT2(2.0.9, HAVE_FT2="yes", HAVE_FT2="no")
535 ])
536 dnl make the HAVE_FT2 variable available to automake and Makefile.am
537 AM_CONDITIONAL(HAVE_FT2, test "x$HAVE_FT2" = "xyes")
538 AC_SUBST(FT2_CFLAGS)
539 AC_SUBST(FT2_LIBS)
540
541 dnl *** finalize CFLAGS, LDFLAGS, LIBS
542
543 dnl Overview:
544 dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
545 dnl GST_*:              flags shared by built objects to link against GStreamer
546 dnl GST_ALL_LDFLAGS:    linker flags shared by all
547 dnl GST_LIB_LDFLAGS:    additional linker flags for all libaries
548 dnl GST_LT_LDFLAGS:     library versioning of our libraries
549 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
550
551 dnl GST_OPTION_CFLAGS
552 if test "x$USE_DEBUG" = xyes; then
553    PROFILE_CFLAGS="-g"
554 fi
555 AC_SUBST(PROFILE_CFLAGS)
556
557 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
558 AC_SUBST(DEPRECATED_CFLAGS)
559
560 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
561 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
562 AC_SUBST(GST_OPTION_CFLAGS)
563
564 dnl our libraries need to be versioned correctly
565 AC_SUBST(GST_LT_LDFLAGS)
566
567 dnl FIXME: do we want to rename to GST_ALL_* ?
568 dnl prefer internal headers to already installed ones
569 dnl also add builddir include for enumtypes and marshal
570 dnl add GST_OPTION_CFLAGS, but overridable
571 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
572 AC_SUBST(GST_CFLAGS)
573 AC_SUBST(GST_LIBS)
574
575 dnl LDFLAGS really should only contain flags, not libs - they get added before
576 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
577 GST_ALL_LDFLAGS="-no-undefined"
578 AC_SUBST(GST_ALL_LDFLAGS)
579
580 dnl GST_LIB_LDFLAGS
581 dnl linker flags shared by all libraries
582 dnl LDFLAGS modifier defining exported symbols from built libraries
583 GST_LIB_LDFLAGS="-export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*"
584 AC_SUBST(GST_LIB_LDFLAGS)
585
586 dnl this really should only contain flags, not libs - they get added before
587 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
588 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
589 AC_SUBST(GST_PLUGIN_LDFLAGS)
590
591 dnl *** output files ***
592
593 AC_CONFIG_FILES(
594 Makefile
595 gst-plugins-base.spec
596 gst/Makefile
597 gst/adder/Makefile
598 gst/audioconvert/Makefile
599 gst/audiorate/Makefile
600 gst/audioresample/Makefile
601 gst/audiotestsrc/Makefile
602 gst/ffmpegcolorspace/Makefile
603 gst/playback/Makefile
604 gst/subparse/Makefile
605 gst/tcp/Makefile
606 gst/typefind/Makefile
607 gst/videotestsrc/Makefile
608 gst/videorate/Makefile
609 gst/videoscale/Makefile
610 gst/volume/Makefile
611 sys/Makefile
612 sys/ximage/Makefile
613 sys/xvimage/Makefile
614 sys/v4l/Makefile
615 ext/Makefile
616 ext/alsa/Makefile
617 ext/cdparanoia/Makefile
618 ext/gnomevfs/Makefile
619 ext/libvisual/Makefile
620 ext/ogg/Makefile
621 ext/pango/Makefile
622 ext/theora/Makefile
623 ext/vorbis/Makefile
624 gst-libs/Makefile
625 gst-libs/gst/Makefile
626 gst-libs/gst/audio/Makefile
627 gst-libs/gst/cdda/Makefile
628 gst-libs/gst/floatcast/Makefile
629 gst-libs/gst/interfaces/Makefile
630 gst-libs/gst/netbuffer/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 tools/Makefile
636 win32/common/config.h
637 pkgconfig/Makefile
638 pkgconfig/gstreamer-plugins-base.pc
639 pkgconfig/gstreamer-plugins-base-uninstalled.pc
640 tests/Makefile
641 tests/check/Makefile
642 tests/examples/Makefile
643 tests/examples/seek/Makefile
644 tests/examples/volume/Makefile
645 tests/icles/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