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, 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
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)
34 dnl FIXME take something else ?
35 AC_CONFIG_SRCDIR([gst/law/alaw.c])
36 AM_CONFIG_HEADER(config.h)
38 dnl Add parameters for aclocal
39 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
40 ACLOCAL_FLAGS="-I m4 -I common/m4"
41 AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
49 the gettext stuff needed
50 AM_GNU_GETTEXT_VERSION(0.11.5)
51 AM_GNU_GETTEXT([external])
53 GETTEXT_PACKAGE=gst-plugins-$GST_MAJORMINOR
54 AC_SUBST(GETTEXT_PACKAGE)
55 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
56 [gettext package name])
58 dnl define LOCALEDIR in config.h
59 AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
60 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
63 dnl decide on error flags
64 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
66 if test "x$GST_WALL" = "xyes"; then
67 GST_ERROR="$GST_ERROR -Wall"
69 if test "x$GST_CVS" = "xyes"; then
70 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
74 dnl determine c++ compiler
76 dnl determine if c++ is available on this system
77 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
78 dnl determine c++ preprocessor
86 dnl Check for malloc.h
87 AC_CHECK_HEADER(malloc.h,[
88 AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
91 dnl Check for a way to display the function name in debug output
94 dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
95 dnl messages printed when running cvs builds
96 if test "x$GST_CVS" = "xyes"; then
97 AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
100 dnl Check for FIONREAD ioctl declaration :
103 DEFAULT_AUDIOSINK="osssink"
104 DEFAULT_VIDEOSINK="xvimagesink"
105 DEFAULT_AUDIOSRC="osssrc"
106 DEFAULT_VIDEOSRC="v4lsrc"
107 DEFAULT_VISUALIZER="goom"
109 *-sun-* | *pc-solaris* )
110 DEFAULT_AUDIOSINK="sunaudiosink"
111 DEFAULT_VIDEOSINK="ximagesink"
112 DEFAULT_AUDIOSRC="sunaudiosrc"
115 DEFAULT_AUDIOSINK="osxaudiosink"
116 DEFAULT_AUDIOSRC="osxaudiosrc"
117 DEFAULT_VIDEOSINK="osxvideosink"
121 AC_SUBST(DEFAULT_AUDIOSINK)
122 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
123 AC_SUBST(DEFAULT_AUDIOSRC)
124 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
125 AC_SUBST(DEFAULT_VIDEOSINK)
126 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
127 AC_SUBST(DEFAULT_VIDEOSRC)
128 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
129 AC_SUBST(DEFAULT_VISUALIZER)
130 AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
132 dnl ############################################
133 dnl # Super Duper options for plug-in building #
134 dnl ############################################
136 dnl ext plug-ins; plug-ins that have external dependencies
137 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
138 [HAVE_EXTERNAL=yes],enabled,
140 AC_MSG_WARN(building external plug-ins)
143 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
146 # make BUILD_EXTERNAL available to Makefile.am
147 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
149 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
150 dnl read 'builds, but might not work'UTO
151 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
152 [HAVE_EXPERIMENTAL=yes],disabled,
154 AC_MSG_WARN(building experimental plug-ins)
157 AC_MSG_NOTICE(not building experimental plug-ins)
161 dnl broken plug-ins; stuff that doesn't seem to build at the moment
162 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
163 HAVE_BROKEN=yes,disabled,
165 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
167 AC_MSG_NOTICE([not building broken plug-ins])
170 dnl ##############################
171 dnl # Do automated configuration #
172 dnl ##############################
177 dnl allow for different autotools
178 AS_AUTOTOOLS_ALTERNATE()
180 dnl modify pkg-config path
181 AC_ARG_WITH(pkg-config-path,
182 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
183 [export PKG_CONFIG_PATH=${withval}])
186 dnl check architecture
189 dnl check for gconftool-2
191 dnl this macro defines an am conditional, so it needs to be run always
194 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
195 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
196 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
197 if test x$GCONFTOOL = xno; then
198 AC_MSG_WARN(Not installing GConf schemas)
203 AC_SUBST(HAVE_GCONFTOOL)
206 dnl check for GConf libraries
207 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
208 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
209 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
210 AC_SUBST(GCONF_CFLAGS)
214 dnl check for gstreamer
215 dnl uninstalled is selected preferentially -- see pkg-config(1)
217 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
218 HAVE_GST="yes", HAVE_GST="no")
220 if test "x$HAVE_GST" = "xno"; then
221 AC_MSG_ERROR(no GStreamer found)
224 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
225 if test -z $GST_TOOLS_DIR; then
226 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
228 AC_SUBST(GST_TOOLS_DIR)
230 dnl check for gstreamer-control; uninstalled is selected preferentially
231 PKG_CHECK_MODULES(GST_CONTROL, gstreamer-control-$GST_MAJORMINOR >= $GST_REQ,
232 HAVE_GST_CONTROL="yes", HAVE_GST_CONTROL="no")
234 if test "x$HAVE_GST_CONTROL" = "xno"; then
235 AC_MSG_ERROR(no GStreamer Control Libs found)
238 AC_SUBST(GST_CONTROL_LIBS)
240 dnl check for gstreamer-base; uninstalled is selected preferentially
241 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
242 HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
244 if test "x$HAVE_GST_BASE" = "xno"; then
245 AC_MSG_ERROR(no GStreamer Base Libs found)
248 AC_SUBST(GST_BASE_LIBS)
249 AC_SUBST(GST_BASE_CFLAGS)
251 dnl check for gstreamer-plugins-base; uinstalled is selected preferentially
252 PKG_CHECK_MODULES(GST_PLUGINS_BASE,
253 gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ,
254 HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no")
256 if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
257 AC_MSG_ERROR(no GStreamer Base Plugins development files found)
260 AC_SUBST(GST_PLUGINS_BASE_LIBS)
261 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
263 dnl Determine endianness
266 dnl Check for fast float to int casting as defined in C99
270 dnl Check for essential libraries first:
271 dnl ====================================
275 dnl Check for additional libraries that we might use:
276 dnl =================================================
278 # we set the defaults always to make sure we have non-empty variables
281 PKG_CHECK_MODULES(LIBOIL, liboil-0.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
282 #PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
283 AC_SUBST(LIBOIL_CFLAGS)
284 AC_SUBST(LIBOIL_LIBS)
285 if test "x${HAVE_LIBOIL}" = xyes ; then
286 #AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
290 dnl ===========================================================================
291 dnl ============================= gst plug-ins ================================
292 dnl ===========================================================================
294 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
297 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '[_]*(gst_|Gst|GST_).*' $GST_LIBS"
298 AC_SUBST(GST_PLUGIN_LDFLAGS)
300 dnl these are all the gst plug-ins, compilable without additional libs
318 dnl see if we can build C++ plug-ins
319 if test "x$HAVE_CXX" = "xyes"; then
320 GST_PLUGINS_ALL="$GST_PLUGINS_ALL"
322 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
325 AC_SUBST(GST_PLUGINS_ALL)
327 GST_PLUGINS_SELECTED=""
330 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
331 [for i in `echo $withval | tr , ' '`; do
332 if echo $GST_PLUGINS_ALL | grep $i > /dev/null
334 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
336 echo "plug-in $i not recognized, ignoring..."
339 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
341 AC_SUBST(GST_PLUGINS_SELECTED)
343 dnl ==========================================================================
344 dnl ============================= sys plug-ins ================================
345 dnl ==========================================================================
347 dnl *** OSS audio *** (Linux, *BSD)
348 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
349 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
351 dnl Linux and newer BSD versions :
352 AC_CHECK_HEADER(sys/soundcard.h, [
353 AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
355 dnl Some old BSD versions :
356 AC_CHECK_HEADER(soundcard.h, [
357 AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
359 dnl Some old BSD versions :
360 AC_CHECK_HEADER(machine/soundcard.h, [
361 AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
369 dnl ###########################
370 dnl # Configure external libs #
371 dnl ###########################
374 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
375 GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
376 AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
377 AS_SCRUB_INCLUDE(AALIB_CFLAGS)
381 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBCACA, true)
382 GST_CHECK_FEATURE(LIBCACA, [libcaca], libcaca, [
383 GST_CHECK_CONFIGPROG(LIBCACA, caca-config)
384 AC_SUBST(LIBCACA_CFLAGS)
385 AC_SUBST(LIBCACA_LIBS)
389 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBDV, true)
390 GST_CHECK_FEATURE(LIBDV, [libdv DV/video decoder], dvdec, [
391 PKG_CHECK_MODULES(LIBDV, libdv >= 0.100, HAVE_LIBDV="yes", HAVE_LIBDV="no")
392 AC_SUBST(LIBDV_CFLAGS)
397 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
398 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
399 PKG_CHECK_MODULES(SHOUT2, shout >= 2.0, [
401 AC_SUBST(SHOUT2_CFLAGS)
402 AC_SUBST(SHOUT2_LIBS)
404 AM_PATH_SHOUT2(HAVE_SHOUT2="yes", HAVE_SHOUT2="no")
405 AC_SUBST(SHOUT2_CFLAGS)
406 AC_SUBST(SHOUT2_LIBS)
410 dnl *** sidplay : works with libsidplay 1.36.x (not 2.x.x) ***
411 translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
412 GST_CHECK_FEATURE(SIDPLAY, [sidplay plug-in], sidplay, [
417 dnl FIXME: we could use header checks here as well IMO
418 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
419 GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
420 dnl check with pkg-config first
421 PKG_CHECK_MODULES(MAD, mad >= 0.15 id3tag >= 0.15, HAVE_MAD="yes", HAVE_MAD="no")
422 if test "x$HAVE_MAD" = "xno"; then
423 dnl fall back to oldskool detection
424 AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
425 if test "x$HAVE_MAD" = "xyes"; then
429 AC_CHECK_LIB(id3tag, id3_tag_options, HAVE_MAD="yes" MAD_LIBS="-lmad -lid3tag -lz")
437 translit(dnm, m, l) AM_CONDITIONAL(USE_DV1394, true)
438 GST_CHECK_FEATURE(DV1394, [raw1394 and avc1394 library], dv1394src, [
439 dnl we need to test three headers and three libs
440 GST_CHECK_LIBHEADER(RAW1394,
441 raw1394, raw1394_new_handle,,
442 libraw1394/raw1394.h, RAW1394_LIBS="-lraw1394")
443 GST_CHECK_LIBHEADER(AVC1394,
444 avc1394, avc1394_send_command, $RAW1394_LIBS,
445 libavc1394/avc1394.h, AVC1394_LIBS="-lavc1394")
446 GST_CHECK_LIBHEADER(ROM1394,
447 rom1394, rom1394_free_directory, $RAW1394_LIBS,
448 libavc1394/rom1394.h, ROM1394_LIBS="-lrom1394")
450 dnl now see how far we got
451 if test x$HAVE_RAW1394 = xyes && \
452 test x$HAVE_AVC1394 = xyes && \
453 test x$HAVE_ROM1394 = xyes; then
455 DV1394_LIBS="$RAW1394_LIBS $AVC1394_LIBS $ROM1394_LIBS"
456 AC_SUBST(DV1394_LIBS)
463 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
464 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [
465 PKG_CHECK_MODULES(ESD, esound >= 0.2.12, [
470 AM_PATH_ESD(0.2.12, HAVE_ESD="yes", HAVE_ESD="no")
471 AS_SCRUB_INCLUDE(ESD_CFLAGS)
475 dnl also add builddir include for enumtypes and marshal
476 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
481 dnl ############################
482 dnl # Set up some more defines #
483 dnl ############################
485 dnl set license and copyright notice
486 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
488 dnl package name in plugins
489 AC_ARG_WITH(package-name,
490 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
491 [case "${withval}" in
492 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
493 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
494 *) GST_PACKAGE="${withval}" ;;
498 if test "x$GST_CVS" = "xyes"
501 GST_PACKAGE="GStreamer CVS/prerelease"
503 GST_PACKAGE="GStreamer source release"
507 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
508 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
510 dnl package origin URL
511 AC_ARG_WITH(package-origin,
512 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
513 [case "${withval}" in
514 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
515 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
516 *) GST_ORIGIN="${withval}" ;;
518 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
519 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
520 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
522 dnl #########################
523 dnl # Make the output files #
524 dnl #########################
537 gst/realmedia/Makefile
542 gst/videobox/Makefile
543 gst/videofilter/Makefile
545 gst-libs/gst/Makefile
564 echo -n "configure: *** Plug-ins that will be built :"
565 echo -e "$GST_PLUGINS_YES" | sort
567 echo -n "configure: *** Plug-ins that will not be built :"
568 echo -e "$GST_PLUGINS_NO" | sort
570 if test "x$BUILD_EXTERNAL" = "xno"; then
571 echo "configure: *** No external plug-ins will be built"