8 my $no = join('|',qw(GDBM_File ODBM_File NDBM_File DB_File
9 Syslog SysV Langinfo));
17 $ENV{'PWD'} = Win32::GetCwd();
18 $ENV{'PWD'} =~ s:\\:/:g ;
22 sub set_static_extensions
24 # adjust results of scan_ext, and also save
25 # statics in case scan_ext hasn't been called yet.
29 $ext{$_} = 'static' if $ext{$_} && $ext{$_} eq 'dynamic';
37 chdir($dir) || die "Cannot cd to $dir\n";
38 ($ext = getcwd()) =~ s,/,\\,g;
40 chdir($here) || die "Cannot cd to $here\n";
41 my @ext = extensions();
46 return sort grep $ext{$_} eq 'dynamic',keys %ext;
51 return sort grep $ext{$_} eq 'static',keys %ext;
56 return sort grep $ext{$_} eq 'nonxs',keys %ext;
61 return sort grep $ext{$_} ne 'known',keys %ext;
66 # faithfully copy Configure in not including nonxs extensions for the nonce
67 return sort grep $ext{$_} ne 'nonxs',keys %ext;
72 return $ext{$_[0]} eq 'static'
75 # Function to recursively find available extensions, ignoring DynaLoader
76 # NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
79 for my $xxx (glob "*") {
80 if ($xxx ne "DynaLoader") {
81 if (-f "$xxx/$xxx.xs") {
82 $ext{"$_[0]$xxx"} = $static{"$_[0]$xxx"} ? 'static' : 'dynamic';
83 } elsif (-f "$xxx/Makefile.PL") {
84 $ext{"$_[0]$xxx"} = 'nonxs';
86 if (-d $xxx && @_ < 10) {
88 find_ext("$_[0]$xxx/", @_);
92 $ext{"$_[0]$xxx"} = 'known' if $ext{"$_[0]$xxx"} && $xxx =~ $no;
96 # Special case: Add in threads/shared since it is not picked up by the
97 # recursive find above (and adding in general recursive finding breaks
98 # SDBM_File/sdbm). A.D. 10/25/2001.
100 if (!$_[0] && -d "threads/shared") {
101 $ext{"threads/shared"} = 'dynamic';