libtool
[Top][All Lists]
Advanced

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

Re: static vs. shared libraries


From: Vikram Ambrose
Subject: Re: static vs. shared libraries
Date: Mon, 09 Jun 2008 13:17:50 -0400
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

John Calcote wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have two library projects (flaim and ftk), one built atop the other.
I've configured the lower-level project (ftk) as its own project and
made it a sub-project of the other, wrt Autoconf:

flaim/
  ftk/

I'd like the option of statically linking ftk into flaim, but (as per
the Libtool docs) using any of the "-static*" options in the flaim
project ensures not only that ftk is linked statically into flaim, but
also (unfortunately) that flaim itself becomes a static library (only).

Ideally, I'd like to build both shared and static ftk libraries, but
choose to link ftk statically into flaim using a flaim configure option.
Is there any elegant way to do this, or is there some reason why doing
so is considered bad practice? I've found over the years that if
something's not easily possible, it's usually because it's not the right
thing to do.

Comments?

Thanks!
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFITWcTdcgqmRY/OH8RAsK6AJ0V19YLCKgo6+3rwWlEvLNwCHjgJQCgk5Xk
hCayiobM1dOQzwUDi6g+SDs=
=i4/S
-----END PGP SIGNATURE-----


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool
I suppose you can make libftk.a a dependency of libflaim.so and use lib_LIBRARIES to build libftk.a instead of libtool when building it as part of libflaim.so, or AM_SUBST something to make it use libtool when you need it to.


--
Vikram Ambrose | Linux Products Division | WindRiver Corporation





reply via email to

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