3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AC_INIT(GStreamer Editing Services, 1.5.0.1,
7 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
8 gstreamer-editing-services)
12 dnl initialize automake
13 AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
15 dnl define PACKAGE_VERSION_* variables
18 dnl check if this is a release version
19 AS_NANO(GST_GIT="no", GST_GIT="yes")
21 dnl can autoconf find the source ?
22 AC_CONFIG_SRCDIR([ges/ges-timeline.c])
24 dnl define the output header for config
25 AC_CONFIG_HEADERS([config.h])
27 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
28 AM_MAINTAINER_MODE([enable])
30 dnl sets host_* variables
33 dnl use pretty build output with automake >= 1.11
34 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
35 [AM_DEFAULT_VERBOSITY=1
36 AC_SUBST(AM_DEFAULT_VERBOSITY)])
38 dnl GES versioning, this is mostly informational
39 GES_VERSION_MAJOR=$PACKAGE_VERSION_MAJOR
40 GES_VERSION_MINOR=$PACKAGE_VERSION_MINOR
41 GES_VERSION_MICRO=$PACKAGE_VERSION_MICRO
42 GES_VERSION_NANO=$PACKAGE_VERSION_NANO
43 AC_SUBST(GES_VERSION_MAJOR)
44 AC_SUBST(GES_VERSION_MINOR)
45 AC_SUBST(GES_VERSION_MICRO)
46 AC_SUBST(GES_VERSION_NANO)
48 dnl our libraries and install dirs use major.minor as a version
49 GST_API_VERSION=$GST_EDITING_SERVICES_VERSION_MAJOR.$GST_EDITING_SERVICES_VERSION_MINOR
50 dnl we override it here if we need to for the release candidate of new series
52 AC_SUBST(GST_API_VERSION)
54 AS_LIBTOOL(GST, 0, 0, 0)
56 dnl *** required versions of GStreamer stuff ***
60 dnl *** autotools stuff ****
62 dnl allow for different autotools
63 AS_AUTOTOOLS_ALTERNATE
65 dnl Add parameters for aclocal
66 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
67 AC_CONFIG_MACRO_DIR([m4])
69 dnl *** check for arguments to configure ***
78 AG_GST_ARG_WITH_PKG_CONFIG_PATH
79 AG_GST_ARG_WITH_PACKAGE_NAME
80 AG_GST_ARG_WITH_PACKAGE_ORIGIN
82 AG_GST_PKG_CONFIG_PATH
84 dnl *** checks for platform ***
86 dnl * hardware/architecture *
88 dnl common/m4/gst-arch.m4
92 dnl Determine endianness
95 dnl *** checks for programs ***
100 dnl determine c++ compiler
102 dnl determine if c++ is available on this system
103 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
105 dnl check if the compiler supports '-c' and '-o' options
108 dnl check if the compiler supports do while(0) macros
109 AG_GST_CHECK_DOWHILE_MACROS
111 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
112 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
114 dnl check for gobject-introspection
115 GOBJECT_INTROSPECTION_CHECK([0.9.6])
117 dnl check for documentation tools
120 AS_PATH_PYTHON([2.1])
121 AG_GST_PLUGIN_DOCS([1.3],[2.1])
125 AC_MSG_CHECKING(for python >= 2.3)
128 minver = (2,3,0,'final',0)
129 if sys.version_info < minver:
133 if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
139 AC_MSG_RESULT(no python)
142 dnl check for pygobject
143 AC_SUBST(PYGOBJECT_REQ, 4.22)
144 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0 >= $PYGOBJECT_REQ,
147 ], HAVE_PYGOBJECT=no)
149 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYGOBJECT" = "xyes"])
151 dnl check for pygobject
152 PKG_CHECK_MODULES(GST_VALIDATE, gst-validate-1.0 >= 1.0.0.0,
154 HAVE_GST_VALIDATE=yes
155 AC_DEFINE(HAVE_GST_VALIDATE, 1, [Define if build with gst-validate support])
156 ], HAVE_GST_VALIDATE=no)
158 AC_SUBST(GST_VALIDATE_CFLAGS)
159 AC_SUBST(GST_VALIDATE_LIBS)
160 AM_CONDITIONAL(HAVE_GST_VALIDATE, [test "x$HAVE_GST_VALIDATE" = "xyes"])
162 dnl needed for scenarios definition files
163 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
165 GST_DATADIR="$GST_PREFIX/share"
166 AC_DEFINE_UNQUOTED(GST_DATADIR, "$GST_DATADIR", [system wide data directory])
168 dnl check for bash completion
169 AC_ARG_WITH([bash-completion-dir],
170 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
171 [Install the bash auto-completion script in this directory. @<:@default=yes@:>@]),
173 [with_bash_completion_dir=yes])
175 if test "x$with_bash_completion_dir" = "xyes"; then
176 PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0],
177 [BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"],
178 [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"])
180 BASH_COMPLETION_DIR="$with_bash_completion_dir"
183 AC_SUBST([BASH_COMPLETION_DIR])
184 AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
186 dnl *** checks for libraries ***
188 dnl check for libm, for sin() etc.
192 dnl *** checks for header files ***
194 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
195 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
197 if test "x$HAVE_UNISTD_H" != "xyes"; then
198 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
201 dnl *** checks for types/defines ***
203 dnl *** checks for structures ***
205 dnl *** checks for compiler characteristics ***
207 dnl *** checks for library functions ***
209 dnl *** checks for headers ***
211 dnl *** checks for dependency libraries ***
214 AG_GST_GLIB_CHECK([2.34.0])
216 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, HAVE_GIO=yes, HAVE_GIO=no)
220 dnl checks for gstreamer
221 dnl uninstalled is selected preferentially -- see pkg-config(1)
222 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
223 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
224 #AG_GST_CHECK_GST_GDP($GST_API_VERSION, [$GST_REQ], yes)
225 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
226 AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
227 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
228 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
230 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_API_VERSION --variable pluginsdir`
231 AC_SUBST(GSTPB_PLUGINS_DIR)
232 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
234 dnl check for gstreamer-pbutils
235 PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_API_VERSION, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
236 if test "x$HAVE_GST_PBUTILS" != "xyes"; then
237 AC_ERROR([gst-pbutils is required for rendering support])
239 AC_SUBST(GST_PBUTILS_LIBS)
240 AC_SUBST(GST_PBUTILS_CFLAGS)
242 dnl check for gst-controller
243 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_API_VERSION, HAVE_GST_CONTROLLER="yes", HAVE_GST_CONROLLER="no")
244 if test "x$HAVE_GST_CONTROLLER" != "xyes"; then
245 AC_ERROR([gst-controller is required for transition support])
247 AC_SUBST(GST_CONTROLLER_LIBS)
248 AC_SUBST(GST_CONTROLLER_CFLAGS)
250 dnl check for gstvideo
251 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_API_VERSION, HAVE_GST_VIDEO="yes", HAVE_GST_CONROLLER="no")
252 if test "x$HAVE_GST_VIDEO" != "xyes"; then
253 AC_ERROR([gst-video is required for transition support])
255 AC_SUBST(GST_VIDEO_LIBS)
256 AC_SUBST(GST_VIDEO_CFLAGS)
258 dnl Check for documentation xrefs
259 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
260 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
261 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
262 AC_SUBST(GLIB_PREFIX)
264 AC_SUBST(GSTPB_PREFIX)
266 dnl pitivi formatter needs libxml
267 PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no")
268 if test "x$HAVE_LIBXML" != "xyes"; then
269 AC_ERROR([libxml2 is required])
274 dnl GTK is optional and only used in examples
279 if test "x$BUILD_EXAMPLES" = "xyes"; then
280 AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
282 AC_HELP_STRING([--with-gtk=3.0|2.0],
283 [which gtk+ version to compile against (default: 2.0)]),
285 2.0) GTK_REQ=$GTK2_REQ ;;
286 3.0) GTK_REQ=$GTK3_REQ ;;
287 *) AC_MSG_ERROR([invalid gtk+ version specified]);;
291 AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
292 PKG_CHECK_MODULES(GTK, gtk+-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
293 dnl some examples need gtk+-x11
294 PKG_CHECK_MODULES(GTK_X11, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
298 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
299 AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
301 dnl building of benchmarks
302 AC_ARG_ENABLE(benchmarks,
303 AS_HELP_STRING([--disable-benchmarks],[disable building benchmarks apps]),
305 case "${enableval}" in
306 yes) BUILD_BENCHMARKS=yes ;;
307 no) BUILD_BENCHMARKS=no ;;
308 *) AC_MSG_ERROR(bad value ${enableval} for --disable-benchmarks) ;;
311 [BUILD_BENCHMARKS=yes]) dnl Default value
312 AM_CONDITIONAL(BUILD_BENCHMARKS, test "x$BUILD_BENCHMARKS" = "xyes")
314 dnl set license and copyright notice
316 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
317 AC_SUBST(GST_LICENSE)
319 dnl define LIBDIR so we can inform people where we live
320 AS_AC_EXPAND(LIBDIR, $libdir)
321 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
323 dnl set location of plugin directory
326 dnl define an ERROR_CFLAGS Makefile variable
327 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef \
328 -Wwrite-strings -Wformat-security -Wold-style-definition \
329 -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar \
332 dnl define an ERROR_CXXFLAGS Makefile variable
333 AG_GST_SET_ERROR_CXXFLAGS($GST_GIT)
335 dnl define correct level for debugging messages
336 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
338 dnl *** finalize CFLAGS, LDFLAGS, LIBS
341 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
342 dnl GST_*: flags shared by built objects to link against GStreamer
343 dnl GST_ALL_LDFLAGS: linker flags shared by all
344 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
345 dnl GST_LT_LDFLAGS: library versioning of our libraries
346 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
348 dnl GST_OPTION_CFLAGS
349 if test "x$USE_DEBUG" = xyes; then
352 AC_SUBST(PROFILE_CFLAGS)
354 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
355 dnl Define _only_ during CVS (not pre-releases or releases)
356 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
360 AC_SUBST(DEPRECATED_CFLAGS)
362 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
363 dnl at make time with e.g. make ERROR_CFLAGS=""
364 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
365 GST_OPTION_CXXFLAGS="\$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
366 AC_SUBST(GST_OPTION_CFLAGS)
367 AC_SUBST(GST_OPTION_CXXFLAGS)
369 dnl FIXME: do we want to rename to GST_ALL_* ?
370 dnl prefer internal headers to already installed ones
371 dnl also add builddir include for enumtypes and marshal
372 dnl add GST_OPTION_CFLAGS, but overridable
373 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DGST_USE_UNSTABLE_API"
374 GST_CXXFLAGS="$GST_CXXFLAGS \$(GST_OPTION_CXXFLAGS)"
376 AC_SUBST(GST_CXXFLAGS)
379 dnl LDFLAGS really should only contain flags, not libs - they get added before
380 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
381 GST_ALL_LDFLAGS="-no-undefined"
382 AC_SUBST(GST_ALL_LDFLAGS)
385 dnl linker flags shared by all libraries
386 dnl LDFLAGS modifier defining exported symbols from built libraries
387 GST_LIB_LDFLAGS=" -export-symbols-regex \^_*\(nle\|ges_\|GES_\).*"
388 AC_SUBST(GST_LIB_LDFLAGS)
390 dnl *** output files ***
399 gst-editing-services.spec
404 tests/benchmarks/Makefile
405 tests/examples/Makefile
406 tests/validate/Makefile
407 tests/validate/scenarios/Makefile
410 docs/version.entities
413 pkgconfig/gst-editing-services.pc
414 pkgconfig/gst-editing-services-uninstalled.pc
416 bindings/python/Makefile
417 bindings/python/gi/Makefile
418 bindings/python/gi/overrides/Makefile
419 bindings/python/examples/Makefile