1 dnl autoconf configuration file for gst-plugins
2 AC_INIT
3 AC_CANONICAL_TARGET
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
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
11 AM_MAINTAINER_MODE
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, GST_PLUGINS_VERSION, 0, 9, 0, 1, GST_CVS="no", GST_CVS="yes")
17 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
19 dnl our libraries and install dirs use major.minor as a version
20 GST_MAJORMINOR=$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
21 dnl we override it here if we need to for the release candidate of new series
22 GST_MAJORMINOR=0.9
23 AC_SUBST(GST_MAJORMINOR)
25 dnl CURRENT, REVISION, AGE
26 dnl - library source changed -> increment REVISION
27 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
28 dnl - interfaces added -> increment AGE
29 dnl - interfaces removed -> AGE = 0
30 dnl for 0.8.3 release, gst_play_get_all_by_interface was added, so update
31 AS_LIBTOOL(GST_PLUGINS, 1, 0, 1)
32 AS_LIBTOOL_TAGS([CXX])
33 AM_PROG_LIBTOOL
35 dnl FIXME take something else ?
36 AC_CONFIG_SRCDIR([gst/law/alaw.c])
37 AM_CONFIG_HEADER(config.h)
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)
44 AC_PROG_CC
45 AM_PROG_CC_STDC
46 AM_PROG_AS
47 AS="${CC}"
48 AS_PROG_OBJC
50 dnl the gettext stuff needed
51 AM_GNU_GETTEXT_VERSION(0.11.5)
52 AM_GNU_GETTEXT([external])
54 GETTEXT_PACKAGE=gst-plugins-$GST_MAJORMINOR
55 AC_SUBST(GETTEXT_PACKAGE)
56 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
57 [gettext package name])
59 dnl define LOCALEDIR in config.h
60 AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
61 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
62 [gettext locale dir])
64 dnl decide on error flags
65 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
67 if test "x$GST_WALL" = "xyes"; then
68 GST_ERROR="$GST_ERROR -Wall"
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
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
83 AC_HEADER_STDC([])
84 AC_C_INLINE
85 AX_CREATE_STDINT_H
87 dnl Check for malloc.h
88 AC_CHECK_HEADER(malloc.h,[
89 AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
90 ])
92 dnl Check for a way to display the function name in debug output
93 GST_CHECK_FUNCTION()
95 dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
96 dnl messages printed when running cvs builds
97 if test "x$GST_CVS" = "xyes"; then
98 AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
99 fi
101 dnl Check for FIONREAD ioctl declaration :
102 GST_CHECK_FIONREAD()
104 DEFAULT_AUDIOSINK="autoaudiosink"
105 DEFAULT_VIDEOSINK="autovideosink"
106 DEFAULT_AUDIOSRC="alsasrc"
107 DEFAULT_VIDEOSRC="v4lsrc"
108 DEFAULT_VISUALIZER="goom"
109 case "$host" in
110 *-sun-* | *pc-solaris* )
111 DEFAULT_AUDIOSRC="sunaudiosrc"
112 ;;
113 *-darwin* )
114 DEFAULT_AUDIOSRC="osxaudiosrc"
115 ;;
116 esac
118 AC_SUBST(DEFAULT_AUDIOSINK)
119 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
120 AC_SUBST(DEFAULT_AUDIOSRC)
121 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
122 AC_SUBST(DEFAULT_VIDEOSINK)
123 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
124 AC_SUBST(DEFAULT_VIDEOSRC)
125 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
126 AC_SUBST(DEFAULT_VISUALIZER)
127 AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
129 dnl ############################################
130 dnl # Super Duper options for plug-in building #
131 dnl ############################################
133 dnl ext plug-ins; plug-ins that have external dependencies
134 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
135 [HAVE_EXTERNAL=yes],enabled,
136 [
137 AC_MSG_WARN(building external plug-ins)
138 BUILD_EXTERNAL="yes"
139 ],[
140 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
141 BUILD_EXTERNAL="no"
142 ])
143 # make BUILD_EXTERNAL available to Makefile.am
144 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
146 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
147 dnl read 'builds, but might not work'UTO
148 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
149 [HAVE_EXPERIMENTAL=yes],disabled,
150 [
151 AC_MSG_WARN(building experimental plug-ins)
152 USE_TARKIN="yes"
153 ],[
154 AC_MSG_NOTICE(not building experimental plug-ins)
155 USE_TARKIN="no"
156 ])
158 dnl broken plug-ins; stuff that doesn't seem to build at the moment
159 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
160 HAVE_BROKEN=yes,disabled,
161 [
162 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
163 ],[
164 AC_MSG_NOTICE([not building broken plug-ins])
165 ])
167 dnl ##############################
168 dnl # Do automated configuration #
169 dnl ##############################
171 dnl Check for tools:
172 dnl ================
174 dnl allow for different autotools
175 AS_AUTOTOOLS_ALTERNATE()
177 dnl modify pkg-config path
178 AC_ARG_WITH(pkg-config-path,
179 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
180 [export PKG_CONFIG_PATH=${withval}])
182 GST_DOC()
183 dnl check architecture
184 GST_ARCH()
186 dnl check for gconftool-2
188 dnl this macro defines an am conditional, so it needs to be run always
189 AM_GCONF_SOURCE_2
191 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
192 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
193 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
194 if test x$GCONFTOOL = xno; then
195 AC_MSG_WARN(Not installing GConf schemas)
196 HAVE_GCONFTOOL="no"
197 else
198 HAVE_GCONFTOOL="yes"
199 fi
200 AC_SUBST(HAVE_GCONFTOOL)
201 ])
203 dnl check for GConf libraries
204 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
205 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
206 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
207 AC_SUBST(GCONF_CFLAGS)
208 AC_SUBST(GCONF_LIBS)
209 ])
211 dnl check for gstreamer
212 dnl uninstalled is selected preferentially -- see pkg-config(1)
213 GST_REQ=0.9.0.1
214 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
215 HAVE_GST="yes", HAVE_GST="no")
217 if test "x$HAVE_GST" = "xno"; then
218 AC_MSG_ERROR(no GStreamer found)
219 fi
221 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
222 if test -z $GST_TOOLS_DIR; then
223 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
224 fi
225 AC_SUBST(GST_TOOLS_DIR)
227 dnl check for gstreamer-base; uninstalled is selected preferentially
228 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
229 HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
231 if test "x$HAVE_GST_BASE" = "xno"; then
232 AC_MSG_ERROR(no GStreamer Base Libs found)
233 fi
235 AC_SUBST(GST_BASE_LIBS)
236 AC_SUBST(GST_BASE_CFLAGS)
238 dnl check for gstreamer-plugins-base; uinstalled is selected preferentially
239 PKG_CHECK_MODULES(GST_PLUGINS_BASE,
240 gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ,
241 HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no")
243 if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
244 AC_MSG_ERROR(no GStreamer Base Plugins development files found)
245 fi
247 AC_SUBST(GST_PLUGINS_BASE_LIBS)
248 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
250 dnl Determine endianness
251 AC_C_BIGENDIAN
253 dnl Check for fast float to int casting as defined in C99
254 AC_C99_FUNC_LRINT()
255 AC_C99_FUNC_LRINTF()
257 dnl Check for essential libraries first:
258 dnl ====================================
260 GST_GLIB2_CHECK()
262 dnl Check for additional libraries that we might use:
263 dnl =================================================
265 # we set the defaults always to make sure we have non-empty variables
266 # for the Makefile
268 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
269 AC_SUBST(LIBOIL_CFLAGS)
270 AC_SUBST(LIBOIL_LIBS)
271 if test "x${HAVE_LIBOIL}" = xyes ; then
272 #AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
273 true
274 fi
276 dnl ===========================================================================
277 dnl ============================= gst plug-ins ================================
278 dnl ===========================================================================
280 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
281 AC_SUBST(plugindir)
283 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '[_]*(gst_|Gst|GST_).*' $GST_LIBS"
284 AC_SUBST(GST_PLUGIN_LDFLAGS)
286 dnl these are all the gst plug-ins, compilable without additional libs
287 GST_PLUGINS_ALL="\
288 videofilter \
289 alpha \
290 autodetect \
291 avi \
292 effectv \
293 fdsrc \
294 goom \
295 law \
296 level \
297 mpegaudioparse \
298 qtdemux \
299 realmedia \
300 rtp \
301 rtsp \
302 smpte \
303 silence \
304 udp \
305 videobox \
306 wavenc \
307 wavparse \
308 mpegaudioparse \
309 "
311 dnl see if we can build C++ plug-ins
312 if test "x$HAVE_CXX" = "xyes"; then
313 GST_PLUGINS_ALL="$GST_PLUGINS_ALL"
314 else
315 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
316 fi
318 AC_SUBST(GST_PLUGINS_ALL)
320 GST_PLUGINS_SELECTED=""
322 AC_ARG_WITH(plugins,
323 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
324 [for i in `echo $withval | tr , ' '`; do
325 if echo $GST_PLUGINS_ALL | grep $i > /dev/null
326 then
327 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
328 else
329 echo "plug-in $i not recognized, ignoring..."
330 fi
331 done],
332 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
334 AC_SUBST(GST_PLUGINS_SELECTED)
336 dnl ==========================================================================
337 dnl ============================= sys plug-ins ================================
338 dnl ==========================================================================
340 dnl *** OSS audio *** (Linux, *BSD)
341 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
342 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
343 HAVE_OSS="yes"
344 dnl Linux and newer BSD versions :
345 AC_CHECK_HEADER(sys/soundcard.h, [
346 AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
347 ] , [
348 dnl Some old BSD versions :
349 AC_CHECK_HEADER(soundcard.h, [
350 AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
351 ], [
352 dnl Some old BSD versions :
353 AC_CHECK_HEADER(machine/soundcard.h, [
354 AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
355 ], [
356 HAVE_OSS="no"
357 ])
358 ])
359 ])
360 ])
362 dnl ###########################
363 dnl # Configure external libs #
364 dnl ###########################
366 dnl *** aalib ***
367 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
368 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
369 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
370 AS_SCRUB_INCLUDE(AALIB_CFLAGS)
371 ])
373 dnl *** AMR-NB ***
374 translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true)
375 GST_CHECK_FEATURE(AMRNB, [AMR-NB], amrnbdec amrnbenc, [
376 GST_CHECK_LIBHEADER(AMRNB, amrnb,
377 Decoder_Interface_init, -lm,
378 amrnb/interf_dec.h,
379 AMRNB_LIBS="-lamrnb -lm"
380 AC_SUBST(AMRNB_LIBS))
381 ])
383 dnl **** ESound ****
384 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
385 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [
386 PKG_CHECK_MODULES(ESD, esound >= 0.2.12, [
387 HAVE_ESD="yes"
388 AC_SUBST(ESD_CFLAGS)
389 AC_SUBST(ESD_LIBS)
390 ], [
391 AM_PATH_ESD(0.2.12, HAVE_ESD="yes", HAVE_ESD="no")
392 AS_SCRUB_INCLUDE(ESD_CFLAGS)
393 ])
394 ])
396 dnl **** Free AAC Decoder (FAAD) ****
397 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
398 GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
399 HAVE_FAAD="yes"
400 GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h, FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
401 if test $HAVE_FAAD = "yes"; then
402 AC_MSG_CHECKING([Checking for FAAD >= 2])
403 AC_TRY_RUN([
405 #include <faad.h>
406 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
407 #error Not faad2
408 #else
409 #include <string.h>
411 int main()
412 {
413 char version[9] = FAAD2_VERSION;
414 // a release candidate of 2.0 is not enought for us
415 if ( strstr( version, "2.0 RC" ) ) { return 1; }
417 return 0;
418 }
420 #endif
421 ],
422 [ HAVE_FAAD="yes" && AC_MSG_RESULT(yes)],
423 [ HAVE_FAAD="no" && AC_MSG_RESULT(no)])
424 fi;
425 AS_SCRUB_INCLUDE(FAAD_CFLAGS)
426 AC_SUBST(FAAD_LIBS)
427 ])
429 dnl *** FLAC ***
430 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
431 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
432 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__seekable_stream_encoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC -lm")
433 dnl API change in FLAC 1.1.1, so require that...
434 if test x$HAVE_FLAC = xyes; then
435 AC_CHECK_DECL(FLAC__SEEKABLE_STREAM_ENCODER_TELL_ERROR,
436 HAVE_FLAC="yes", HAVE_FLAC="no", [
437 #include <FLAC/seekable_stream_encoder.h>
438 ])
439 fi
440 AC_SUBST(FLAC_LIBS)
441 ])
443 dnl *** jpeg ***
444 dnl FIXME: we could use header checks here as well IMO
445 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
446 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
447 AC_ARG_WITH(jpeg-mmx,
448 [ --with-jpeg-mmx, path to MMX'ified JPEG library])
449 OLD_LIBS="$LIBS"
450 if test x$with_jpeg_mmx != x; then
451 LIBS="$LIBS -L$with_jpeg_mmx"
452 fi
453 AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
454 JPEG_LIBS="$LIBS -ljpeg-mmx"
455 LIBS="$OLD_LIBS"
456 if test x$HAVE_JPEG != xyes; then
457 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
458 JPEG_LIBS="-ljpeg"
459 fi
460 AC_SUBST(JPEG_LIBS)
461 ])
464 dnl *** ladspa ***
465 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
466 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
467 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
468 ])
470 dnl *** lame ***
471 translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
472 GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
473 GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, -lm, lame/lame.h,
474 [
475 HAVE_LAME="yes"
476 LAME_LIBS="-lmp3lame -lm"
477 dnl is lame presets available
478 LAME_CFLAGS=""
479 AC_TRY_RUN([
480 #include <lame/lame.h>
481 int main (int argc, char *argv[])
482 {
483 printf("%d\n", MEDIUM);
484 return 0;
485 }
486 ],
487 [LAME_CFLAGS="-DGSTLAME_PRESET"],
488 [LAME_CFLAGS=""]
489 )
490 AC_SUBST(LAME_CFLAGS)
491 AC_SUBST(LAME_LIBS)
492 ])
493 ])
495 dnl *** libcaca ***
496 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBCACA, true)
497 GST_CHECK_FEATURE(LIBCACA, [libcaca], libcaca, [
498 GST_CHECK_CONFIGPROG(LIBCACA, caca-config)
499 AC_SUBST(LIBCACA_CFLAGS)
500 AC_SUBST(LIBCACA_LIBS)
501 ])
503 dnl *** libdv ***
504 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
505 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
506 PKG_CHECK_MODULES(LIBDV, libdv >= 0.100, HAVE_LIBDV="yes", HAVE_LIBDV="no")
507 AC_SUBST(LIBDV_CFLAGS)
508 AC_SUBST(LIBDV_LIBS)
509 ])
511 dnl *** libpng ***
512 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
513 GST_CHECK_FEATURE(LIBPNG, [libpng PNG encoder], pngenc, [
514 PKG_CHECK_MODULES(LIBPNG, libpng12, HAVE_LIBPNG="yes", HAVE_LIBPNG="no")
515 AC_SUBST(LIBPNG_CFLAGS)
516 AC_SUBST(LIBPNG_LIBS)
517 ])
519 dnl *** mad ***
520 dnl FIXME: we could use header checks here as well IMO
521 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
522 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
523 dnl check with pkg-config first
524 PKG_CHECK_MODULES(MAD, mad >= 0.15 id3tag >= 0.15, HAVE_MAD="yes", HAVE_MAD="no")
525 if test "x$HAVE_MAD" = "xno"; then
526 dnl fall back to oldskool detection
527 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
528 if test "x$HAVE_MAD" = "xyes"; then
529 HAVE_MAD="no"
530 save_LIBS=$LIBS
531 LIBS="-lz"
532 AC_CHECK_LIB(id3tag, id3_tag_options, HAVE_MAD="yes" MAD_LIBS="-lmad -lid3tag -lz")
533 LIBS=$save_LIBS
534 fi
535 fi
536 ])
537 AC_SUBST(MAD_LIBS)
539 dnl *** mpeg2dec ***
540 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
541 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
542 PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.4.0,
543 HAVE_MPEG2DEC="yes", HAVE_MPEG2DEC="no")
544 AC_SUBST(MPEG2DEC_CFLAGS)
545 AC_SUBST(MPEG2DEC_LIBS)
546 ])
548 dnl *** dv1394 ***
549 translit(dnm, m, l) AM_CONDITIONAL(USE_DV1394, true)
550 GST_CHECK_FEATURE(DV1394, [raw1394 and avc1394 library], dv1394src, [
551 dnl we need to test three headers and three libs
552 GST_CHECK_LIBHEADER(RAW1394,
553 raw1394, raw1394_new_handle,,
554 libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
555 GST_CHECK_LIBHEADER(AVC1394,
556 avc1394, avc1394_send_command, $RAW1394_LIBS,
557 libavc1394/avc1394.h, AVC1394_LIBS="-lavc1394")
558 GST_CHECK_LIBHEADER(ROM1394,
559 rom1394, rom1394_free_directory, $RAW1394_LIBS,
560 libavc1394/rom1394.h, ROM1394_LIBS="-lrom1394")
562 dnl now see how far we got
563 if test x$HAVE_RAW1394 = xyes && \
564 test x$HAVE_AVC1394 = xyes && \
565 test x$HAVE_ROM1394 = xyes; then
566 HAVE_DV1394=yes
567 DV1394_LIBS="$RAW1394_LIBS $AVC1394_LIBS $ROM1394_LIBS"
568 AC_SUBST(DV1394_LIBS)
569 else
570 HAVE_DV1394=no
571 fi
572 ])
574 dnl *** shout2 ***
575 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
576 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
577 PKG_CHECK_MODULES(SHOUT2, shout >= 2.0, [
578 HAVE_SHOUT2="yes"
579 AC_SUBST(SHOUT2_CFLAGS)
580 AC_SUBST(SHOUT2_LIBS)
581 ], [
582 AM_PATH_SHOUT2(HAVE_SHOUT2="yes", HAVE_SHOUT2="no")
583 AC_SUBST(SHOUT2_CFLAGS)
584 AC_SUBST(SHOUT2_LIBS)
585 ])
586 ])
588 dnl *** sidplay : works with libsidplay 1.36.x (not 2.x.x) ***
589 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
590 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
591 GST_PATH_SIDPLAY()
592 ])
594 dnl *** speex >= 1.0.4 or >= 1.1.5 ***
595 dnl 1.1.4 and earlier were not API/ABI compatible with 1.0
596 dnl 1.1.6 is the first to use a .pc/pkg-config file ***
597 dnl speex_jitter.h is 1.1.x only
598 translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true)
599 GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
600 PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, [
601 HAVE_SPEEX="yes"
602 AC_SUBST(SPEEX_CFLAGS)
603 AC_SUBST(SPEEX_LIBS)
604 ], [
605 GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex/speex.h, [
606 AC_CHECK_HEADER(speex/speex_jitter.h, [
607 dnl speex 1.1.x :
608 GST_CHECK_LIBHEADER(SPEEX, speex, speex_encode_int, , speex/speex.h, [
609 dnl speex 1.1.5 or + :
610 HAVE_SPEEX="yes"
611 SPEEX_LIBS="-lspeex"
612 AC_SUBST(SPEEX_CFLAGS)
613 AC_SUBST(SPEEX_LIBS)
614 ],[
615 HAVE_SPEEX="no"
616 ])
617 ],[
618 dnl speex 1.0.x :
619 AC_CHECK_DECL(SPEEX_GET_LOOKAHEAD, [
620 dnl speex 1.0.4
621 HAVE_SPEEX="yes"
622 SPEEX_LIBS="-lspeex"
623 AC_SUBST(SPEEX_CFLAGS)
624 AC_SUBST(SPEEX_LIBS)
626 AC_DEFINE_UNQUOTED(SPEEX_1_0, 1,
627 [defined if speex 1.0.x API detected])
628 ],[
629 HAVE_SPEEX="no"
630 AC_MSG_NOTICE(You need at least 1.0.4 to compile the speex plugin)
631 ], [
632 #include <speex/speex.h>
633 ])
634 ])
635 ])
636 ])
637 ])
639 dnl also add builddir include for enumtypes and marshal
640 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
642 AC_SUBST(GST_LIBS)
643 AC_SUBST(GST_CFLAGS)
645 dnl ############################
646 dnl # Set up some more defines #
647 dnl ############################
649 dnl set license and copyright notice
650 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
652 dnl package name in plugins
653 AC_ARG_WITH(package-name,
654 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
655 [case "${withval}" in
656 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
657 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
658 *) GST_PACKAGE="${withval}" ;;
659 esac],
660 [
661 dnl default value
662 if test "x$GST_CVS" = "xyes"
663 then
664 dnl nano >= 1
665 GST_PACKAGE="GStreamer CVS/prerelease"
666 else
667 GST_PACKAGE="GStreamer source release"
668 fi
669 ]
670 )
671 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
672 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
674 dnl package origin URL
675 AC_ARG_WITH(package-origin,
676 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
677 [case "${withval}" in
678 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
679 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
680 *) GST_ORIGIN="${withval}" ;;
681 esac],
682 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
683 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
684 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
686 dnl #########################
687 dnl # Make the output files #
688 dnl #########################
690 AC_CONFIG_FILES(
691 Makefile
692 gst-plugins.spec
693 gst/Makefile
694 gst/alpha/Makefile
695 gst/autodetect/Makefile
696 gst/avi/Makefile
697 gst/effectv/Makefile
698 gst/fdsrc/Makefile
699 gst/goom/Makefile
700 gst/law/Makefile
701 gst/level/Makefile
702 gst/mpegaudioparse/Makefile
703 gst/realmedia/Makefile
704 gst/rtp/Makefile
705 gst/rtsp/Makefile
706 gst/smpte/Makefile
707 gst/silence/Makefile
708 gst/udp/Makefile
709 gst/videobox/Makefile
710 gst/videofilter/Makefile
711 ext/jpeg/Makefile
712 gst/qtdemux/Makefile
713 gst/wavenc/Makefile
714 gst/wavparse/Makefile
715 gst-libs/Makefile
716 gst-libs/gst/Makefile
717 sys/Makefile
718 sys/oss/Makefile
719 ext/Makefile
720 ext/aalib/Makefile
721 ext/dv/Makefile
722 ext/flac/Makefile
723 ext/gconf/Makefile
724 ext/ladspa/Makefile
725 ext/lame/Makefile
726 ext/libcaca/Makefile
727 ext/libpng/Makefile
728 ext/mad/Makefile
729 ext/raw1394/Makefile
730 ext/shout2/Makefile
731 ext/sidplay/Makefile
732 ext/speex/Makefile
733 ext/esd/Makefile
734 ext/mpeg2dec/Makefile
735 ext/faad/Makefile
736 ext/amrnb/Makefile
737 po/Makefile.in
738 common/Makefile
739 common/m4/Makefile
740 m4/Makefile
741 )
742 AC_OUTPUT
744 echo -n "configure: *** Plug-ins that will be built :"
745 echo -e "$GST_PLUGINS_YES" | sort
746 echo
747 echo -n "configure: *** Plug-ins that will not be built :"
748 echo -e "$GST_PLUGINS_NO" | sort
749 echo
750 if test "x$BUILD_EXTERNAL" = "xno"; then
751 echo "configure: *** No external plug-ins will be built"
752 fi