Here's a patch that implements the change I spoke of on dbi-users. I'm
submitting this for your review. It's been tested only on a Gentoo AMD64
system.
The larger problem here, is that Makefile.PL uses the last compiler option it
finds. So if there happen to be a series of ifdef's or ifeq's then the last
of the series will be the one whose compiler options get chosen. It would
probably be a good idea to have Makefile.PL, when faced with choices like
this, make an intelligent decision based upon the characteristics of the host
compiler. How difficult could that be? ;-)
Thanks,
Tom
--
it's tough to handle, this fortune and fame. everybody's so different. i
haven't changed. -- james gang
Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 9402)
+++ Makefile.PL (working copy)
@@ -1119,7 +1119,7 @@
$edit{COMPOBJS} = q{
# Firstly a Solaris specific edit:
$_ = del_crtobj($_) if $os eq 'solaris';
-
+
# Delete any object files in COMPOBJS that don't actually exist
my $of;
foreach $of (split(/=|\s+/)) {
@@ -1135,6 +1135,10 @@
my $incompat_ext = ($MK{OBJ_EXT} && $MK{OBJ_EXT} !~ /^\./);
warn "OBJ_EXT correction enabled ($MK{OBJ_EXT})\n" if $incompat_ext;
+ # Don't include compiler options for these compilers
+ my @ignore_def = qw( BUILD_CCC296 BUILD_ICC );
+ my %ignore_def; @[EMAIL PROTECTED] = ('1') x @ignore_def;
+
my $mkver = 0;
my $lastline = '';
my @lines = read_inc_file($file);
@@ -1150,6 +1154,14 @@
s/\.(\$\(LIB_EXT\))/$1/g;
}
+ # skip compiler options for undesirable compilers
+ m/^ifdef (\w+)/ and do {
+ if ($ignore_def{$1}) {
+ $_ = shift @lines until m/^endif/;
+ next;
+ }
+ };
+
if (m!^([-\w/+.\$()\s]+)\s*:+\s*([^=]*)!) { # skip targets
my @tgts = split(/ /, $1); # multiple target names in Oracle9i's demo_rdbms.mk
for (@tgts) { $mk_target_deps{$_} = $2 || '' }