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