Blame common/m4/gst.m4

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