Commit | Line | Data |
---|---|---|
2304df62 | 1 | #!./miniperl |
8990e307 LW |
2 | |
3 | @ARGV = "./config.sh"; | |
4 | ||
8990e307 LW |
5 | open STDOUT, ">lib/Config.pm" |
6 | or die "Can't open lib/Config.pm: $!\n"; | |
7 | $myver = sprintf("%.3f", $]); | |
8 | print <<"ENDOFBEG"; | |
9 | package Config; | |
10 | require Exporter; | |
11 | \@ISA = (Exporter); | |
12 | \@EXPORT = qw(%Config); | |
13 | ||
14 | \$] == $myver or die sprintf | |
15 | "Perl lib version ($myver) doesn't match executable version (%.3f)\\n", \$]; | |
16 | ||
17 | ENDOFBEG | |
18 | ||
85e6fe83 LW |
19 | while (<>) { |
20 | s:^#!/bin/sh::; | |
21 | s/'undef'/undef/; # So we can say "if $Config{'foo'}". | |
22 | s/=true$/='true'/; # Catch CONFIG=true line from Configure. | |
23 | s/^(\w+)=/\$Config{'$1'} = /; | |
24 | s/$/;/ unless (/^#/ || /^$/); | |
25 | print $_; | |
26 | } | |
27 | print "1;\n"; | |
28 | exit 0; |