Subject: [PATCH] build: fix build on Solaris 10

From: Eric Blake <[email-masked]>
Date: Tue, 5 Oct 2010 08:41:21 -0600

* gnulib: Update to latest, for reduced -lgen scope.
* bootstrap: Synchronize from upstream.
Reported by Clemens Brogi, as bug #7142.
---

And the coreutils counterpart.

* gnulib 7c2e368...ae0a6b2 (9):
  > bootstrap: work with pkg-config
  > faccessat: remove unused wrappers
  > tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
  > gnulib-tool: Synthesize appropriate _LDFLAGS for a libtool library.
  > threadlib: Make option --with-libpth-prefix work.
  > Avoid line length limitation from HP NonStop system header files.
  > read-file tests: Avoid a test failure on NonStop Kernel.
  > gnulib-tool: Fixes for --create-testdir with --libtool.
  > Avoid some lines longer than 80 characters.

 bootstrap |   16 +++++++++-------
 gnulib    |    2 +-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bootstrap b/bootstrap
index 7f0ee81..29802a1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -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

diff --git a/gnulib b/gnulib
index 7c2e368..ae0a6b2 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 7c2e36888a6f0d63557fc2b98a8c8f3d3cb73aa3
+Subproject commit ae0a6b2df106b7ed760cc393312997adf995cc3b
-- 
1.7.2.3