diff --git a/core/c/jbigi/build_jbigi.sh b/core/c/jbigi/build_jbigi.sh
index f2c042ef03d029ec6ca91dd497d0e18462d72288..73cc5db8344c60075acb07798e5200ef4d036a5c 100755
--- a/core/c/jbigi/build_jbigi.sh
+++ b/core/c/jbigi/build_jbigi.sh
@@ -5,18 +5,28 @@
 [ -z "$CC" ] && CC="gcc"
 
 if [ -z $BITS ]; then
-  if [[ $(uname -a) =~ "x86_64" ]]; then
+  UNAME="$(uname -a)"
+  if test "${UNAME#*x86_64}" != "x86_&4"; then
     BITS=64
-  elif [[ $(uname -a) =~ "i386" ]]; then
+  elif test "${UNAME#*i386}" != "i386"; then
     BITS=32
-  elif [[ $(uname -a) =~ "i686" ]]; then
+  elif test "${UNAME#*i686}" != "i686"; then
     BITS=32
+  elif test "${UNAME#*armv6}" != "armv6"; then
+    BITS=32
+  elif test "${UNAME#*armv7}" != "armv7"; then
+    BITS=32
+  elif test "${UNAME#*aarch32}" != "aarch32"; then
+    BITS=32
+  elif test "${UNAME#*aarch64}" != "aarch64"; then
+    BITS=64
   else
+ 
     echo "Unable to detect default setting for BITS variable"
     exit
   fi
 
-  printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
+  printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
 fi
 
 # If JAVA_HOME isn't set we'll try to figure it out
diff --git a/core/c/jbigi/mbuild-all.sh b/core/c/jbigi/mbuild-all.sh
index 5099b578d2b4d9a07268036d03cdac30030f1953..be3072ac8bb4ac33b695d591f0e10d1c49c2dab6 100755
--- a/core/c/jbigi/mbuild-all.sh
+++ b/core/c/jbigi/mbuild-all.sh
@@ -93,12 +93,21 @@ if [ -z $BITS ]; then
     BITS=32
   elif test "${UNAME#*i686}" != "i686"; then
     BITS=32
+  elif test "${UNAME#*armv6}" != "armv6"; then
+    BITS=32
+  elif test "${UNAME#*armv7}" != "armv7"; then
+    BITS=32
+  elif test "${UNAME#*aarch32}" != "aarch32"; then
+    BITS=32
+  elif test "${UNAME#*aarch64}" != "aarch64"; then
+    BITS=64
   else
+ 
     echo "Unable to detect default setting for BITS variable"
     exit
   fi
 
-  printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
+  printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
 fi
 
 
diff --git a/core/c/jcpuid/build.sh b/core/c/jcpuid/build.sh
index 63dacb55e968d973f3955968e3c169ba4b568d3b..98fb67ab6305524b951f82fbcdc1c599304d23ee 100755
--- a/core/c/jcpuid/build.sh
+++ b/core/c/jcpuid/build.sh
@@ -31,12 +31,21 @@ if [ -z $BITS ]; then
     BITS=32
   elif test "${UNAME#*i686}" != "i686"; then
     BITS=32
+  elif test "${UNAME#*armv6}" != "armv6"; then
+    BITS=32
+  elif test "${UNAME#*armv7}" != "armv7"; then
+    BITS=32
+  elif test "${UNAME#*aarch32}" != "aarch32"; then
+    BITS=32
+  elif test "${UNAME#*aarch64}" != "aarch64"; then
+    BITS=64
   else
+ 
     echo "Unable to detect default setting for BITS variable"
     exit
   fi
 
-  printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
+  printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
 fi