This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change OP_MULTICONCAT nargs from UV to SSize_t
[perl5.git] / configpm
CommitLineData
a0d0e21e 1#!./miniperl -w
962e59f3
DM
2#
3# configpm
4#
8ed6d636
VK
5# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007 Larry Wall and others.
962e59f3
DM
7#
8#
9# Regenerate the files
10#
11# lib/Config.pm
12# lib/Config_heavy.pl
13# lib/Config.pod
962e59f3 14#
8ed6d636 15#
962e59f3
DM
16# from the contents of the static files
17#
18# Porting/Glossary
19# myconfig.SH
20#
21# and from the contents of the Configure-generated file
22#
23# config.sh
24#
8ed6d636 25#
962e59f3
DM
26# It will only update Config.pm and Config_heavy.pl if the contents of
27# either file would be different. Note that *both* files are updated in
28# this case, since for example an extension makefile that has a dependency
29# on Config.pm should trigger even if only Config_heavy.pl has changed.
30
31sub usage { die <<EOF }
d2d98f31 32usage: $0 [ options ]
962e59f3 33 --no-glossary don't include Porting/Glossary in lib/Config.pod
4e73d6a4 34 --chdir=dir change directory before writing files
962e59f3
DM
35EOF
36
2f4f46ad 37use strict;
3d3a0a8a 38our (%Config, $Config_SH_expanded);
8990e307 39
a8e1d30b
NC
40my $how_many_common = 22;
41
42# commonly used names to precache (and hence lookup fastest)
43my %Common;
44
45while ($how_many_common--) {
46 $_ = <DATA>;
47 chomp;
48 /^(\S+):\s*(\d+)$/ or die "Malformed line '$_'";
49 $Common{$1} = $1;
50}
5435c704 51
d50f1408
NC
52# Post 37589e1eefb1bd62 DynaLoader defaults to reading these at runtime.
53# Ideally we're redo the data below, but Fotango's build system made it
54# wonderfully easy to instrument, and no longer exists.
55$Common{$_} = $_ foreach qw(dlext so);
56
5435c704
NC
57# names of things which may need to have slashes changed to double-colons
58my %Extensions = map {($_,$_)}
59 qw(dynamic_ext static_ext extensions known_extensions);
60
1f0fc1c9
NC
61# The plan is that this information is used by ExtUtils::MakeMaker to generate
62# Makefile dependencies, rather than hardcoding a list, which has become out
63# of date. However, currently, MM_Unix.pm and MM_VMS.pm have *different* lists,
64# *and* descrip_mms.template doesn't actually install all the headers.
65# The "Unix" list seems to (attempt to) avoid the generated headers, which I'm
66# not sure is the right thing to do. Also, not certain whether it would be
67# easier to parse MANIFEST to get these (adding config.h, and potentially
68# removing others), but for now, stick to a hard coded list.
69
70# Could use a map to add ".h", but I suspect that it's easier to use literals,
71# so that anyone using grep will find them
97cb92d6 72# This is the list from MM_VMS, plus pad.h, parser.h, utf8.h
1f0fc1c9
NC
73# which it installs. It *doesn't* install perliol.h - FIXME.
74my @header_files = qw(EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h
4d3a042d 75 embed.h embedvar.h form.h gv.h handy.h hv.h hv_func.h intrpvar.h
1f0fc1c9
NC
76 iperlsys.h keywords.h mg.h nostdio.h op.h opcode.h
77 pad.h parser.h patchlevel.h perl.h perlio.h perlsdio.h
97cb92d6 78 perlvars.h perly.h pp.h pp_proto.h proto.h
1f0fc1c9
NC
79 regcomp.h regexp.h regnodes.h scope.h sv.h thread.h utf8.h
80 util.h);
81
1f0fc1c9
NC
82push @header_files,
83 $^O eq 'VMS' ? 'vmsish.h' : qw(dosish.h perliol.h time64.h unixish.h);
84
85my $header_files = ' return qw(' . join(' ', sort @header_files) . ');';
86$header_files =~ s/(?=.{64}) # If line is still overlength
87 (.{1,64})\ # Split at the last convenient space
88 /$1\n /gx;
89
5435c704
NC
90# allowed opts as well as specifies default and initial values
91my %Allowed_Opts = (
2d9d8159 92 'glossary' => 1, # --no-glossary - no glossary file inclusion,
5435c704 93 # for compactness
4e73d6a4 94 'chdir' => '', # --chdir=dir - change directory before writing files
18f68570 95);
18f68570 96
5435c704
NC
97sub opts {
98 # user specified options
99 my %given_opts = (
100 # --opt=smth
101 (map {/^--([\-_\w]+)=(.*)$/} @ARGV),
102 # --opt --no-opt --noopt
103 (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV),
104 );
105
106 my %opts = (%Allowed_Opts, %given_opts);
107
108 for my $opt (grep {!exists $Allowed_Opts{$_}} keys %given_opts) {
962e59f3
DM
109 warn "option '$opt' is not recognized";
110 usage;
5435c704
NC
111 }
112 @ARGV = grep {!/^--/} @ARGV;
113
114 return %opts;
115}
18f68570 116
5435c704
NC
117
118my %Opts = opts();
119
4e73d6a4
NC
120if ($Opts{chdir}) {
121 chdir $Opts{chdir} or die "$0: could not chdir $Opts{chdir}: $!"
122}
123
8ed6d636 124my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD);
d2d98f31 125my $Glossary = 'Porting/Glossary';
5435c704 126
8aaffb9f
BF
127$Config_PM = "lib/Config.pm";
128$Config_POD = "lib/Config.pod";
129$Config_SH = "config.sh";
130
d2d98f31
VK
131($Config_heavy = $Config_PM) =~ s/\.pm$/_heavy.pl/;
132die "Can't automatically determine name for Config_heavy.pl from '$Config_PM'"
133 if $Config_heavy eq $Config_PM;
8990e307 134
962e59f3
DM
135my $config_txt;
136my $heavy_txt;
2d9d8159 137
c6b7b56c 138my $export_funcs = <<'EOT';
9fe67fcb
NC
139my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1,
140 config_re => 1, compile_date => 1, local_patches => 1,
3acb769b 141 bincompat_options => 1, non_bincompat_options => 1,
1f0fc1c9 142 header_files => 1);
c6b7b56c 143EOT
a0d0e21e 144
c6b7b56c
NC
145my %export_ok = eval $export_funcs or die;
146
c7a7bc4d 147$config_txt .= sprintf << 'EOT', $], $export_funcs;
5435c704
NC
148# This file was created by configpm when Perl was built. Any changes
149# made to this file will be lost the next time perl is built.
3c81428c 150
3acf89b2
MB
151# for a description of the variables, please have a look at the
152# Glossary file, as written in the Porting folder, or use the url:
153# http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary
154
8990e307 155package Config;
2f4f46ad 156use strict;
9fe67fcb 157use warnings;
3d3a0a8a 158our ( %%Config, $VERSION );
c7a7bc4d
DG
159
160$VERSION = "%s";
c6b7b56c
NC
161
162# Skip @Config::EXPORT because it only contains %%Config, which we special
163# case below as it's not a function. @Config::EXPORT won't change in the
164# lifetime of Perl 5.
165%s
2f4f46ad 166@Config::EXPORT = qw(%%Config);
c6b7b56c 167@Config::EXPORT_OK = keys %%Export_Cache;
a48f8c77 168
43d06990
NC
169# Need to stub all the functions to make code such as print Config::config_sh
170# keep working
171
c6b7b56c 172EOT
43d06990 173
c6b7b56c 174$config_txt .= "sub $_;\n" foreach sort keys %export_ok;
2f4f46ad 175
c6b7b56c
NC
176my $myver = sprintf "%vd", $^V;
177
178$config_txt .= sprintf <<'ENDOFBEG', ($myver) x 3;
e3d0cac0
IZ
179
180# Define our own import method to avoid pulling in the full Exporter:
181sub import {
a5094cb0 182 shift;
2f4f46ad 183 @_ = @Config::EXPORT unless @_;
5435c704 184
a48f8c77
MS
185 my @funcs = grep $_ ne '%%Config', @_;
186 my $export_Config = @funcs < @_ ? 1 : 0;
5435c704 187
2f4f46ad 188 no strict 'refs';
a48f8c77
MS
189 my $callpkg = caller(0);
190 foreach my $func (@funcs) {
a5094cb0
NC
191 die qq{"$func" is not exported by the Config module\n}
192 unless $Export_Cache{$func};
a48f8c77
MS
193 *{$callpkg.'::'.$func} = \&{$func};
194 }
5435c704 195
a48f8c77
MS
196 *{"$callpkg\::Config"} = \%%Config if $export_Config;
197 return;
e3d0cac0
IZ
198}
199
69667126 200die "$0: Perl lib version (%s) doesn't match executable '$^X' version ($])"
5435c704 201 unless $^V;
de98c553 202
5435c704 203$^V eq %s
69667126 204 or die sprintf "%%s: Perl lib version (%s) doesn't match executable '$^X' version (%%vd)", $0, $^V;
a0d0e21e 205
8990e307
LW
206ENDOFBEG
207
16d20bd9 208
5435c704 209my @non_v = ();
5435c704
NC
210my @v_others = ();
211my $in_v = 0;
212my %Data = ();
ebf3760c 213my $quote;
5435c704 214
6c2ae642
AC
215# These variables were set in older versions of Perl, but are no longer needed
216# by the core. However, some CPAN modules may rely on them; in particular, Tk
217# (at least up to version 804.034) fails to build without them. We force them
218# to be emitted to Config_heavy.pl for backcompat with such modules (and we may
219# find that this set needs to be extended in future). See RT#132347.
220my @v_forced = map "$_\n", split /\n+/, <<'EOT';
221i_limits='define'
222i_stdlib='define'
223i_string='define'
224i_time='define'
225prototype='define'
226EOT
227
a0d0e21e 228
1a9ca827 229my %seen_quotes;
2f4f46ad
NC
230{
231 my ($name, $val);
1ae6ead9 232 open(CONFIG_SH, '<', $Config_SH) || die "Can't open $Config_SH: $!";
2f4f46ad 233 while (<CONFIG_SH>) {
a0d0e21e 234 next if m:^#!/bin/sh:;
5435c704 235
a02608de 236 # Catch PERL_CONFIG_SH=true and PERL_VERSION=n line from Configure.
d4de4258 237 s/^(\w+)=(true|\d+)\s*$/$1='$2'\n/ or m/^(\w+)='(.*)'$/;
3905a40f 238 my($k, $v) = ($1, $2);
5435c704 239
2000072c 240 # grandfather PATCHLEVEL and SUBVERSION and CONFIG
cceca5ed
GS
241 if ($k) {
242 if ($k eq 'PERL_VERSION') {
243 push @v_others, "PATCHLEVEL='$v'\n";
244 }
245 elsif ($k eq 'PERL_SUBVERSION') {
246 push @v_others, "SUBVERSION='$v'\n";
247 }
a02608de 248 elsif ($k eq 'PERL_CONFIG_SH') {
2000072c
JH
249 push @v_others, "CONFIG='$v'\n";
250 }
cceca5ed 251 }
5435c704 252
435ec615
HM
253 # We can delimit things in config.sh with either ' or ".
254 unless ($in_v or m/^(\w+)=(['"])(.*\n)/){
a0d0e21e
LW
255 push(@non_v, "#$_"); # not a name='value' line
256 next;
257 }
5435c704
NC
258 if ($in_v) {
259 $val .= $_;
260 }
261 else {
ebf3760c 262 $quote = $2;
5435c704 263 ($name,$val) = ($1,$3);
02817d9f
MB
264 if ($name eq 'cc') {
265 $val =~ s{^(['"]?+).*\bccache\s+}{$1};
266 }
5435c704 267 }
435ec615 268 $in_v = $val !~ /$quote\n/;
44a8e56a 269 next if $in_v;
a0d0e21e 270
5435c704 271 s,/,::,g if $Extensions{$name};
a0d0e21e 272
5435c704 273 $val =~ s/$quote\n?\z//;
3c81428c 274
5435c704 275 my $line = "$name=$quote$val$quote\n";
deeea481 276 push(@v_others, $line);
1a9ca827 277 $seen_quotes{$quote}++;
2f4f46ad
NC
278 }
279 close CONFIG_SH;
5435c704 280}
2f4f46ad 281
1a9ca827
NC
282# This is somewhat grim, but I want the code for parsing config.sh here and
283# now so that I can expand $Config{ivsize} and $Config{ivtype}
284
285my $fetch_string = <<'EOT';
286
287# Search for it in the big string
288sub fetch_string {
289 my($self, $key) = @_;
290
291EOT
292
293if ($seen_quotes{'"'}) {
294 # We need the full ' and " code
1a9ca827 295
b46acf92
NC
296$fetch_string .= <<'EOT';
297 return undef unless my ($quote_type, $value) = $Config_SH_expanded =~ /\n$key=(['"])(.*?)\1\n/s;
1a9ca827
NC
298
299 # If we had a double-quote, we'd better eval it so escape
300 # sequences and such can be interpolated. Since the incoming
301 # value is supposed to follow shell rules and not perl rules,
302 # we escape any perl variable markers
b46acf92
NC
303
304 # Historically, since " 'support' was added in change 1409, the
305 # interpolation was done before the undef. Stick to this arguably buggy
306 # behaviour as we're refactoring.
1a9ca827
NC
307 if ($quote_type eq '"') {
308 $value =~ s/\$/\\\$/g;
309 $value =~ s/\@/\\\@/g;
310 eval "\$value = \"$value\"";
311 }
b46acf92
NC
312
313 # So we can say "if $Config{'foo'}".
314 $self->{$key} = $value eq 'undef' ? undef : $value; # cache it
1a9ca827 315}
b46acf92
NC
316EOT
317
318} else {
2effe01f 319 # We only have ' delimited.
b46acf92 320
1a9ca827 321$fetch_string .= <<'EOT';
b46acf92 322 return undef unless $Config_SH_expanded =~ /\n$key=\'(.*?)\'\n/s;
1a9ca827 323 # So we can say "if $Config{'foo'}".
b46acf92 324 $self->{$key} = $1 eq 'undef' ? undef : $1;
1a9ca827
NC
325}
326EOT
327
b46acf92
NC
328}
329
1a9ca827
NC
330eval $fetch_string;
331die if $@;
3c81428c 332
8468119f
NC
333# Calculation for the keys for byteorder
334# This is somewhat grim, but I need to run fetch_string here.
bc60657c 335$Config_SH_expanded = join "\n", '', @v_others;
8468119f
NC
336
337my $t = fetch_string ({}, 'ivtype');
338my $s = fetch_string ({}, 'ivsize');
339
340# byteorder does exist on its own but we overlay a virtual
341# dynamically recomputed value.
342
343# However, ivtype and ivsize will not vary for sane fat binaries
344
345my $f = $t eq 'long' ? 'L!' : $s == 8 ? 'Q': 'I';
346
347my $byteorder_code;
348if ($s == 4 || $s == 8) {
4efc19b7 349 my $list = join ',', reverse(1..$s-1);
8468119f
NC
350 my $format = 'a'x$s;
351 $byteorder_code = <<"EOT";
2855b621 352
4efc19b7
NC
353my \$i = ord($s);
354foreach my \$c ($list) { \$i <<= 8; \$i |= ord(\$c); }
2d9d8159 355our \$byteorder = join('', unpack('$format', pack('$f', \$i)));
8468119f
NC
356EOT
357} else {
2d9d8159 358 $byteorder_code = "our \$byteorder = '?'x$s;\n";
8468119f
NC
359}
360
88fe16b2
NC
361my @need_relocation;
362
363if (fetch_string({},'userelocatableinc')) {
4d20abad
NC
364 foreach my $what (qw(prefixexp
365
366 archlibexp
367 html1direxp
368 html3direxp
369 man1direxp
370 man3direxp
91f668c3 371 privlibexp
4d20abad 372 scriptdirexp
91f668c3 373 sitearchexp
4d20abad
NC
374 sitebinexp
375 sitehtml1direxp
376 sitehtml3direxp
91f668c3 377 sitelibexp
4d20abad
NC
378 siteman1direxp
379 siteman3direxp
380 sitescriptexp
91f668c3 381 vendorarchexp
4d20abad
NC
382 vendorbinexp
383 vendorhtml1direxp
384 vendorhtml3direxp
91f668c3 385 vendorlibexp
4d20abad
NC
386 vendorman1direxp
387 vendorman3direxp
388 vendorscriptexp
389
390 siteprefixexp
391 sitelib_stem
1d230ada
NC
392 vendorlib_stem
393
394 installarchlib
395 installhtml1dir
396 installhtml3dir
397 installman1dir
398 installman3dir
399 installprefix
400 installprefixexp
401 installprivlib
402 installscript
403 installsitearch
404 installsitebin
405 installsitehtml1dir
406 installsitehtml3dir
407 installsitelib
408 installsiteman1dir
409 installsiteman3dir
410 installsitescript
411 installvendorarch
412 installvendorbin
413 installvendorhtml1dir
414 installvendorhtml3dir
415 installvendorlib
416 installvendorman1dir
417 installvendorman3dir
418 installvendorscript
419 )) {
88fe16b2
NC
420 push @need_relocation, $what if fetch_string({}, $what) =~ m!^\.\.\./!;
421 }
88fe16b2
NC
422}
423
424my %need_relocation;
425@need_relocation{@need_relocation} = @need_relocation;
426
91f668c3
NC
427# This can have .../ anywhere:
428if (fetch_string({}, 'otherlibdirs') =~ m!\.\.\./!) {
429 $need_relocation{otherlibdirs} = 'otherlibdirs';
430}
431
88fe16b2
NC
432my $relocation_code = <<'EOT';
433
434sub relocate_inc {
435 my $libdir = shift;
436 return $libdir unless $libdir =~ s!^\.\.\./!!;
437 my $prefix = $^X;
438 if ($prefix =~ s!/[^/]*$!!) {
439 while ($libdir =~ m!^\.\./!) {
440 # Loop while $libdir starts "../" and $prefix still has a trailing
441 # directory
442 last unless $prefix =~ s!/([^/]+)$!!;
443 # but bail out if the directory we picked off the end of $prefix is .
444 # or ..
445 if ($1 eq '.' or $1 eq '..') {
446 # Undo! This should be rare, hence code it this way rather than a
447 # check each time before the s!!! above.
448 $prefix = "$prefix/$1";
449 last;
450 }
451 # Remove that leading ../ and loop again
452 substr ($libdir, 0, 3, '');
453 }
454 $libdir = "$prefix/$libdir";
455 }
456 $libdir;
457}
458EOT
459
ed9ba3bb
JR
460my $osname = fetch_string({}, 'osname');
461my $from = $osname eq 'VMS' ? 'PERLSHR image' : 'binary (from libperl)';
462my $env_cygwin = $osname eq 'cygwin'
463 ? 'push @env, "CYGWIN=\"$ENV{CYGWIN}\"" if $ENV{CYGWIN};' . "\n" : "";
464
465$heavy_txt .= sprintf <<'ENDOFBEG', $osname, $osname, $from, $osname, $env_cygwin;
466# This file was created by configpm when Perl was built. Any changes
467# made to this file will be lost the next time perl is built.
468
469package Config;
470use strict;
471use warnings;
3d3a0a8a 472our %%Config;
ed9ba3bb
JR
473
474sub bincompat_options {
475 return split ' ', (Internals::V())[0];
476}
477
478sub non_bincompat_options {
479 return split ' ', (Internals::V())[1];
480}
481
482sub compile_date {
483 return (Internals::V())[2]
484}
485
486sub local_patches {
487 my (undef, undef, undef, @patches) = Internals::V();
488 return @patches;
489}
490
491sub _V {
492 die "Perl lib was built for '%s' but is being run on '$^O'"
493 unless "%s" eq $^O;
494
495 my ($bincompat, $non_bincompat, $date, @patches) = Internals::V();
496
0bac45c8 497 my @opts = sort split ' ', "$bincompat $non_bincompat";
ed9ba3bb
JR
498
499 print Config::myconfig();
500 print "\nCharacteristics of this %s: \n";
501
0bac45c8
DM
502 print " Compile-time options:\n";
503 print " $_\n" for @opts;
ed9ba3bb
JR
504
505 if (@patches) {
506 print " Locally applied patches:\n";
0bac45c8 507 print " $_\n" foreach @patches;
ed9ba3bb
JR
508 }
509
510 print " Built under %s\n";
511
512 print " $date\n" if defined $date;
513
514 my @env = map { "$_=\"$ENV{$_}\"" } sort grep {/^PERL/} keys %%ENV;
515%s
516 if (@env) {
517 print " \%%ENV:\n";
518 print " $_\n" foreach @env;
519 }
520 print " \@INC:\n";
521 print " $_\n" foreach @INC;
522}
523
524sub header_files {
525ENDOFBEG
526
527$heavy_txt .= $header_files . "\n}\n\n";
528
91f668c3 529if (%need_relocation) {
88fe16b2 530 my $relocations_in_common;
91f668c3
NC
531 # otherlibdirs only features in the hash
532 foreach (keys %need_relocation) {
88fe16b2
NC
533 $relocations_in_common++ if $Common{$_};
534 }
535 if ($relocations_in_common) {
962e59f3 536 $config_txt .= $relocation_code;
88fe16b2 537 } else {
962e59f3 538 $heavy_txt .= $relocation_code;
88fe16b2
NC
539 }
540}
541
962e59f3 542$heavy_txt .= join('', @non_v) . "\n";
3c81428c 543
5435c704 544# copy config summary format from the myconfig.SH script
962e59f3 545$heavy_txt .= "our \$summary = <<'!END!';\n";
1ae6ead9 546open(MYCONFIG,'<','myconfig.SH') || die "open myconfig.SH failed: $!";
54310121 5471 while defined($_ = <MYCONFIG>) && !/^Summary of/;
962e59f3 548do { $heavy_txt .= $_ } until !defined($_ = <MYCONFIG>) || /^\s*$/;
3c81428c 549close(MYCONFIG);
a0d0e21e 550
962e59f3 551$heavy_txt .= "\n!END!\n" . <<'EOT';
90ec21fb 552my $summary_expanded;
3c81428c 553
554sub myconfig {
90ec21fb
EM
555 return $summary_expanded if $summary_expanded;
556 ($summary_expanded = $summary) =~ s{\$(\w+)}
46807d8e
YO
557 {
558 my $c;
559 if ($1 eq 'git_ancestor_line') {
560 if ($Config::Config{git_ancestor}) {
561 $c= "\n Ancestor: $Config::Config{git_ancestor}";
562 } else {
563 $c= "";
564 }
565 } else {
566 $c = $Config::Config{$1};
567 }
568 defined($c) ? $c : 'undef'
569 }ge;
90ec21fb 570 $summary_expanded;
3c81428c 571}
5435c704 572
8468119f
NC
573local *_ = \my $a;
574$_ = <<'!END!';
3c81428c 575EOT
acbcf0c5
YO
576#proper lexicographical order of the keys
577$heavy_txt .= join('',
578 map { $_->[-1] }
579 sort {$a->[0] cmp $b->[0] }
580 map {
581 /^([^=]+)/ ? [ $1, $_ ]
582 : [ $_, $_ ] # shouldnt happen
6c2ae642 583 } @v_others, @v_forced
acbcf0c5 584) . "!END!\n";
2855b621
NC
585
586# Only need the dynamic byteorder code in Config.pm if 'byteorder' is one of
587# the precached keys
588if ($Common{byteorder}) {
962e59f3 589 $config_txt .= $byteorder_code;
2855b621 590} else {
962e59f3 591 $heavy_txt .= $byteorder_code;
2855b621 592}
5435c704 593
88fe16b2 594if (@need_relocation) {
962e59f3
DM
595$heavy_txt .= 'foreach my $what (qw(' . join (' ', @need_relocation) .
596 ")) {\n" . <<'EOT';
8d962fa1 597 s/^($what=)(['"])(.*?)\2/$1 . $2 . relocate_inc($3) . $2/me;
88fe16b2
NC
598}
599EOT
91f668c3
NC
600# Currently it only makes sense to do the ... relocation on Unix, so there's
601# no need to emulate the "which separator for this platform" logic in perl.c -
602# ':' will always be applicable
603if ($need_relocation{otherlibdirs}) {
962e59f3 604$heavy_txt .= << 'EOT';
91f668c3
NC
605s{^(otherlibdirs=)(['"])(.*?)\2}
606 {$1 . $2 . join ':', map {relocate_inc($_)} split ':', $3 . $2}me;
607EOT
608}
88fe16b2
NC
609}
610
962e59f3 611$heavy_txt .= <<'EOT';
2d9d8159 612s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m;
43d06990
NC
613
614my $config_sh_len = length $_;
3be00128 615
e935c5a4 616our $Config_SH_expanded = "\n$_" . << 'EOVIRTUAL';
8468119f
NC
617EOT
618
06482b90
NC
619foreach my $prefix (qw(ccflags ldflags)) {
620 my $value = fetch_string ({}, $prefix);
621 my $withlargefiles = fetch_string ({}, $prefix . "_uselargefiles");
27da23d5
JH
622 if (defined $withlargefiles) {
623 $value =~ s/\Q$withlargefiles\E\b//;
962e59f3 624 $heavy_txt .= "${prefix}_nolargefiles='$value'\n";
27da23d5 625 }
06482b90 626}
5435c704 627
06482b90
NC
628foreach my $prefix (qw(libs libswanted)) {
629 my $value = fetch_string ({}, $prefix);
27da23d5
JH
630 my $withlf = fetch_string ({}, 'libswanted_uselargefiles');
631 next unless defined $withlf;
06482b90
NC
632 my @lflibswanted
633 = split(' ', fetch_string ({}, 'libswanted_uselargefiles'));
634 if (@lflibswanted) {
635 my %lflibswanted;
636 @lflibswanted{@lflibswanted} = ();
637 if ($prefix eq 'libs') {
638 my @libs = grep { /^-l(.+)/ &&
639 not exists $lflibswanted{$1} }
640 split(' ', fetch_string ({}, 'libs'));
641 $value = join(' ', @libs);
642 } else {
643 my @libswanted = grep { not exists $lflibswanted{$_} }
644 split(' ', fetch_string ({}, 'libswanted'));
645 $value = join(' ', @libswanted);
4b2ec495 646 }
435ec615 647 }
962e59f3 648 $heavy_txt .= "${prefix}_nolargefiles='$value'\n";
5435c704
NC
649}
650
1ae6ead9 651if (open(my $fh, '<', 'cflags')) {
2313e9ca
JH
652 my $ccwarnflags;
653 my $ccstdflags;
654 while (<$fh>) {
655 if (/^warn="(.+)"$/) {
656 $ccwarnflags = $1;
657 } elsif (/^stdflags="(.+)"$/) {
658 $ccstdflags = $1;
659 }
660 }
661 if (defined $ccwarnflags) {
662 $heavy_txt .= "ccwarnflags='$ccwarnflags'\n";
663 }
664 if (defined $ccstdflags) {
665 $heavy_txt .= "ccstdflags='$ccstdflags'\n";
666 }
667}
668
962e59f3 669$heavy_txt .= "EOVIRTUAL\n";
06482b90 670
46807d8e 671$heavy_txt .= <<'ENDOFGIT';
505afc73 672eval {
12d7e04d
YO
673 # do not have hairy conniptions if this isnt available
674 require 'Config_git.pl';
675 $Config_SH_expanded .= $Config::Git_Data;
505afc73
YO
676 1;
677} or warn "Warning: failed to load Config_git.pl, something strange about this perl...\n";
46807d8e
YO
678ENDOFGIT
679
962e59f3 680$heavy_txt .= $fetch_string;
06482b90 681
962e59f3 682$config_txt .= <<'ENDOFEND';
06482b90 683
2d9d8159 684sub FETCH {
5435c704
NC
685 my($self, $key) = @_;
686
687 # check for cached value (which may be undef so we use exists not defined)
9fe67fcb 688 return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
a0d0e21e 689}
9fe67fcb 690
2d9d8159
NC
691ENDOFEND
692
962e59f3 693$heavy_txt .= <<'ENDOFEND';
1a9ca827 694
3c81428c 695my $prevpos = 0;
696
a0d0e21e
LW
697sub FIRSTKEY {
698 $prevpos = 0;
2ddb7828 699 substr($Config_SH_expanded, 1, index($Config_SH_expanded, '=') - 1 );
a0d0e21e
LW
700}
701
702sub NEXTKEY {
1a9ca827
NC
703ENDOFEND
704if ($seen_quotes{'"'}) {
962e59f3 705$heavy_txt .= <<'ENDOFEND';
435ec615 706 # Find out how the current key's quoted so we can skip to its end.
3be00128
NC
707 my $quote = substr($Config_SH_expanded,
708 index($Config_SH_expanded, "=", $prevpos)+1, 1);
709 my $pos = index($Config_SH_expanded, qq($quote\n), $prevpos) + 2;
1a9ca827
NC
710ENDOFEND
711} else {
712 # Just ' quotes, so it's much easier.
962e59f3 713$heavy_txt .= <<'ENDOFEND';
1a9ca827
NC
714 my $pos = index($Config_SH_expanded, qq('\n), $prevpos) + 2;
715ENDOFEND
716}
962e59f3 717$heavy_txt .= <<'ENDOFEND';
3be00128 718 my $len = index($Config_SH_expanded, "=", $pos) - $pos;
a0d0e21e 719 $prevpos = $pos;
3be00128 720 $len > 0 ? substr($Config_SH_expanded, $pos, $len) : undef;
85e6fe83 721}
a0d0e21e 722
2ddb7828 723sub EXISTS {
5435c704
NC
724 return 1 if exists($_[0]->{$_[1]});
725
1a9ca827
NC
726 return(index($Config_SH_expanded, "\n$_[1]='") != -1
727ENDOFEND
728if ($seen_quotes{'"'}) {
962e59f3 729$heavy_txt .= <<'ENDOFEND';
1a9ca827
NC
730 or index($Config_SH_expanded, "\n$_[1]=\"") != -1
731ENDOFEND
732}
962e59f3 733$heavy_txt .= <<'ENDOFEND';
5435c704 734 );
a0d0e21e
LW
735}
736
3c81428c 737sub STORE { die "\%Config::Config is read-only\n" }
e736dcee 738*DELETE = *CLEAR = \*STORE; # Typeglob aliasing uses less space
3c81428c 739
740sub config_sh {
43d06990 741 substr $Config_SH_expanded, 1, $config_sh_len;
748a9306 742}
9193ea20 743
744sub config_re {
745 my $re = shift;
3be00128
NC
746 return map { chomp; $_ } grep eval{ /^(?:$re)=/ }, split /^/,
747 $Config_SH_expanded;
9193ea20 748}
749
3c81428c 750sub config_vars {
307dc113 751 # implements -V:cfgvar option (see perlrun -V:)
a48f8c77 752 foreach (@_) {
307dc113 753 # find optional leading, trailing colons; and query-spec
4a305f6a 754 my ($notag,$qry,$lncont) = m/^(:)?(.*?)(:)?$/; # flags fore and aft,
307dc113
JC
755 # map colon-flags to print decorations
756 my $prfx = $notag ? '': "$qry="; # tag-prefix for print
757 my $lnend = $lncont ? ' ' : ";\n"; # line ending for print
4a305f6a 758
307dc113 759 # all config-vars are by definition \w only, any \W means regex
4a305f6a
JC
760 if ($qry =~ /\W/) {
761 my @matches = config_re($qry);
762 print map "$_$lnend", @matches ? @matches : "$qry: not found" if !$notag;
763 print map { s/\w+=//; "$_$lnend" } @matches ? @matches : "$qry: not found" if $notag;
a48f8c77 764 } else {
2d9d8159
NC
765 my $v = (exists $Config::Config{$qry}) ? $Config::Config{$qry}
766 : 'UNKNOWN';
a48f8c77 767 $v = 'undef' unless defined $v;
4a305f6a 768 print "${prfx}'${v}'$lnend";
a48f8c77 769 }
3c81428c 770 }
771}
772
2d9d8159
NC
773# Called by the real AUTOLOAD
774sub launcher {
775 undef &AUTOLOAD;
776 goto \&$Config::AUTOLOAD;
777}
778
7791;
9193ea20 780ENDOFEND
781
782if ($^O eq 'os2') {
962e59f3 783 $config_txt .= <<'ENDOFSET';
9193ea20 784my %preconfig;
785if ($OS2::is_aout) {
3be00128 786 my ($value, $v) = $Config_SH_expanded =~ m/^used_aout='(.*)'\s*$/m;
9193ea20 787 for (split ' ', $value) {
3be00128 788 ($v) = $Config_SH_expanded =~ m/^aout_$_='(.*)'\s*$/m;
9193ea20 789 $preconfig{$_} = $v eq 'undef' ? undef : $v;
790 }
791}
764df951 792$preconfig{d_fork} = undef unless $OS2::can_fork; # Some funny cases can't
9193ea20 793sub TIEHASH { bless {%preconfig} }
794ENDOFSET
a48f8c77
MS
795 # Extract the name of the DLL from the makefile to avoid duplication
796 my ($f) = grep -r, qw(GNUMakefile Makefile);
797 my $dll;
798 if (open my $fh, '<', $f) {
799 while (<$fh>) {
800 $dll = $1, last if /^PERL_DLL_BASE\s*=\s*(\S*)\s*$/;
801 }
30500b05 802 }
962e59f3 803 $config_txt .= <<ENDOFSET if $dll;
30500b05
IZ
804\$preconfig{dll_name} = '$dll';
805ENDOFSET
9193ea20 806} else {
962e59f3 807 $config_txt .= <<'ENDOFSET';
5435c704
NC
808sub TIEHASH {
809 bless $_[1], $_[0];
810}
9193ea20 811ENDOFSET
812}
813
a8e1d30b
NC
814foreach my $key (keys %Common) {
815 my $value = fetch_string ({}, $key);
816 # Is it safe on the LHS of => ?
817 my $qkey = $key =~ /^[A-Za-z_][A-Za-z0-9_]*$/ ? $key : "'$key'";
818 if (defined $value) {
819 # Quote things for a '' string
820 $value =~ s!\\!\\\\!g;
821 $value =~ s!'!\\'!g;
822 $value = "'$value'";
91f668c3
NC
823 if ($key eq 'otherlibdirs') {
824 $value = "join (':', map {relocate_inc(\$_)} split (':', $value))";
825 } elsif ($need_relocation{$key}) {
88fe16b2
NC
826 $value = "relocate_inc($value)";
827 }
a8e1d30b
NC
828 } else {
829 $value = "undef";
830 }
831 $Common{$key} = "$qkey => $value";
832}
2855b621
NC
833
834if ($Common{byteorder}) {
835 $Common{byteorder} = 'byteorder => $byteorder';
836}
837my $fast_config = join '', map { " $_,\n" } sort values %Common;
5435c704 838
e4d9df75
FC
839# Sanity check needed to stop an infinite loop if Config_heavy.pl fails to
840# define &launcher for some reason (eg it got truncated)
962e59f3 841$config_txt .= sprintf <<'ENDOFTIE', $fast_config;
9193ea20 842
fb73857a 843sub DESTROY { }
844
2d9d8159 845sub AUTOLOAD {
c1b2b415 846 require 'Config_heavy.pl';
938af39e 847 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
2d9d8159
NC
848 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
849}
850
2c165900 851# tie returns the object, so the value returned to require will be true.
5435c704 852tie %%Config, 'Config', {
a8e1d30b 853%s};
5435c704
NC
854ENDOFTIE
855
748a9306 856
1ae6ead9 857open(CONFIG_POD, '>', $Config_POD) or die "Can't open $Config_POD: $!";
5435c704 858print CONFIG_POD <<'ENDOFTAIL';
3c81428c 859=head1 NAME
a0d0e21e 860
3c81428c 861Config - access Perl configuration information
862
863=head1 SYNOPSIS
864
865 use Config;
63f18be6
NC
866 if ($Config{usethreads}) {
867 print "has thread support\n"
3c81428c 868 }
869
a48f8c77 870 use Config qw(myconfig config_sh config_vars config_re);
3c81428c 871
872 print myconfig();
873
874 print config_sh();
875
a48f8c77
MS
876 print config_re();
877
3c81428c 878 config_vars(qw(osname archname));
879
880
881=head1 DESCRIPTION
882
883The Config module contains all the information that was available to
884the C<Configure> program at Perl build time (over 900 values).
885
886Shell variables from the F<config.sh> file (written by Configure) are
887stored in the readonly-variable C<%Config>, indexed by their names.
888
889Values stored in config.sh as 'undef' are returned as undefined
1fef88e7 890values. The perl C<exists> function can be used to check if a
3c81428c 891named variable exists.
892
3acf89b2
MB
893For a description of the variables, please have a look at the
894Glossary file, as written in the Porting folder, or use the url:
895http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary
896
3c81428c 897=over 4
898
899=item myconfig()
900
901Returns a textual summary of the major perl configuration values.
2788353a 902See also C<-V> in L<perlrun/Command Switches>.
3c81428c 903
904=item config_sh()
905
906Returns the entire perl configuration information in the form of the
907original config.sh shell variable assignment script.
908
a48f8c77
MS
909=item config_re($regex)
910
911Like config_sh() but returns, as a list, only the config entries who's
912names match the $regex.
913
3c81428c 914=item config_vars(@names)
915
916Prints to STDOUT the values of the named configuration variable. Each is
917printed on a separate line in the form:
918
919 name='value';
920
921Names which are unknown are output as C<name='UNKNOWN';>.
2788353a 922See also C<-V:name> in L<perlrun/Command Switches>.
3c81428c 923
3acb769b
NC
924=item bincompat_options()
925
926Returns a list of C pre-processor options used when compiling this F<perl>
927binary, which affect its binary compatibility with extensions.
928C<bincompat_options()> and C<non_bincompat_options()> are shown together in
929the output of C<perl -V> as I<Compile-time options>.
930
931=item non_bincompat_options()
932
933Returns a list of C pre-processor options used when compiling this F<perl>
934binary, which do not affect binary compatibility with extensions.
935
936=item compile_date()
937
938Returns the compile date (as a string), equivalent to what is shown by
939C<perl -V>
940
941=item local_patches()
942
943Returns a list of the names of locally applied patches, equivalent to what
944is shown by C<perl -V>.
945
1f0fc1c9
NC
946=item header_files()
947
948Returns a list of the header files that should be used as dependencies for
949XS code, for this version of Perl on this platform.
950
3c81428c 951=back
952
953=head1 EXAMPLE
954
955Here's a more sophisticated example of using %Config:
956
957 use Config;
743c51bc
W
958 use strict;
959
960 my %sig_num;
961 my @sig_name;
962 unless($Config{sig_name} && $Config{sig_num}) {
963 die "No sigs?";
964 } else {
965 my @names = split ' ', $Config{sig_name};
966 @sig_num{@names} = split ' ', $Config{sig_num};
967 foreach (@names) {
968 $sig_name[$sig_num{$_}] ||= $_;
969 }
970 }
3c81428c 971
743c51bc
W
972 print "signal #17 = $sig_name[17]\n";
973 if ($sig_num{ALRM}) {
974 print "SIGALRM is $sig_num{ALRM}\n";
3c81428c 975 }
976
977=head1 WARNING
978
979Because this information is not stored within the perl executable
980itself it is possible (but unlikely) that the information does not
981relate to the actual perl binary which is being used to access it.
982
983The Config module is installed into the architecture and version
984specific library directory ($Config{installarchlib}) and it checks the
985perl version number when loaded.
986
435ec615
HM
987The values stored in config.sh may be either single-quoted or
988double-quoted. Double-quoted strings are handy for those cases where you
989need to include escape sequences in the strings. To avoid runtime variable
990interpolation, any C<$> and C<@> characters are replaced by C<\$> and
991C<\@>, respectively. This isn't foolproof, of course, so don't embed C<\$>
992or C<\@> in double-quoted strings unless you're willing to deal with the
993consequences. (The slashes will end up escaped and the C<$> or C<@> will
994trigger variable interpolation)
995
ebc74a4b
GS
996=head1 GLOSSARY
997
998Most C<Config> variables are determined by the C<Configure> script
999on platforms supported by it (which is most UNIX platforms). Some
1000platforms have custom-made C<Config> variables, and may thus not have
1001some of the variables described below, or may have extraneous variables
1002specific to that particular port. See the port specific documentation
1003in such cases.
1004
c90cd22b
RGS
1005=cut
1006
ebc74a4b
GS
1007ENDOFTAIL
1008
5435c704 1009if ($Opts{glossary}) {
1ae6ead9 1010 open(GLOS, '<', $Glossary) or die "Can't open $Glossary: $!";
18f68570 1011}
2f4f46ad
NC
1012my %seen = ();
1013my $text = 0;
fb87c415 1014$/ = '';
8b4a1c96 1015my $errors= 0;
fb87c415
IZ
1016
1017sub process {
aade5aff
YST
1018 if (s/\A(\w*)\s+\(([\w.]+)\):\s*\n(\t?)/=item C<$1>\n\nFrom F<$2>:\n\n/m) {
1019 my $c = substr $1, 0, 1;
1020 unless ($seen{$c}++) {
5435c704 1021 print CONFIG_POD <<EOF if $text;
fb87c415 1022=back
ebc74a4b 1023
c90cd22b
RGS
1024=cut
1025
fb87c415 1026EOF
5435c704 1027 print CONFIG_POD <<EOF;
fb87c415
IZ
1028=head2 $c
1029
bbc7dcd2 1030=over 4
fb87c415 1031
c90cd22b
RGS
1032=cut
1033
fb87c415 1034EOF
aade5aff
YST
1035 $text = 1;
1036 }
1037 }
1038 elsif (!$text || !/\A\t/) {
1039 warn "Expected a Configure variable header",
8b4a1c96
YO
1040 ($text ? " or another paragraph of description" : () ),
1041 ", instead we got:\n$_";
1042 $errors++;
fb87c415
IZ
1043 }
1044 s/n't/n\00t/g; # leave can't, won't etc untouched
9b22980b 1045 s/^\t\s+(.*)/\n$1/gm; # Indented lines ===> new paragraph
fb87c415
IZ
1046 s/^(?<!\n\n)\t(.*)/$1/gm; # Not indented lines ===> text
1047 s{([\'\"])(?=[^\'\"\s]*[./][^\'\"\s]*\1)([^\'\"\s]+)\1}(F<$2>)g; # '.o'
1048 s{([\'\"])([^\'\"\s]+)\1}(C<$2>)g; # "date" command
1049 s{\'([A-Za-z_\- *=/]+)\'}(C<$1>)g; # 'ln -s'
1050 s{
24665371 1051 (?<! [\w./<\'\"\$] ) # Only standalone file names
fb87c415
IZ
1052 (?! e \. g \. ) # Not e.g.
1053 (?! \. \. \. ) # Not ...
1054 (?! \d ) # Not 5.004
a1151a3c
RGS
1055 (?! read/ ) # Not read/write
1056 (?! etc\. ) # Not etc.
1057 (?! I/O ) # Not I/O
1058 (
1059 \$ ? # Allow leading $
1060 [\w./]* [./] [\w./]* # Require . or / inside
1061 )
1062 (?<! \. (?= [\s)] ) ) # Do not include trailing dot
fb87c415
IZ
1063 (?! [\w/] ) # Include all of it
1064 }
1065 (F<$1>)xg; # /usr/local
1066 s/((?<=\s)~\w*)/F<$1>/g; # ~name
1067 s/(?<![.<\'\"])\b([A-Z_]{2,})\b(?![\'\"])/C<$1>/g; # UNISTD
1068 s/(?<![.<\'\"])\b(?!the\b)(\w+)\s+macro\b/C<$1> macro/g; # FILE_cnt macro
1069 s/n[\0]t/n't/g; # undo can't, won't damage
ebc74a4b
GS
1070}
1071
5435c704 1072if ($Opts{glossary}) {
7701ffb5
JH
1073 <GLOS>; # Skip the "DO NOT EDIT"
1074 <GLOS>; # Skip the preamble
18f68570
VK
1075 while (<GLOS>) {
1076 process;
5435c704 1077 print CONFIG_POD;
18f68570 1078 }
8b4a1c96
YO
1079 if ($errors) {
1080 die "Errors encountered while processing $Glossary. ",
1081 "Header lines are expected to be of the form:\n",
1082 "NAME (CLASS):\n",
1083 "Maybe there is a malformed header?\n",
1084 ;
1085 }
fb87c415 1086}
ebc74a4b 1087
5435c704 1088print CONFIG_POD <<'ENDOFTAIL';
ebc74a4b
GS
1089
1090=back
1091
58ab6743
RS
1092=head1 GIT DATA
1093
1094Information on the git commit from which the current perl binary was compiled
1095can be found in the variable C<$Config::Git_Data>. The variable is a
1096structured string that looks something like this:
1097
1098 git_commit_id='ea0c2dbd5f5ac6845ecc7ec6696415bf8e27bd52'
1099 git_describe='GitLive-blead-1076-gea0c2db'
1100 git_branch='smartmatch'
1101 git_uncommitted_changes=''
1102 git_commit_id_title='Commit id:'
1103 git_commit_date='2009-05-09 17:47:31 +0200'
1104
1105Its format is not guaranteed not to change over time.
1106
3c81428c 1107=head1 NOTE
1108
1109This module contains a good example of how to use tie to implement a
1110cache and an example of how to make a tied variable readonly to those
1111outside of it.
1112
1113=cut
a0d0e21e 1114
9193ea20 1115ENDOFTAIL
a0d0e21e 1116
962e59f3 1117close(GLOS) if $Opts{glossary};
5435c704 1118close(CONFIG_POD);
8ed6d636 1119print "written $Config_POD\n";
962e59f3
DM
1120
1121my $orig_config_txt = "";
1122my $orig_heavy_txt = "";
1123{
1124 local $/;
1125 my $fh;
1126 $orig_config_txt = <$fh> if open $fh, "<", $Config_PM;
1127 $orig_heavy_txt = <$fh> if open $fh, "<", $Config_heavy;
1128}
1129
1130if ($orig_config_txt ne $config_txt or $orig_heavy_txt ne $heavy_txt) {
1131 open CONFIG, ">", $Config_PM or die "Can't open $Config_PM: $!\n";
1132 open CONFIG_HEAVY, ">", $Config_heavy or die "Can't open $Config_heavy: $!\n";
1133 print CONFIG $config_txt;
1134 print CONFIG_HEAVY $heavy_txt;
1135 close(CONFIG_HEAVY);
1136 close(CONFIG);
1137 print "updated $Config_PM\n";
1138 print "updated $Config_heavy\n";
1139}
1140
a0d0e21e
LW
1141# Now do some simple tests on the Config.pm file we have created
1142unshift(@INC,'lib');
5435c704 1143require $Config_PM;
13bce055 1144require $Config_heavy;
a0d0e21e
LW
1145import Config;
1146
5435c704 1147die "$0: $Config_PM not valid"
a02608de 1148 unless $Config{'PERL_CONFIG_SH'} eq 'true';
a0d0e21e 1149
5435c704 1150die "$0: error processing $Config_PM"
a0d0e21e 1151 if defined($Config{'an impossible name'})
a02608de 1152 or $Config{'PERL_CONFIG_SH'} ne 'true' # test cache
a0d0e21e
LW
1153 ;
1154
5435c704 1155die "$0: error processing $Config_PM"
a0d0e21e
LW
1156 if eval '$Config{"cc"} = 1'
1157 or eval 'delete $Config{"cc"}'
1158 ;
1159
1160
85e6fe83 1161exit 0;
a8e1d30b
NC
1162# Popularity of various entries in %Config, based on a large build and test
1163# run of code in the Fotango build system:
1164__DATA__
1165path_sep: 8490
1166d_readlink: 7101
1167d_symlink: 7101
1168archlibexp: 4318
1169sitearchexp: 4305
1170sitelibexp: 4305
1171privlibexp: 4163
1172ldlibpthname: 4041
1173libpth: 2134
1174archname: 1591
1175exe_ext: 1256
1176scriptdir: 1155
1177version: 1116
1178useithreads: 1002
1179osvers: 982
1180osname: 851
1181inc_version_list: 783
1182dont_use_nlink: 779
1183intsize: 759
1184usevendorprefix: 642
1185dlsrc: 624
1186cc: 541
1187lib_ext: 520
1188so: 512
1189ld: 501
1190ccdlflags: 500
1191ldflags: 495
1192obj_ext: 495
1193cccdlflags: 493
1194lddlflags: 493
1195ar: 492
1196dlext: 492
1197libc: 492
1198ranlib: 492
1199full_ar: 491
1200vendorarchexp: 491
1201vendorlibexp: 491
1202installman1dir: 489
1203installman3dir: 489
1204installsitebin: 489
1205installsiteman1dir: 489
1206installsiteman3dir: 489
1207installvendorman1dir: 489
1208installvendorman3dir: 489
1209d_flexfnam: 474
1210eunicefix: 360
1211d_link: 347
1212installsitearch: 344
1213installscript: 341
1214installprivlib: 337
1215binexp: 336
1216installarchlib: 336
1217installprefixexp: 336
1218installsitelib: 336
1219installstyle: 336
1220installvendorarch: 336
1221installvendorbin: 336
1222installvendorlib: 336
1223man1ext: 336
1224man3ext: 336
1225sh: 336
1226siteprefixexp: 336
1227installbin: 335
1228usedl: 332
1229ccflags: 285
1230startperl: 232
1231optimize: 231
1232usemymalloc: 229
1233cpprun: 228
1234sharpbang: 228
1235perllibs: 225
1236usesfio: 224
1237usethreads: 220
1238perlpath: 218
1239extensions: 217
1240usesocks: 208
1241shellflags: 198
1242make: 191
1243d_pwage: 189
1244d_pwchange: 189
1245d_pwclass: 189
1246d_pwcomment: 189
1247d_pwexpire: 189
1248d_pwgecos: 189
1249d_pwpasswd: 189
1250d_pwquota: 189
1251gccversion: 189
1252libs: 186
1253useshrplib: 186
1254cppflags: 185
1255ptrsize: 185
1256shrpenv: 185
1257static_ext: 185
1258use5005threads: 185
1259uselargefiles: 185
1260alignbytes: 184
1261byteorder: 184
1262ccversion: 184
1263config_args: 184
1264cppminus: 184