Index: trunk/psconfig/pscheckperl
===================================================================
--- trunk/psconfig/pscheckperl	(revision 25893)
+++ trunk/psconfig/pscheckperl	(revision 26256)
@@ -78,7 +78,14 @@
     if ($line =~ m|^\s*\#|) { next; }
 
-    ($N, $module, $tarball, $modver, $prompts) = split (" ", $line);
+    $Nvalue = ($N, $module, $tarball, $modver, $buildopts, $prompts) = split (" ", $line);
+    if ($Nvalue < 6) {
+	print "Error in perl module config line $line\n";
+	exit 1;
+    }
+    # print "N: $N, module: $module, tarball: $tarball, modver: $modver, buildopts: $buildopts, prompts: $prompts\n";
 
-    if ($modver eq "") { $modver = 0; }
+    # we require the number of fields to be fixed, so this test is now invalid:
+    # if ($modver eq "") { $modver = 0; }
+
     system ("pscheckmods $module $modver");
     if (($? == 0) and not defined $force{$module} and not defined $force{'all'}) {
@@ -109,7 +116,11 @@
     chdir $tardir;
 
+    # we use NONE as the empty word
+    if ($buildopts eq "NONE") { $buildopts = ""; }
+    if ($prompts eq "NONE") { $prompts = ""; }
+
     if (-e "Build.PL") {
         # vsystem("perl Build.PL --install_path lib=$perldir ");
-        vsystem("perl Build.PL --install_base $prefix");
+        vsystem("perl Build.PL --install_base $prefix $buildopts");
         vsystem("Build");
         vsystem("Build install");
@@ -118,5 +129,5 @@
         if ($prompts) {
             @answers = split (",", $prompts);
-            open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir");
+            open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir $buildopts");
             foreach $answer (@answers) {
                 print PIPE "$answer\n";
@@ -124,7 +135,6 @@
             close (PIPE);
         } else {
-            vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir");
+            vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir $buildopts");
         }
-
         vsystem ("make < /dev/null");
         vsystem ("make install");
