diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-09-28 02:28:40 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-09-28 02:28:40 +0300 |
commit | 8491b31c4b58385fbe8986b9c99685ce1842b158 (patch) | |
tree | 793717a2f82f58b86b97509981bbbcd63a229aed /configure.ac | |
parent | db3f85d062ae688dfed5d52970d2740e446a5220 (diff) |
enable -msse2 -mfpmath=sse on x86 machines that support it; fixes #450; fixes #263
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 8239dd11f2..240df9ddf7 100644 --- a/configure.ac +++ b/configure.ac @@ -85,8 +85,18 @@ AC_C_INLINE AC_FUNC_STRERROR_R AC_C__GENERIC AC_C___ATOMIC -AC_CANONICAL_HOST AC_CHECK_SIZEOF([void *]) +AC_CANONICAL_HOST + +AC_ARG_VAR([SSE_CANDIDATE], [C compiler flags for SSE]) +AS_CASE([$host_cpu], + [i?86], [SSE_CANDIDATE="yes"] +) +AC_SUBST([SSE_CANDIDATE]) +if test "${SSE_CANDIDATE}" = "yes"; then + opt="-msse2 -mfpmath=sse" + AX_CHECK_COMPILE_FLAG($opt, [CFLAGS="$CFLAGS $opt"], []) +fi AC_ARG_VAR([MATH_CFLAGS], [C compiler flags for math]) AC_ARG_VAR([MATH_LIBS], [linker flags for math]) |