summaryrefslogtreecommitdiff
path: root/vms/genconfig.pl
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1995-03-12 22:32:14 -0800
committerLarry Wall <lwall@netlabs.com>1995-03-12 22:32:14 -0800
commit748a93069b3d16374a9859d1456065dd3ae11394 (patch)
tree308ca14de9933a313dceacce8be77db67d9368c7 /vms/genconfig.pl
parentfec02dd38faf8f83471b031857d89cb76fea1ca0 (diff)
downloadperl-748a93069b3d16374a9859d1456065dd3ae11394.tar.gz
Perl 5.001perl-5.001
[See the Changes file for a list of changes]
Diffstat (limited to 'vms/genconfig.pl')
-rw-r--r--vms/genconfig.pl66
1 files changed, 52 insertions, 14 deletions
diff --git a/vms/genconfig.pl b/vms/genconfig.pl
index 18bc9851db..ca15aa7943 100644
--- a/vms/genconfig.pl
+++ b/vms/genconfig.pl
@@ -3,9 +3,10 @@
#
# Extract info from Config.VMS, and add extra data here, to generate Config.sh
# Edit the static information after __END__ to reflect your site and options
-# that went into your perl binary.
+# 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. 30-Sep-1994 Charles Bailey bailey@genetics.upenn.edu
+# Rev. 08-Mar-1995 Charles Bailey bailey@genetics.upenn.edu
#
unshift(@INC,'lib'); # In case someone didn't define Perl_Root
@@ -26,11 +27,9 @@ EndOfGasp
$outdir = '';
open(IN,"$infile") || die "Can't open $infile: $!\n";
open(OUT,">${outdir}Config.sh") || die "Can't open ${outdir}Config.sh: $!\n";
-select OUT;
-
$time = &ctime(time());
-print <<EndOfIntro;
+print OUT <<EndOfIntro;
# This file generated by GenConfig.pl on a VMS system.
# Input obtained from:
# $infile
@@ -39,6 +38,12 @@ print <<EndOfIntro;
EndOfIntro
+foreach (@ARGV) {
+ ($key,$val) = split('=',$_,2);
+ print OUT "$key=\'$val\'\n";
+ if ($val =~/VMS_DO_SOCKETS/) { $dosock = 1; }
+}
+
while (<IN>) { # roll through the comment header in Config.VMS
last if /^#define _config_h_/;
}
@@ -59,10 +64,11 @@ while (<IN>) {
$val =~ s%/\*.*\*/\s*%%g; $val =~ s/\s*$//; # strip off trailing comment
$val =~ s/^"//; $val =~ s/"$//; # remove end quotes
$val =~ s/","/ /g; # make signal list look nice
- if ($val) { print "$token=\'$val\'\n"; }
+ if ($val) { print OUT "$token=\'$val\'\n"; }
else {
$token = "d_$token" unless $token =~ /^i_/;
- print "$token=\'$state\'\n"; }
+ print OUT "$token=\'$state\'\n";
+ }
}
close IN;
@@ -70,8 +76,34 @@ while (<DATA>) {
next if /^\s*#/ or /^\s*$/;
s/#.*$//; s/\s*$//;
($key,$val) = split('=',$_,2);
- print "$key=\'$val\'\n";
+ print OUT "$key='$val'\n";
+ eval "\$$key = '$val'";
+}
+# Add in some of the architecture-dependent stuff which has to be consistent
+print OUT "d_vms_do_sockets=",$dosock ? "'define'\n" : "'undef'\n";
+print OUT "d_has_sockets=",$dosock ? "'define'\n" : "'undef'\n";
+$osvers = `Write Sys\$Output F\$GetSyi("VERSION")`;
+chomp $osvers;
+$osvers =~ s/^V//;
+print OUT "osvers='$osvers'\n";
+$hw_model = `Write Sys\$Output F\$GetSyi("HW_MODEL")`;
+chomp $hw_model;
+if ($hw_model > 1024) {
+ print OUT "arch='VMS_AXP'\n";
+ print OUT "archname='VMS_AXP'\n";
+ $archsufx = "AXP";
+}
+else {
+ print OUT "arch='VMS_VAX'\n";
+ print OUT "archname='VMS_VAX'\n";
+ $archsufx = 'VAX';
}
+$archlib = &VMS::Filespec::vmspath($privlib);
+$archlib =~ s#\]#.VMS_$archsufx\]#;
+$installarchlib = &VMS::Filespec::vmspath($installprivlib);
+$installarchlib =~ s#\]#.VMS_$archsufx\]#;
+print OUT "archlib='$archlib'\n";
+print OUT "installarchlib='$installarchlib'\n";
__END__
@@ -85,7 +117,15 @@ __END__
osname=VMS # DO NOT CHANGE THIS! Tests elsewhere depend on this to identify
# VMS. Use the 'arch' item below to specify hardware version.
CONFIG=true
-PATCHLEVEL=0
+PATCHLEVEL=001
+ld=Link
+lddlflags=/Share
+ccdlflags=
+cccdlflags=
+libc=
+ranlib=
+eunicefix=:
+usedl=true
dldir=/ext/dl
dlobj=dl_vms.obj
dlsrc=dl_vms.c
@@ -100,13 +140,11 @@ signal_t=void
timetype=long
usemymalloc=n
builddir=perl_root:[000000]
+installprivlib=perl_root:[lib]
+privlib=perl_root:[lib]
+installbin=perl_root:[000000]
# The definitions in this block are site-specific, and will probably need to
# be changed on most systems.
myhostname=nowhere.loopback.edu
-arch=VAX
-osvers=5.5-2
-cppflags=/Define=(DEBUGGING)
-d_vms_do_sockets=undef #=define if perl5 built with socket support
-d_has_sockets=undef # This should have the same value as d_vms_do_sockets
libs= # This should list RTLs other than the C RTL and IMAGELIB (e.g. socket RTL)