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.17.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, 1700, 0, 1700)
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 ***
71 AG_GST_ARG_DISABLE_FATAL_WARNINGS
72 AG_GST_ARG_ENABLE_EXTRA_CHECKS
81 AG_GST_ARG_WITH_PKG_CONFIG_PATH
82 AG_GST_ARG_WITH_PACKAGE_NAME
83 AG_GST_ARG_WITH_PACKAGE_ORIGIN
85 AG_GST_PKG_CONFIG_PATH
89 dnl *** checks for platform ***
91 dnl * hardware/architecture *
93 dnl common/m4/gst-arch.m4
97 dnl Determine endianness
100 dnl *** checks for programs ***
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])
123 dnl check for pygobject
124 AC_SUBST(PYGOBJECT_REQ, 3.0)
125 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0 >= $PYGOBJECT_REQ,
128 ], HAVE_PYGOBJECT=no)
130 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYGOBJECT" = "xyes"])
132 dnl check for gst-validate
133 PKG_CHECK_MODULES(GST_VALIDATE, gst-validate-1.0 >= 1.12.1,
135 HAVE_GST_VALIDATE=yes
136 AC_DEFINE(HAVE_GST_VALIDATE, 1, [Define if build with gst-validate support])
137 ], HAVE_GST_VALIDATE=no)
139 AC_SUBST(GST_VALIDATE_CFLAGS)
140 AC_SUBST(GST_VALIDATE_LIBS)
141 AM_CONDITIONAL(HAVE_GST_VALIDATE, [test "x$HAVE_GST_VALIDATE" = "xyes"])
143 dnl needed for scenarios definition files
144 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
146 GST_DATADIR="$GST_PREFIX/share"
147 AC_DEFINE_UNQUOTED(GST_DATADIR, "$GST_DATADIR", [system wide data directory])
149 dnl check for bash completion
150 AC_ARG_WITH([bash-completion-dir],
151 AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
152 [Install the bash auto-completion script in this directory. @<:@default=yes@:>@]),
154 [with_bash_completion_dir=yes])
156 if test "x$with_bash_completion_dir" = "xyes"; then
157 PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0],
158 [BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"],
159 [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"])
161 BASH_COMPLETION_DIR="$with_bash_completion_dir"
164 AC_SUBST([BASH_COMPLETION_DIR])
165 AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
167 dnl *** checks for libraries ***
169 dnl check for libm, for sin() etc.
173 dnl *** checks for header files ***
175 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
176 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
178 if test "x$HAVE_UNISTD_H" != "xyes"; then
179 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
182 dnl *** checks for gst-validate-launcher ***
184 AC_CHECK_PROG(GST_VALIDATE_LAUNCHER, gst-validate-launcher, yes)
185 AM_CONDITIONAL(HAVE_GST_VALIDATE_LAUNCHER, [test "x$GST_VALIDATE_LAUNCHER" = "xyes"])
187 dnl *** checks for types/defines ***
189 dnl *** checks for structures ***
191 dnl *** checks for compiler characteristics ***
193 dnl *** checks for library functions ***
195 dnl *** checks for headers ***
197 dnl *** checks for dependency libraries ***
200 AG_GST_GLIB_CHECK([2.40.0])
202 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, HAVE_GIO=yes, HAVE_GIO=no)
206 dnl checks for gstreamer
207 dnl uninstalled is selected preferentially -- see pkg-config(1)
208 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
209 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
210 #AG_GST_CHECK_GST_GDP($GST_API_VERSION, [$GST_REQ], yes)
211 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
212 AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
213 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
214 AG_GST_CHECK_GST_PLUGINS_BAD($GST_API_VERSION, [$GST_REQ], yes)
215 AG_GST_CHECK_GST_PLUGINS_GOOD($GST_API_VERSION, [$GST_REQ], yes)
216 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
218 AG_GST_ARG_WITH_PLUGINS
219 AG_GST_CHECK_PLUGIN(plugins)
221 dnl set location of plugin directory
224 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_API_VERSION --variable pluginsdir`
225 AC_SUBST(GSTPB_PLUGINS_DIR)
226 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
228 dnl check for gstreamer-pbutils
229 PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_API_VERSION, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
230 if test "x$HAVE_GST_PBUTILS" != "xyes"; then
231 AC_ERROR([gst-pbutils is required for rendering support])
233 AC_SUBST(GST_PBUTILS_LIBS)
234 AC_SUBST(GST_PBUTILS_CFLAGS)
236 dnl check for gst-controller
237 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_API_VERSION, HAVE_GST_CONTROLLER="yes", HAVE_GST_CONROLLER="no")
238 if test "x$HAVE_GST_CONTROLLER" != "xyes"; then
239 AC_ERROR([gst-controller is required for transition support])
241 AC_SUBST(GST_CONTROLLER_LIBS)
242 AC_SUBST(GST_CONTROLLER_CFLAGS)
244 dnl check for gstvideo
245 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_API_VERSION, HAVE_GST_VIDEO="yes", HAVE_GST_CONROLLER="no")
246 if test "x$HAVE_GST_VIDEO" != "xyes"; then
247 AC_ERROR([gst-video is required for transition support])
249 AC_SUBST(GST_VIDEO_LIBS)
250 AC_SUBST(GST_VIDEO_CFLAGS)
252 dnl Check for documentation xrefs
253 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
254 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
255 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
256 AC_SUBST(GLIB_PREFIX)
258 AC_SUBST(GSTPB_PREFIX)
260 dnl pitivi formatter needs libxml
261 PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no")
262 if test "x$HAVE_LIBXML" != "xyes"; then
263 AC_ERROR([libxml2 is required])
268 dnl GTK is optional and only used in examples
272 if test "x$BUILD_EXAMPLES" = "xyes"; then
273 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
274 dnl some examples need gtk+-x11
275 PKG_CHECK_MODULES(GTK_X11, gtk+-x11-3.0 >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
279 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
280 AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
282 dnl Check for -Bsymbolic-functions linker flag used to avoid
283 dnl intra-library PLT jumps, if available.
284 AC_ARG_ENABLE(Bsymbolic,
285 [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],,
286 [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
287 AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
288 LDFLAGS=-Wl,-Bsymbolic-functions
290 AC_TRY_LINK([], [return 0],
292 enable_Bsymbolic=yes,
295 LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
297 dnl building of benchmarks
298 AC_ARG_ENABLE(benchmarks,
299 AS_HELP_STRING([--disable-benchmarks],[disable building benchmarks apps]),
301 case "${enableval}" in
302 yes) BUILD_BENCHMARKS=yes ;;
303 no) BUILD_BENCHMARKS=no ;;
304 *) AC_MSG_ERROR(bad value ${enableval} for --disable-benchmarks) ;;
307 [BUILD_BENCHMARKS=yes]) dnl Default value
308 AM_CONDITIONAL(BUILD_BENCHMARKS, test "x$BUILD_BENCHMARKS" = "xyes")
310 dnl set license and copyright notice
312 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
313 AC_SUBST(GST_LICENSE)
315 dnl define LIBDIR so we can inform people where we live
316 AS_AC_EXPAND(LIBDIR, $libdir)
317 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
319 dnl set location of plugin directory
322 dnl define an ERROR_CFLAGS Makefile variable
323 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef \
324 -Wwrite-strings -Wformat-security -Wold-style-definition \
325 -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar \
328 dnl define correct level for debugging messages
329 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
331 dnl *** finalize CFLAGS, LDFLAGS, LIBS
334 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
335 dnl GST_*: flags shared by built objects to link against GStreamer
336 dnl GST_ALL_LDFLAGS: linker flags shared by all
337 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
338 dnl GST_LT_LDFLAGS: library versioning of our libraries
339 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
341 dnl GST_OPTION_CFLAGS
342 if test "x$USE_DEBUG" = xyes; then
345 AC_SUBST(PROFILE_CFLAGS)
347 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
348 dnl Define _only_ during CVS (not pre-releases or releases)
349 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
353 AC_SUBST(DEPRECATED_CFLAGS)
356 AS_COMPILER_FLAG([-fvisibility=hidden], [
357 VISIBILITY_CFLAGS="-fvisibility=hidden"
358 AC_DEFINE(GST_API_EXPORT, [extern __attribute__ ((visibility ("default")))], [public symbol export define])
361 AC_DEFINE(GST_API_EXPORT, [extern], [public symbol export define])
363 AC_SUBST(VISIBILITY_CFLAGS)
365 dnl disable strict aliasing
366 AS_COMPILER_FLAG([-fno-strict-aliasing], [EXTRA_CFLAGS="-fno-strict-aliasing"])
367 AC_SUBST(EXTRA_CFLAGS)
369 dnl every flag in GST_OPTION_CFLAGS can be overridden
370 dnl at make time with e.g. make ERROR_CFLAGS=""
371 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
372 AC_SUBST(GST_OPTION_CFLAGS)
374 dnl FIXME: do we want to rename to GST_ALL_* ?
375 dnl prefer internal headers to already installed ones
376 dnl also add builddir include for enumtypes and marshal
377 dnl add GST_OPTION_CFLAGS, but overridable
378 GST_CFLAGS="$GST_CFLAGS $EXTRA_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) \$(VISIBILITY_CFLAGS) -DGST_USE_UNSTABLE_API"
382 dnl LDFLAGS really should only contain flags, not libs - they get added before
383 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
384 GST_ALL_LDFLAGS="-no-undefined"
385 if test "x${enable_Bsymbolic}" = "xyes"; then
386 GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions"
388 AC_SUBST(GST_ALL_LDFLAGS)
391 dnl linker flags shared by all libraries
392 dnl LDFLAGS modifier defining exported symbols from built libraries
394 AC_SUBST(GST_LIB_LDFLAGS)
396 dnl GST_PLUGIN_LDFLAGS must only contain flags, not libs - they get added before
397 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
398 GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_ALL_LDFLAGS"
399 AC_SUBST(GST_PLUGIN_LDFLAGS)
401 dnl *** output files ***
414 tests/benchmarks/Makefile
417 tests/validate/Makefile
418 tests/validate/scenarios/Makefile
421 docs/version.entities
424 pkgconfig/gst-editing-services.pc
425 pkgconfig/gst-editing-services-uninstalled.pc
430 bindings/python/Makefile
431 bindings/python/gi/Makefile
432 bindings/python/gi/overrides/Makefile