automake
[Top][All Lists]
Advanced

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

Re: Dynamically loadable libraries and check_LTLIBRARIES primary


From: Ralf Wildenhues
Subject: Re: Dynamically loadable libraries and check_LTLIBRARIES primary
Date: Fri, 28 Oct 2005 10:04:09 +0200
User-agent: Mutt/1.5.11

Hi Matteo,

* address@hidden wrote on Thu, Oct 27, 2005 at 05:03:22PM CEST:
> 
> I am working on a portable plugin framework that relies on the autoconf,
> automake, libtool trio to achieve maximum portability. The framework builds
> the plugins as runtime dynamically linked modules with the following:
> lib_LTLIBRARIES =       module.la
> module_la_SOURCES =     module.cxx
> module_la_LDFLAGS =     -module -avoid-version -no-undefined
> 
> My aim is to package my plugin framework in such a way that it can be untarred
> into an existing project (lets say project X) and integrated into it by just
> telling automake to descend into its directory structure (i.e. by modifying
> project X's toplevel Makefile.am with SUBDIRS = plugin_framework ).

OK.  Most likely you'll also have to add plugin_framework/Makefile as
argument to the `AC_CONFIG_FILES' macro in configure.ac, or otherwise
make sure config.status instantiates it manually.  (The latter should
be possible, ask for details if you're interested.)

> All works fine and dandy, except for the following minor annoyance...
*snip*

[ check_LTLIBRARIES will be built as convenience archives by default,
  not shared modules ]

What you do is add `-rpath /nowhere' to module_la_LDFLAGS.  This is to
trigger libtool to not create a convenience archive.  It might seem a
bit weird, but for modules that are not intended to be installed, this
is a fine and documented workaround for the libtool semantics in this
case.

Cheers,
Ralf




reply via email to

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