4 # Extract info from Config.VMS, and add extra data here, to generate Config.sh
5 # Edit the static information after __END__ to reflect your site and options
6 # that went into your perl binary.
8 # Rev. 30-Sep-1994 Charles Bailey bailey@genetics.upenn.edu
11 unshift(@INC,'lib'); # In case someone didn't define Perl_Root
13 require 'ctime.pl' || die "Couldn't execute ctime.pl: $!\n";
15 if (-f "config.vms") { $infile = "config.vms"; $outdir = "[-]"; }
16 elsif (-f "[.vms]config.vms") { $infile = "[.vms]config.vms"; $outdir = "[]"; }
17 elsif (-f "config.h") { $infile = "config.h"; $outdir = "[]";}
19 if ($infile) { print "Generating Config.sh from $infile . . .\n"; }
20 else { die <<EndOfGasp;
21 Can't find config.vms or config.h to read!
22 Please run this script from the perl source directory or
23 the VMS subdirectory in the distribution.
27 open(IN,"$infile") || die "Can't open $infile: $!\n";
28 open(OUT,">${outdir}Config.sh") || die "Can't open ${outdir}Config.sh: $!\n";
32 $time = &ctime(time());
34 # This file generated by GenConfig.pl on a VMS system.
35 # Input obtained from:
42 while (<IN>) { # roll through the comment header in Config.VMS
43 last if /^#define _config_h_/;
48 while (/\\\s*$/) { # pick up contination lines
55 next unless my ($blocked,$un,$token,$val) = m%(\/\*)?\s*\#\s*(un)?def\w*\s*([A-za-z0-9]\w+)\S*\s*(.*)%;
56 next if /config-skip/;
57 $state = ($blocked || $un) ? 'undef' : 'define';
58 $token =~ tr/A-Z/a-z/;
59 $val =~ s%/\*.*\*/\s*%%g; $val =~ s/\s*$//; # strip off trailing comment
60 $val =~ s/^"//; $val =~ s/"$//; # remove end quotes
61 $val =~ s/","/ /g; # make signal list look nice
62 if ($val) { print "$token=\'$val\'\n"; }
64 $token = "d_$token" unless $token =~ /^i_/;
65 print "$token=\'$state\'\n"; }
70 next if /^\s*#/ or /^\s*$/;
72 ($key,$val) = split('=',$_,2);
73 print "$key=\'$val\'\n";
78 # This list is incomplete in comparison to what ends up in config.sh, but
79 # should contain the essentials. Some of these definitions reflect
80 # options chosen when building perl or site-specific data; these should
81 # be hand-edited appropriately. Someday, perhaps, we'll get this automated.
83 # The definitions in this block are constant across most systems, and
84 # should only rarely need to be changed.
85 osname=VMS # DO NOT CHANGE THIS! Tests elsewhere depend on this to identify
86 # VMS. Use the 'arch' item below to specify hardware version.
94 libpth=/sys$share /sys$library
102 builddir=perl_root:[000000]
104 # The definitions in this block are site-specific, and will probably need to
105 # be changed on most systems.
106 myhostname=nowhere.loopback.edu
109 cppflags=/Define=(DEBUGGING)
110 d_vms_do_sockets=undef #=define if perl5 built with socket support
111 d_has_sockets=undef # This should have the same value as d_vms_do_sockets
112 libs= # This should list RTLs other than the C RTL and IMAGELIB (e.g. socket RTL)