diff configure.in @ 3382:294fb5e6f301

A better solution to making the default build optimization -O3 Cygwin32 autoconf complains about c.m4 ... of course. :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 11 Oct 2009 10:38:38 +0000
parents dd11d2376e27
children be67ddef6617
line wrap: on
line diff
--- a/configure.in	Sun Oct 11 10:30:47 2009 +0000
+++ b/configure.in	Sun Oct 11 10:38:38 2009 +0000
@@ -4,6 +4,9 @@
 AC_GNU_SOURCE
 AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
 
+dnl Save the CFLAGS to see whether they were passed in or generated
+orig_CFLAGS="$CFLAGS"
+
 dnl Set various version strings - taken gratefully from the GTk sources
 #
 # Making releases:
@@ -87,6 +90,10 @@
         ;;
 esac
 BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
+# The default optimization for SDL 1.3 is -O3 (Bug #31)
+if test x$orig_CFLAGS = x; then
+    BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
+fi
 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
 BUILD_LDFLAGS="$LDFLAGS"
 EXTRA_LDFLAGS="$BASE_LDFLAGS"