X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fgenconfig.pl;h=6e9df703ebd9cad3c0aa368fbbbe28b7b3a5d6c3;hb=57c348a981665d6305f7f38920ab85e57a77ae65;hp=a1df9c1362ec20fba4be30b34a1c463dea7a22b6;hpb=7aa5c81fb93ce6741dd5751e93d46dc87d2c1c61;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/genconfig.pl b/vms/genconfig.pl index a1df9c1..6e9df70 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -6,16 +6,18 @@ # 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. 16-Feb-1998 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 @@ -24,6 +26,7 @@ if ($ARGV[0] eq '-f') { open(ARGS,$ARGV[1]) or die "Can't read data from $ARGV[1]: $!\n"; @ARGV = (); while () { + chomp; push(@ARGV,split(/\|/,$_)); } close ARGS; @@ -50,6 +53,8 @@ $archsufx = `Write Sys\$Output F\$GetSyi("HW_MODEL")` > 1024 ? 'AXP' : 'VAX'; ($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 <= 5.2 and $vmsver >= 7) { $rtlnew = 'define'; } + else { $rtlnew = 'undef'; } + } + else { $rtlhas = $rtlnew = '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"; + } + print OUT "d_stdio_ptr_lval_sets_cnt='undef'\n"; + print OUT "d_stdio_ptr_lval_nochange_cnt='undef'\n"; + foreach (qw[ d_gettimeod d_uname d_truncate d_wait4 d_index + d_pathconf d_fpathconf d_sysconf d_sigsetjmp ]) { + print OUT "$_='$rtlnew'\n"; + } next; } elsif ($key eq 'exe_ext') { @@ -234,19 +330,21 @@ while () { $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"; } @@ -256,13 +354,16 @@ while () { # 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";} } @@ -273,6 +374,9 @@ close IN; # as the manifest for the obsolete variable $d_eunice. print OUT "d_eunice='undef'\n"; delete $pp_vars{VMS}; +# XXX temporary -- USE_5005THREADS is currently on CC command line +delete $pp_vars{'USE_5005THREADS'}; + foreach (sort keys %pp_vars) { warn "Didn't see $_ in $infile\n"; } @@ -296,15 +400,21 @@ else { warn "Can't read ${outdir}crtl.opt - skipping 'libs' & 'libc'"; } if (open(PL,"${outdir}patchlevel.h")) { while () { - if (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; } - elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; } + if (/^#define PERL_VERSION\s+(\S+)/) { + print OUT "PERL_VERSION='$1'\n"; + print OUT "PATCHLEVEL='$1'\n"; # XXX compat + } + elsif (/^#define PERL_SUBVERSION\s+(\S+)/) { + print OUT "PERL_SUBVERSION='$1'\n"; + print OUT "SUBVERSION='$1'\n"; # XXX compat + } } close PL; } 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'; } }