Consider the following:
% cat >configure.ac <<'EOF'
AC_INIT([test], [0])
m4_define([FOO], [baz])
AC_SUBST([FOO], [bar])
AC_CONFIG_FILES([test])
AC_OUTPUT
EOF
% cat >test.in <<'EOF'
@FOO@
EOF
This produces no error messages at autoconf time and none at configure
time. Nevertheless, the substituted value of FOO is the empty string,
instead of bar, as expected. Sure enough, in the output variables
section of config.log, we see FOO='' instead of FOO='bar'. Looking
at the generated configure script, we see that AC_SUBST has produced
baz=bar in the output, instead of the expected FOO=bar. But this is
the only place: everywhere else is still using FOO.
* lib/autoconf/general.m4 (AC_SUBST): Add another layer of
quoting.
* THANKS: Update.
Signed-off-by: Eric Blake <eblake@redhat.com>
Nelson H. F. Beebe beebe@math.utah.edu
Nicolas Joly njoly@pasteur.fr
Nicolás Lichtmaier jnl@synapsis-sa.com.ar
-Nick Bowler nbowler@elliptictech.com
+Nick Bowler nbowler@draconx.ca
NightStrike nightstrike@gmail.com
Nishio Futoshi fut_nis@d3.dion.ne.jp
Noah Elliott elliott@hera.llnl.gov
[m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl
[AC_SUBST_TRACE([$1])]dnl
[m4_pattern_allow([^$1$])]dnl
-[m4_ifvaln([$2], [$1=$2])[]]dnl
+[m4_ifvaln([$2], [[$1]=$2])[]]dnl
[m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST