diff --git a/autoconf_share/dorubbuild b/autoconf_share/dorubbuild
index 650f6729aac8960179db229adef8248657885e08..0abf847ca4951a59119beef6e22c3e4a1664a0b0 100755
--- a/autoconf_share/dorubbuild
+++ b/autoconf_share/dorubbuild
@@ -36,6 +36,8 @@ skipbuilt=$1
 shift
 kopt=$1
 shift
+jobsopt=$1
+shift
 buildmake=$1
 shift
 conf=$1
@@ -147,7 +149,7 @@ for pkg in $pkgs
 do
   echo "" >> $logfile
   if [ $skipbuilt = 1 ]; then
-    fgrep "$pkg " $resfile >& /dev/null
+    fgrep "$pkg " $resfile 2>&1 > /dev/null
     if [ $? = 0 ]; then
       echo "  skipping package $pkg; already built in a previous run" | tee -a $logfile
       continue
diff --git a/autoconf_share/lofar_aips++.m4 b/autoconf_share/lofar_aips++.m4
index a1bf394b126867a05d21295d98240281972689fc..1d1938a8678538b5cfa8f6dec96f7a7e18485e6b 100644
--- a/autoconf_share/lofar_aips++.m4
+++ b/autoconf_share/lofar_aips++.m4
@@ -174,7 +174,7 @@ if [ "$lfr_use_casa" = 1 ]; then
     AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_NO_TEMPLATE_SRC"
   fi
   # Check if we're on a x86-64 bit system.
-  if test "`arch`" = "x86_64"; then
+  if test "`uname -m`" = "x86_64"; then
     AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_64B"
   fi
 
diff --git a/autoconf_share/lofar_external.m4 b/autoconf_share/lofar_external.m4
index a73ec5b4296181e00681511895558770117bfb80..08cda0e3f1ae5420f9d0d899cada0d5b9c4b6b86 100644
--- a/autoconf_share/lofar_external.m4
+++ b/autoconf_share/lofar_external.m4
@@ -281,7 +281,7 @@ else
 
 ## Use different lib directory on 64 bit systems.
   lfr_libdext=lib
-  if test "`arch`" = "x86_64"; then
+  if test "`uname -m`" = "x86_64"; then
     lfr_libdext=lib64;
   fi
 ## Put possible version into the library names.
diff --git a/autoconf_share/lofar_init.m4 b/autoconf_share/lofar_init.m4
index 5809b0fd283e9aaeb0153a4a026c4afb24a75b76..42ab86549ab340addf9068e6244496327ff11a89 100644
--- a/autoconf_share/lofar_init.m4
+++ b/autoconf_share/lofar_init.m4
@@ -412,7 +412,7 @@ AC_CHECK_FILE([$lfr_find], [lfr_var=yes], [lfr_var=no])
   [fi]
 
   # Make sure that libraries are installed in lib64 on x86_64 architectures.
-  if test "`arch`" == "x86_64"; then
+  if test "`uname -m`" == "x86_64"; then
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib64'
       AC_SUBST(libdir, "$libdir")
diff --git a/autoconf_share/rub b/autoconf_share/rub
index a7dd467ad2388e20e282219a7c9f53c86a87ee0a..15de8636e14e2e916dec0730ba428020c6e37829 100755
--- a/autoconf_share/rub
+++ b/autoconf_share/rub
@@ -725,7 +725,7 @@ if [ $boot != 0 ]; then
   for pkg in $pkgs
   do
     if [ $skipbuilt = 1 ]; then
-      fgrep "$pkg " build.result >& /dev/null
+      fgrep "$pkg " build.result 2>&1 > /dev/null
       if [ $? = 0 ]; then
         echo "  package $pkg already bootstrapped in a previous run" | tee build.log
         continue
diff --git a/autoconf_share/rubbuild b/autoconf_share/rubbuild
index 2d6b76376c8f05b79f1e796915d67c2e8fadabbe..99f5932b630c32c6987577b30cf188c67cbef399 100755
--- a/autoconf_share/rubbuild
+++ b/autoconf_share/rubbuild
@@ -190,6 +190,10 @@ do
     shift
   else
     case "$1" in
+    -j*)
+      jobsopt='-j'`echo $1 | sed -e 's/-j//'`
+      shift
+      ;;
     -*)
       echo "$1 is an unknown rubbuild option"
       exit 1
@@ -284,8 +288,8 @@ fi
 # dorubbuild writes the build output to a log file.
 if [ $bg = 1 ]; then
   echo "Building packages on `uname -n` in $buildvarpr in the background"
-  $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs >> /dev/null 2>&1 &
+  $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$jobsopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs >> /dev/null 2>&1 &
 else
   echo "Building packages in $buildvarpr ..."
-  $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs
+  $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$jobsopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs
 fi