automake
[Top][All Lists]
Advanced

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

Re: Shared library location


From: Russell Shaw
Subject: Re: Shared library location
Date: Sat, 06 Jun 2009 17:15:38 +1000
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Russell Shaw wrote:
Ralf Wildenhues wrote:
Hello Russell,

* Russell Shaw wrote on Fri, Jun 05, 2009 at 06:42:16PM CEST:
In my code that isn't installed, i dlopen "my.so":

  ~/home/russ/myproj/src/libdir/my.so

When i "make install", i want the dlopen to get my.so
from a system location:

  /usr/lib/my.so

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/my.la ./program ...

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

to run an installed program.  The former ensures that dlopening my.so
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.

Hi,
I figured it out by making the program look for a header file
#define that happens to be deleted for an installed header file.
I edited the header file using an "install-data-hook".

I found that doesn't work how i wanted. Ignore.




reply via email to

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