summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author- <nemo@alice.(none)>2013-05-16 21:10:57 +0200
committer- <nemo@alice.(none)>2013-05-16 21:10:57 +0200
commit6aba9fc2635ca02ae4e2089bf6bfa7d78fdfc322 (patch)
treecd047e87f6e5e1c60b8d48c9818716ca4e1f6956
parent919586f8d86ceed1f979967a453f4812fc10d80b (diff)
Fixed sse instruction only set if supported by cpu
-rw-r--r--configure.in31
-rw-r--r--lv2/Makefile.am2
2 files changed, 32 insertions, 1 deletions
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
diff --git a/lv2/Makefile.am b/lv2/Makefile.am
index bb7cea1..55db9b9 100644
--- a/lv2/Makefile.am
+++ b/lv2/Makefile.am
@@ -6,7 +6,7 @@ include $(top_srcdir)/src/Makefile.am.drumgizmo
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/plugingui \
-I$(top_srcdir)/include $(SNDFILE_CXXFLAGS) \
$(PTHREAD_CFLAGS) $(EXPAT_CFLAGS) $(LV2_CFLAGS) \
- $(PLUGIN_GUI_CFLAGS) -DX11 -DSSE -msse -msse2 -msse3 \
+ $(PLUGIN_GUI_CFLAGS) -DX11 \
-DUSE_THREAD
plugindir = $(prefix)/lib/lv2/drumgizmo.lv2