I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c2f35c0d authored by dev's avatar dev
Browse files

core/buildscripts: Added proper uname based BITS detection.

Added automatic detection for the BITS variable.
parent 4fd0261e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment