]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_SUBST: don't underquote the variable name
authorNick Bowler <nbowler@draconx.ca>
Thu, 16 Aug 2012 03:54:53 +0000 (21:54 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 16 Aug 2012 03:54:53 +0000 (21:54 -0600)
commit5fdd360bcbeeff0fdb3214aad1866c2f9eace98d
tree159cbde50b0da085661e8dc772d25bd988768ff3
parentb406df6adc6af9010f13d0c0fb43fa8ced8a5436
AC_SUBST: don't underquote the variable name

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>
THANKS
lib/autoconf/general.m4