[vlc-devel] commit: Configure: add a new configure switch for SSE3 ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Tue Sep 22 14:46:18 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Sep 22 00:54:09 2009 +0200| [5a0ff31e26ecb174f501246745a887ab5331ca15] | committer: Jean-Baptiste Kempf
Configure: add a new configure switch for SSE3
This makes SSE3/SSSE3 in the same switch. Maybe this should be fusionned with SSE/SSE2 ?
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a0ff31e26ecb174f501246745a887ab5331ca15
---
configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index daf33c8..6627c2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1455,6 +1455,48 @@ AS_IF([test "${enable_sse}" != "no"], [
])
])
+AC_ARG_ENABLE(ssse3,
+[ --disable-sse3 disable SSE3/SSSE3 optimizations (default auto)]
+,, [
+ case "${host_cpu}" in
+ i686|x86_64)
+ enable_sse3=yes
+ ;;
+ *)
+ enable_sse3=no
+ ;;
+ esac
+])
+AS_IF([test "${enable_sse3}" != "no"], [
+
+ AC_CACHE_CHECK([if $CC groks SSE3 inline assembly],
+ [ac_cv_sse3_inline],
+ [CFLAGS="${CFLAGS_save} -O -msse3"
+ AC_TRY_COMPILE(,[void *p;asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p));],
+ ac_cv_sse3_inline=yes, ac_cv_sse3_inline=no)
+ ARCH="${ARCH} sse3"
+ ])
+ AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
+ AC_DEFINE(CAN_COMPILE_SSE3, 1,
+ [Define to 1 if SSE3 inline assembly is available.])
+ ]
+ )
+
+ AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly],
+ [ac_cv_ssse3_inline],
+ [CFLAGS="${CFLAGS_save} -O -mssse3"
+ AC_TRY_COMPILE(,[void *p;asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p));],
+ ac_cv_ssse3_inline=yes, ac_cv_ssse3_inline=no)
+ ARCH="${ARCH} ssse3"
+ ])
+
+ AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
+ AC_DEFINE(CAN_COMPILE_SSSE3, 1,
+ [Define to 1 if SSSE3 inline assembly is available.])
+ ]
+ )
+])
+
AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly],
[ac_cv_3dnow_inline],
[CFLAGS="${CFLAGS_save}"
More information about the vlc-devel
mailing list