Libtool and Support for Shared Libraries (3)

Greg Banks gnb at fastmail.fm
Tue Jun 5 03:02:21 EDT 2012



On Mon, Jun 4, 2012, at 04:22 PM, Дилян Палаузов wrote:
> Hello,
> 
> then I suggest to build both static and shared libraries, to link all 
> services and user programmes with the shared libraries, to link the 
> IMAP.so and manageiseve.so files with the static libraries, and resolve 
> by this way the need to insert RPATH in IMAP.so and managesieve.so .

Using noinst_LTLIBRARIES to create a "non-static convenience library"
(in libtool's terminology) whose only purpose is to get linked into
IMAP.so and managesieve.so ?  This might work.

> I guess libtool has to be run for every step, and this makes the things 
> very messy.

Maybe not. According to the libtool documentation, you can convince
"libtool --mode=link" to build a native .a file using the obvious
options "-o foo.a".  So you might be able to convince the main
Makefile.am to build a native .a and link against that in the MakeMaker
makefile.

> Running libtool with --quiet during "make install DESTDIR=" (achieved by 
> "make install DESTDIR=... LIBTOOLOPTIONS=--quiet") steal leads to 
> warnings that the shared libraries are not installed on their final 
> destination.

Ah, libtool... :(

>From the documention it looks like using -R $(libdir) instead of -rpath
$(libdir) might be useful.

-- 
Greg.


More information about the Cyrus-devel mailing list