Index: trunk/psconfig/pscheckperl
===================================================================
--- trunk/psconfig/pscheckperl	(revision 25802)
+++ trunk/psconfig/pscheckperl	(revision 25803)
@@ -9,14 +9,14 @@
 for (; @ARGV > 0; ) {
     if ($ARGV[0] eq "-version") {
-	$version = $ARGV[1];
+        $version = $ARGV[1];
         shift; shift; next;
     }
     if ($ARGV[0] eq "-build") {
-	$build = 1;
+        $build = 1;
         shift; next;
     }
     if ($ARGV[0] eq "-force") {
-	$force{$ARGV[1]} = 1;
-	shift; shift; next;
+        $force{$ARGV[1]} = 1;
+        shift; shift; next;
     }
     if ($ARGV[0] eq "-h")     { &usage (); }
@@ -31,5 +31,5 @@
 if ( @ARGV > 1) { &usage(); }
 
-if ( @ARGV == 0) { 
+if ( @ARGV == 0) {
     @list = <$tagsets/*.perl>;
     $file = $list[-1];
@@ -79,20 +79,20 @@
     ($N, $module, $tarball, $modver, $prompts) = split (" ", $line);
 
-    if ($modver eq "") { $modver = 0; } 
+    if ($modver eq "") { $modver = 0; }
     system ("pscheckmods $module $modver");
-    if (($? == 0) and not defined $force{$module} and not defined $force{'all'}) { 
-	# print "$module: found\n";
-	next; 
+    if (($? == 0) and not defined $force{$module} and not defined $force{'all'}) {
+        # print "$module: found\n";
+        next;
     }
 
     if (defined $force{$module}) {
-	print "$module: force\n";
+        print "$module: force\n";
     } else {
-	print "$module: missing\n";
+        print "$module: missing\n";
     }
-    unless ($build or defined $force{$module} or defined $force{'all'}) { 
-	$Nmissing ++;
-	push @missing, $module;
-	next; 
+    unless ($build or defined $force{$module} or defined $force{'all'}) {
+        $Nmissing ++;
+        push @missing, $module;
+        next;
     }
 
@@ -102,5 +102,5 @@
     print "extract $module from $tarball\n";
     vsystem ("tar xvzf $tarball");
-    
+
     ($tardir) = $tarball =~ m|(\S*).tar.gz|;
     print "tardir: $tardir\n";
@@ -108,18 +108,24 @@
     chdir $tardir;
 
-    # build the MakeMaker makefile, setting the output directories
-    if ($prompts) {
-	@answers = split (",", $prompts);
-	open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir");
-	foreach $answer (@answers) {
-	    print PIPE "$answer\n";
-	}
-	close (PIPE);
+    if (-e "Build.PL") {
+        vsystem("psbuildperl");
+        vsystem("Build");
+        vsystem("Build install");
     } else {
-	vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir");
+        # build the MakeMaker makefile, setting the output directories
+        if ($prompts) {
+            @answers = split (",", $prompts);
+            open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir");
+            foreach $answer (@answers) {
+                print PIPE "$answer\n";
+            }
+            close (PIPE);
+        } else {
+            vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir");
+        }
+
+        vsystem ("make < /dev/null");
+        vsystem ("make install");
     }
-    
-    vsystem ("make < /dev/null");
-    vsystem ("make install");
 
     chdir $homedir;
@@ -127,11 +133,11 @@
 if (!$build) {
     if ($Nmissing > 0) {
-	print "The following $Nmissing perl modules are missing from your system\n";
-	foreach $name (@missing) {
-	    print "  $name\n";
-	}
-	print "you may install them in your local path by re-running pscheckperl with -build\n";
+        print "The following $Nmissing perl modules are missing from your system\n";
+        foreach $name (@missing) {
+            print "  $name\n";
+        }
+        print "you may install them in your local path by re-running pscheckperl with -build\n";
     } else {
-	print "no perl modules are missing from your system\n";
+        print "no perl modules are missing from your system\n";
     }
 }
@@ -152,7 +158,7 @@
     @list = <$tagsets/*.perl>;
     foreach $line (@list) {
-	chomp $line;
-	($dist) = $line =~ m|$tagsets/(\S*).perl|;
-	print STDERR "$dist\n";
+        chomp $line;
+        ($dist) = $line =~ m|$tagsets/(\S*).perl|;
+        print STDERR "$dist\n";
     }
     exit 2;
