Change-Id: I386a67682ec48e46f37416feef914f4df7e3ef32
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
-if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
- LIBDIR_ARCH="${LIBDIR}64"
-else
- LIBDIR_ARCH="$LIBDIR"
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then
+ # Detect the userspace bitness in a distro agnostic way
+ if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then
+ LIBDIR_ARCH="${LIBDIR}64"
+ else
+ LIBDIR_ARCH="$LIBDIR"
+ fi
fi
# Create tmp directory
fi
# Create tmp directory
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
-if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
- LIBDIR_ARCH="${LIBDIR}64"
-else
- LIBDIR_ARCH="$LIBDIR"
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then
+ # Detect the userspace bitness in a distro agnostic way
+ if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then
+ LIBDIR_ARCH="${LIBDIR}64"
+ else
+ LIBDIR_ARCH="$LIBDIR"
+ fi
fi
# Create tmp directory
fi
# Create tmp directory
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
-if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
- LIBDIR_ARCH="${LIBDIR}64"
-else
- LIBDIR_ARCH="$LIBDIR"
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then
+ # Detect the userspace bitness in a distro agnostic way
+ if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then
+ LIBDIR_ARCH="${LIBDIR}64"
+ else
+ LIBDIR_ARCH="$LIBDIR"
+ fi
fi
DEPS_INC="$WORKSPACE/deps/build/include"
fi
DEPS_INC="$WORKSPACE/deps/build/include"
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
# RHEL and SLES both use lib64 but don't bother shipping a default autoconf
# site config that matches this.
-if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then
- LIBDIR_ARCH="${LIBDIR}64"
-else
- LIBDIR_ARCH="$LIBDIR"
+if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then
+ # Detect the userspace bitness in a distro agnostic way
+ if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then
+ LIBDIR_ARCH="${LIBDIR}64"
+ else
+ LIBDIR_ARCH="$LIBDIR"
+ fi
fi
DEPS_INC="$WORKSPACE/deps/build/include"
fi
DEPS_INC="$WORKSPACE/deps/build/include"