Cope with new-style ext/Data-Dumper as well as old-style ext/Data/Dumper
authorNicholas Clark <nick@ccl4.org>
Fri, 6 Feb 2009 18:28:47 +0000 (18:28 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 6 Feb 2009 19:05:14 +0000 (19:05 +0000)
Configure
make_ext.pl

index 6063e53..67c20b5 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -21619,10 +21619,12 @@ find_extensions='
        case "$xxx" in
            DynaLoader|dynaload) ;;
            *)
-           if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then
-               known_extensions="$known_extensions $1$xxx";
+           this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
+           leaf=`echo $xxx | $sed -e s/.*-//`;
+           if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then
+               known_extensions="$known_extensions $1$this_ext";
            elif $test -f $xxx/Makefile.PL; then
-               nonxs_extensions="$nonxs_extensions $1$xxx";
+               nonxs_extensions="$nonxs_extensions $1$this_ext";
            else
                if $test -d $xxx -a $# -lt 10; then
                    set $1$xxx/ $*;
index 2875422..5224f41 100644 (file)
@@ -176,7 +176,16 @@ if ($is_Win32) {
 foreach my $spec (@extspec)  {
     my $mname = $spec;
     $mname =~ s!/!::!g;
-    my $ext_pathname = "ext/$spec";
+    my $ext_pathname;
+    if (-d "ext/$spec") {
+       # Old style ext/Data/Dumper/
+       $ext_pathname = "ext/$spec";
+    } else {
+       # New style ext/Data-Dumper/
+       my $copy = $spec;
+       $copy =~ tr!/!-!;
+       $ext_pathname = "ext/$copy";
+    }
     my $up = $ext_pathname;
     $up =~ s![^/]+!..!g;