2 dnl sets up use of GStreamer configure.ac macros
3 dnl all GStreamer autoconf macros are prefixed
4 dnl with AG_GST_ for public macros
5 dnl with _AG_GST_ for private macros
7 dnl We call AC_CANONICAL_TARGET and AC_CANONICAL_HOST so that
8 dnl it is valid before AC_ARG_PROGRAM is called
10 AC_DEFUN([AG_GST_INIT],
12 m4_pattern_forbid(^_?AG_GST_)
13 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables
14 AC_REQUIRE([AC_CANONICAL_TARGET]) dnl we use target_ variables
17 dnl AG_GST_PKG_CONFIG_PATH
19 dnl sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am
20 dnl which contains the path of the in-tree pkgconfig directory first
21 dnl and then any paths specified in PKG_CONFIG_PATH.
23 dnl We do this mostly so we don't have to use unportable shell constructs
24 dnl such as ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} in Makefile.am to handle
25 dnl the case where the environment variable is not set, but also in order
26 dnl to avoid a trailing ':' in the PKG_CONFIG_PATH which apparently causes
27 dnl problems with pkg-config on windows with msys/mingw.
28 AC_DEFUN([AG_GST_PKG_CONFIG_PATH],
30 GST_PKG_CONFIG_PATH="\$(top_builddir)/pkgconfig"
31 if test "x$PKG_CONFIG_PATH" != "x"; then
32 GST_PKG_CONFIG_PATH="$GST_PKG_CONFIG_PATH:$PKG_CONFIG_PATH"
34 AC_SUBST([GST_PKG_CONFIG_PATH])
35 AC_MSG_NOTICE([Using GST_PKG_CONFIG_PATH = $GST_PKG_CONFIG_PATH])