This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ configure time
Richard Henderson <rth@redhat.com> writes:
|> Taking AC_DEFINE for example because it is small,
|>
|> define(ACQS, [patsubst($1, ['], ['\''])])
|> define(AC_DEFINE,
|> [echo '#define $1 ifelse($#, 2, ACQS($2), $#, 3, ACQS($2), 1)' >> confdefs.h
|> ])
|>
|> Your definition, for example would fail for
|>
|> AC_DEFINE(TICK, '\'')
|>
|> which seems like a perfectly legitimate thing to want to do.
This is still not enough for
AC_DEFINE(FOOBAR, '\n')
because on some systems echo interprets backslash sequences.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5