]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
configure.ac: Support building with old autoconf 2.63
authorSerhey Popovych <serhe.popovych@gmail.com>
Fri, 29 Nov 2019 09:21:30 +0000 (11:21 +0200)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 9 Dec 2019 10:03:04 +0000 (11:03 +0100)
This version found on RHEL6 making autoreconf fail with following error:

  configure.ac:61: error: possibly undefined macro: AS_VAR_COPY
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.

Apply fix from https://github.com/gdnsd/gdnsd/issues/85 to fix problem.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
configure.ac

index 8fe1890300cf2f94d2965d21655aa5b7beebf3d5..17ba18431c7a911e7866c64a0ff158c9975d4736 100644 (file)
@@ -64,6 +64,12 @@ 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])])])
+
 if test "x$enable_bashcompl" = "xyes"; then
        PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , bashcompdir="${sysconfdir}/bash_completion.d")
        AC_SUBST(bashcompdir)