I've discussed the SWIG Perl module build process with various people on PerlMonks.org and they recommended a more robust and appropriate solution to building Perl modules in SWIG which is to generate a Makefile.PL and use ExtUtils::MakeMaker to do the build process. This is the de facto standard method by which all Perl CPAN modules build themselves when you install them and it's robust since ExtUtils::MakeMaker takes care of finding for you exactly how to generate the correct build commands and options for your Perl installation, environment and OS, etc. ExtUtils::MakeMaker is part of the Perl distribution so everyone who has Perl has it. Now the recommendation is to have SWIG auto-generate the Makefile.PL and a couple other necessary files during the swig -perl example.i command. Then users do the typical Perl module building and installing commands:
What I need to provide for you is a representative SWIG Perl module Makefile.PL and the other necessary files and show what parts can be variable for the SWIG auto-generate process to know what to do. Does this sound like a good idea you all of you?
BTW the updated commands I provided earlier are still good and correct for the "quick start tutorial" as they fix what was there before and manually do the same thing that ExtUtils::MakeMaker actually does in a gcc compiler environment.
On Fri, Mar 25, 2011 at 9:02 PM, William S Fulton <email@example.com> wrote:
Thanks for suggestions. I've updated the tutorial as suggested. Please check it and confirm it is correct. I don't get those warnings though with latest SWIG.
Hi William - sorry I forgot to say that I tested it with swig 1.3.29 on RHEL5 which came from swig rpm package. I'm glad with 2.0.x these warnings are fixed