diff options
Diffstat (limited to 'm4/00gnulib.m4')
| -rw-r--r-- | m4/00gnulib.m4 | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4 index 06eff4f3863..14628c363b7 100644 --- a/m4/00gnulib.m4 +++ b/m4/00gnulib.m4 | |||
| @@ -1,44 +1,12 @@ | |||
| 1 | # 00gnulib.m4 serial 7 | 1 | # 00gnulib.m4 serial 8 |
| 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| 5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
| 6 | 6 | ||
| 7 | dnl This file must be named something that sorts before all other | 7 | dnl This file must be named something that sorts before all other |
| 8 | dnl gnulib-provided .m4 files. The first part is needed until such time | 8 | dnl gnulib-provided .m4 files. It is needed until the clang fix has |
| 9 | dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and | 9 | dnl been included in Autoconf. |
| 10 | dnl m4_divert semantics. The second part is needed until the clang fix | ||
| 11 | dnl has been included in Autoconf. | ||
| 12 | |||
| 13 | # Until autoconf 2.63, handling of the diversion stack required m4_init | ||
| 14 | # to be called first; but this does not happen with aclocal. Wrapping | ||
| 15 | # the entire execution in another layer of the diversion stack fixes this. | ||
| 16 | # Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 | ||
| 17 | # for whether it was FIFO or LIFO; in order to properly balance with | ||
| 18 | # m4_init, we need to undo our push just before anything wrapped within | ||
| 19 | # the m4_init body. The way to ensure this is to wrap both sides of | ||
| 20 | # m4_init with a one-shot macro that does the pop at the right time. | ||
| 21 | m4_ifndef([_m4_divert_diversion], | ||
| 22 | [m4_divert_push([KILL]) | ||
| 23 | m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) | ||
| 24 | m4_define([m4_init], | ||
| 25 | [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) | ||
| 26 | |||
| 27 | |||
| 28 | # AC_DEFUN_ONCE([NAME], VALUE) | ||
| 29 | # ---------------------------- | ||
| 30 | # Define NAME to expand to VALUE on the first use (whether by direct | ||
| 31 | # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. | ||
| 32 | # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This | ||
| 33 | # definition is slower than the version in Autoconf 2.64, because it | ||
| 34 | # can only use interfaces that existed since 2.59; but it achieves the | ||
| 35 | # same effect. Quoting is necessary to avoid confusing Automake. | ||
| 36 | m4_version_prereq([2.63.263], [], | ||
| 37 | [m4_define([AC][_DEFUN_ONCE], | ||
| 38 | [AC][_DEFUN([$1], | ||
| 39 | [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], | ||
| 40 | [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl | ||
| 41 | [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) | ||
| 42 | 10 | ||
| 43 | # The following definitions arrange to use a compiler option | 11 | # The following definitions arrange to use a compiler option |
| 44 | # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the | 12 | # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the |