forked from I2P_Developers/i2p.i2p
core/buildscripts: Added proper uname based BITS detection.
Added automatic detection for the BITS variable.
This commit is contained in:
@@ -24,10 +24,22 @@ esac
|
||||
|
||||
|
||||
if [ -z $BITS ]; then
|
||||
BITS=64
|
||||
UNAME="$(uname -a)"
|
||||
if test "${UNAME#*x86_64}" != "x86_&4"; then
|
||||
BITS=64
|
||||
elif test "${UNAME#*i386}" != "i386"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*i686}" != "i686"; then
|
||||
BITS=32
|
||||
else
|
||||
echo "Unable to detect default setting for BITS variable"
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
|
||||
fi
|
||||
|
||||
|
||||
if [ -z $CC ]; then
|
||||
export CC="gcc"
|
||||
printf "\aCC variable not set, defaulting to $CC\n\a" >&2
|
||||
|
||||
Reference in New Issue
Block a user