[Top][All Lists]

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

Re: Shared library location

From: Ralf Wildenhues
Subject: Re: Shared library location
Date: Sat, 6 Jun 2009 08:40:26 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Russell,

* Russell Shaw wrote on Fri, Jun 05, 2009 at 06:42:16PM CEST:
> In my code that isn't installed, i dlopen "":
>   ~/home/russ/myproj/src/libdir/
> When i "make install", i want the dlopen to get
> from a system location:
>   /usr/lib/
> What "make" variable can i utilize that has a value
> dependent on whether the package is installed or not?

Typically, projects that create modules use libtool to do so, and use
  libtool --mode=execute -dlopen libdir/ ./program ...

to run an uninstalled program, while they use
  program ...

to run an installed program.  The former ensures that dlopening
will find the uninstalled library.

Should you not use libtool, you could still use wrapper scripts for your
uninstalled programs to prefer uninstalled libraries, config files, etc.
The Automake package does this too, with the tests/address@hidden@
and tests/address@hidden@ wrappers.

Hope that helps.


reply via email to

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