autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/12] use a shell function for AC_CHECK_TYPE


From: Paolo Bonzini
Subject: Re: [PATCH 09/12] use a shell function for AC_CHECK_TYPE
Date: Sun, 02 Nov 2008 15:23:15 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Eric Blake wrote:
> According to Paolo Bonzini on 11/2/2008 1:27 AM:
>> By a completely different approach, would it make sense to switch from
>> cat to AS_ECHO in order to build the conftest.c files?  That would save
>> forks for *all* tests...
> 
> That would mean tracking the contents of confdefs.h as a shell variable
> rather than a separate file.  But yes, it might be possible.

Now I see why I was confused.  The reason is that AC_LANG_SOURCE does

cat > conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h - <<_ACEOF >>conftest.$ac_ext
/* end confdefs.h.  */
$1
_ACEOF

but the source is split across lang.m4 and c.m4

Why couldn't AC_LANG_CONFTEST do per-language dispatching, so that we
can put "/* confdefs.h */" at the beginning of confdefs.h and do

cat confdefs.h - <<_ACEOF >>conftest.$ac_ext
/* end confdefs.h.  */
$1
_ACEOF

Again, that would save a fork for *all* tests (not two as with AS_ECHO,
but much easier to do and less error-prone).

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]