8 my $no = join('|',qw(GDBM_File ODBM_File NDBM_File DB_File
9 Syslog SysV Langinfo));
20 return $ENV{'PWD'} = $_;
23 sub set_static_extensions
25 # adjust results of scan_ext, and also save
26 # statics in case scan_ext hasn't been called yet.
30 $ext{$_} = 'static' if $ext{$_} && $ext{$_} eq 'dynamic';
38 chdir($dir) || die "Cannot cd to $dir\n";
39 ($ext = getcwd()) =~ s,/,\\,g;
41 chdir($here) || die "Cannot cd to $here\n";
42 my @ext = extensions();
47 return sort grep $ext{$_} eq 'dynamic',keys %ext;
52 return sort grep $ext{$_} eq 'static',keys %ext;
57 return sort grep $ext{$_} eq 'nonxs',keys %ext;
62 return sort grep $ext{$_} ne 'known',keys %ext;
67 # faithfully copy Configure in not including nonxs extensions for the nonce
68 return sort grep $ext{$_} ne 'nonxs',keys %ext;
73 return $ext{$_[0]} eq 'static'
76 # Function to recursively find available extensions, ignoring DynaLoader
77 # NOTE: recursion limit of 10 to prevent runaway in case of symlink madness
81 my @items = grep { !/^\.\.?$/ } readdir $dh;
83 for my $xxx (@items) {
84 if ($xxx ne "DynaLoader") {
85 if (-f "$xxx/$xxx.xs") {
86 $ext{"$_[0]$xxx"} = $static{"$_[0]$xxx"} ? 'static' : 'dynamic';
87 } elsif (-f "$xxx/Makefile.PL") {
88 $ext{"$_[0]$xxx"} = 'nonxs';
90 if (-d $xxx && @_ < 10) {
92 find_ext("$_[0]$xxx/", @_);
96 $ext{"$_[0]$xxx"} = 'known' if $ext{"$_[0]$xxx"} && $xxx =~ $no;
100 # Special case: Add in threads/shared since it is not picked up by the
101 # recursive find above (and adding in general recursive finding breaks
102 # SDBM_File/sdbm). A.D. 10/25/2001.
103 # Ditto for IO/Compress/Base and IO/Compress/Zlib
105 if (!$_[0] && -d "threads/shared") {
106 $ext{"threads/shared"} = 'dynamic';
108 if (!$_[0] && -d "IO/Compress/Base") {
109 $ext{"IO/Compress/Base"} = 'nonxs';
111 if (!$_[0] && -d "IO/Compress/Zlib") {
112 $ext{"IO/Compress/Zlib"} = 'nonxs';