Index: trunk/psconfig/pschecklibs
===================================================================
--- trunk/psconfig/pschecklibs	(revision 19150)
+++ trunk/psconfig/pschecklibs	(revision 19604)
@@ -2,4 +2,5 @@
 
 $tagsets = "tagsets";
+$needdev = 0;
 
 # default system library locations
@@ -127,10 +128,14 @@
     if ($line =~ m|^\s*\#|) { next; }
 
-    ($type, $name, $altnames, $altpaths, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = split (" ", $line);
-    if (($use_equals ne "Y") && ($use_equals ne "N")) { die "invalid value for use_equals field\n"; }
+    ($type, $name, $altnames, $altpaths, $tarball, $tardir, $auto_force, $configure_opts, $make_opts, $install_opts) = split (" ", $line);
+    if (($auto_force ne "Y") && ($auto_force ne "N")) { die "invalid value for auto_force field\n"; }
 
     if ((defined $force{lc($name)} or defined $force{'all'}) and lc($tarball) ne "none") {
-        &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
-#       exit 0;
+        &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
+        next;
+    }
+
+    if ($build and ($auto_force eq "Y")) {
+        &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
         next;
     }
@@ -147,6 +152,15 @@
     }
 
+    if ($auto_force eq "Y") {
+	print "$name will be built\n";
+    }
+
     if ($found) {
-        print "pass $name ($found)\n";
+	if ($found eq "runtime-only") {
+	    print "runtime $name ($found)\n";
+	    push @faillibs, "$name";
+	} else {
+	    print "pass $name ($found)\n";
+	}
         next;
     } else {
@@ -155,4 +169,8 @@
     }
 
+    if ($auto_force eq "Y") {
+	print "$name will be built\n";
+    }
+
     if (! $build) { next; }
     if ($type eq "inc") {
@@ -160,5 +178,5 @@
         # Will attempt to install library.
     }
-    &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
+    &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
 }
 if ($build) { exit 0; }
@@ -172,4 +190,8 @@
     print "\n";
     print "you may install them in your local path by re-running pschecklibs with -build\n";
+
+    print "*** WARNING *** Some libraries are installed in your system only for runtime use, not for linking.\n";
+    print " For many systems, it is possible to install the developer version of a library, and this may be safer\n";
+    print " If you choose to install our version of any of these libraries, please use -force (library) in your psbuild / pschecklibs options\n";
     exit 1;
 }
@@ -179,5 +201,5 @@
 
 sub buildlib {
-    my ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = @_;
+    my ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts) = @_;
 
     if ($tarball eq "NONE") {
@@ -278,23 +300,29 @@
         # versions libraries if we find only a .so.N without a matching
         # .so, we link this in the installed libdir
-        foreach $topdir ( @libpath ) {
-            foreach $subdir ( @subdirs ) {
-                if ($subdir eq ".") {
-                    $path = $topdir;
-                } else {
-                    $path = "$topdir/$subdir";
-                }
-                if (! -e $path) { next; }
-                @libnames = <$path/$tryname.$dlltype*>;
-                if (@libnames > 0) {
-                    $libname = @libnames[-1];
-                    # print "making link to numbered .$dlltype library $libdir/$f.$dlltype\n";
-                    symlink $libname, "$libdir/$f.$dlltype";
-                    if ($?) { exit 1; }
-                    return $libname;
-                }
-                # print "no $path/$tryname.$dlltype*\n";
-            }
-        }
+	# XXX this was probably a mistake to allow some systems to build without supplied libs
+	if (1) {
+	    foreach $topdir ( @libpath ) {
+		foreach $subdir ( @subdirs ) {
+		    if ($subdir eq ".") {
+			$path = $topdir;
+		    } else {
+			$path = "$topdir/$subdir";
+		    }
+		    if (! -e $path) { next; }
+		    @libnames = <$path/$tryname.$dlltype*>;
+		    if (@libnames > 0) {
+			$libname = @libnames[-1];
+			$needdev = 1;
+			# print " *** need developer version of $name\n";
+			return "runtime-only";
+
+			# XXX old option: link in existing library
+			# symlink $libname, "$libdir/$f.$dlltype";
+			# if ($?) { exit 1; }
+			# return $libname;
+		    }
+		}
+	    }
+	}
     }
     return 0;
