push(@scripts, map("$_.exe", @scripts));
}
+# Exclude nonxs extensions that are not architecture dependent
+my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
+
find(sub {
- if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
+ if (($File::Find::name =~ m{^ext\b(.*)/([^/]+)\.pm$}) &&
+ ! grep { $File::Find::name =~ /^ext\/$_/ } @nonxs)
+ {
my($path, $modname) = ($1,$2);
# strip to optional "/lib", or remove trailing component
next unless m,^/,;
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
+ next unless -d;
next if samepath($_, $binexp);
next if samepath($_, cwd());
next if ($mainperl_is_instperl && samepath($_, $mainperldir));