summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 402919d174..6ea414ece0 100644
--- a/configure.in
+++ b/configure.in
@@ -771,6 +771,22 @@ if test "$GCC" = yes; then
for oflag in -fno-fast-math; do
RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)])
done
+ AS_CASE(["$target"],
+ [*-darwin*], [
+ # doesn't seem necessary on Mac OS X
+ ],
+ [[i[4-6]86*|i386*mingw*]], [
+ RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [
+ RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)
+ ])
+ AS_CASE(["$XCFLAGS"],
+ [[*-msse2*]], [
+ RUBY_TRY_CFLAGS(-mstackrealign, [
+ RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign)
+ ])
+ ])
+ ]
+ )
fi
test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\""