From: Nick Bowler Date: Thu, 16 Aug 2012 03:54:53 +0000 (-0600) Subject: AC_SUBST: don't underquote the variable name X-Git-Tag: v2.69b~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fdd360bcbeeff0fdb3214aad1866c2f9eace98d;p=thirdparty%2Fautoconf.git 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 --- diff --git a/THANKS b/THANKS index d90237d4..be83c285 100644 --- a/THANKS +++ b/THANKS @@ -302,7 +302,7 @@ Nathanael Nerode neroden@gcc.gnu.org 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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index d06fdf5a..51cee303 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2180,7 +2180,7 @@ m4_define([AC_SUBST], [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