From: Gurusamy Sarathy Date: Fri, 24 Sep 1999 16:09:23 +0000 (+0000) Subject: support cygwin and other platforms that link to import libraries X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6fbb8a80bb346d2cf570d95f2cd4a86144bf596;p=p5sagit%2Fp5-mst-13.2.git support cygwin and other platforms that link to import libraries rather than directly with shared libraries (from a suggestion by Lucian Cionca ) p4raw-id: //depot/perl@4224 --- diff --git a/utils/perlcc.PL b/utils/perlcc.PL index ad2543a..a585580 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -375,7 +375,9 @@ sub _ccharness my $libs = _getSharedObjects($sourceprog); - my $cccmd = "$Config{cc} $Config{ccflags} $optimize $incdir " + my $ccflags = $Config{ccflags}; + $ccflags .= ' -DUSEIMPORTLIB' if $Config{osname} =~ /cygwin/i; + my $cccmd = "$Config{cc} $ccflags $optimize $incdir " ."@args $dynaloader $linkargs @$libs"; _print ("$cccmd\n", 36); @@ -467,7 +469,8 @@ sub _lookforAuto my ($relabs, $relshared); my ($prefix); my $return; - my $sharedextension=$^O eq 'MSWin32' ? '.lib':$Config{so}; + my $sharedextension = $^O =~ /MSWin32|cygwin|os2/i + ? $Config{_a} : ".$Config{so}"; ($prefix = $file) =~ s"(.*)\.pm"$1"; my ($tmp, $modname) = ($prefix =~ m"(?:(.*)[\\/]){0,1}(.*)"s);