By default, Compress::Zlib builds exactly the way I want. By bundling the zlib C library, the normal:
perl Makefile.PL make make test make install
just works and the resulting Zlib.so (Zlib.dll on Windows) contains the zlib C code -- and so is independent of any zlib library that happens to be installed on the target system, works even if zlib is not installed on the target system, and can be installed without requiring root permissions.
I'd like to do the same thing with XML::Parser (and its companion C expat library) but, being a MakeMaker novice, I'm struggling.
I started by installing the expat C library. I then installed XML::Parser with:
All tests passed. So far, so good. Now, as a test, I removed the expat C library from /usr/local/lib and XML::Parser failed on AIX and Solaris. Curiously, it continued to work fine on Linux.perl Makefile.PL EXPATLIBPATH=/usr/local/lib EXPATINCPATH=/usr/local/i +nclude make make test make install
What I want is to ensure the expat C code gets stuffed into Expat.so (just as the zlib C code gets stuffed into Zlib.so). I was able to achieve that by crudely changing this section of code in Expat/Makefile.PL:
from:WriteMakefile( NAME => 'XML::Parser::Expat', C => ['Expat.c'], LIBS => $libs, XSPROTOARG => '-noprototypes', VERSION_FROM => 'Expat.pm', @extras );
to:LIBS => $libs,
Anyone know a better way to do it?OBJECT => "Expat.o /usr/local/lib/libexpat.a",
In reply to Building XML::Parser and expat standalone by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |