autoconf-patches
[Top][All Lists]
Advanced

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

Re: Improve AC_REPLACE_FUNCS


From: Paolo Bonzini
Subject: Re: Improve AC_REPLACE_FUNCS
Date: Thu, 17 Sep 2009 01:39:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

On 09/16/2009 11:37 PM, Eric Blake wrote:
It gives a reduction
in size by using more AC_CHECK_FUNCS_ONCE instead of inline function checks,
and can reduce forks by using a literal rather than a shell variable in more
places; particularly when doing AC_REPLACE_FUNCS([a b]).

No, this breaks if AC_REPLACE_FUNCS is used within a conditional. However, since we do not support (pfew...) non-literal $1, using AC_CHECK_FUNC to reduce forks is fine now that we are using shell functions, like

m4_define([_AC_REPLACE_FUNC],
[AC_CHECK_FUNC([$1, [AC_LIBOBJ([$1])])
])

This should expand to just four lines per function. It won't give a size reduction but it would noticeably reduce forks.

I should polish up my patches introducing AC_FOREACH, but that would be after 2.65.

Paolo




reply via email to

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