This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add towupper() and towlower() to Configure-ish files
[perl5.git] / win32 / FindExt.pm
index 4a8dc5f..4d46821 100644 (file)
@@ -1,12 +1,12 @@
 package FindExt;
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 use strict;
 use warnings;
 
-my $no = join('|',qw(GDBM_File ODBM_File NDBM_File DB_File
-                     VMS VMS-DCLsym VMS-Stdio Sys-Syslog IPC-SysV I18N-Langinfo));
+my $no = join('|',qw(Amiga.* GDBM_File ODBM_File NDBM_File DB_File
+                     VMS.* Sys-Syslog IPC-SysV));
 $no = qr/^(?:$no)$/i;
 
 sub apply_config {
@@ -18,11 +18,11 @@ sub apply_config {
     # duplicates logic from Configure (mostly)
     push @no, "DB_File" unless $config->{i_db};
     push @no, "GDBM_File" unless $config->{i_gdbm};
-    push @no, "I18N-Langinfo" unless $config->{i_langinfo} && $config->{d_nl_langinfo};
     push @no, "IPC-SysV" unless $config->{d_msg} || $config->{d_sem} || $config->{d_shm};
     push @no, "NDBM_File" unless $config->{d_ndbm};
     push @no, "ODBM_File"
       unless ($config->{i_dbm} || $config->{i_rpcsvcdbm}) && !$config->{d_cplusplus};
+    push @no, "Amiga.*" unless $^O eq "amigaos";
     push @no, "VMS.*" unless $^O eq "VMS";
     push @no, "Win32.*" unless $^O eq "MSWin32" || $^O eq "cygwin";
 
@@ -66,13 +66,6 @@ sub set_static_extensions {
     }
 }
 
-sub scan_ext
-{
-    my $dir  = shift;
-    find_ext("$dir/");
-    extensions();
-}
-
 sub _ext_eq {
     my $key = shift;
     sub {
@@ -108,36 +101,35 @@ sub has_xs_or_c {
 }
 
 # Function to find available extensions, ignoring DynaLoader
-sub find_ext
+sub scan_ext
 {
     my $ext_dir = shift;
     opendir my $dh, "$ext_dir";
     while (defined (my $item = readdir $dh)) {
         next if $item =~ /^\.\.?$/;
         next if $item eq "DynaLoader";
-        next unless -d "$ext_dir$item";
+        next unless -d "$ext_dir/$item";
         my $this_ext = $item;
         my $leaf = $item;
 
         $this_ext =~ s!-!/!g;
         $leaf =~ s/.*-//;
 
+        # List/Util.xs lives in Scalar-List-Utils, Cwd.xs lives in PathTools
+        $this_ext = 'List/Util' if $this_ext eq 'Scalar/List/Utils';
+        $this_ext = 'Cwd'       if $this_ext eq 'PathTools';
+
        # Temporary hack to cope with smokers that are not clearing directories:
         next if $ext{$this_ext};
 
-        if (has_xs_or_c("$ext_dir$item")) {
+        if (has_xs_or_c("$ext_dir/$item")) {
             $ext{$this_ext} = $static{$this_ext} ? 'static' : 'dynamic';
         } else {
             $ext{$this_ext} = 'nonxs';
         }
-        $ext{$this_ext} = 'known' if $ext{$this_ext} && $item =~ $no;
+        $ext{$this_ext} = 'known' if $item =~ $no;
     }
 }
 
 1;
-# Local variables:
-# cperl-indent-level: 4
-# indent-tabs-mode: nil
-# End:
-#
 # ex: set ts=8 sts=4 sw=4 et: