From ca1c867ac96a3bdb83f2bc4cb2081e2a0deb1a16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 14 Aug 2010 18:59:23 +0100 Subject: [PATCH] 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. --- m4/gst.m4 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/m4/gst.m4 b/m4/gst.m4 index 04b466f..ddfde51 100644 --- a/m4/gst.m4 +++ b/m4/gst.m4 @@ -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]) +]) -- 2.7.4