autoconf
[Top][All Lists]
Advanced

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

Re: Correct way to check for clock_gettime()


From: Eric Blake
Subject: Re: Correct way to check for clock_gettime()
Date: Mon, 09 Aug 2010 11:50:19 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1

On 08/02/2010 09:14 AM, Thomas Petazzoni wrote:
>> You should be able to modify both configure scripts in a way so that
>> it works again; and in this particular example it should be done.
>> Getting this approach to scale can be a lot of work though.
> 
> Is this approach "officially" supported by autoconf ? If I fix one of
> the configure.{in,ac} script and try to get the change merged upstream,
> it's an important argument to know if the change is done to comply with
> a general rule of configure.{in,ac} and not a specific hack.

Sharing a cache file is a worthwhile goal in my opinion, although it may
take a lot of bug reports across a lot of packages before it is
feasible.  Standardizing cache variable names helps somewhat in this regard.

At any rate, I'd argue that glib's configure.ac (the one that does not
check for -lrt) would be the best candidate for proposing an upstream
patch.  glib in isolation will not use clock_gettime even if it is
available through an alternate library; this is correct but not optimal
behavior.  Therefore, it seems like it would be easier to get them to
adopt the same approach as CTorrent of allowing -lrt to be able to use
clock_gettime on more platforms.

> I have also other cases of configure cache misuse by two independent
> packages. I'm often able to track down the cause of the problem, but
> I'm not autoconf-ed enough to know which is the correct fix. May I
> present those other cases to the list ?

Sure; although I can't guarantee that we can always provide a solution
(let alone in a timely manner), it can't hurt to document your findings
on the list for more eyes to look at.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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