2 dnl initialize autoconf
3 dnl when going to/from release please set the nano (fourth number) right !
4 dnl releases only do Wall, cvs and prerelease does Werror too
5 AC_INIT(Gst-Validate, 1.17.0.1,
6 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
9 dnl This is the version of the testsuite to use with the current version
10 dnl of gst-validate. During development it should be "master"
11 dnl during release cycle it should be the release version (1.6 in the 1.6
12 dnl branch, 1.5.90 for the 1.5.90 release)
13 GST_VALIDATE_TESTSUITE_VERSION="master"
14 AS_AC_EXPAND(GST_VALIDATE_TESTSUITE_VERSION, $GST_VALIDATE_TESTSUITE_VERSION)
18 dnl initialize automake
19 AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar])
21 dnl define PACKAGE_VERSION_* variables
24 dnl check if this is a release version
25 AS_NANO(GST_GIT="no", GST_GIT="yes")
27 dnl can autoconf find the source ?
28 AC_CONFIG_SRCDIR([tools/gst-validate.c])
30 dnl define the output header for config
31 AC_CONFIG_HEADERS([config.h])
33 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
34 AM_MAINTAINER_MODE([enable])
36 dnl sets host_* variables
39 dnl use pretty build output with automake >= 1.11
40 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
41 [AM_DEFAULT_VERBOSITY=1
42 AC_SUBST(AM_DEFAULT_VERBOSITY)])
44 dnl our libraries and install dirs use major.minor as a version
45 dnl GST_API_VERSION=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
46 dnl we override it here if we need to for the release candidate of new series
48 AC_SUBST(GST_API_VERSION)
49 AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
50 [GStreamer API Version])
52 AS_LIBTOOL(GST, 1700, 0, 1700)
54 dnl *** required versions of GStreamer stuff ***
58 dnl *** autotools stuff ****
60 dnl allow for different autotools
61 AS_AUTOTOOLS_ALTERNATE
63 dnl Add parameters for aclocal
64 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
65 AC_CONFIG_MACRO_DIR([m4])
68 dnl the version check needs to stay here because autopoint greps for it
69 AM_GNU_GETTEXT_VERSION([0.17])
70 AM_GNU_GETTEXT([external])
71 AG_GST_GETTEXT([gst-validate-$GST_API_VERSION])
73 dnl Check wether to build LDPRELOAD related code or not
76 mingw* | msvc* | mks*)
79 BUILD_LDPRELOAD=yes ;;
81 AM_CONDITIONAL(HAVE_LD_PRELOAD, test "x$BUILD_LDPRELOAD" = "xyes")
83 dnl *** check for arguments to configure ***
88 AG_GST_ARG_WITH_PACKAGE_NAME
89 AG_GST_ARG_WITH_PACKAGE_ORIGIN
91 AG_GST_PKG_CONFIG_PATH
93 dnl *** checks for platform ***
95 dnl * hardware/architecture *
97 dnl *** checks for programs ***
103 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
104 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
106 dnl check for gobject-introspection
107 GOBJECT_INTROSPECTION_CHECK([0.6.3])
109 dnl *** checks for libraries ***
111 dnl *** checks for header files ***
113 dnl *** checks for types/defines ***
115 dnl *** checks for structures ***
117 dnl *** checks for compiler characteristics ***
119 dnl *** checks for library functions ***
121 dnl *** checks for dependancy libraries ***
130 AG_GST_GLIB_CHECK([$GLIB_REQ])
132 dnl checks for gstreamer
133 dnl uninstalled is selected preferentially -- see pkg-config(1)
134 AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], [yes])
136 GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_API_VERSION`
137 if test -z $GST_TOOLS_DIR; then
138 AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
140 AC_SUBST(GST_TOOLS_DIR)
142 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_API_VERSION --variable pluginsdir`
143 AC_SUBST(GST_PLUGINS_DIR)
144 AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR)
146 AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], [yes])
148 AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], [yes])
149 GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_API_VERSION --variable pluginsdir`
150 AC_SUBST(GSTPB_PLUGINS_DIR)
151 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
153 dnl check for gstreamer-pbutils
154 PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_API_VERSION, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
155 if test "x$HAVE_GST_PBUTILS" != "xyes"; then
156 AC_ERROR([gst-pbutils is required])
158 AC_SUBST(GST_PBUTILS_LIBS)
159 AC_SUBST(GST_PBUTILS_CFLAGS)
161 dnl check for gstreamer-video
162 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_API_VERSION >= 1.4, HAVE_GST_VIDEO="yes", HAVE_GST_VIDEO="no")
163 if test "x$HAVE_GST_VIDEO" != "xyes"; then
164 AC_ERROR([gst-video is required])
166 AC_SUBST(GST_VIDEO_LIBS)
167 AC_SUBST(GST_VIDEO_CFLAGS)
169 dnl needed for scenarios definition files
170 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
172 GST_DATADIR="$GST_PREFIX/share"
173 AC_DEFINE_UNQUOTED(GST_DATADIR, "$GST_DATADIR", [system wide data directory])
175 PKG_CHECK_MODULES(GIO, gio-2.0, HAVE_GIO=yes, HAVE_GIO=no)
179 PKG_CHECK_MODULES(GTK, gtk+-3.0, HAVE_GTK=yes, HAVE_GTK=no)
182 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
184 PKG_CHECK_MODULES(GDK, gdk-3.0, HAVE_GDK=yes, HAVE_GDK=no)
188 PKG_CHECK_MODULES(CAIRO, "cairo", HAVE_CAIRO=yes, HAVE_CAIRO=no)
189 AC_SUBST(CAIRO_CFLAGS)
191 AM_CONDITIONAL(HAVE_CAIRO, test ! "x$HAVE_CAIRO" = "xno")
192 if test "x$HAVE_CAIRO" != "xyes"; then
193 AC_MSG_NOTICE([Cairo is needed for the gst-validate-images-tool])
196 PKG_CHECK_MODULES(GST_RTSP_SERVER, "gstreamer-rtsp-server-1.0", HAVE_GST_RTSP_SERVER=yes, HAVE_GST_RTSP_SERVER=no)
197 AC_SUBST(GST_RTSP_SERVER_CFLAGS)
198 AC_SUBST(GST_RTSP_SERVER_LIBS)
199 AM_CONDITIONAL(HAVE_GST_RTSP_SERVER, test ! "x$HAVE_GST_RTSP_SERVER" = "xno")
200 if test "x$HAVE_GST_RTSP_SERVER" != "xyes"; then
201 AC_MSG_NOTICE([GstRtspServer is needed for the gst-validate-rtsp-server])
204 PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0)
205 AC_SUBST(JSON_GLIB_LIBS)
206 AC_SUBST(JSON_GLIB_CFLAGS)
208 dnl checks for gstreamer
210 AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
211 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
213 dnl *** set variables based on configure arguments ***
215 dnl set license and copyright notice
217 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
218 AC_SUBST(GST_LICENSE)
220 dnl define location of plugin directory
221 AS_AC_EXPAND(VALIDATEPLUGINDIR, ${libdir}/gstreamer-$GST_API_VERSION/validate)
222 AC_DEFINE_UNQUOTED(VALIDATEPLUGINDIR, "$VALIDATEPLUGINDIR",
223 [directory where GstValidate plugins are located])
224 AC_MSG_NOTICE([Using $VALIDATEPLUGINDIR as the plugin install location for GstValidate])
226 dnl plugin directory configure-time variable for use in Makefile.am
227 validateplugindir="\$(libdir)/gstreamer-$GST_API_VERSION/validate"
228 AC_SUBST(validateplugindir)
230 dnl set location of plugin directory
233 # set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
234 dnl make sure it doesn't complain about unused variables if debugging is disabled
236 AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""])
238 dnl define an ERROR_CFLAGS Makefile variable
239 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs $NO_WARNINGS])
241 dnl define correct level for debugging messages
242 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
245 AG_GST_DEFAULT_ELEMENTS
247 dnl *** finalize CFLAGS, LDFLAGS, LIBS
250 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
251 dnl GST_*: flags shared by built objects to link against GStreamer
252 dnl GST_ALL_LDFLAGS: linker flags shared by all
253 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
254 dnl GST_LT_LDFLAGS: library versioning of our libraries
255 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
257 dnl GST_OPTION_CFLAGS
258 if test "x$USE_DEBUG" = xyes; then
261 AC_SUBST(PROFILE_CFLAGS)
263 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
264 AC_SUBST(DEPRECATED_CFLAGS)
266 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
267 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
268 AC_SUBST(GST_OPTION_CFLAGS)
270 dnl FIXME: do we want to rename to GST_ALL_* ?
271 dnl prefer internal headers to already installed ones
272 dnl add GST_OPTION_CFLAGS, but overridable
273 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
278 dnl vars common to for all internal objects (core libs, elements, applications)
280 dnl - src and build dirs need to be added because every piece that gets built
281 dnl will need the GStreamer source and generated headers
282 GST_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir) $GST_PLUGINS_BASE_CFLAGS $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
283 AC_SUBST([GST_ALL_CFLAGS])
285 dnl FIXME: check if LTLIBINTL is needed everywhere
286 dnl I presume it is given that it contains the symbols that _() stuff maps to
287 GST_ALL_LIBS="$GST_LIBS $LTLIBINTL \$(GCOV_LIBS)"
288 AC_SUBST([GST_ALL_LIBS])
290 dnl LDFLAGS really should only contain flags, not libs - they get added before
291 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
292 GST_ALL_LDFLAGS="-no-undefined"
293 AC_SUBST(GST_ALL_LDFLAGS)
296 dnl linker flags shared by all libraries
297 dnl LDFLAGS modifier defining exported symbols from built libraries
298 GST_LIB_LDFLAGS="-export-symbols-regex \^[_]?\(gst_\|Gst\|GST_\).*"
299 AC_SUBST(GST_LIB_LDFLAGS)
301 dnl this really should only contain flags, not libs - they get added before
302 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
303 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
304 AC_SUBST(GST_PLUGIN_LDFLAGS)
306 AM_PATH_PYTHON(2.7.0)
307 AS_AC_EXPAND(LIBDIR, $libdir)
308 AC_MSG_NOTICE(Storing library files in $LIBDIR)
309 AC_CONFIG_FILES([tools/gst-validate-launcher], [chmod +x tools/gst-validate-launcher])
310 AS_AC_EXPAND(DATADIR, $datadir)
311 AC_CONFIG_FILES([launcher/config.py])
313 dnl this really should only contain flags, not libs - they get added before
314 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
316 dnl *** output files ***
318 dnl keep this alphabetic per directory, please
324 data/scenarios/Makefile
326 gst/validate/Makefile
327 gst/overrides/Makefile
329 plugins/fault_injection/Makefile
330 plugins/flow/Makefile
331 plugins/gapplication/Makefile
333 plugins/ssim/Makefile
335 gst-libs/gst/Makefile
336 gst-libs/gst/video/Makefile
340 pkgconfig/gst-validate-uninstalled.pc
341 pkgconfig/gst-validate.pc
345 launcher/apps/Makefile
346 launcher/testsuites/Makefile
354 Source code location : ${srcdir}
358 gst-validate configured. Type 'make' to build.