summaryrefslogtreecommitdiff
path: root/pkg.m4.in
diff options
context:
space:
mode:
Diffstat (limited to 'pkg.m4.in')
-rw-r--r--pkg.m4.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg.m4.in b/pkg.m4.in
index 62995f0..0a1536a 100644
--- a/pkg.m4.in
+++ b/pkg.m4.in
@@ -22,6 +22,27 @@
# configuration script generated by Autoconf, you may include it under
# 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
+# MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+# installed version of pkg-config, this checks the developer's version
+# of pkg.m4 when generating configure.
+#
+# To ensure that this macro is defined, also add:
+# m4_ifndef([PKG_PREREQ],
+# [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+#
+# See the "Since" comment for each macro you use to see what version of
+# the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [@VERSION@])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])# PKG_PREREQ
+
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],