Update configure.sh script

This commit is contained in:
Jeffrey Walton 2020-07-30 09:31:03 -04:00
parent 0e8eba1df2
commit b3949f7796
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -45,6 +45,7 @@ fi
SUN_COMPILER=$(${CXX} -V 2>/dev/null | ${GREP} -i -c -E 'CC: (Sun|Studio)')
XLC_COMPILER=$(${CXX} -qversion 2>/dev/null | ${GREP} -i -c "IBM XL")
CLANG_COMPILER=$(${CXX} --version 2>/dev/null | ${GREP} -i -c -E 'clang|llvm')
if [[ "$SUN_COMPILER" -ne 0 ]]
then
@ -62,18 +63,35 @@ then
IS_IA32=0
IS_ARM32=0
IS_ARMV8=0
IS_PPC=$(uname -m 2>&1 | ${GREP} -v 64 | ${GREP} -c -E 'ppc|powerpc')
IS_PPC=$(uname -m 2>&1 | ${GREP} -c -E 'ppc|powerpc')
IS_PPC64=$(uname -m 2>&1 | ${GREP} -c -E 'ppc64|powerpc64')
elif [[ "$CLANG_COMPILER" -ne 0 ]]
then
IS_X86=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -c -E 'i386|i486|i585|i686')
IS_X64=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -c -E 'i86pc|x86_64|amd64')
IS_IA32=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -c -E 'i86pc|i386|i486|i585|i686|x86_64|amd64')
IS_ARM32=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -i -c -E 'arm|armhf|armv7|eabihf|armv8')
IS_ARMV8=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -i -c -E 'aarch32|aarch64|arm64')
IS_PPC=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -i -c -E 'ppc|powerpc')
IS_PPC64=$(${CXX} ${CXXFLAGS} -dM -E - </dev/null | ${GREP} -c -E 'ppc64|powerpc64')
else
IS_X86=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -c -E 'i386|i486|i585|i686')
IS_X64=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -c -E 'i86pc|x86_64|amd64')
IS_IA32=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -c -E 'i86pc|i386|i486|i585|i686|x86_64|amd64')
IS_X86=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'i386|i486|i585|i686')
IS_X64=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'i86pc|x86_64|amd64')
IS_IA32=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'i86pc|i386|i486|i585|i686|x86_64|amd64')
IS_ARM32=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'arm|armhf|armv7|eabihf|armv8')
IS_ARMV8=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'aarch32|aarch64|arm64')
IS_PPC=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -v 64 | ${GREP} -c -E 'ppc|powerpc')
IS_PPC64=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -c -E 'ppc64|powerpc64')
IS_PPC=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'ppc|powerpc')
IS_PPC64=$(${CXX} ${CXXFLAGS} -dumpmachine 2>&1 | ${GREP} -i -c -E 'ppc64|powerpc64')
fi
# ===========================================================================
# ================================== Fixups =================================
# ===========================================================================
if [[ "${IS_X64}" -ne 0 ]]; then IS_X86=0; fi
if [[ "${IS_ARMV8}" -ne 0 ]]; then IS_ARM32=0; fi
if [[ "${IS_PPC64}" -ne 0 ]]; then IS_PPC=0; fi
# ===========================================================================
# =================================== Info ==================================
# ===========================================================================