summaryrefslogtreecommitdiff
path: root/pkg.m4.in
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2015-09-26 20:58:25 -0700
committerDan Nicholson <dbn.lists@gmail.com>2015-09-26 20:58:25 -0700
commit5e786130a58c1d5c77e01ef2b8fe0247e4c3e652 (patch)
treeed71ed40ceb6058486c4deb2899bf4c974a856df /pkg.m4.in
parentd5c6358eda546dbdde9ac42dc796c893a811ecc4 (diff)
downloadpkg-config-5e786130a58c1d5c77e01ef2b8fe0247e4c3e652.tar.gz
m4: Add Since releases and cleanup comments
Note which release each macro was added in and cleanup the comments to be more consistent between them.
Diffstat (limited to 'pkg.m4.in')
-rw-r--r--pkg.m4.in41
1 files changed, 29 insertions, 12 deletions
diff --git a/pkg.m4.in b/pkg.m4.in
index b604a75..056de62 100644
--- a/pkg.m4.in
+++ b/pkg.m4.in
@@ -23,7 +23,7 @@
# the same distribution terms that you use for the rest of that program.
# PKG_PREREQ(MIN-VERSION)
-# -------------------------------------
+# -----------------------
# Since: 0.29
#
# Verify that the version of the pkg-config macros are at least
@@ -45,6 +45,13 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
+# Since: 0.16
+#
+# Search for the pkg-config tool and set the PKG_CONFIG variable to
+# first found in the path. Checks that the version of pkg-config found
+# is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+# used since that's the first version where most current features of
+# pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -69,6 +76,8 @@ fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------------------------------
+# Since: 0.18
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
@@ -77,7 +86,6 @@ fi[]dnl
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
@@ -89,6 +97,8 @@ fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
+# Internal wrapper calling pkg-config via PKG_CONFIG and setting
+# pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
@@ -103,7 +113,8 @@ fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
+# ---------------------------
+# Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -115,15 +126,13 @@ fi[]dnl
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
+# [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------------------
+# Since: 0.4.0
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
@@ -181,8 +190,10 @@ fi[]dnl
# PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# [ACTION-IF-NOT-FOUND])
# ---------------------------------------------------------------------
+# Since: 0.29
+#
# Checks for existence of MODULES and gathers its build flags with
# static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
# and VARIABLE-PREFIX_LIBS from --libs.
@@ -199,8 +210,10 @@ PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])
-# PKG_INSTALLDIR(DIRECTORY)
+# PKG_INSTALLDIR([DIRECTORY])
# -------------------------
+# Since: 0.27
+#
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
@@ -219,8 +232,10 @@ m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
+# PKG_NOARCH_INSTALLDIR([DIRECTORY])
+# --------------------------------
+# Since: 0.27
+#
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
@@ -242,6 +257,8 @@ m4_popdef([pkg_description])
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
+# Since: 0.28
+#
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl