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:
@ -5,7 +5,17 @@
|
||||
[ -z "$CC" ] && CC="gcc"
|
||||
|
||||
if [ -z $BITS ]; then
|
||||
BITS=64
|
||||
if [[ $(uname -a) =~ "x86_64" ]]; then
|
||||
BITS=64
|
||||
elif [[ $(uname -a) =~ "i386" ]]; then
|
||||
BITS=32
|
||||
elif [[ $(uname -a) =~ "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
|
||||
|
||||
|
@ -86,10 +86,22 @@ fi
|
||||
|
||||
|
||||
if [ -z $BITS ]; then
|
||||
BITS=32
|
||||
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
|
||||
|
@ -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