]> git.draconx.ca Git - dxcommon.git/blob - snippet/at-compat.at
Add helper to work around Solaris /bin/sh bug in Autotest.
[dxcommon.git] / snippet / at-compat.at
1 # Copyright © 2023 Nick Bowler
2 #
3 # Compatibility helper for Autotest test suites.  This should be included
4 # before expanding AT_INIT
5 #
6 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
7 # This is free software: you are free to do what the fuck you want to.
8 # There is NO WARRANTY, to the extent permitted by law.
9
10 # Redefine AT_INIT to work around nonportable constructs in current
11 # (as of 2023) Autoconf releases:
12 #
13 #   - In a shell function, redirections on : are not correctly handled
14 #     by Solaris /bin/sh.  See the following Autoconf patch for details:
15 #
16 #       https://lists.gnu.org/archive/html/autoconf-patches/2021-03/msg00000.html
17
18 m4_define([AT_INIT],
19   m4_bpatsubst(m4_dquote(m4_defn([AT_INIT])),
20     [^\( *\)\(: >"\$at_stdout".*$\)], [\1eval '\2']))