From 7a9e9468e6857434755bc2d14ed43616bd628a05 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 31 Oct 2006 21:28:11 +0000 Subject: 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 --- configure.in | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. -- cgit v1.2.3