2
dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
2
dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
7
7
dnl This file must be named something that sorts before all other
8
8
dnl gnulib-provided .m4 files. It is needed until such time as we can
9
dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
9
dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
10
dnl m4_divert semantics.
12
# Until autoconf 2.63, handling of the diversion stack required m4_init
13
# to be called first; but this does not happen with aclocal. Wrapping
14
# the entire execution in another layer of the diversion stack fixes this.
15
# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
16
# for whether it was FIFO or LIFO; in order to properly balance with
17
# m4_init, we need to undo our push just before anything wrapped within
18
# the m4_init body. The way to ensure this is to wrap both sides of
19
# m4_init with a one-shot macro that does the pop at the right time.
20
m4_ifndef([_m4_divert_diversion],
21
[m4_divert_push([KILL])
22
m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
24
[gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
11
27
# AC_DEFUN_ONCE([NAME], VALUE)
12
28
# ----------------------------