summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-01-10 23:01:30 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-01-10 23:01:30 -0800
commitbada50fc50d34e0e2ffd00fd64957cfb397c6eee (patch)
treed93a451eed031c36f12254dbadd787bbee903e49 /m4
parent6b81c31d81137170c6883a59d37478cda3b09432 (diff)
downloademacs-bada50fc50d34e0e2ffd00fd64957cfb397c6eee.tar.gz
Merge from gnulib.
This incorporates: 2014-01-07 update from texinfo 2014-01-06 md5, sha1, sha256, sha512: support older autoconf
Diffstat (limited to 'm4')
-rw-r--r--m4/00gnulib.m420
-rw-r--r--m4/gnulib-common.m46
2 files changed, 23 insertions, 3 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index b494772e9ee..8eca5518ad6 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,4 +1,4 @@
-# 00gnulib.m4 serial 2
+# 00gnulib.m4 serial 3
dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,23 @@ dnl with or without modifications, as long as this notice is preserved.
dnl This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics.
+
+# Until autoconf 2.63, handling of the diversion stack required m4_init
+# to be called first; but this does not happen with aclocal. Wrapping
+# the entire execution in another layer of the diversion stack fixes this.
+# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
+# for whether it was FIFO or LIFO; in order to properly balance with
+# m4_init, we need to undo our push just before anything wrapped within
+# the m4_init body. The way to ensure this is to wrap both sides of
+# m4_init with a one-shot macro that does the pop at the right time.
+m4_ifndef([_m4_divert_diversion],
+[m4_divert_push([KILL])
+m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
+m4_define([m4_init],
+ [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
+
# AC_DEFUN_ONCE([NAME], VALUE)
# ----------------------------
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index ae31e80d3bf..3b61b239beb 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 33
+# gnulib-common.m4 serial 34
dnl Copyright (C) 2007-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -375,3 +375,7 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
AC_CACHE_VAL([$1], [$2])
as_echo_n="$saved_as_echo_n"
])
+
+# AS_VAR_COPY was added in autoconf 2.63b
+m4_define_default([AS_VAR_COPY],
+[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])