1 dnl autoconf configuration file for gst-plugins
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
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
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, 0, 1,
16 GST_CVS="no", GST_CVS="yes")
18 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
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
24 AC_SUBST(GST_MAJORMINOR)
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])
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)
50 dnl the gettext stuff needed
51 AM_GNU_GETTEXT_VERSION(0.11.5)
52 AM_GNU_GETTEXT([external])
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])
59 dnl define LOCALEDIR in config.h
60 AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
61 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
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")
75 dnl determine c++ compiler
77 dnl determine if c++ is available on this system
78 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
79 dnl determine c++ preprocessor
87 dnl Check for malloc.h
88 AC_CHECK_HEADER(malloc.h,[
89 AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
92 dnl Check for a way to display the function name in debug output
95 dnl Check for FIONREAD ioctl declaration :
98 DEFAULT_AUDIOSINK="autoaudiosink"
99 DEFAULT_VIDEOSINK="autovideosink"
100 DEFAULT_AUDIOSRC="alsasrc"
101 DEFAULT_VIDEOSRC="v4lsrc"
102 DEFAULT_VISUALIZER="goom"
104 *-sun-* | *pc-solaris* )
105 DEFAULT_AUDIOSRC="sunaudiosrc"
108 DEFAULT_AUDIOSRC="osxaudiosrc"
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])
123 dnl ############################################
124 dnl # Super Duper options for plug-in building #
125 dnl ############################################
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,
131 AC_MSG_WARN(building external plug-ins)
134 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
137 # make BUILD_EXTERNAL available to Makefile.am
138 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
140 dnl ##############################
141 dnl # Do automated configuration #
142 dnl ##############################
147 dnl allow for different autotools
148 AS_AUTOTOOLS_ALTERNATE()
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}])
156 dnl check architecture
159 dnl check for gconftool-2
161 dnl this macro defines an am conditional, so it needs to be run always
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)
173 AC_SUBST(HAVE_GCONFTOOL)
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)
184 dnl check for gstreamer
185 dnl uninstalled is selected preferentially -- see pkg-config(1)
187 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
188 HAVE_GST="yes", HAVE_GST="no")
190 if test "x$HAVE_GST" = "xno"; then
191 AC_MSG_ERROR(no GStreamer found)
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.])
198 AC_SUBST(GST_TOOLS_DIR)
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")
204 if test "x$HAVE_GST_BASE" = "xno"; then
205 AC_MSG_ERROR(no GStreamer Base Libs found)
208 AC_SUBST(GST_BASE_LIBS)
209 AC_SUBST(GST_BASE_CFLAGS)
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")
216 if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
217 AC_MSG_ERROR(no GStreamer Base Plugins development files found)
220 AC_SUBST(GST_PLUGINS_BASE_LIBS)
221 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
223 PKG_CHECK_MODULES(GST_CHECK, gstreamer-check-$GST_MAJORMINOR >= $GST_REQ,
224 HAVE_GST_CHECK="yes", HAVE_GST_CHECK="no")
226 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
227 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
229 dnl Determine endianness
232 dnl Check for fast float to int casting as defined in C99
236 dnl Check for essential libraries first:
237 dnl ====================================
241 dnl Check for additional libraries that we might use:
242 dnl =================================================
244 # we set the defaults always to make sure we have non-empty variables
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])
255 dnl ===========================================================================
256 dnl ============================= gst plug-ins ================================
257 dnl ===========================================================================
259 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
262 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '[_]*(gst_|Gst|GST_).*' $GST_LIBS"
263 AC_SUBST(GST_PLUGIN_LDFLAGS)
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
286 AC_SUBST(GST_PLUGINS_ALL)
288 GST_PLUGINS_SELECTED=""
291 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
292 [for i in `echo $withval | tr , ' '`; do
293 if echo $GST_PLUGINS_ALL | grep $i > /dev/null
295 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
297 echo "plug-in $i not recognized, ignoring..."
300 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
302 AC_SUBST(GST_PLUGINS_SELECTED)
304 dnl ==========================================================================
305 dnl ============================= sys plug-ins ================================
306 dnl ==========================================================================
308 dnl *** OSS audio *** (Linux, *BSD)
309 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
310 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
312 dnl Linux and newer BSD versions :
313 AC_CHECK_HEADER(sys/soundcard.h, [
314 AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
316 dnl Some old BSD versions :
317 AC_CHECK_HEADER(soundcard.h, [
318 AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
320 dnl Some old BSD versions :
321 AC_CHECK_HEADER(machine/soundcard.h, [
322 AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
330 dnl ###########################
331 dnl # Configure external libs #
332 dnl ###########################
335 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
336 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
337 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
338 AS_SCRUB_INCLUDE(AALIB_CFLAGS)
342 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
343 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [
344 PKG_CHECK_MODULES(ESD, esound >= 0.2.12, [
349 AM_PATH_ESD(0.2.12, HAVE_ESD="yes", HAVE_ESD="no")
350 AS_SCRUB_INCLUDE(ESD_CFLAGS)
355 translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
356 GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
357 GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__seekable_stream_encoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC -lm")
358 dnl API change in FLAC 1.1.1, so require that...
359 if test x$HAVE_FLAC = xyes; then
360 AC_CHECK_DECL(FLAC__SEEKABLE_STREAM_ENCODER_TELL_ERROR,
361 HAVE_FLAC="yes", HAVE_FLAC="no", [
362 #include <FLAC/seekable_stream_encoder.h>
369 dnl FIXME: we could use header checks here as well IMO
370 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
371 GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
372 AC_ARG_WITH(jpeg-mmx,
373 [ --with-jpeg-mmx, path to MMX'ified JPEG library])
375 if test x$with_jpeg_mmx != x; then
376 LIBS="$LIBS -L$with_jpeg_mmx"
378 AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
379 JPEG_LIBS="$LIBS -ljpeg-mmx"
381 if test x$HAVE_JPEG != xyes; then
382 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
390 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
391 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
392 AC_CHECK_HEADER(ladspa.h, HAVE_LADSPA="yes", HAVE_LADSPA="no")
396 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBCACA, true)
397 GST_CHECK_FEATURE(LIBCACA, [libcaca], libcaca, [
398 GST_CHECK_CONFIGPROG(LIBCACA, caca-config)
399 AC_SUBST(LIBCACA_CFLAGS)
400 AC_SUBST(LIBCACA_LIBS)
404 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
405 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
406 PKG_CHECK_MODULES(LIBDV, libdv >= 0.100, HAVE_LIBDV="yes", HAVE_LIBDV="no")
407 AC_SUBST(LIBDV_CFLAGS)
412 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBPNG, true)
413 GST_CHECK_FEATURE(LIBPNG, [libpng PNG encoder], pngenc, [
414 PKG_CHECK_MODULES(LIBPNG, libpng12, HAVE_LIBPNG="yes", HAVE_LIBPNG="no")
415 AC_SUBST(LIBPNG_CFLAGS)
416 AC_SUBST(LIBPNG_LIBS)
420 translit(dnm, m, l) AM_CONDITIONAL(USE_DV1394, true)
421 GST_CHECK_FEATURE(DV1394, [raw1394 and avc1394 library], dv1394src, [
422 dnl we need to test three headers and three libs
423 GST_CHECK_LIBHEADER(RAW1394,
424 raw1394, raw1394_new_handle,,
425 libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
426 GST_CHECK_LIBHEADER(AVC1394,
427 avc1394, avc1394_send_command, $RAW1394_LIBS,
428 libavc1394/avc1394.h, AVC1394_LIBS="-lavc1394")
429 GST_CHECK_LIBHEADER(ROM1394,
430 rom1394, rom1394_free_directory, $RAW1394_LIBS,
431 libavc1394/rom1394.h, ROM1394_LIBS="-lrom1394")
433 dnl now see how far we got
434 if test x$HAVE_RAW1394 = xyes && \
435 test x$HAVE_AVC1394 = xyes && \
436 test x$HAVE_ROM1394 = xyes; then
438 DV1394_LIBS="$RAW1394_LIBS $AVC1394_LIBS $ROM1394_LIBS"
439 AC_SUBST(DV1394_LIBS)
446 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
447 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
448 PKG_CHECK_MODULES(SHOUT2, shout >= 2.0, [
450 AC_SUBST(SHOUT2_CFLAGS)
451 AC_SUBST(SHOUT2_LIBS)
453 AM_PATH_SHOUT2(HAVE_SHOUT2="yes", HAVE_SHOUT2="no")
454 AC_SUBST(SHOUT2_CFLAGS)
455 AC_SUBST(SHOUT2_LIBS)
459 dnl *** speex >= 1.0.4 or >= 1.1.5 ***
460 dnl 1.1.4 and earlier were not API/ABI compatible with 1.0
461 dnl 1.1.6 is the first to use a .pc/pkg-config file ***
462 dnl speex_jitter.h is 1.1.x only
463 translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true)
464 GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
465 PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, [
467 AC_SUBST(SPEEX_CFLAGS)
470 GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex/speex.h, [
471 AC_CHECK_HEADER(speex/speex_jitter.h, [
473 GST_CHECK_LIBHEADER(SPEEX, speex, speex_encode_int, , speex/speex.h, [
474 dnl speex 1.1.5 or + :
477 AC_SUBST(SPEEX_CFLAGS)
484 AC_CHECK_DECL(SPEEX_GET_LOOKAHEAD, [
488 AC_SUBST(SPEEX_CFLAGS)
491 AC_DEFINE_UNQUOTED(SPEEX_1_0, 1,
492 [defined if speex 1.0.x API detected])
495 AC_MSG_NOTICE(You need at least 1.0.4 to compile the speex plugin)
497 #include <speex/speex.h>
504 dnl also add builddir include for enumtypes and marshal
505 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
510 dnl ######################
511 dnl # Checks for gtk-doc #
512 dnl ######################
516 dnl ############################
517 dnl # Set up some more defines #
518 dnl ############################
520 dnl set license and copyright notice
521 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
523 dnl package name in plugins
524 AC_ARG_WITH(package-name,
525 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
526 [case "${withval}" in
527 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
528 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
529 *) GST_PACKAGE="${withval}" ;;
533 if test "x$GST_CVS" = "xyes"
536 GST_PACKAGE="GStreamer CVS/prerelease"
538 GST_PACKAGE="GStreamer source release"
542 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
543 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
545 dnl package origin URL
546 AC_ARG_WITH(package-origin,
547 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
548 [case "${withval}" in
549 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
550 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
551 *) GST_ORIGIN="${withval}" ;;
553 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
554 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
555 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
557 dnl #########################
558 dnl # Make the output files #
559 dnl #########################
561 dnl keep this alphabetic per directory, please
566 gst/autodetect/Makefile
577 gst/videobox/Makefile
578 gst/videofilter/Makefile
580 gst/wavparse/Makefile
598 gconf/gstreamer.schemas
600 docs/plugins/Makefile
601 docs/version.entities
606 gst-plugins-good.spec
610 echo -n "configure: *** Plug-ins that will be built :"
611 echo -e "$GST_PLUGINS_YES" | sort
613 echo -n "configure: *** Plug-ins that will not be built :"
614 echo -e "$GST_PLUGINS_NO" | sort
616 if test "x$BUILD_EXTERNAL" = "xno"; then
617 echo "configure: *** No external plug-ins will be built"