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