Hi!
I'm writing a C++ library along with a wrapper for Python (generated
by SWIG), and I'm using Autotools for building it all. The way I
build it, I have one core library, of the form libfoo.la, and one
wrapper library, _foo.la. The _foo.la library (or, rather, _foo.so or
the like) will be dynamically loaded into the Python interpreter.
This seems to work nicely ... mostly. But the problem is that I write
my test suite in Python, so I need to dynamically load _foo.so before
installing, and that doesn't seem to be altogether straightforward.
The problem is (as I'm sure you already understand) that _foo.so
refers to the libfoo.la file -- but at the -rpath location.
I see that Libtool goes to great lengths to have things work before
installing -- but I haven't been able to make it do what I need. The
automatic relinking of executables, for example, doesn't apply. I had
some hopes when I discovered the --enable-fast-install=no option, but
that didn't do anything either, as far as I can see. When I came
across the following quote in the manual, I was rather discouraged:
"In the current implementation, libtool libraries may not depend on
other uninstalled libtool libraries."
Does this mean that I can't do what I'm trying to do -- that is, that
there is no switch or mechanism in Autotools (or, more specifically,
Libtool) that will make it work?
If so, what would be the "best" approach to get a similar effect? I
can see a couple of possibilities, at least:
- Statically link _foo.la with libfoo.la, so there is no dependency
(but a *slight* bloat :)
- Do some Automake magic (or just add some instructions to the
README file,
though that would break distcheck) to run configure and install
in a
sandbox before testing (rather cumbersome)
Any other suggestions or input?
--
Magnus Lie Hetland
http://hetland.org
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool