This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++ configure time


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]