diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-08-14 18:59:23 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-08-14 18:59:23 +0100 |
commit | ca1c867ac96a3bdb83f2bc4cb2081e2a0deb1a16 (patch) | |
tree | 48e2072a37731c2328f39f020dbe24bdea5065ca | |
parent | ec60217bf93d537b324c3682c1bd7d49ad9ad9b3 (diff) |
m4: add AG_GST_PKG_CONFIG_PATH macro
Sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am
which contains the path of the in-tree pkgconfig directory first
and then any paths specified in PKG_CONFIG_PATH.
We do this mostly so we don't have to use unportable shell constructs
such as ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} in Makefile.am to handle
the case where the environment variable is not set, but also in order
to avoid a trailing ':' in the PKG_CONFIG_PATH which apparently causes
problems with pkg-config on windows with msys/mingw.
Also shows the PKG_CONFIG_PATH set up in the configure output,
which is handy when debugging other people's configure problems.
-rw-r--r-- | m4/gst.m4 | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -8,3 +8,24 @@ AC_DEFUN([AG_GST_INIT], [ m4_pattern_forbid(^_?AG_GST_) ]) + +dnl AG_GST_PKG_CONFIG_PATH +dnl +dnl sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am +dnl which contains the path of the in-tree pkgconfig directory first +dnl and then any paths specified in PKG_CONFIG_PATH. +dnl +dnl We do this mostly so we don't have to use unportable shell constructs +dnl such as ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} in Makefile.am to handle +dnl the case where the environment variable is not set, but also in order +dnl to avoid a trailing ':' in the PKG_CONFIG_PATH which apparently causes +dnl problems with pkg-config on windows with msys/mingw. +AC_DEFUN([AG_GST_PKG_CONFIG_PATH], +[ + GST_PKG_CONFIG_PATH="\$(top_builddir)/pkgconfig" + if test "x$PKG_CONFIG_PATH" != "x"; then + GST_PKG_CONFIG_PATH="$GST_PKG_CONFIG_PATH:$PKG_CONFIG_PATH" + fi + AC_SUBST([GST_PKG_CONFIG_PATH]) + AC_MSG_NOTICE([Using GST_PKG_CONFIG_PATH = $GST_PKG_CONFIG_PATH]) +]) |