1 package ExtUtils::CBuilder::Platform::Unix;
4 use ExtUtils::CBuilder::Base;
6 use vars qw($VERSION @ISA);
8 @ISA = qw(ExtUtils::CBuilder::Base);
12 my $cf = $self->{config};
14 # Some platforms (notably Mac OS X 10.3, but some others too) expect
15 # the syntax "FOO=BAR /bin/command arg arg" to work in %Config
16 # (notably $Config{ld}). It usually works in system(SCALAR), but we
17 # use system(LIST). We fix it up here with 'env'.
19 local $cf->{ld} = $cf->{ld};
21 unshift @{$cf->{ld}}, 'env' if $cf->{ld}[0] =~ /^\s*\w+=/;
23 $cf->{ld} =~ s/^(\s*\w+=)/env $1/;
26 return $self->SUPER::link(@_);