Subject: | 0.29 builds only with g++ compiler |
Hi,
The 0.29 distro is effectively hard coded to use only g++ as the compiler.
Here is a patch to Makefile.PL that addresses this shortcoming.
##############################
--- Makefile.PL_orig 2011-11-13 20:56:58 +1100
+++ Makefile.PL 2011-11-13 20:56:03 +1100
@@ -71,8 +71,8 @@
close CPP;
for (@lines) {
- s|\@COMPILER|$cpp_compiler| if m|\# default compiler|;
- s|\@DEFAULTLIBS|$libs| if m|\# default libs|;
+ $_ = " \$o->{ILSM}{MAKEFILE}{CC} ||= '$cpp_compiler'; # default
compiler\n" if $_ =~ /# default compiler/;
+ $_ = " \$o->{ILSM}{MAKEFILE}{LIBS} ||= ['$libs']; # default
libs\n" if $_ =~ /# default libs/;
}
open CPP, ">CPP.pm"
##############################
I'm sure there are alternative approaches that could be taken to resolve
this.
Note that the above patch relies on the presence of the comments "#
default compiler" and "#default libs" to work - probably not a good
practice. If those comments are removed from CPP.pm (or altered in such
a way that the matching regex no longer works) then the source is broken
again.
Cheers,
Rob