about summary refs log tree commit diff
path: root/buildtools
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-01-14 00:13:14 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-01-14 00:13:14 +0000
commitd7f3c79ea449736dd86c17e505e194b9c6c154cf (patch)
treefa141598cf3cfaaade654878aa1d3604ae0bb9f8 /buildtools
parent0e630e5c021e47ee51ca8d47d4f6b5ff7bed2a0b (diff)
downloadnetpbm-mirror-d7f3c79ea449736dd86c17e505e194b9c6c154cf.tar.gz
netpbm-mirror-d7f3c79ea449736dd86c17e505e194b9c6c154cf.tar.xz
netpbm-mirror-d7f3c79ea449736dd86c17e505e194b9c6c154cf.zip
Default svgalib to none if doesn't appear to be installed
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@205 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/configure.pl40
1 files changed, 19 insertions, 21 deletions
diff --git a/buildtools/configure.pl b/buildtools/configure.pl
index f8b46608..9b0f136a 100755
--- a/buildtools/configure.pl
+++ b/buildtools/configure.pl
@@ -1075,27 +1075,27 @@ sub getLinuxsvgaLibrary($@) {
     my ($svgalib, $svgalibhdr_dir);
 
     if ($platform eq "GNU") {
-        {
-            my $default;
+        my $default;
 
-            if (-d('/usr/link/svgalib')) {
-                $default = '/usr/link/svgalib/libvga.so';
-            } elsif (-d('/usr/lib/svgalib')) {
-                $default = '/usr/lib/svgalib/libvga.so';
-            } else {
-                $default = 'libvga.so';
-            }
-            
-            print("What is your Svgalib library?\n");
+        if (-d('/usr/link/svgalib')) {
+            $default = '/usr/link/svgalib/libvga.so';
+        } elsif (-d('/usr/lib/svgalib')) {
+            $default = '/usr/lib/svgalib/libvga.so';
+        } elsif (system('ldconfig -p | grep libvga &>/dev/null')) {
+            $default = 'libvga.so';
+        } else {
+            $default = 'none';
+        }
             
-            my $response = prompt("library filename or 'none'", $default);
+        print("What is your Svgalib library?\n");
+        
+        my $response = prompt("library filename or 'none'", $default);
             
-            if ($response ne "none") {
-                $svgalib = $response;
-            }
+        if ($response ne 'none') {
+            $svgalib = $response;
         }
     }
-    if (defined($svgalib)) {
+    if (defined($svgalib) && $svgalib ne 'none') {
         my $default;
         
         if (-d('/usr/include/svgalib')) {
@@ -2148,13 +2148,11 @@ close(MAKEFILE_CONFIG) or
     die("Error:  Close of Makefile.config failed.\n");
 
 print("\n");
-print("We have created the file 'Makefile.config'.  Note, however, that \n");
-print("we guessed a lot at your configuration and you may want to look \n");
-print("at Makefile.config and edit it to your requirements and taste \n");
-print("before doing the make.\n");
+print("We have created the file 'Makefile.config'.  You may want to look \n");
+print("at it and edit it to your requirements and taste before doing the \n");
+print("make.\n");
 print("\n");
 
-
 print("Now you may proceed with 'make'\n");
 print("\n");