summaryrefslogtreecommitdiff
path: root/build-aux/bootstrap
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-10-23 13:59:08 +0100
committerPádraig Brady <P@draigBrady.com>2014-10-23 16:00:58 +0100
commit1bbbc2c04e265a3282947f0323ddae8fe3d2ec63 (patch)
treee36737ec8e5ae14498a56550d3ca06a3fb4a09ee /build-aux/bootstrap
parente94cfb19c8d84a09cd2827ec2f75222c6e854781 (diff)
downloadgnulib-1bbbc2c04e265a3282947f0323ddae8fe3d2ec63.tar.gz
bootstrap: print more diagnostics for missing programs
* build-aux/bootstrap: only suppress stderr when checking for alternative program names. This supports programs issuing non standard error messages like: "Provide an AUTOMAKE_VERSION environment variable, please" Reported by Ingo Schwarze with OpenBSD
Diffstat (limited to 'build-aux/bootstrap')
-rwxr-xr-xbuild-aux/bootstrap16
1 files changed, 13 insertions, 3 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 5dbd1b14c0..4f0493ad9a 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -210,7 +210,17 @@ bootstrap_sync=false
use_git=true
check_exists() {
- ($1 --version </dev/null) >/dev/null 2>&1
+ if test "$1" = "--verbose"; then
+ ($2 --version </dev/null) >/dev/null 2>&1
+ if test $? -ge 126; then
+ # If not found, run with diagnostics as one may be
+ # presented with env variables to set to find the right version
+ ($2 --version </dev/null)
+ fi
+ else
+ ($1 --version </dev/null) >/dev/null 2>&1
+ fi
+
test $? -lt 126
}
@@ -408,7 +418,7 @@ sort_ver() { # sort -V is not generally available
get_version() {
app=$1
- $app --version >/dev/null 2>&1 || return 1
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
$app --version 2>&1 |
sed -n '# Move version to start of line.
@@ -467,7 +477,7 @@ check_versions() {
if [ "$req_ver" = "-" ]; then
# Merely require app to exist; not all prereq apps are well-behaved
# so we have to rely on $? rather than get_version.
- if ! check_exists $app; then
+ if ! check_exists --verbose $app; then
warn_ "Error: '$app' not found"
ret=1
fi