This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ configure time
On Sun, Mar 18, 2001 at 05:11:23PM -0800, Zack Weinberg wrote:
> Keep in mind that cat <<EOF is used to write out test code, too.
Yes, I know. Redefining AC_DEFINE and AC_DEFINE_UNQUOTED only
takes care of 2/5ths of the problem in our configure. But if
we were more careful with patterns, we could do just about
everything with echo.
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.
In most of the places that we do programs, we actually want
double quotes so that shell variables expand, but not to be
bothered by " and \ themselves. I'm thinking
changequote(<,>)dnl
define(ACQD, <patsubst($1, <[\"]>. <\\\&>)>)
changequote([,])dnl
might do the trick.
> ... will probably break horribly with autoconf 2.50.
I'll try to gather more data here, but if this problem is what
I think it is, autoconf 2.50 will have to address this somehow.
r~