5a6092bcdf25725d5fbb27185d70a1dd8e498b2a
[platform/upstream/gstreamer.git] / configure.ac
1 dnl autoconf configuration file for gst-plugins 
2 AC_INIT
3 AC_CANONICAL_TARGET
4
5 dnl We disable static building for development, for time savings
6 dnl this goes before AS_LIBTOOL to appease autoconf
7 dnl *NOTE*: dnl this line before release, so release does static too
8 AM_DISABLE_STATIC
9
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
11 AM_MAINTAINER_MODE
12
13 dnl when going to/from release please set the nano (fourth number) right !
14 dnl releases only do Wall, cvs and prerelease does Werror too
15 AS_VERSION(gst-plugins-good, GST_PLUGINS_GOOD_VERSION, 0, 9, 3, 1,
16     GST_CVS="no", GST_CVS="yes")
17
18 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
19
20 dnl our libraries and install dirs use major.minor as a version
21 GST_MAJORMINOR=$GST_PLUGINS_GOOD_VERSION_MAJOR.$GST_PLUGINS_GOOD_VERSION_MINOR
22 dnl we override it here if we need to for the release candidate of new series
23 GST_MAJORMINOR=0.9
24 AC_SUBST(GST_MAJORMINOR)
25
26 dnl CURRENT, REVISION, AGE
27 dnl - library source changed -> increment REVISION
28 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
29 dnl - interfaces added -> increment AGE
30 dnl - interfaces removed -> AGE = 0
31 dnl for 0.8.3 release, gst_play_get_all_by_interface was added, so update
32 AS_LIBTOOL(GST_PLUGINS_GOOD, 0, 0, 0)
33 AS_LIBTOOL_TAGS([CXX])
34 AM_PROG_LIBTOOL
35
36 AC_CONFIG_SRCDIR([gst/law/alaw.c])
37 AM_CONFIG_HEADER(config.h)
38
39 dnl Add parameters for aclocal
40 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
41 ACLOCAL_FLAGS="-I m4 -I common/m4"
42 AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
43
44 AC_PROG_CC
45 AM_PROG_CC_STDC
46 AM_PROG_AS
47 AS="${CC}"
48 AS_PROG_OBJC
49
50 dnl the gettext stuff needed
51 AM_GNU_GETTEXT_VERSION(0.11.5)
52 AM_GNU_GETTEXT([external])
53                                                                             
54 GETTEXT_PACKAGE=gst-plugins-good-$GST_MAJORMINOR
55 AC_SUBST(GETTEXT_PACKAGE)
56 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
57                   [gettext package name])
58
59 dnl define LOCALEDIR in config.h
60 AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
61 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
62                    [gettext locale dir])
63
64 dnl decide on error flags
65 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
66
67 if test "x$GST_WALL" = "xyes"; then
68    GST_ERROR="$GST_ERROR -Wall"
69
70    if test "x$GST_CVS" = "xyes"; then
71      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
72    fi
73 fi
74
75 dnl determine c++ compiler
76 AC_PROG_CXX
77 dnl determine if c++ is available on this system
78 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
79 dnl determine c++ preprocessor
80 AC_PROG_CXXCPP
81 AC_ISC_POSIX
82
83 AC_HEADER_STDC([])
84 AC_C_INLINE
85 AX_CREATE_STDINT_H
86
87 dnl Check for malloc.h
88 AC_CHECK_HEADER(malloc.h,[
89   AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
90 ])
91
92 dnl Check for a way to display the function name in debug output
93 GST_CHECK_FUNCTION()
94
95 dnl Check for FIONREAD ioctl declaration :
96 GST_CHECK_FIONREAD()
97
98 DEFAULT_AUDIOSINK="autoaudiosink"
99 DEFAULT_VIDEOSINK="autovideosink"
100 DEFAULT_AUDIOSRC="alsasrc"
101 DEFAULT_VIDEOSRC="v4lsrc"
102 DEFAULT_VISUALIZER="goom"
103 case "$host" in 
104   *-sun-* | *pc-solaris* )
105     DEFAULT_AUDIOSRC="sunaudiosrc"
106     ;;
107   *-darwin* )
108     DEFAULT_AUDIOSRC="osxaudiosrc"
109     ;;
110 esac
111
112 AC_SUBST(DEFAULT_AUDIOSINK)
113 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
114 AC_SUBST(DEFAULT_AUDIOSRC)
115 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
116 AC_SUBST(DEFAULT_VIDEOSINK)
117 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
118 AC_SUBST(DEFAULT_VIDEOSRC)
119 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
120 AC_SUBST(DEFAULT_VISUALIZER)
121 AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
122
123 dnl ############################################
124 dnl # Super Duper options for plug-in building #
125 dnl ############################################
126
127 dnl ext plug-ins; plug-ins that have external dependencies
128 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
129 [HAVE_EXTERNAL=yes],enabled,
130 [
131   AC_MSG_WARN(building external plug-ins)
132   BUILD_EXTERNAL="yes"
133 ],[
134   AC_MSG_WARN(all plug-ins with external dependencies will not be built)
135   BUILD_EXTERNAL="no"
136 ])
137 # make BUILD_EXTERNAL available to Makefile.am
138 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
139
140 dnl ##############################
141 dnl # Do automated configuration #
142 dnl ##############################
143
144 dnl Check for tools:
145 dnl ================
146
147 dnl allow for different autotools
148 AS_AUTOTOOLS_ALTERNATE()
149
150 dnl modify pkg-config path
151 AC_ARG_WITH(pkg-config-path, 
152    AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
153    [export PKG_CONFIG_PATH=${withval}])
154
155 GST_DOCBOOK_CHECK()
156 dnl check architecture
157 GST_ARCH()
158
159 dnl check for gconftool-2
160
161 dnl this macro defines an am conditional, so it needs to be run always
162 AM_GCONF_SOURCE_2
163
164 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
165 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
166   AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
167   if test x$GCONFTOOL = xno; then
168     AC_MSG_WARN(Not installing GConf schemas)
169     HAVE_GCONFTOOL="no"
170   else
171     HAVE_GCONFTOOL="yes"
172   fi
173   AC_SUBST(HAVE_GCONFTOOL)
174 ])
175
176 dnl check for GConf libraries
177 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
178 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
179   PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
180   AC_SUBST(GCONF_CFLAGS)
181   AC_SUBST(GCONF_LIBS)
182 ])
183
184 dnl check for gstreamer
185 dnl uninstalled is selected preferentially -- see pkg-config(1)
186 GST_REQ=0.9.0.1
187 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
188   HAVE_GST="yes", HAVE_GST="no")
189
190 if test "x$HAVE_GST" = "xno"; then
191   AC_MSG_ERROR(no GStreamer found)
192 fi
193
194 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
195 if test -z $GST_TOOLS_DIR; then
196   AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
197 fi
198 AC_SUBST(GST_TOOLS_DIR)
199
200 dnl check for gstreamer-base; uninstalled is selected preferentially
201 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
202   HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
203
204 if test "x$HAVE_GST_BASE" = "xno"; then
205   AC_MSG_ERROR(no GStreamer Base Libs found)
206 fi
207
208 AC_SUBST(GST_BASE_LIBS)
209 AC_SUBST(GST_BASE_CFLAGS)
210
211 dnl check for gstreamer-plugins-base; uinstalled is selected preferentially
212 PKG_CHECK_MODULES(GST_PLUGINS_BASE,
213   gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ,
214   HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no")
215
216 if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
217   AC_MSG_ERROR(no GStreamer Base Plugins development files found)
218 fi
219
220 AC_SUBST(GST_PLUGINS_BASE_LIBS)
221 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
222
223 PKG_CHECK_MODULES(GST_CHECK, gstreamer-check-$GST_MAJORMINOR >= $GST_REQ,
224   HAVE_GST_CHECK="yes", HAVE_GST_CHECK="no")
225
226 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
227 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
228
229 dnl Determine endianness
230 AC_C_BIGENDIAN
231
232 dnl Check for fast float to int casting as defined in C99
233 AC_C99_FUNC_LRINT()
234 AC_C99_FUNC_LRINTF()
235
236 dnl Check for essential libraries first:
237 dnl ====================================
238
239 GST_GLIB_CHECK([2.6])
240
241 dnl Check for additional libraries that we might use:
242 dnl =================================================
243
244 # we set the defaults always to make sure we have non-empty variables
245 # for the Makefile
246
247 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
248 AC_SUBST(LIBOIL_CFLAGS)
249 AC_SUBST(LIBOIL_LIBS)
250 if test "x${HAVE_LIBOIL}" = xyes ; then
251   #AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
252   true
253 fi
254
255 dnl ===========================================================================
256 dnl ============================= gst plug-ins ================================
257 dnl ===========================================================================
258
259 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
260 AC_SUBST(plugindir)
261
262 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' -no-undefined"
263 AC_SUBST(GST_PLUGIN_LDFLAGS)
264
265 dnl these are all the gst plug-ins, compilable without additional libs
266 dnl videofilter is at the top because others depend on it
267 GST_PLUGINS_ALL="\
268                 videofilter \
269                 alpha \
270                 auparse \
271                 autodetect \
272                 avi \
273                 debug \
274                 effectv \
275                 goom \
276                 law \
277                 level \
278                 matroska \
279                 rtp     \
280                 rtsp    \
281                 smpte   \
282                 udp     \
283                 videobox \
284                 videomixer \
285                 wavenc \
286                 wavparse \
287                 "
288
289 AC_SUBST(GST_PLUGINS_ALL)
290
291 GST_PLUGINS_SELECTED=""
292
293 AC_ARG_WITH(plugins,
294     AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
295     [for i in `echo $withval | tr , ' '`; do
296         if echo $GST_PLUGINS_ALL | grep $i > /dev/null
297         then
298             GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
299         else
300             echo "plug-in $i not recognized, ignoring..."
301         fi
302     done],
303     [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
304
305 AC_SUBST(GST_PLUGINS_SELECTED)
306
307 dnl Check for mmap (needed by electricfence plugin)
308 AC_FUNC_MMAP()
309 AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
310
311 dnl ==========================================================================
312 dnl ============================= sys plug-ins ================================
313 dnl ==========================================================================
314
315 dnl *** OSS audio *** (Linux, *BSD)
316 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
317 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
318  HAVE_OSS="yes"
319 dnl Linux and newer BSD versions :
320  AC_CHECK_HEADER(sys/soundcard.h, [
321    AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
322    ] , [
323 dnl Some old BSD versions :
324    AC_CHECK_HEADER(soundcard.h, [
325      AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
326      ], [
327   dnl Some old BSD versions :
328      AC_CHECK_HEADER(machine/soundcard.h, [
329        AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
330        ], [
331        HAVE_OSS="no"
332      ])
333    ])
334  ])
335 ])
336
337 dnl ###########################
338 dnl # Configure external libs #
339 dnl ###########################
340
341 dnl *** aalib ***
342 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
343 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
344   AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
345   AS_SCRUB_INCLUDE(AALIB_CFLAGS)
346 ])
347
348 dnl *** cairo ***
349 translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
350 GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
351   PKG_CHECK_MODULES(CAIRO, cairo >= 1.0.0, [
352     HAVE_CAIRO=yes
353     AC_SUBST(CAIRO_CFLAGS)
354     AC_SUBST(CAIRO_LIBS)
355   ], [
356      HAVE_CAIRO=no
357   ])
358 ])
359
360 dnl **** ESound ****
361 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
362 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [
363   PKG_CHECK_MODULES(ESD, esound >= 0.2.12, [
364     HAVE_ESD="yes"
365     AC_SUBST(ESD_CFLAGS)
366     AC_SUBST(ESD_LIBS)
367   ], [
368     AM_PATH_ESD(0.2.12, HAVE_ESD="yes", HAVE_ESD="no")
369     AS_SCRUB_INCLUDE(ESD_CFLAGS)
370   ])
371 ])
372
373 dnl *** FLAC ***
374 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
375 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
376   GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__seekable_stream_encoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC -lm")
377   dnl API change in FLAC 1.1.1, so require that...
378   if test x$HAVE_FLAC = xyes; then
379     AC_CHECK_DECL(FLAC__SEEKABLE_STREAM_ENCODER_TELL_ERROR,
380                   HAVE_FLAC="yes", HAVE_FLAC="no", [
381 #include <FLAC/seekable_stream_encoder.h>
382                   ])
383   fi
384   AC_SUBST(FLAC_LIBS)
385 ])
386
387 dnl *** jpeg ***
388 dnl FIXME: we could use header checks here as well IMO
389 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
390 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
391   AC_ARG_WITH(jpeg-mmx,
392     [  --with-jpeg-mmx, path to MMX'ified JPEG library])
393   OLD_LIBS="$LIBS"
394   if test x$with_jpeg_mmx != x; then
395     LIBS="$LIBS -L$with_jpeg_mmx"
396   fi
397   AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
398   JPEG_LIBS="$LIBS -ljpeg-mmx"
399   LIBS="$OLD_LIBS"
400   if test x$HAVE_JPEG != xyes; then
401     AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
402     JPEG_LIBS="-ljpeg"
403   fi
404   AC_SUBST(JPEG_LIBS)
405 ])
406
407
408 dnl *** ladspa ***
409 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
410 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
411   AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
412 ])
413
414 dnl *** libcaca ***
415 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBCACA, true)
416 GST_CHECK_FEATURE(LIBCACA, [libcaca], libcaca, [
417   GST_CHECK_CONFIGPROG(LIBCACA, caca-config)
418   AC_SUBST(LIBCACA_CFLAGS)
419   AC_SUBST(LIBCACA_LIBS)
420 ])
421
422 dnl *** libdv ***
423 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
424 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
425   PKG_CHECK_MODULES(LIBDV, libdv >= 0.100, HAVE_LIBDV="yes", HAVE_LIBDV="no")
426   AC_SUBST(LIBDV_CFLAGS)
427   AC_SUBST(LIBDV_LIBS)
428 ])
429
430 dnl *** libpng ***
431 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
432 GST_CHECK_FEATURE(LIBPNG, [libpng PNG encoder], pngenc, [
433   PKG_CHECK_MODULES(LIBPNG, libpng12, HAVE_LIBPNG="yes", HAVE_LIBPNG="no")
434   AC_SUBST(LIBPNG_CFLAGS)
435   AC_SUBST(LIBPNG_LIBS)
436 ])
437
438 dnl *** dv1394 ***
439 translit(dnm, m, l) AM_CONDITIONAL(USE_DV1394, true)
440 GST_CHECK_FEATURE(DV1394, [raw1394 and avc1394 library], dv1394src, [
441   dnl we need to test three headers and three libs
442   GST_CHECK_LIBHEADER(RAW1394,
443     raw1394, raw1394_new_handle,,
444     libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
445   GST_CHECK_LIBHEADER(AVC1394,
446     avc1394, avc1394_send_command, $RAW1394_LIBS,
447     libavc1394/avc1394.h, AVC1394_LIBS="-lavc1394")
448   GST_CHECK_LIBHEADER(ROM1394,
449     rom1394, rom1394_free_directory, $RAW1394_LIBS,
450     libavc1394/rom1394.h, ROM1394_LIBS="-lrom1394")
451
452   dnl now see how far we got
453   if test x$HAVE_RAW1394 = xyes && \
454      test x$HAVE_AVC1394 = xyes && \
455      test x$HAVE_ROM1394 = xyes; then
456        HAVE_DV1394=yes
457        DV1394_LIBS="$RAW1394_LIBS $AVC1394_LIBS $ROM1394_LIBS"
458        AC_SUBST(DV1394_LIBS)
459   else
460        HAVE_DV1394=no
461   fi
462 ])
463
464 dnl *** shout2 ***
465 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
466 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
467   PKG_CHECK_MODULES(SHOUT2, shout >= 2.0, [
468     HAVE_SHOUT2="yes"
469     AC_SUBST(SHOUT2_CFLAGS)
470     AC_SUBST(SHOUT2_LIBS)
471   ], [
472     AM_PATH_SHOUT2(HAVE_SHOUT2="yes", HAVE_SHOUT2="no")
473     AC_SUBST(SHOUT2_CFLAGS)
474     AC_SUBST(SHOUT2_LIBS)
475   ])
476 ])
477
478 dnl *** speex >= 1.0.4 or >= 1.1.5 ***
479 dnl   1.1.4 and earlier were not API/ABI compatible with 1.0
480 dnl   1.1.6 is the first to use a .pc/pkg-config file ***
481 dnl   speex_jitter.h is 1.1.x only
482 translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true)
483 GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
484   PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, [
485     HAVE_SPEEX="yes"
486     AC_SUBST(SPEEX_CFLAGS)
487     AC_SUBST(SPEEX_LIBS)
488   ], [
489     GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex/speex.h, [
490       AC_CHECK_HEADER(speex/speex_jitter.h, [
491         dnl speex 1.1.x :
492         GST_CHECK_LIBHEADER(SPEEX, speex, speex_encode_int, , speex/speex.h, [
493           dnl speex 1.1.5 or + :
494           HAVE_SPEEX="yes"
495           SPEEX_LIBS="-lspeex"
496           AC_SUBST(SPEEX_CFLAGS)
497           AC_SUBST(SPEEX_LIBS)
498         ],[
499           HAVE_SPEEX="no"
500         ])
501       ],[
502         dnl speex 1.0.x :
503           AC_CHECK_DECL(SPEEX_GET_LOOKAHEAD, [
504             dnl speex 1.0.4
505             HAVE_SPEEX="yes"
506             SPEEX_LIBS="-lspeex"
507             AC_SUBST(SPEEX_CFLAGS)
508             AC_SUBST(SPEEX_LIBS)
509
510             AC_DEFINE_UNQUOTED(SPEEX_1_0, 1,
511               [defined if speex 1.0.x API detected])
512         ],[
513             HAVE_SPEEX="no"
514             AC_MSG_NOTICE(You need at least 1.0.4 to compile the speex plugin)
515         ], [
516 #include <speex/speex.h>
517         ])
518       ])
519     ])
520   ])
521 ])
522
523 dnl also add builddir include for enumtypes and marshal
524 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
525
526 AC_SUBST(GST_LIBS)
527 AC_SUBST(GST_CFLAGS)
528
529 dnl check for "check", unit testing library/header
530 AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
531 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
532
533 dnl ######################
534 dnl # Checks for gtk-doc #
535 dnl ######################
536
537 GTK_DOC_CHECK([1.3])
538 AS_PATH_PYTHON([2.1])
539
540 dnl ############################
541 dnl # Set up some more defines #
542 dnl ############################
543
544 dnl set license and copyright notice
545 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
546
547 dnl package name in plugins
548 AC_ARG_WITH(package-name,
549 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
550 [case "${withval}" in
551   yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
552   no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
553   *) GST_PACKAGE="${withval}" ;;
554 esac], 
555 [
556 dnl default value
557 if test "x$GST_CVS" = "xyes"
558 then
559   dnl nano >= 1
560   GST_PACKAGE="GStreamer CVS/prerelease"
561 else
562   GST_PACKAGE="GStreamer source release"
563 fi
564 ]
565 )
566 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
567 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
568
569 dnl package origin URL
570 AC_ARG_WITH(package-origin,
571 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
572 [case "${withval}" in
573   yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
574   no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
575   *) GST_ORIGIN="${withval}" ;;
576 esac], 
577 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
578 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
579 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
580
581 dnl #########################
582 dnl # Make the output files #
583 dnl #########################
584
585 dnl keep this alphabetic per directory, please
586 AC_CONFIG_FILES(
587 Makefile
588 gst/Makefile
589 gst/alpha/Makefile
590 gst/auparse/Makefile
591 gst/autodetect/Makefile
592 gst/avi/Makefile
593 gst/debug/Makefile
594 gst/effectv/Makefile
595 gst/goom/Makefile
596 gst/law/Makefile
597 gst/level/Makefile
598 gst/matroska/Makefile
599 gst/rtp/Makefile
600 gst/rtsp/Makefile
601 gst/smpte/Makefile
602 gst/udp/Makefile
603 gst/videobox/Makefile
604 gst/videofilter/Makefile
605 gst/videomixer/Makefile
606 gst/wavenc/Makefile
607 gst/wavparse/Makefile
608 gst/flx/Makefile
609 ext/jpeg/Makefile
610 ext/Makefile
611 ext/aalib/Makefile
612 ext/cairo/Makefile
613 ext/dv/Makefile
614 ext/esd/Makefile
615 ext/flac/Makefile
616 ext/gconf/Makefile
617 ext/ladspa/Makefile
618 ext/libcaca/Makefile
619 ext/libpng/Makefile
620 ext/raw1394/Makefile
621 ext/shout2/Makefile
622 ext/speex/Makefile
623 sys/Makefile
624 sys/oss/Makefile
625 po/Makefile.in
626 gconf/Makefile
627 gconf/gstreamer.schemas
628 docs/Makefile
629 docs/plugins/Makefile
630 docs/version.entities
631 check/Makefile
632 common/Makefile
633 common/m4/Makefile
634 m4/Makefile
635 gst-plugins-good.spec
636 )
637 AC_OUTPUT
638
639 echo -n "configure: *** Plug-ins that will be built :"
640 echo -e "$GST_PLUGINS_YES" | sort
641 echo
642 echo -n "configure: *** Plug-ins that will not be built :"
643 echo -e "$GST_PLUGINS_NO" | sort
644 echo
645 if test "x$BUILD_EXTERNAL" = "xno"; then
646   echo "configure: *** No external plug-ins will be built"
647 fi