diff --git a/install.sh b/install.sh index 10f8211..52b6044 100755 --- a/install.sh +++ b/install.sh @@ -40,11 +40,14 @@ case `uname` in export DARWIN=0 GCC_VERSION=`gcc -dumpversion` COMPILER_NAME="gcc $GCC_VERSION" - if [ "$GCC_VERSION" \> "4.6.0" ] || [ "$GCC_VERSION" = "4.6.0" ] || [ "$GCC_VERSION" = "4.6" ] || [ "$GCC_VERSION" -ge 5 ]; then + if [ "${GCC_VERSION%%.*}" -ge 5 ]; then + export USE_AVX=yes + export USE_AVX2=yes + elif [ "$GCC_VERSION" \> "4.7.0" ] || [ "$GCC_VERSION" = "4.7.0" ] || [ "$GCC_VERSION" = "4.7" ] || [ "$GCC_VERSION" -ge 5 ]; then export USE_AVX=yes - fi - if [ "$GCC_VERSION" \> "4.7.0" ] || [ "$GCC_VERSION" = "4.7.0" ] || [ "$GCC_VERSION" = "4.7" ] || [ "$GCC_VERSION" -ge 5 ]; then export USE_AVX2=yes + elif [ "$GCC_VERSION" \> "4.6.0" ] || [ "$GCC_VERSION" = "4.6.0" ] || [ "$GCC_VERSION" = "4.6" ] || [ "$GCC_VERSION" -ge 5 ]; then + export USE_AVX=yes fi ;; esac