Tom Tromey writes:
> >>>>> "Jeremy" == Jeremy Slade <[EMAIL PROTECTED]> writes:
>
> Jeremy> What I really want to build is 'swigShapeUtils.sl', which
> Jeremy> corresponds to the swigShapeUtils.pm module. But automake
> Jeremy> complains:
>
> Jeremy> automake: src/perl/swig/Makefile.am: `swigShapeUtils.la' is not a
> Jeremy> standard libtool library name
>
> Rename it back to what you want and `-module' into
> `swigShapeUtils_la_LDFLAGS'.
>
> This should be documented, but it isn't. I've written a patch for the
> manual which I'll check in shortly.
Okay, did that, now it's at least happier about the library name...
> Jeremy> Anyway, once I make that little change, it builds a shared lib
> Jeremy> that doesn't have a bunch of symbols in it, because they are
> Jeremy> evidently expected to be in another shared lib at runtime.
> Jeremy> These appear to be the symbols that I was hoping to get from
> Jeremy> -lShapeUtils (see the LIBADD line above).
>
> Try putting the -L and -l options into _LDADD and not _LIBADD.
First, it complained that I should use _LIBADD and not _LDADD. Not
sure if that is significant...
So, now I try to build swigShapeUtils.sl, and get the following output
during the make process:
*** Warning: This library needs some functionality provided by -lShapeUtil.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module swigShapeUtils. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
I don't really understand this whole libtool process yet. It seems
that what I really what is to create swigShapeUtils.sl using the
original ../../lib/*.lo files build earlier (and used to create
libShapeUtils.sl), rather than create swigShapeUtils.sl with a
run-time dependency on libShapeUtils.sl (which of course isn't
installed at the time I'm build swigShapeUtils.sl). In short, I think
I ultimately want:
ld -b -E -o swigShapeUtils.o swigShapeUtils.lo ../../lib/*.lo
and not
ld -b -E -o swigShapeUtils.o swigShapeUtils.lo -L../../lib -lShapeUtils
But how do I achieve that?
Taking it one step farther: swigShapeUtils also has a dependency on
-lMiscContrib, which has been installed at this point. But there
again, I would much rather have swigShapeUtils.sl build using the
original *.lo that comprise libMiscContrib.sl rather than linking
against -lMiscContrib and therefore having that run-time dependency.
Any reasonable way to do that?
Jeremy
btw, here's my current Makefile.am:
--------------------------------------------------
perllib_DATA = swigShapeUtils.pm
perllibarch_LTLIBRARIES = swigShapeUtils.la
swigShapeUtils_la_SOURCES = swigShapeUtils.C
swigShapeUtils_la_LDFLAGS = -module
swigShapeUtils_la_LIBADD = \
-L../../lib -lShapeUtil \
-L$(REUSELIB)/lib -lMiscContrib
INCLUDES = -I$(PERL_ARCHLIBCORE) -I../../lib -I$(REUSELIB)/include
swigShapeUtils.C: ShapeUtils.i
$(SWIG) $(SWIG_CXXFLAGS) $(SWIG_NORUNTIME) -dnone -o $@ $^
ShapeUtils.i: Shape.i ShapeRegion.i scaled.i
--------------------------------------------------
--
Jeremy Slade
Hewlett-Packard Company VLSI Technology Center - http://cpus.hp.com/
[EMAIL PROTECTED] (970) 898-7881