X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fconfig_sh.PL;h=cea5fef747ecffac05ea3bb8ef00b02679f6d19e;hb=2d736872f25b3e41d616d46e8286fe3f13ef058d;hp=b1c7b9f59295b01d4d5717486fecdbecfc0a7430;hpb=1d7c184104c076988718a01b77c8706aae05b092;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/config_sh.PL b/win32/config_sh.PL index b1c7b9f..cea5fef 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -1,3 +1,4 @@ +use FindExt; # take a semicolon separated path list and turn it into a quoted # list of paths that Text::Parsewords will grok sub mungepath { @@ -33,17 +34,34 @@ sub loadopts { } } +FindExt::scan_ext("../ext"); + my %opt; + my $optref = loadopts(); while (@{$optref} && $optref->[0] =~ /^([\w_]+)=(.*)$/) { $opt{$1}=$2; shift(@{$optref}); } +my @dynamic = FindExt::dynamic_extensions(); +my @noxs = FindExt::noxs_extensions(); +my @known = sort(@dynamic,split(/\s+/,$opt{'staticext'}),@noxs); +$opt{'known_extensions'} = join(' ',@known); + +if (!$opt{'use5005threads'} || $opt{'use5005threads'} eq 'undef') + { + @dynamic = grep(!/Thread/,@dynamic); + @known = grep(!/Thread/,@dynamic); + } + +$opt{'dynamic_ext'} = join(' ',@dynamic); +$opt{'nonxs_ext'} = join(' ',@noxs); + +$opt{'extensions'} = join(' ',@known); + my $pl_h = '../patchlevel.h'; -$opt{VERSION} = $]; -$opt{INST_VER} =~ s|~VERSION~|$]|g; if (-e $pl_h) { open PL, "<$pl_h" or die "Can't open $pl_h: $!"; while () { @@ -53,17 +71,13 @@ if (-e $pl_h) { } close PL; } -elsif ($] =~ /^(\d+)\.(\d\d\d)?(\d\d)?$/) { # should always be true - $opt{PERL_REVISION} = $1; - $opt{PERL_VERSION} = int($2 || 0); - $opt{PERL_SUBVERSION} = $3; - $opt{PERL_APIVERSION} = $]; -} else { - die "Can't parse perl version ($])"; + die "Can't find $pl_h: $!"; } - -$opt{PERL_SUBVERSION} ||= '00'; +$opt{VERSION} = "$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}"; +$opt{INST_VER} =~ s|~VERSION~|$opt{VERSION}|g; +$opt{'version_patchlevel_string'} = "version $opt{PERL_VERSION} subversion $opt{PERL_SUBVERSION}"; +$opt{'version_patchlevel_string'} .= " patchlevel $opt{PERL_PATCHLEVEL}" if exists $opt{PERL_PATCHLEVEL}; $opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'}; $opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0] @@ -73,6 +87,12 @@ $opt{'usemymalloc'} = 'y' if $opt{'d_mymalloc'} eq 'define'; $opt{libpth} = mungepath($opt{libpth}) if exists $opt{libpth}; $opt{incpath} = mungepath($opt{incpath}) if exists $opt{incpath}; +# some functions are not available on Win9x +if (defined(&Win32::IsWin95) && Win32::IsWin95()) { + $opt{d_flock} = 'undef'; + $opt{d_link} = 'undef'; +} + while (<>) { s/~([\w_]+)~/$opt{$1}/g; if (/^([\w_]+)=(.*)$/) { @@ -88,4 +108,3 @@ while (<>) { } print; } -