diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2013-05-17 10:51:50 +0200 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2013-05-17 10:51:50 +0200 |
commit | aa02b204c0e5f92e8b444db52f25bb6b17dd6dc4 (patch) | |
tree | 7ecc74ea36d874343bd565bf0458d091a743250b | |
parent | 165af82e9b8ecf098357eb4637888fb5f9487e3d (diff) |
Disabling of sse and enabling sse with level.
-rw-r--r-- | configure.in | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/configure.in b/configure.in index ca3b751..6fea409 100644 --- a/configure.in +++ b/configure.in @@ -325,34 +325,54 @@ AC_SUBST(EXPAT_LIBS) dnl =========================== dnl Check for SSE instructions dnl =========================== -AC_MSG_CHECKING([for sse3 instructions]) -if grep -q "sse3" /proc/cpuinfo -then - AC_MSG_RESULT([yes]) - SSEFLAGS="-msse3" - AC_SUBST(SSEFLAGS) -else - AC_MSG_RESULT([no]) +AC_ARG_ENABLE([sse], +[ --enable-sse[=level] Enable SSE Level 1, 2, 3 or auto [default=auto]],, + [enable_sse="auto"]) +if test "x$enable_sse" = "xyes"; then + enable_sse="auto" fi -AC_MSG_CHECKING([for sse2 instructions]) -if grep -q "sse2" /proc/cpuinfo -then - AC_MSG_RESULT([yes]) - SSEFLAGS="$SSEFLAGS -msse2" - AC_SUBST(SSEFLAGS) -else - AC_MSG_RESULT([no]) +#AC_MSG_RESULT([SSE: $enable_sse]) +if test "x$enable_sse" = "x3"; then + AC_MSG_RESULT([Setting sse level 3]) + SSE_FLAGS="-DSSE -msse -msse2 -mss3" +elif test "x$enable_sse" = "x2"; then + AC_MSG_RESULT([Setting sse level 2]) + SSE_FLAGS="-DSSE -msse -msse2" +elif test "x$enable_sse" = "x1"; then + AC_MSG_RESULT([Setting sse level 1]) + SSE_FLAGS="-DSSE -msse" +elif test "x$enable_sse" = "xauto"; then + AC_MSG_RESULT([Auto setting sse level]) + AC_MSG_CHECKING([for sse3 instructions]) + if grep -q "sse3" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + SSEFLAGS="-msse3" + AC_SUBST(SSEFLAGS) + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([for sse2 instructions]) + if grep -q "sse2" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + SSEFLAGS="$SSEFLAGS -msse2" + AC_SUBST(SSEFLAGS) + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([for sse instructions]) + if grep -q "sse" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + SSEFLAGS="$SSEFLAGS -DSSE -msse" + AC_SUBST(SSEFLAGS) + else + AC_MSG_RESULT([no]) + fi +else + AC_MSG_RESULT([*** Disabling SSE ***]) fi -AC_MSG_CHECKING([for sse instructions]) -if grep -q "sse" /proc/cpuinfo -then - AC_MSG_RESULT([yes]) - SSEFLAGS="$SSEFLAGS -DSSE -msse" - AC_SUBST(SSEFLAGS) -else - AC_MSG_RESULT([no]) -fi - AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) |