]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Honor properly the `#define' config.h.in templates.
authorAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 10:38:59 +0000 (10:38 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 10 Feb 2000 10:38:59 +0000 (10:38 +0000)
commit08de8c9f931365ac8a2dbcdf988dceee7c093753
treef0f118e29d64fce4044ec78a98695ade35b44d56
parent14930dcc79293ccbb491be67154d7642cf8c5c6c
Honor properly the `#define' config.h.in templates.
Test it.

* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this.  All callers changed.
Don't mess with changequote, just quote properly.
Bug 1.  Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'.  Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2.  Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top').  This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3.  Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
ChangeLog
acgeneral.m4
lib/autoconf/general.m4
tests/torture.m4