[Top][All Lists]

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

Re: AC_SEARCH_LIBS directories on 32-bit and 64-bit

From: Sergio Belkin
Subject: Re: AC_SEARCH_LIBS directories on 32-bit and 64-bit
Date: Tue, 19 Oct 2010 20:02:51 -0300

2010/10/18 Eric Blake <address@hidden>:
> On 10/18/2010 04:54 PM, Sergio Belkin wrote:
>> Hi,
>> Let's say we have the check:
>> AC_SEARCH_LIBS([ns_get16],[resolv])
>> How can I do to detect library directory path based on host
>> architecture, I mean, I want that if is an x86_64 bit looks on
>> ${prefix}/lib64 and if is 32-bit look on /usr/lib. I'd want to avoid
>> that user has to provide manually LDFLAGS. Is that possible? If I am
>> thinking something wrong, correct me.
> Why should you want to offload the responsibility for the user setting up
> their system correctly in the first place?  And you can't blindly assume
> that ${prefix}/lib64 is the correct spelling, as there are 64-bit OSs that
> install their libraries directly in /usr/lib.  And, per the GNU Coding
> Standards, a user should feel free to install libraries in ~/lib (if they
> don't have write access to /usr) rather than /usr/local/lib (autoconf's
> default, good for installing optional packages above what the distro
> includes); as it is, libraries installed in /usr/lib64 is already a case of
> distros using the GCS-mandated ability to specify an alternate $prefix of
> /usr instead of the default /usr/local.
> In my opinion, the solution to the 32- vs. 64-bit library question SHOULD be
> answered by the user (and not by the configure author). Obviously, this can
> be done by setting LDFLAGS for every configure run of every package, but
> that gets tiresome.  But more efficiently, this can be done by installing an
> appropriate to answer the question up front.  And the manual
> already mentions how to do that:
> If a distro wants to ship 64-bit libraries in /usr/lib64, then they should
> also ship a that automatically uses that directory any time a
> configure script targets ${prefix} of /usr, so that users automatically get
> this default without having to set LDFLAGS themselves.  But that's in the
> realm of the distro, not of autoconf.
> As a package author, you shouldn't have to care about the distro's choice of
> spelling for preferred library location.
> --
> Eric Blake   address@hidden    +1-801-349-2682
> Libvirt virtualization library

Thanks Eric for your explanation

Sergio Belkin
Watch More TV
Sergio Belkin -

reply via email to

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