From 6aba9fc2635ca02ae4e2089bf6bfa7d78fdfc322 Mon Sep 17 00:00:00 2001 From: - Date: Thu, 16 May 2013 21:10:57 +0200 Subject: Fixed sse instruction only set if supported by cpu --- configure.in | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 32c1c1c..6a68625 100644 --- a/configure.in +++ b/configure.in @@ -45,6 +45,37 @@ if test "x$enable_lv2" = "xyes"; then dnl Check for Xlib dnl ====================== PKG_CHECK_MODULES(X11, x11 >= 1.0) + + dnl =========================== + dnl Check for SSE instructions + dnl =========================== + AC_MSG_CHECKING([for sse3 instructions]) + if grep -q "sse3" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + CXXFLAGS="$CXXFLAGS -msse3" + AC_SUBST(CXXFLAGS) + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([for sse2 instructions]) + if grep -q "sse2" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + CXXFLAGS="$CXXFLAGS -msse2" + AC_SUBST(CXXFLAGS) + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([for sse instructions]) + if grep -q "sse" /proc/cpuinfo + then + AC_MSG_RESULT([yes]) + CXXFLAGS="$CXXFLAGS -DSSE -msse" + AC_SUBST(CXXFLAGS) + else + AC_MSG_RESULT([no]) + fi else AC_MSG_RESULT([*** LV2 plugin will not be compiled ***]) enable_lv2=no -- cgit v1.2.3 From 565aea03207e93ee8253de9f3d3c36b120b54547 Mon Sep 17 00:00:00 2001 From: - Date: Thu, 16 May 2013 21:33:16 +0200 Subject: Only applying sse-flags in lv2. --- configure.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 6a68625..1b2123c 100644 --- a/configure.in +++ b/configure.in @@ -53,8 +53,8 @@ if test "x$enable_lv2" = "xyes"; then if grep -q "sse3" /proc/cpuinfo then AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -msse3" - AC_SUBST(CXXFLAGS) + LV2FLAGS="-msse3" + AC_SUBST(LV2FLAGS) else AC_MSG_RESULT([no]) fi @@ -62,8 +62,8 @@ if test "x$enable_lv2" = "xyes"; then if grep -q "sse2" /proc/cpuinfo then AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -msse2" - AC_SUBST(CXXFLAGS) + LV2FLAGS="$LV2FLAGS -msse2" + AC_SUBST(LV2FLAGS) else AC_MSG_RESULT([no]) fi @@ -71,8 +71,8 @@ if test "x$enable_lv2" = "xyes"; then if grep -q "sse" /proc/cpuinfo then AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -DSSE -msse" - AC_SUBST(CXXFLAGS) + LV2FLAGS="$LV2FLAGS -DSSE -msse" + AC_SUBST(LV2FLAGS) else AC_MSG_RESULT([no]) fi -- cgit v1.2.3 From 165af82e9b8ecf098357eb4637888fb5f9487e3d Mon Sep 17 00:00:00 2001 From: - Date: Thu, 16 May 2013 21:41:00 +0200 Subject: Moved sse flags to SSEFLAGS variable. --- configure.in | 65 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 1b2123c..ca3b751 100644 --- a/configure.in +++ b/configure.in @@ -45,37 +45,6 @@ if test "x$enable_lv2" = "xyes"; then dnl Check for Xlib dnl ====================== PKG_CHECK_MODULES(X11, x11 >= 1.0) - - dnl =========================== - dnl Check for SSE instructions - dnl =========================== - AC_MSG_CHECKING([for sse3 instructions]) - if grep -q "sse3" /proc/cpuinfo - then - AC_MSG_RESULT([yes]) - LV2FLAGS="-msse3" - AC_SUBST(LV2FLAGS) - else - AC_MSG_RESULT([no]) - fi - AC_MSG_CHECKING([for sse2 instructions]) - if grep -q "sse2" /proc/cpuinfo - then - AC_MSG_RESULT([yes]) - LV2FLAGS="$LV2FLAGS -msse2" - AC_SUBST(LV2FLAGS) - else - AC_MSG_RESULT([no]) - fi - AC_MSG_CHECKING([for sse instructions]) - if grep -q "sse" /proc/cpuinfo - then - AC_MSG_RESULT([yes]) - LV2FLAGS="$LV2FLAGS -DSSE -msse" - AC_SUBST(LV2FLAGS) - else - AC_MSG_RESULT([no]) - fi else AC_MSG_RESULT([*** LV2 plugin will not be compiled ***]) enable_lv2=no @@ -353,11 +322,45 @@ LIBS="$tmp_LIBS" AC_SUBST(EXPAT_CFLAGS) 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]) +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 + + AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(LDFLAGS) + + # au/Makefile AC_OUTPUT( -- cgit v1.2.3 From aa02b204c0e5f92e8b444db52f25bb6b17dd6dc4 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Fri, 17 May 2013 10:51:50 +0200 Subject: Disabling of sse and enabling sse with level. --- configure.in | 72 ++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 26 deletions(-) (limited to 'configure.in') 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) -- cgit v1.2.3 From 87370e2852b4dc3c6b32d4d82aa14f76648b19d3 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Fri, 17 May 2013 11:02:11 +0200 Subject: Consistent naming of SSEFLAGS variable. --- configure.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 6fea409..d149ce9 100644 --- a/configure.in +++ b/configure.in @@ -334,13 +334,13 @@ fi #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" + SSEFLAGS="-DSSE -msse -msse2 -mss3" elif test "x$enable_sse" = "x2"; then AC_MSG_RESULT([Setting sse level 2]) - SSE_FLAGS="-DSSE -msse -msse2" + SSEFLAGS="-DSSE -msse -msse2" elif test "x$enable_sse" = "x1"; then AC_MSG_RESULT([Setting sse level 1]) - SSE_FLAGS="-DSSE -msse" + SSEFLAGS="-DSSE -msse" elif test "x$enable_sse" = "xauto"; then AC_MSG_RESULT([Auto setting sse level]) AC_MSG_CHECKING([for sse3 instructions]) -- cgit v1.2.3