sub maybe_command {
my($self,$file) = @_;
- return "$file.exe" if -e "$file.exe";
+ my @e = exists($ENV{'PATHEXT'})
+ ? split(/;/, $ENV{PATHEXT})
+ : qw(.com .exe .bat .cmd);
+ my $e = '';
+ for (@e) { $e .= "\Q$_\E|" }
+ chop $e;
+ # see if file ends in one of the known extensions
+ if ($file =~ /($e)$/i) {
+ return $file if -e $file;
+ }
+ else {
+ for (@e) {
+ return "$file$_" if -e "$file$_";
+ }
+ }
return;
}
{
$self->{'LDLOADLIBS'}
||= ( $BORLAND
- ? 'import32.lib cw32mti.lib '
- : ( $OBJ ? '' : 'msvcrt.lib ' )
- .'oldnames.lib kernel32.lib comdlg32.lib winspool.lib gdi32.lib '
+ ? 'import32.lib'
+ : # compiler adds msvcrtd?.lib according to debug switches
+ 'oldnames.lib kernel32.lib comdlg32.lib winspool.lib gdi32.lib '
.'advapi32.lib user32.lib shell32.lib netapi32.lib ole32.lib '
- .'oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib '
- ) . ' odbc32.lib odbccp32.lib';
+ .'oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib'
+ ) . ' $(LIBC) odbc32.lib odbccp32.lib';
}
$self->{'DEV_NULL'} = '> NUL';
# $self->{'NOECHO'} = ''; # till we have it working
sub perl_archive
{
+ my ($self) = @_;
if($OBJ) {
- return '$(PERL_INC)\perlcore$(LIB_EXT)';
+ if ($self->{CAPI} eq 'TRUE') {
+ return '$(PERL_INC)\perlCAPI$(LIB_EXT)';
+ }
}
- return '$(PERL_INC)\perl$(LIB_EXT)';
+ return '$(PERL_INC)\\'.$Config{'libperl'};
}
sub export_list
=cut
sub manifypods {
+ my($self) = shift;
return "\nmanifypods :\n\t$self->{NOECHO}\$(NOOP)\n";
}