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 197a4a4ed..a9e4c289a 100644
--- a/configure.in
+++ b/configure.in
@@ -425,6 +425,22 @@ AC_SUBST([WITH_PLUGINS])
#
+# -O2 implies -fstrict-aliasing, but the code is not safe for that
+#
+AC_MSG_CHECKING([whether $CC supports -fno-strict-aliasing])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fno-strict-aliasing"
+AC_COMPILE_IFELSE(
+ [int foo;],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+#
# DB_MANUAL_CAST_TO_UNION
#
AC_MSG_CHECKING([whether $CC is able to typecast to union])