| In Amanda, we used to have an AC_MSG_WARN whose text contained `#'.
| It worked fine with autoconf 2.13. With CVS autoconf, we get:
|
| echo "configure: WARNING: ... #undef ..." >&m4_default([2], [AC_FD_MSG])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Ideas?
Quote your literal argument twice.
Quoting once means you want all the macros which will be call to keep
the argument unevaluated until you hit the bottom, and *then* it's
expanded. It's a kind of lazy evaluation.
Quoting twice means passing the quoted argument to the bottom, and at
this precise moment it is `unquoted' and left as is.
In your case, the `#', left unquoted at the bottom, started a comment,
and there is no expansion in the comments. m4_default had not
opportunity to express itself.
/tmp % cat configure.in nostromo 10:52
define([YOU_LOSE], [You win])
AC_INIT
AC_MSG_WARN([[zorglub] # is # a # bad # guy #]) YOU_LOSE
AC_MSG_WARN([[[zorglub] # is # a # bad # guy #]]) YOU_LOSE
This is 2.13
/tmp % /usr/bin/autoconf nostromo 10:52
/tmp % grep zorglub configure nostromo 10:52
echo "configure: warning: zorglub # is # a # bad # guy #" 1>&2 YOU_LOSE
echo "configure: warning: [zorglub] # is # a # bad # guy #" 1>&2 You win
This is CVS
/tmp % ace nostromo 10:52
autoconf: warning: --macrodir is obsolete, use --autoconf-dir
/tmp % grep zorglub configure nostromo 10:52
echo "configure: WARNING: zorglub # is # a # bad # guy #" >&m4_default([2],
[AC_FD_MSG]) YOU_LOSE
echo "configure: WARNING: [zorglub] # is # a # bad # guy #" >&2 You win
They are both quoting properly.