bootstrap: work with pkg-config
authorEric Blake <eblake@redhat.com>
Tue, 5 Oct 2010 12:35:44 +0000 (06:35 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 5 Oct 2010 14:30:09 +0000 (08:30 -0600)
* build-aux/bootstrap (found_aux_dir): Also transliterate - in
prerequisite name.
(print_versions): Be robust to any \ in $buildreq.  Avoid listing
prerequisites that were already found, to avoid confusion.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
build-aux/bootstrap

index 87559f4..76d3d01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-10-05  Eric Blake  <eblake@redhat.com>
 
+       bootstrap: work with pkg-config
+       * build-aux/bootstrap (found_aux_dir): Also transliterate - in
+       prerequisite name.
+       (print_versions): Be robust to any \ in $buildreq.  Avoid listing
+       prerequisites that were already found, to avoid confusion.
+       Reported by Justin Clift.
+
        faccessat: remove unused wrappers
        * lib/openat.h (accessat, euidaccesat): Delete, since the mere
        presence of these wrappers dragged in -lgen on Solaris.
index 7f0ee81..29802a1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2010-09-30.21; # UTC
+scriptversion=2010-10-05.14; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -351,7 +351,7 @@ check_versions() {
       app=libtoolize
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]' '[A-Z]'`
+    appvar=`echo $app | tr 'a-z-' 'A-Z_'`
     test "$appvar" = TAR && appvar=AMTAR
     eval "app=\${$appvar-$app}"
     inst_ver=$(get_version $app)
@@ -374,7 +374,7 @@ check_versions() {
 print_versions() {
   echo "Program    Min_version"
   echo "----------------------"
-  printf "$buildreq"
+  printf %s "$buildreq"
   echo "----------------------"
   # can't depend on column -t
 }
@@ -392,10 +392,12 @@ if test $use_libtool = 1; then
 fi
 
 if ! printf "$buildreq" | check_versions; then
-  test -f README-prereq &&
-  echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
-  echo
-  print_versions
+  echo >&2
+  if test -f README-prereq; then
+    echo "See README-prereq for notes on obtaining the prerequisite programs" >&2
+  else
+    echo "Please install the prerequisite programs" >&2
+  fi
   exit 1
 fi