This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ configure time
- To: Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org, Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: libstdc++ configure time
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Sun, 18 Mar 2001 17:11:23 -0800
- References: <20010318015411.A28945@redhat.com> <20010318124140.A880@redhat.com>
On Sun, Mar 18, 2001 at 12:41:40PM -0800, Richard Henderson wrote:
> Pop quiz, autoconf maintainers, where does this come from? Hint:
>
> cat >> confdefs.h <<\EOF
> #define HAVE_FMODF 1
> EOF
>
> I count 485 ocurrences of ^EOF in this configure script.
Keep in mind that cat <<EOF is used to write out test code, too.
> Given
> that it would appear that Solaris /bin/sh wants to make a hard link
> to each of these 485 input fragments whenever it forks a subshell,
> it would appear to be fantastically cheaper to use
>
> echo "#define HAVE_FMODF 1" >> confdefs.h
>
> instead.
Hmm... In aclocal.m4,
define([AC_DEFINE],
[echo '[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)' >> confdefs.h
])
define([AC_DEFINE_UNQUOTED],
[echo [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) >> confdefs.h
])
*should* work. Completely untested, will probably break horribly with
autoconf 2.50.
zw