]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)
authorOndřej Surý <ondrej@sury.org>
Thu, 8 Aug 2019 12:11:35 +0000 (14:11 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 8 Aug 2019 12:58:03 +0000 (14:58 +0200)
(cherry picked from commit d80b6ec879e84fa32e47b44b7e993a83021aadcd)

libtool.m4/compat.m4 [new file with mode: 0644]
util/copyrights

diff --git a/libtool.m4/compat.m4 b/libtool.m4/compat.m4
new file mode 100644 (file)
index 0000000..4ea93d0
--- /dev/null
@@ -0,0 +1,24 @@
+# backwards compat with older pkg-config
+# - pull in AC_DEFUN from pkg.m4
+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
+])
+
+# This hack makes PKG_CHECK_VARS from m4/pkg.m4 work on autoconf 2.63
+# ( courtesy of sunnybear in https://github.com/gdnsd/gdnsd/issues/85 )
+m4_ifndef([AS_VAR_COPY],
+[m4_define([AS_VAR_COPY],
+[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])])
+## End Autoconf-2.63-Compat
index 5e7fa61b3c3f02e4246dd1d77844f183a2600bfb..d92cd181687bdcd550ff14734a2c155d7d099489 100644 (file)
 ./lib/win32/bindevt/bindevt.vcxproj.user       X       2013,2018,2019
 ./libtool.m4/ax_restore_flags.m4               X       2019
 ./libtool.m4/ax_save_flags.m4                  X       2019
+./libtool.m4/compat.m4                         X       2019
 ./libtool.m4/libtool.m4                                X       2012,2018,2019
 ./libtool.m4/ltoptions.m4                      X       2012,2018,2019
 ./libtool.m4/ltsugar.m4                                X       2012,2018,2019