On 10 December 2017 at 01:48, Bruno Haible <[email protected]> wrote:

> Hi Reuben,
>
> > > ​I have a relocatable library that depends on files in pkgdatadir.​
> >
> > ​So, the shared library calls relocate. relocate tries to compute
> > curr_prefix_better, using get_shared_library_fullname. This will have a
> > prefix of libdir (or bindir on Win32). This is why I am setting
> INSTALLDIR
> > to libdir (but need bindir on Win32).
>
> Oh, I see. Yes, after reading the code I confirm your finding:
>
> INSTALLDIR should be defined
>
> 1) for the code in the relocatable library (only needed if
>    ENABLE_COSTLY_RELOCATABLE is not defined to 0). Its value should
>    be a C string that contains (for a shared library) the installation
> directory
>    of the shared library; often this will be $(libdir) on Unix excluding
> Cygwin,
>    or $(bindir) on Windows or Cygwin.
>
> 2) for the code that makes use of the relocatable library, that is, that
> invokes
>    set_program_name. Its value should be a C string that contains the
> installation
>    directory of the program; often this will be $(bindir).


Thanks very much for the confirmation. For case 1, am I correct in thinking
there is no variable that contains this directory, i.e. "the directory
where shared libraries are installed"?  As far as I can tell, this
directory is computed by libtool, and I can't see a better way than
effectively recomputing it, that is, use bindir when the platform is
cygwin, mingw or cegcc, and libdir otherwise.

-- 
https://rrt.sc3d.org

Reply via email to