At times we must make do with what we have:

I'm working with a team of C++ programmers.  To provide Perl access to their
code they are using SWIG, which produces a .pm and a (big fat) .so file.
 The question is how to turn this into a distribution that can be installed
in the correct place.

Target platform is all the same so no real concern about portability at this
time (famous last words).  We can just copy into @INC I suppose, although
the plan is to use cpan2rpm so really would like a distribution (with a
Makefile.PL).

I've always used XS before that builds a "real" distribution where the .xs
is compiled and linked at build time and MakeMaker figures out where to
install.  But, that's just not what I have, unfortunately.

To get by could I just make a normal distribution and add in the .so file
into the lib directory?   Then let MakeMaker install? That seems ugly (not
to mention platform dependent).

Any other suggestions how to package up these so they can be installed in a
normal "make install" for a stop-gap measure for now?

My suggestion is to move to autoconf to build libraries and use thin XS
wrappers, but that's a bigger project than anyone is willing to take on
right now.

BTW -- poking around Google there seems to be debate about SWIG vs. XS (and
Inline), and often it seems like SWIG is preferred.  Hard to believe since
it makes such odd code with werid naming (use "foo";  $foo = foo::Foo->new)
and sub TIEHASH.

-- 
Bill Moseley
mose...@hank.org

Reply via email to