diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
commit | e5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch) | |
tree | a6716c9275b4b413f6c9194798b34b91affb3cc7 /m4/PKG_CHECK_VAR.m4 | |
parent | Initial commit. (diff) | |
download | pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip |
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/PKG_CHECK_VAR.m4')
-rw-r--r-- | m4/PKG_CHECK_VAR.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/PKG_CHECK_VAR.m4 b/m4/PKG_CHECK_VAR.m4 new file mode 100644 index 0000000..2221a69 --- /dev/null +++ b/m4/PKG_CHECK_VAR.m4 @@ -0,0 +1,24 @@ +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +dnl +dnl Origin (declared license: GPLv2+ with less restrictive exception): +dnl https://cgit.freedesktop.org/pkg-config/tree/pkg.m4.in?h=pkg-config-0.29.1#n261 +dnl (AS_VAR_COPY replaced with backward-compatible equivalent and guard +dnl to prefer system-wide variant by Jan Pokorny <jpokorny@redhat.com>) + +m4_ifndef([PKG_CHECK_VAR],[ +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +dnl AS_VAR_COPY([$1], [pkg_cv_][$1]) +$1=AS_VAR_GET([pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR +])dnl m4_ifndef |