automake
[Top][All Lists]
Advanced

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

Re: building static libraries for modules


From: Ralf Wildenhues
Subject: Re: building static libraries for modules
Date: Mon, 4 Sep 2006 10:27:46 +0200
User-agent: Mutt/1.5.12 (2006-08-10)

Hello Tommi,

* Tommi Mäkitalo wrote on Mon, Sep 04, 2006 at 10:08:24AM CEST:
> 
> I have a library, which builds libtool-modules. I wonder, why automake builds 
> static libraries at all for them. These *.a-files are pretty useless, because 
> modules can't be linked at all. Libraries must have the lib-prefix to be 
> linkable, but modules don't.

With libltdl, Libtool also offers a way to simulate modules when linking
statically, see http://www.gnu.org/software/libtool/manual.html#Dlpreopening

> Here is what I have in my Makefile.am:
> 
> lib_LTLIBRARIES = tntdb-postgresql.la
> tntdb_postgresql_la_SOURCES = $(sources)
> tntdb_postgresql_la_LDFLAGS = @PG_LDFLAGS@ -module -version-info @sonumber@

To disable building of static libraries, here's a set of possibilities:
http://lists.gnu.org/archive/html/libtool/2006-02/msg00045.html
One should add that LIBTOOLFLAGS/AM_LIBTOOLFLAGS/target_LIBTOOLFLAGS are
a feature of Automake-1.9b (thus will be present in 1.10, but are not in
1.9.6).

FWIW, I would not install modules into $(libdir), but that's certainly a
matter of policy.

Cheers,
Ralf




reply via email to

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