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, 0.10.1.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])
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 AM_CONFIG_HEADER([config.h])
27 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
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 our libraries and install dirs use major.minor as a version
39 GST_MAJORMINOR=$GST_EDITING_SERVICES_VERSION_MAJOR.$GST_EDITING_SERVICES_VERSION_MINOR
40 dnl we override it here if we need to for the release candidate of new series
42 AC_SUBST(GST_MAJORMINOR)
44 dnl FIXME: this macro doesn't actually work;
45 dnl the generated libtool script has no support for the listed tags.
46 dnl So this needs to be fixed first if we want to use this
47 dnl AS_LIBTOOL_TAGS([CXX])
52 dnl *** required versions of GStreamer stuff ***
56 dnl *** autotools stuff ****
58 dnl allow for different autotools
59 AS_AUTOTOOLS_ALTERNATE
61 dnl Add parameters for aclocal
62 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
63 AC_CONFIG_MACRO_DIR([m4])
65 dnl *** check for arguments to configure ***
74 AG_GST_ARG_WITH_PKG_CONFIG_PATH
75 AG_GST_ARG_WITH_PACKAGE_NAME
76 AG_GST_ARG_WITH_PACKAGE_ORIGIN
78 AG_GST_PKG_CONFIG_PATH
80 dnl *** checks for platform ***
82 dnl * hardware/architecture *
84 dnl common/m4/gst-arch.m4
88 dnl Determine endianness
91 dnl *** checks for programs ***
96 dnl determine c++ compiler
98 dnl determine if c++ is available on this system
99 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
103 dnl check if the compiler supports '-c' and '-o' options
106 dnl check if the compiler supports do while(0) macros
107 AG_GST_CHECK_DOWHILE_MACROS
109 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
110 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
112 dnl check for gobject-introspection
113 GOBJECT_INTROSPECTION_CHECK([0.9.6])
115 dnl check for documentation tools
118 AS_PATH_PYTHON([2.1])
119 AG_GST_PLUGIN_DOCS([1.3],[2.1])
123 AC_MSG_CHECKING(for python >= 2.3)
126 minver = (2,3,0,'final',0)
127 if sys.version_info < minver:
131 if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
137 AC_MSG_RESULT(no python)
140 AM_CHECK_PYTHON_HEADERS([HAVE_PYTHON_HEADERS=yes],[HAVE_PYTHON_HEADERS=no])
142 dnl check for pygobject (optional, used in the bindings)
144 PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ,
145 [HAVE_PYGOBJECT="yes"], [HAVE_PYGOBJECT="no"])
146 AC_SUBST(PYGOBJECT_CFLAGS)
148 dnl check for gst-python
150 PKG_CHECK_MODULES(PYGST, gst-python-0.10 >= $PYGST_REQ,
151 [HAVE_PYGST="yes"], [HAVE_PYGST="no"])
153 if test "x$HAVE_PYGST" = "xyes"; then
154 PYGST_DEFSDIR=`pkg-config gst-python-0.10 --variable=defsdir`
156 AC_SUBST(PYGST_DEFSDIR, $PYGST_DEFSDIR)
159 "x$HAVE_PYTHON" = "xyes" -a \
160 "x$HAVE_PYTHON_HEADERS" = "xyes" -a \
161 "x$HAVE_PYGOBJECT" = "xyes" -a \
162 "x$HAVE_PYGST" = "xyes"; then
163 HAVE_PYTHON_BINDINGS="yes"
165 HAVE_PYTHON_BINDINGS="no"
168 AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON_BINDINGS" = "xyes"])
170 dnl *** checks for libraries ***
172 dnl check for libm, for sin() etc.
176 dnl *** checks for header files ***
178 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
179 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
181 if test "x$HAVE_UNISTD_H" != "xyes"; then
182 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
185 dnl *** checks for types/defines ***
187 dnl *** checks for structures ***
189 dnl *** checks for compiler characteristics ***
191 dnl *** checks for library functions ***
193 dnl *** checks for headers ***
195 dnl *** checks for dependency libraries ***
198 AG_GST_GLIB_CHECK([2.22])
200 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, HAVE_GIO=yes, HAVE_GIO=no)
204 dnl checks for gstreamer
205 dnl uninstalled is selected preferentially -- see pkg-config(1)
206 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], yes)
207 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], yes)
208 #AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ], yes)
209 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
210 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ], yes)
211 AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ], yes)
212 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
214 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
215 AC_SUBST(GSTPB_PLUGINS_DIR)
216 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
218 dnl check for gstreamer-pbutils
219 PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_MAJORMINOR, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
220 if test "x$HAVE_GST_PBUTILS" != "xyes"; then
221 AC_ERROR([gst-pbutils is required for rendering support])
223 AC_SUBST(GST_PBUTILS_LIBS)
224 AC_SUBST(GST_PBUTILS_CFLAGS)
226 dnl check for gst-controller
227 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_MAJORMINOR, HAVE_GST_CONTROLLER="yes", HAVE_GST_CONROLLER="no")
228 if test "x$HAVE_GST_CONTROLLER" != "xyes"; then
229 AC_ERROR([gst-controller is required for transition support])
231 AC_SUBST(GST_CONTROLLER_LIBS)
232 AC_SUBST(GST_CONTROLLER_CFLAGS)
234 dnl check for gstvideo
235 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_MAJORMINOR, HAVE_GST_VIDEO="yes", HAVE_GST_CONROLLER="no")
236 if test "x$HAVE_GST_VIDEO" != "xyes"; then
237 AC_ERROR([gst-video is required for transition support])
239 AC_SUBST(GST_VIDEO_LIBS)
240 AC_SUBST(GST_VIDEO_CFLAGS)
242 dnl Check for documentation xrefs
243 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
244 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_MAJORMINOR`"
245 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_MAJORMINOR`"
246 AC_SUBST(GLIB_PREFIX)
248 AC_SUBST(GSTPB_PREFIX)
250 dnl pitivi formatter needs libxml
251 PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no")
252 if test "x$HAVE_LIBXML" != "xyes"; then
253 AC_ERROR([libxml2 is required])
258 dnl GTK is optional and only used in examples
263 if test "x$BUILD_EXAMPLES" = "xyes"; then
264 AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
266 AC_HELP_STRING([--with-gtk=3.0|2.0],
267 [which gtk+ version to compile against (default: 2.0)]),
269 2.0) GTK_REQ=$GTK2_REQ ;;
270 3.0) GTK_REQ=$GTK3_REQ ;;
271 *) AC_MSG_ERROR([invalid gtk+ version specified]);;
275 AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
276 PKG_CHECK_MODULES(GTK, gtk+-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
277 dnl some examples need gtk+-x11
278 PKG_CHECK_MODULES(GTK_X11, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
282 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
283 AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
285 dnl set license and copyright notice
287 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
288 AC_SUBST(GST_LICENSE)
290 dnl define LIBDIR so we can inform people where we live
291 AS_AC_EXPAND(LIBDIR, $libdir)
292 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
294 dnl set location of plugin directory
297 dnl define an ERROR_CFLAGS Makefile variable
298 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef \
299 -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition \
300 -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar \
303 dnl define an ERROR_CXXFLAGS Makefile variable
304 AG_GST_SET_ERROR_CXXFLAGS($GST_GIT)
306 dnl define correct level for debugging messages
307 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
309 dnl *** finalize CFLAGS, LDFLAGS, LIBS
312 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
313 dnl GST_*: flags shared by built objects to link against GStreamer
314 dnl GST_ALL_LDFLAGS: linker flags shared by all
315 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
316 dnl GST_LT_LDFLAGS: library versioning of our libraries
317 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
319 dnl GST_OPTION_CFLAGS
320 if test "x$USE_DEBUG" = xyes; then
323 AC_SUBST(PROFILE_CFLAGS)
325 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
326 dnl Define _only_ during CVS (not pre-releases or releases)
327 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
331 AC_SUBST(DEPRECATED_CFLAGS)
333 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
334 dnl at make time with e.g. make ERROR_CFLAGS=""
335 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
336 GST_OPTION_CXXFLAGS="\$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
337 AC_SUBST(GST_OPTION_CFLAGS)
338 AC_SUBST(GST_OPTION_CXXFLAGS)
340 dnl FIXME: do we want to rename to GST_ALL_* ?
341 dnl prefer internal headers to already installed ones
342 dnl also add builddir include for enumtypes and marshal
343 dnl add GST_OPTION_CFLAGS, but overridable
344 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DGST_USE_UNSTABLE_API"
345 GST_CXXFLAGS="$GST_CXXFLAGS \$(GST_OPTION_CXXFLAGS)"
347 AC_SUBST(GST_CXXFLAGS)
350 dnl LDFLAGS really should only contain flags, not libs - they get added before
351 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
352 GST_ALL_LDFLAGS="-no-undefined"
353 AC_SUBST(GST_ALL_LDFLAGS)
355 dnl *** output files ***
363 gst-editing-services.spec
367 bindings/python/Makefile
368 bindings/python/codegen/Makefile
369 bindings/python/examples/Makefile
370 bindings/python/testsuite/Makefile
373 tests/examples/Makefile
376 docs/version.entities
379 pkgconfig/gst-editing-services.pc
380 pkgconfig/gst-editing-services-uninstalled.pc