if (!grep(/^-[cS]$/, @args))
{
- my $lperl = $^O eq 'os2' ? '-llibperl' : '-lperl';
+ my $lperl = $^O eq 'os2' ? '-llibperl'
+ : $^O eq 'MSWin32' ? "$Config{archlibexp}\\CORE\\perl.lib"
+ : '-lperl';
my $flags = $type eq 'dynamic' ? $Config{lddlflags} : $Config{ldflags};
- $linkargs = "$flags $libdir $lperl @Config{libs}";
+ $linkargs = "$flags $libdir $lperl $Config{libs}";
}
my @sharedobjects = _getSharedObjects($sourceprog);
my $dynaloader = "$Config{'installarchlib'}/auto/DynaLoader/DynaLoader.a";
my $optimize = $Config{'optimize'} =~ /-O\d/ ? '' : $Config{'optimize'};
my $cccmd =
- "$Config{cc} @Config{qw(ccflags)} $optimize $incdir @sharedobjects @args $dynaloader $linkargs";
+ "$Config{cc} $Config{ccflags} $optimize $incdir @sharedobjects @args $dynaloader $linkargs";
_print ("$cccmd\n", 36);
my (@return);
local($") = " -I";
- if ($Config{'osname'} eq 'MSWin32')
{
- # _addstuff;
- }
- else
- {
- my ($tmpprog);
- ($tmpprog = $sourceprog) =~ s"(.*)[\/\\](.*)"$2";
- $tmpfile = "/tmp/$tmpprog.tst";
- $incfile = "/tmp/$tmpprog.val";
+ my ($tmpprog);
+ ($tmpprog = $sourceprog) =~ s"(.*)[\/\\](.*)"$2";
+ my $tempdir = '/tmp';
+ if ($Config{'osname'} eq 'MSWin32') {
+ $tempdir = $ENV{TEMP};
+ $tempdir =~ s[\\][/]g;
+ }
+ $tmpfile = "$tempdir/$tmpprog.tst";
+ $incfile = "$tempdir/$tmpprog.val";
}
my $fd = new FileHandle("> $tmpfile") || die "Couldn't open $tmpfile!\n";