libtool
[Top][All Lists]
Advanced

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

Libraries that are not installed yet and runpath


From: Ondřej Kuzník
Subject: Libraries that are not installed yet and runpath
Date: Wed, 9 May 2018 13:05:01 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi all,
I'm trying to build a few things together and link to them before they
are installed into the final path.

So let's say I want to link against library.so, my understanding is that
I do this:
myfile_la_LIBADD = -lrary

If it is installed in the system, I can omit anything in ./configure's
LDFLAGS and if installed in $(libdir), I can add LDFLAGS='-L$(libdir)'
and runpath will be set accordingly.

But if I'm still staging things into $DESTDIR[0], either library.so
won't be found or (if -L$DESTDIR/'$(libdir)' is passed) the wrong path
is added to RUNPATH. I know we should be using the .la file[1] and
libtool will then get things right, but then it would be my job to find
the .la file and put it into the Makefile (and if this is Debian, there
are no .la files for system provided libraries for the normal case).

Is there a way of having libtool find the .la file if it exists in
directories provided (via "-L", or something libtool specific?) or find
the .so file as usual if the .la file is not around?

Or maybe there is another way to support all three scenarios above?

Thanks,
Ondrej

[0]. Say staging libraries with a circular dependency like
     libldap/libsasl2 do
[1]. 
https://www.gnu.org/software/libtool/manual/html_node/Linking-executables.html

-- 
Ondřej Kuzník                                                                   
                                                                                
                                                                                
                                               
Senior Software Engineer                                                        
                                                                                
                                                                                
                                               
Symas Corporation                  http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP



reply via email to

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