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, 8, 90, 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 dnl the gettext stuff needed
50 dnl AM_GNU_GETTEXT_VERSION(0.11.5)
51 dnl AM_GNU_GETTEXT([external])
53 dnl GETTEXT_PACKAGE=gst-plugins-$GST_MAJORMINOR
54 dnl AC_SUBST(GETTEXT_PACKAGE)
55 dnl AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
56 dnl [gettext package name])
59 dnl decide on error flags
60 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
62 if test "x$GST_WALL" = "xyes"; then
63 GST_ERROR="$GST_ERROR -Wall"
65 if test "x$GST_CVS" = "xyes"; then
66 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
70 dnl determine c++ compiler
72 dnl determine if c++ is available on this system
73 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
74 dnl determine c++ preprocessor
82 dnl Check for malloc.h
83 AC_CHECK_HEADER(malloc.h,[
84 AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
87 dnl Check for a way to display the function name in debug output
90 dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
91 dnl messages printed when running cvs builds
92 if test "x$GST_CVS" = "xyes"; then
93 AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
96 dnl Check for FIONREAD ioctl declaration :
99 DEFAULT_AUDIOSINK="osssink"
100 DEFAULT_VIDEOSINK="xvimagesink"
101 DEFAULT_AUDIOSRC="osssrc"
102 DEFAULT_VIDEOSRC="v4lsrc"
103 DEFAULT_VISUALIZER="goom"
105 *-sun-* | *pc-solaris* )
106 DEFAULT_AUDIOSINK="sunaudiosink"
107 DEFAULT_VIDEOSINK="ximagesink"
108 DEFAULT_AUDIOSRC="sunaudiosrc"
111 DEFAULT_AUDIOSINK="osxaudiosink"
112 DEFAULT_AUDIOSRC="osxaudiosrc"
113 DEFAULT_VIDEOSINK="osxvideosink"
117 AC_SUBST(DEFAULT_AUDIOSINK)
118 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
119 AC_SUBST(DEFAULT_AUDIOSRC)
120 AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
121 AC_SUBST(DEFAULT_VIDEOSINK)
122 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
123 AC_SUBST(DEFAULT_VIDEOSRC)
124 AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
125 AC_SUBST(DEFAULT_VISUALIZER)
126 AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
128 dnl ############################################
129 dnl # Super Duper options for plug-in building #
130 dnl ############################################
132 dnl ext plug-ins; plug-ins that have external dependencies
133 GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
134 [HAVE_EXTERNAL=yes],enabled,
136 AC_MSG_WARN(building external plug-ins)
139 AC_MSG_WARN(all plug-ins with external dependencies will not be built)
142 # make BUILD_EXTERNAL available to Makefile.am
143 AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
145 dnl experimental plug-ins; stuff that hasn't had the dust settle yet
146 dnl read 'builds, but might not work'UTO
147 GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
148 [HAVE_EXPERIMENTAL=yes],disabled,
150 AC_MSG_WARN(building experimental plug-ins)
153 AC_MSG_NOTICE(not building experimental plug-ins)
157 dnl broken plug-ins; stuff that doesn't seem to build at the moment
158 GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
159 HAVE_BROKEN=yes,disabled,
161 AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches :)])
163 AC_MSG_NOTICE([not building broken plug-ins])
166 dnl ##############################
167 dnl # Do automated configuration #
168 dnl ##############################
173 dnl allow for different autotools
174 AS_AUTOTOOLS_ALTERNATE()
176 dnl modify pkg-config path
177 AC_ARG_WITH(pkg-config-path,
178 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
179 [export PKG_CONFIG_PATH=${withval}])
182 dnl check architecture
185 dnl check for gconftool-2
187 dnl this macro defines an am conditional, so it needs to be run always
190 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
191 GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
192 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
193 if test x$GCONFTOOL = xno; then
194 AC_MSG_WARN(Not installing GConf schemas)
199 AC_SUBST(HAVE_GCONFTOOL)
202 dnl check for GConf libraries
203 translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
204 GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
205 PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
206 AC_SUBST(GCONF_CFLAGS)
210 dnl check for gstreamer
211 dnl uninstalled is selected preferentially -- see pkg-config(1)
213 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
214 HAVE_GST="yes", HAVE_GST="no")
216 if test "x$HAVE_GST" = "xno"; then
217 AC_MSG_ERROR(no GStreamer found)
220 GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
221 if test -z $GST_TOOLS_DIR; then
222 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
224 AC_SUBST(GST_TOOLS_DIR)
226 dnl check for gstreamer-control; uninstalled is selected preferentially
227 PKG_CHECK_MODULES(GST_CONTROL, gstreamer-control-$GST_MAJORMINOR >= $GST_REQ,
228 HAVE_GST_CONTROL="yes", HAVE_GST_CONTROL="no")
230 if test "x$HAVE_GST_CONTROL" = "xno"; then
231 AC_MSG_ERROR(no GStreamer Control Libs found)
234 AC_SUBST(GST_CONTROL_LIBS)
236 dnl check for gstreamer-base; uninstalled is selected preferentially
237 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
238 HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
240 if test "x$HAVE_GST_BASE" = "xno"; then
241 AC_MSG_ERROR(no GStreamer Base Libs found)
244 AC_SUBST(GST_BASE_LIBS)
246 dnl check for gstreamer-interfaces; uinstalled is selected preferentially
247 PKG_CHECK_MODULES(GST_INTERFACES, gstreamer-interfaces-$GST_MAJORMINOR >= $GST_REQ,
248 HAVE_GST_INTERFACES="yes", HAVE_GST_INTERFACES="no")
250 if test "x$HAVE_GST_INTERFACES" = "xno"; then
251 AC_MSG_ERROR(no GStreamer Interfaces Libs found)
254 AC_SUBST(GST_INTERFACES_LIBS)
257 dnl Determine endianness
260 dnl Check for fast float to int casting as defined in C99
264 dnl Check for essential libraries first:
265 dnl ====================================
269 dnl Check for additional libraries that we might use:
270 dnl =================================================
272 # we set the defaults always to make sure we have non-empty variables
275 PKG_CHECK_MODULES(LIBOIL, liboil-0.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
276 #PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
277 AC_SUBST(LIBOIL_CFLAGS)
278 AC_SUBST(LIBOIL_LIBS)
279 if test "x${HAVE_LIBOIL}" = xyes ; then
280 #AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
284 dnl ===========================================================================
285 dnl ============================= gst plug-ins ================================
286 dnl ===========================================================================
288 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
291 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '[_]*(gst_|Gst|GST_).*' $GST_LIBS"
292 AC_SUBST(GST_PLUGIN_LDFLAGS)
294 dnl these are all the gst plug-ins, compilable without additional libs
295 GST_PLUGINS_ALL="effectv"
297 dnl see if we can build C++ plug-ins
298 if test "x$HAVE_CXX" = "xyes"; then
299 GST_PLUGINS_ALL="$GST_PLUGINS_ALL"
301 AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
304 AC_SUBST(GST_PLUGINS_ALL)
306 GST_PLUGINS_SELECTED=""
309 AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
310 [for i in `echo $withval | tr , ' '`; do
311 if echo $GST_PLUGINS_ALL | grep $i > /dev/null
313 GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
315 echo "plug-in $i not recognized, ignoring..."
318 [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
320 AC_SUBST(GST_PLUGINS_SELECTED)
322 dnl ==========================================================================
323 dnl ============================= sys plug-ins ================================
324 dnl ==========================================================================
326 dnl *** OSS audio *** (Linux, *BSD)
327 dnl translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
328 dnl GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
330 dnl Linux and newer BSD versions :
331 dnl AC_CHECK_HEADER(sys/soundcard.h, [
332 dnl AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
334 dnl Some old BSD versions :
335 dnl AC_CHECK_HEADER(soundcard.h, [
336 dnl AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
338 dnl Some old BSD versions :
339 dnl AC_CHECK_HEADER(machine/soundcard.h, [
340 dnl AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
356 dnl ###########################
357 dnl # Configure external libs #
358 dnl ###########################
360 dnl ############################
361 dnl # Set up some more defines #
362 dnl ############################
364 dnl set license and copyright notice
365 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
367 dnl package name in plugins
368 AC_ARG_WITH(package-name,
369 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
370 [case "${withval}" in
371 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
372 no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
373 *) GST_PACKAGE="${withval}" ;;
377 if test "x$GST_CVS" = "xyes"
380 GST_PACKAGE="GStreamer CVS/prerelease"
382 GST_PACKAGE="GStreamer source release"
386 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
387 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
389 dnl package origin URL
390 AC_ARG_WITH(package-origin,
391 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
392 [case "${withval}" in
393 yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
394 no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
395 *) GST_ORIGIN="${withval}" ;;
397 [GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
398 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
399 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
401 dnl #########################
402 dnl # Make the output files #
403 dnl #########################
417 echo -n "configure: *** Plug-ins that will be built :"
418 echo -e "$GST_PLUGINS_YES" | sort
420 echo -n "configure: *** Plug-ins that will not be built :"
421 echo -e "$GST_PLUGINS_NO" | sort
423 if test "x$BUILD_EXTERNAL" = "xno"; then
424 echo "configure: *** No external plug-ins will be built"