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