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.11.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])
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_API_VERSION=$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_API_VERSION)
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 AG_GST_PLUGIN_DOCS([1.3],[2.1])
120 dnl *** checks for libraries ***
122 dnl check for libm, for sin() etc.
126 dnl *** checks for header files ***
128 AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
129 AM_CONDITIONAL(HAVE_UNISTD_H, test "x$HAVE_UNISTD_H" = "xyes")
131 if test "x$HAVE_UNISTD_H" != "xyes"; then
132 GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
135 dnl *** checks for types/defines ***
137 dnl *** checks for structures ***
139 dnl *** checks for compiler characteristics ***
141 dnl *** checks for library functions ***
143 dnl *** checks for headers ***
145 dnl *** checks for dependency libraries ***
148 AG_GST_GLIB_CHECK([2.31.14])
150 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, HAVE_GIO=yes, HAVE_GIO=no)
154 dnl checks for gstreamer
155 dnl uninstalled is selected preferentially -- see pkg-config(1)
156 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
157 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
158 #AG_GST_CHECK_GST_GDP($GST_API_VERSION, [$GST_REQ], yes)
159 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
160 AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
161 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
162 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
164 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_API_VERSION --variable pluginsdir`
165 AC_SUBST(GSTPB_PLUGINS_DIR)
166 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
168 dnl check for gstreamer-pbutils
169 PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_API_VERSION, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
170 if test "x$HAVE_GST_PBUTILS" != "xyes"; then
171 AC_ERROR([gst-pbutils is required for rendering support])
173 AC_SUBST(GST_PBUTILS_LIBS)
174 AC_SUBST(GST_PBUTILS_CFLAGS)
176 dnl check for gst-controller
177 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_API_VERSION, HAVE_GST_CONTROLLER="yes", HAVE_GST_CONROLLER="no")
178 if test "x$HAVE_GST_CONTROLLER" != "xyes"; then
179 AC_ERROR([gst-controller is required for transition support])
181 AC_SUBST(GST_CONTROLLER_LIBS)
182 AC_SUBST(GST_CONTROLLER_CFLAGS)
184 dnl check for gstvideo
185 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_API_VERSION, HAVE_GST_VIDEO="yes", HAVE_GST_CONROLLER="no")
186 if test "x$HAVE_GST_VIDEO" != "xyes"; then
187 AC_ERROR([gst-video is required for transition support])
189 AC_SUBST(GST_VIDEO_LIBS)
190 AC_SUBST(GST_VIDEO_CFLAGS)
192 dnl Check for documentation xrefs
193 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
194 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
195 GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
196 AC_SUBST(GLIB_PREFIX)
198 AC_SUBST(GSTPB_PREFIX)
200 dnl pitivi formatter needs libxml
201 PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no")
202 if test "x$HAVE_LIBXML" != "xyes"; then
203 AC_ERROR([libxml2 is required])
208 dnl GTK is optional and only used in examples
213 if test "x$BUILD_EXAMPLES" = "xyes"; then
214 AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
216 AC_HELP_STRING([--with-gtk=3.0|2.0],
217 [which gtk+ version to compile against (default: 2.0)]),
219 2.0) GTK_REQ=$GTK2_REQ ;;
220 3.0) GTK_REQ=$GTK3_REQ ;;
221 *) AC_MSG_ERROR([invalid gtk+ version specified]);;
225 AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
226 PKG_CHECK_MODULES(GTK, gtk+-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
227 dnl some examples need gtk+-x11
228 PKG_CHECK_MODULES(GTK_X11, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
232 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
233 AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
235 dnl set license and copyright notice
237 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
238 AC_SUBST(GST_LICENSE)
240 dnl define LIBDIR so we can inform people where we live
241 AS_AC_EXPAND(LIBDIR, $libdir)
242 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
244 dnl set location of plugin directory
247 dnl define an ERROR_CFLAGS Makefile variable
248 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef \
249 -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition \
250 -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar \
253 dnl define an ERROR_CXXFLAGS Makefile variable
254 AG_GST_SET_ERROR_CXXFLAGS($GST_GIT)
256 dnl define correct level for debugging messages
257 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
259 dnl *** finalize CFLAGS, LDFLAGS, LIBS
262 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
263 dnl GST_*: flags shared by built objects to link against GStreamer
264 dnl GST_ALL_LDFLAGS: linker flags shared by all
265 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
266 dnl GST_LT_LDFLAGS: library versioning of our libraries
267 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
269 dnl GST_OPTION_CFLAGS
270 if test "x$USE_DEBUG" = xyes; then
273 AC_SUBST(PROFILE_CFLAGS)
275 if test "x$PACKAGE_VERSION_NANO" = "x1"; then
276 dnl Define _only_ during CVS (not pre-releases or releases)
277 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
281 AC_SUBST(DEPRECATED_CFLAGS)
283 dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
284 dnl at make time with e.g. make ERROR_CFLAGS=""
285 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
286 GST_OPTION_CXXFLAGS="\$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
287 AC_SUBST(GST_OPTION_CFLAGS)
288 AC_SUBST(GST_OPTION_CXXFLAGS)
290 dnl FIXME: do we want to rename to GST_ALL_* ?
291 dnl prefer internal headers to already installed ones
292 dnl also add builddir include for enumtypes and marshal
293 dnl add GST_OPTION_CFLAGS, but overridable
294 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DGST_USE_UNSTABLE_API"
295 GST_CXXFLAGS="$GST_CXXFLAGS \$(GST_OPTION_CXXFLAGS)"
297 AC_SUBST(GST_CXXFLAGS)
300 dnl LDFLAGS really should only contain flags, not libs - they get added before
301 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
302 GST_ALL_LDFLAGS="-no-undefined"
303 AC_SUBST(GST_ALL_LDFLAGS)
305 dnl *** output files ***
313 gst-editing-services.spec
318 tests/examples/Makefile
321 docs/version.entities
324 pkgconfig/gst-editing-services.pc
325 pkgconfig/gst-editing-services-uninstalled.pc