Allow uname values to be overridden by the environment
authorDr. Stephen Henson <steve@openssl.org>
Wed, 7 Oct 2009 16:44:03 +0000 (16:44 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 7 Oct 2009 16:44:03 +0000 (16:44 +0000)
config

diff --git a/config b/config
index 2b7c57c9eb581b597bf6155a7302239492836e3a..98729827c8e6711159d642227637fd8c6a339383 100755 (executable)
--- a/config
+++ b/config
@@ -48,10 +48,10 @@ done
 
 # First get uname entries that we use below
 
-MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
-RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
-SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
-VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
+[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
+[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
+[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
+[ "$BUILD" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
 
 
 # Now test for ISC and SCO, since it is has a braindamaged uname.