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 07:07:58PM -0800, Richard Henderson wrote:
> 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.
I've been wondering why sh thinks it has to make hard links to those
files. I see why here documents get turned into temporary files, but
not why the hard links.
Are we likely to run into line length limits if we do more with echo?
E.g.
echo '
...
... long
... test
... program
... here
...
'
could get us in trouble; easily worked around with one echo per line,
although there are then concerns about >> closing and opening the file
over and over again.
> 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.
I couldn't remember how to do that sort of transformation in M4 and I
had to run out the door. Consider it a sketch, not a polished final
proposal. :)
> > ... 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.
Right now, looks like they're still using here documents.
zw