[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake and shared libraries
From: |
Philip Graham Willoughby |
Subject: |
Re: automake and shared libraries |
Date: |
Tue, 29 Jul 2003 18:35:10 +0100 |
User-agent: |
Mutt/1.4.1i |
On 2003-07-29 17:52:32 +0000, Andrew Suffield wrote:
> On Tue, Jul 29, 2003 at 02:34:14PM +0200, Mattias Br?ndstr?m wrote:
> > librkcone_LDADD = common/libcommon.a
> >
> > is for some reason not a portable thing to do?
>
> A static or convenience library is usually built without -fPIC, so
> it can't be included in a shared library.
I generally feel that if it's worth making it a separate entity you may
as well install it as a separate entity -- in this case I would do:
pkglib_LTLIBRARIES=common/libcommon.la
librkcone_LDADD=common/libcommon.la
Which will work everywhere (ish). The problem with this approach is
that if someone not using libtool links against $(libdir)/librkcone.so
they will get undefined references to the symbols in
$(pkglibdir)/libcommon.so. A solution to this is to force everyone to
use libtool/automake/autoconf, which I personally don't have a problem
with.
Note that some architectures allow the library dependency information to
be embedded in the shared library so this won't be a problem on these
systems provided libtool is smart enough to do it.
Regards,
Philip Willoughby
Systems Programmer, Department of Computing, Imperial College, London, UK
--
echo address@hidden | tr "bizndfohces" "pwgd9ociaku"
Why reinvent the wheel? Because we can make it rounder...