# that went into your perl binary. In addition, values which change from run
# to run may be supplied on the command line as key=val pairs.
#
-# Rev. 23-Apr-1996 Charles Bailey bailey@genetics.upenn.edu
+# Rev. 10-Nov-1997 Charles Bailey bailey@newman.upenn.edu
#
#==== Locations of installed Perl components
$prefix='perl_root';
$builddir="$prefix:[000000]";
$installbin="$prefix:[000000]";
+$installscript="$prefix:[000000]";
$installman1dir="$prefix:[man.man1]";
$installman3dir="$prefix:[man.man3]";
$installprivlib="$prefix:[lib]";
+$installsitelib="$prefix:[lib.site_perl]";
unshift(@INC,'lib'); # In case someone didn't define Perl_Root
# before the build
($vers = $]) =~ tr/./_/;
$installarchlib = VMS::Filespec::vmspath($installprivlib);
$installarchlib =~ s#\]#.VMS_$archsufx.$vers\]#;
+$installsitearch = VMS::Filespec::vmspath($installsitelib);
+$installsitearch =~ s#\]#.VMS_$archsufx\]#;
($osvers = `Write Sys\$Output F\$GetSyi("VERSION")`) =~ s/^V?(\S+)\s*\n?$/$1/;
print OUT <<EndOfIntro;
eunicefix=':'
hint='none'
hintfile=''
-intsize='4'
-alignbytes='8'
-shrplib='define'
+useshrplib='define'
usemymalloc='n'
usevfork='true'
-useposix='false'
spitshell='write sys\$output '
dlsrc='dl_vms.c'
binexp='$installbin'
prefix='$prefix'
builddir='$builddir'
installbin='$installbin'
+installscript='$installscript'
installman1dir='$installman1dir'
installman3dir='$installman3dir'
installprivlib='$installprivlib'
installarchlib='$installarchlib'
+installsitelib='$installsitelib'
+installsitearch='$installsitearch'
+path_sep='|'
+startperl='\$ perl 'f\$env("procedure")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !
+\$ exit++ + ++\$status != 0 and \$exit = \$status = undef;'
EndOfIntro
foreach (@ARGV) {
print OUT "gccversion='$1'\n";
}
elsif ($archsufx eq 'VAX' &&
- `$val/NoObject/NoList /prefix=all _nla0:` =~ /IVQUAL/) {
+ # Check exit status too, in case message is turned off
+ ( `$val/NoObject/NoList /prefix=all _nla0:` =~ /IVQUAL/ ||
+ $? == 0x38240 )) {
$cctype = 'vaxc';
$d_attr = 'undef';
}
# object file suffix if it's not .obj.
$ccflags =~ s#/obj(?:ect)?=[^/\s]+##i;
}
+ $debug = $optimize = '';
+ while ( ($qual) = $ccflags =~ m|(/(No)?Deb[^/]*)|i ) {
+ $debug = $qual;
+ $ccflags =~ s/$qual//;
+ }
+ while ( ($qual) = $ccflags =~ m|(/(No)?Opt[^/]*)|i ) {
+ $optimize = $qual;
+ $ccflags =~ s/$qual//;
+ }
+ $optimize = "$debug$optimize";
print OUT "ccflags='$ccflags'\n";
+ print OUT "optimize='$optimize'\n";
+ $usethreads = ($ccflags =~ m!/DEF[^/]+USE_THREADS!i and
+ $ccflags !~ m!/UND[^/]+USE_THREADS!i);
+ print OUT "usethreads='$usethreads'\n";
$dosock = ($ccflags =~ m!/DEF[^/]+VMS_DO_SOCKETS!i and
$ccflags !~ m!/UND[^/]+VMS_DO_SOCKETS!i);
print OUT "d_vms_do_sockets=",$dosock ? "'define'\n" : "'undef'\n";
print OUT "d_select=",$dosock ? "'define'\n" : "'undef'\n";
print OUT "i_niin=",$dosock ? "'define'\n" : "'undef'\n";
print OUT "i_neterrno=",$dosock ? "'define'\n" : "'undef'\n";
+ if ($dosock and $cctype eq 'decc' and $ccflags =~ /DECCRTL_SOCKETS/) {
+ print OUT "selecttype=fd_set\n";
+ }
+ else { print OUT "selecttype=int\n"; }
+
+ if ($cctype eq 'decc') { $rtlhas = 'define'; print OUT "useposix='true'\n"; }
+ else { $rtlhas = 'undef'; print OUT "useposix='false'\n"; }
+ foreach (qw[ d_stdstdio d_stdio_ptr_lval d_stdio_cnt_lval d_stdiobase
+ d_locconv d_setlocale i_locale d_mbstowcs d_mbtowc
+ d_wcstombs d_wctomb d_mblen d_mktime d_strcoll d_strxfrm ]) {
+ print OUT "$_='$rtlhas'\n";
+ }
next;
}
elsif ($key eq 'exe_ext') {
$val =~ s!\s*/\*.*!!; # strip off trailing comment
my($had_val); # Maybe a macro with args that we just #undefd or commented
if (!length($val) and $val_vars{$token} and ($un || $blocked)) {
- print OUT "$val_vars{$token}=''\n";
+ print OUT "$val_vars{$token}=''\n" unless exists $done{$val_vars{$token}};
+ $done{$val_vars{$token}}++;
delete $val_vars{$token};
$had_val = 1;
}
$state = ($blocked || $un) ? 'undef' : 'define';
if ($pp_vars{$token}) {
- print OUT "$pp_vars{$token}='$state'\n";
+ print OUT "$pp_vars{$token}='$state'\n" unless exists $done{$pp_vars{$token}};
+ $done{$pp_vars{$token}}++;
delete $pp_vars{$token};
}
elsif (not length $val and not $had_val) {
# Wups -- should have been shell var for C preprocessor directive
warn "Constant $token not found in config_h.SH\n";
- $token =~ tr/A-Z/a-z/;
+ $token = lc $token;
$token = "d_$token" unless $token =~ /^i_/;
print OUT "$token='$state'\n";
}
# Library directory; convert to VMS syntax
$val = VMS::Filespec::vmspath($val) if ($token =~ /EXP$/);
if ($val_vars{$token}) {
- print OUT "$val_vars{$token}='$val'\n";
- if ($val_vars{$token} =~ s/exp$//) {print OUT "$val_vars{$token}='$val'\n";}
+ print OUT "$val_vars{$token}='$val'\n" unless exists $done{$val_vars{$token}};
+ if ($val_vars{$token} =~ s/exp$//) {
+ print OUT "$val_vars{$token}='$val'\n" unless exists $done{$val_vars{$token}};;
+ }
+ $done{$val_vars{$token}}++;
delete $val_vars{$token};
}
elsif (!$pp_vars{$token}) { # Haven't seen it previously, either
warn "Constant $token not found in config_h.SH (val=|$val|)\n";
- $token =~ tr/A-Z/a-z/;
+ $token = lc $token;
print OUT "$token='$val'\n";
if ($token =~ s/exp$//) {print OUT "$token='$val'\n";}
}
else { warn "Can't read ${outdir}patchlevel.h - skipping 'PATCHLEVEL'"; }
# simple pager support for perldoc
-if (`most` =~ /IVVERB/) {
+if (`most not..file` =~ /IVVERB/) {
$pager = 'more';
if (`more nl:` =~ /IVVERB/) { $pager = 'type/page'; }
}