summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-10-31 21:28:11 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-10-31 21:28:11 +0000
commit7a9e9468e6857434755bc2d14ed43616bd628a05 (patch)
treeda12c55536dfdea61ae204171727d3abdf901147
parent4e0cea8f1024e10a5a6e0ebe114625d8c2fa4d70 (diff)
Add -fno-strict-aliasing to compiler options since GCC doesn't understand
that char * and unsigned char * are safe to interchange (STR #1484) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5538 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--configure.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9ac0075aa..4fd326e6b 100644
--- a/configure.in
+++ b/configure.in
@@ -881,6 +881,16 @@ if test -n "$GCC"; then
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
+ # See if GCC supports -fno-strict-aliasing...
+ AC_MSG_CHECKING(if GCC supports -fno-strict-aliasing)
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ AC_TRY_COMPILE(,,
+ OPTIM="$OPTIM -fno-strict-aliasing"
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+ CFLAGS="$OLDCFLAGS"
+
# See if we are running Solaris; if so, try the -fpermissive option...
# This option is required on some versions of Solaris to work around
# bugs in the X headers up through Solaris 7.