autoconf
[Top][All Lists]
Advanced

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

Re: Finding dependencies in lib64 or lib


From: Daniel Pocock
Subject: Re: Finding dependencies in lib64 or lib
Date: Thu, 11 Feb 2010 14:14:59 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Ralf Corsepius wrote:
> On 02/11/2010 12:37 PM, Daniel Pocock wrote:
>>
>>
>> Hi,
>>
>> I've been looking over configure.in for the Ganglia project.
>>
>> The project depends on some other libs, and their locations can be
>> specified with configure arguments, for example:
>>
>> --with-libconfuse=/usr/local
>>
>> The original configure.in would then try -L/usr/local/lib
>>
>> However, there are platforms where 64 bit libraries should be in
>> */lib64, e.g. the search for libconfuse should try /usr/local/lib64 on
>> those platforms.
>>
>> My initial solution is to test $host
>>
>> LIB_SUFFIX=lib
>> case $host in
>> x86_64-redhat-linux*)
>>    LIB_SUFFIX=lib64
>> esac
>>
>> but a proper solution
>
> A proper solution is not to try tricks like the one above, but to let
> the user specify the directory he needs, if he needs special settings.
>
> In most cases he won't have to, because on e.g. on redhat-based systems,
> /usr/lib64 is in of GCC's default library search path.

It is not quite so simple - the third party library may be installed
elsewhere, e.g. /opt/confuse-2.6/lib64

The --with-libconfuse option only accepts the base directory (e.g.
--with-libconfuse=/opt/confuse-2.6) and configure has to decide whether
to append /lib or /lib64 to find the right dependencies.

On some systems (e.g. a host used for building 32 and 64 bit packages),
there may be two versions of libconfuse installed, e.g.

/opt/confuse-2.6/lib/libconfuse.so (32 bit)
/opt/confuse-2.6/lib64/libconfuse.so (64 bit)

and our original configure.in would never look in the 64 bit directory.





reply via email to

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