[Top][All Lists]

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

Re: shared libtool noinst_ or check_ libraries?

From: Ralf Wildenhues
Subject: Re: shared libtool noinst_ or check_ libraries?
Date: Fri, 1 Dec 2006 10:04:09 +0100
User-agent: Mutt/1.5.13 (2006-11-01)

Hello Jan,

* Jan Nieuwenhuizen wrote on Thu, Nov 30, 2006 at 11:06:34PM CET:
> I am writing a tool*) to generate files.
> *)

FWIW, there's no documentation reachable from that URL, so it's not
really easy to understand what this tool intends to achieve.

> I would like to produce shared libraries for unit tests with automatic
> registration.  I have tried
>     # FIXME: check_libraries are always static?
>     check_LTLIBRARIES =

Two pieces playing together here: For `libtool --mode=link' to create a
shared library, it needs an argument of `-rpath $dir' passed, pointing
to where that library should eventually be reachable at.[1]
Automake now adds such an argument of `-rpath $<FOO>dir' for libraries
mentioned in a <FOO>_LTLIBRARIES variable, where FOO is different from
noinst or check.  For the latter two, if you need a shared library, you
could just add that argument manually, e.g., by
  libtest_foo_la_LDFLAGS = -rpath /foo $(AM_LDFLAGS)

If you never intend to actually install the library anywhere, it doesn't
really matter which path name you supply here.

See for
more information.

> but both produce static libraries.  In I have

These two are synonyms, using just the latter is sufficient.

Hope that helps.


[1] This is necessary but not sufficient.  Shared libraries must not
have been turned off, e.g., by --disable-shared, or on a system where
libtool does not know how to create them.

reply via email to

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