summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-16 17:09:27 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-16 17:09:27 +0000
commitd277092d10c486f94d159f65a37c7cd492d00652 (patch)
treedc10f75d9e0207d002e855623e32423ff0941ee0 /configure.in
parent94b9c4cc347f4c7a3745d001414e565dbf839b62 (diff)
downloadhercules-d277092d10c486f94d159f65a37c7cd492d00652.tar.gz
hercules-d277092d10c486f94d159f65a37c7cd492d00652.tar.bz2
hercules-d277092d10c486f94d159f65a37c7cd492d00652.tar.xz
hercules-d277092d10c486f94d159f65a37c7cd492d00652.zip
* Added -fno-strict-aliasing detection to configure.in (-fstrict-aliasing is added through -O2), since the code is not aliasing safe and causes warnings with gcc.
- This also fixes a missing line in the pre-built configure script (since r14870). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14935 54d463be-8e91-2dee-dedb-b68131a5f0ec
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])