diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2016-02-29 13:02:08 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2016-02-29 13:02:08 +0100 |
commit | a3a984901f580d1a7d07cbfceb5dc279c035dcb1 (patch) | |
tree | 783cad476c7b0e8674dc2078d52117bf1ddab2fa | |
parent | 3b0941302c0940e625ea545b096a20319a0d8a19 (diff) |
Support older pkg-config packages
Resolve the pkg-config 0.28 or greater dependency introduced by
the patch "Add bash completion to the install routine."
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1de0808..bb6d673 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,23 @@ AC_ARG_ENABLE([bashcompl], [Install bash completion for ipset]), [enable_bashcompl="$enableval"], [enable_bashcompl="no"]) +# backward compatibility with older pkg-config +m4_ifndef([PKG_CHECK_VAR], [ +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +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]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR +]) + if test "x$enable_bashcompl" = "xyes"; then PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , bashcompdir="${sysconfdir}/bash_completion.d") AC_SUBST(bashcompdir) |