summaryrefslogtreecommitdiff
path: root/utils/perlcc.PL
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-09 21:11:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-09 21:11:51 +0000
commit46a8855a50eb32c89dd161fbf5c3956ca0e452d8 (patch)
treea4a37862e6e1d8a6e16661b534a1603d995a2b20 /utils/perlcc.PL
parentb5ce6607ab4b332cfeb9911174599b4208a0bc29 (diff)
downloadperl-46a8855a50eb32c89dd161fbf5c3956ca0e452d8.tar.gz
perlcc on win32 (correct version of fix suggested by Jean-Louis
Leroy <jll@skynet.be>) p4raw-id: //depot/perl@3351
Diffstat (limited to 'utils/perlcc.PL')
-rw-r--r--utils/perlcc.PL26
1 files changed, 14 insertions, 12 deletions
diff --git a/utils/perlcc.PL b/utils/perlcc.PL
index 7aca1d8726..afad20a2b4 100644
--- a/utils/perlcc.PL
+++ b/utils/perlcc.PL
@@ -308,16 +308,18 @@ sub _ccharness
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);
@@ -331,16 +333,16 @@ sub _getSharedObjects
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";