[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1255
Date : Mon Jun 5 17:35:54 BST 2006
Changed paths:
M /Trunk/XaraLX/configure.in
Turn off strict-aliasing so GCC 4.1 does not whinge about type-punned pointers. Also it is dangerous.
Diff:
Index: Trunk/XaraLX/configure.in
===================================================================
--- Trunk/XaraLX/configure.in (revision 1254)
+++ Trunk/XaraLX/configure.in (revision 1255)
@@ -26,13 +26,18 @@
[Disable svn versioning]),
SvnVersionEnable="$enableval", SvnVersionEnable="yes")
+OPT_FLAGS34="-fno-strict-aliasing"
+WARN_FLAGS34="-Wstrict-aliasing=2"
+
# Sort out compile lags
if test "$DebugEnable" = "yes"; then
DEBUG_FLAGS="-ggdb -D_DEBUG"
OPT_FLAGS="-O0"
+ WARN_FLAGS=""
else
DEBUG_FLAGS=""
OPT_FLAGS="-O3"
+ WARN_FLAGS=""
fi
# Note mysteriously we still use --enable-debug to control build flags even when static enabled
@@ -40,39 +45,6 @@
DebugEnable="no"
fi
-# Setup our build flags (if not set by user)
-if test -z "$CFLAGS"; then
- CFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $DEBUG_FLAGS"
-else
- CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -g -fexceptions $DEBUG_FLAGS"
-fi
-if test -z "$CXXFLAGS"; then
- CXXFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $DEBUG_FLAGS"
-else
- CXXFLAGS="$CXXFLAGS -Wall -Wno-unknown-pragmas -g -fexceptions $DEBUG_FLAGS"
-fi
-
-
-# Set language - this should be taken from a configure option
-# Note this MUST be in ISO8859-1 form
-
-# Stop automake directly including stuff
-XRCINCLUDE=include
-
-AC_PROG_CXX
-AC_PROG_INSTALL
-# We don't need dlopen right now and it's not supported on Darwin
-# AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
-
-AC_C_BIGENDIAN
-AC_CHECK_SIZEOF(void*)
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(__int64)
-
# Check that AUTOMAKE is new enough
AutomakeVersion=`automake --version | awk '{ if($3 ~ /automake\)/) print $4}'`
AC_MSG_CHECKING([Automake ($AutomakeVersion)])
@@ -87,6 +59,9 @@
GccVersion=0
PrecompileEnable="yes"
+AC_PROG_CXX
+AC_PROG_INSTALL
+
AC_MSG_CHECKING([Compiler])
if test $ac_compiler_gnu = "yes"; then
GccVersion=`$CXX -v 2>&1 | $AWK '{ if ($2 ~ /version/) print $3 }'`
@@ -94,7 +69,9 @@
if test -n "$GccVersion" && test "$GccVersion" -ge 3004000; then
AC_MSG_RESULT([gcc >= 3.4.0, PreCompiled headers enabled])
- PrecopmpileEnable="yes"
+ WARN_FLAGS="$WARNFLAGS $WARN_FLAGS34"
+ OPT_FLAGS="$OPT_FLAGS $OPT_FLAGS34"
+ PrecompileEnable="yes"
else
AC_MSG_RESULT([gcc < 3.4.0, PreCompiled headers disabled])
PrecompileEnable="no"
@@ -104,6 +81,37 @@
PrecompileEnable="no"
fi
+# Setup our build flags (if not set by user)
+if test -z "$CFLAGS"; then
+ CFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $WARN_FLAGS $DEBUG_FLAGS"
+else
+ CFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $WARN_FLAGS $DEBUG_FLAGS $CFLAGS"
+fi
+if test -z "$CXXFLAGS"; then
+ CXXFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $WARN_FLAGS $DEBUG_FLAGS"
+else
+ CXXFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $OPT_FLAGS $WARN_FLAGS $DEBUG_FLAGS $CXXFLAGS"
+fi
+
+# Set language - this should be taken from a configure option
+# Note this MUST be in ISO8859-1 form
+
+# Stop automake directly including stuff
+XRCINCLUDE=include
+
+# We don't need dlopen right now and it's not supported on Darwin
+# AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(void*)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(__int64)
+
+
WXCONFIG=wx-config
AC_ARG_WITH(wx-config,
[[ --with-wx-config=FILE Use the given path to wx-config when determining
Xara