$GCC = 1 if $Config{'cc'} =~ /^gcc/i;
$DMAKE = 1 if $Config{'make'} =~ /^dmake/i;
$NMAKE = 1 if $Config{'make'} =~ /^nmake/i;
+$OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i;
sub dlsyms {
my($self,%attribs) = @_;
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 '
- : '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
');
if ($GCC) {
push(@m,
- q{ $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS)
+ q{ dlltool --def $(EXPORT_LIST) --output-exp dll.exp
+ $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
$(LD) -o $@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp });
} else {
sub perl_archive
{
- return '$(PERL_INC)\perl$(LIB_EXT)';
+ my ($self) = @_;
+ if($OBJ) {
+ if ($self->{CAPI} eq 'TRUE') {
+ return '$(PERL_INC)\perlCAPI$(LIB_EXT)';
+ }
+ }
+ return '$(PERL_INC)\\'.$Config{'libperl'};
}
sub export_list
=cut
sub manifypods {
+ my($self) = shift;
return "\nmanifypods :\n\t$self->{NOECHO}\$(NOOP)\n";
}