diff options
author | Max Horn | 2009-10-13 18:50:46 +0000 |
---|---|---|
committer | Max Horn | 2009-10-13 18:50:46 +0000 |
commit | 0df369767d4c560b75e4578cb7d3ab703cb5bf2b (patch) | |
tree | 2efeff066a919a21bc70d9865c0d638c48438195 /configure | |
parent | f5b73061e45cafe17e409f42046660524e6d278d (diff) | |
download | scummvm-rg350-0df369767d4c560b75e4578cb7d3ab703cb5bf2b.tar.gz scummvm-rg350-0df369767d4c560b75e4578cb7d3ab703cb5bf2b.tar.bz2 scummvm-rg350-0df369767d4c560b75e4578cb7d3ab703cb5bf2b.zip |
Revamp the way --enable-release / --enable-debug work. They are now no longer mutually exclusive. Also, ports can override whether we default to (non-)release resp. (non-)debug builds
svn-id: r45036
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 24 insertions, 7 deletions
@@ -125,6 +125,8 @@ _fluidsynth=auto _16bit=auto _readline=auto # Default option behaviour yes/no +_debug_build=auto +_release_build=auto _text_console=no _mt32emu=yes _build_hq_scalers=yes @@ -658,8 +660,6 @@ EOF fi done # for parm in ... -DEBFLAGS="-g" - for ac_option in $@; do case "$ac_option" in --disable-16bit) _16bit=no ;; @@ -750,16 +750,19 @@ for ac_option in $@; do _backend=`echo $ac_option | cut -d '=' -f 2` ;; --enable-debug) - # debug is enabled by default + _debug_build=yes ;; --disable-debug) - DEBFLAGS="" + _debug_build=no ;; --enable-Werror) CXXFLAGS="$CXXFLAGS -Werror" ;; --enable-release) - DEBFLAGS="-O2 -Wuninitialized" + _release_build=yes + ;; + --disable-release) + _release_build=no ;; --enable-profiling) CXXFLAGS="$CXXFLAGS -pg" @@ -812,8 +815,6 @@ for ac_option in $@; do esac; done; -CXXFLAGS="$CXXFLAGS $DEBFLAGS" - guessed_host=`$_srcdir/config.guess` get_system_exe_extension $guessed_host NATIVEEXEEXT=$_exeext @@ -924,6 +925,22 @@ else fi # +# Determine extra build flags for debug and/or release builds +# + +if test "$_debug_build" != no; then + # debug mode not explicitly disabled -> compile with -g + CXXFLAGS="$CXXFLAGS -g" +fi + +if test "$_release_build" = yes; then + # Release mode enabled: enable optimizations. This also + # makes it possible to use -Wuninitialized, so let's do that. + CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized" +fi + + +# # Determine extension used for executables # get_system_exe_extension $_host_os |