From fe97ab6059cecd77e789d58ef7122fc9c3b91700 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 20 Nov 2012 13:45:35 +0100 Subject: configure: add --disable-optimization, change --enable-debug semantics --disable-optimization removes -O2 from CFLAGS. Now --enable-debug only adds -g to CFLAGS, and doesn't disable optimization anymore. As an obscure feature, --enable-optimization= adds -O to CFLAGS. Also remove stray $def_debug from configure. --- configure | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 705aba1f5e..78f09a736d 100755 --- a/configure +++ b/configure @@ -387,6 +387,7 @@ Miscellaneous options: Advanced options: --enable-shm enable shm [autodetect] --enable-debug[=1-3] compile-in debugging information [disable] + --disable-optimization compile without -O2 [enable] Use these options if autodetection fails: --extra-cflags=FLAGS extra CFLAGS @@ -562,15 +563,22 @@ for ac_option do ;; --enable-debug) _debug='-g' - _opt= ;; --enable-debug=*) _debug=$(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2) - _opt= ;; --disable-debug) _debug= ;; + --enable-optimization) + _opt='-O2' + ;; + --enable-optimization=*) + _opt=$(echo $_echo_n '-O'$_echo_c; echo $ac_option | cut -d '=' -f 2) + ;; + --disable-optimization) + _opt= + ;; --enable-gettext) _gettext=yes ;; --disable-gettext) _gettext=no ;; --enable-cross-compile) _cross_compile=yes ;; @@ -3408,7 +3416,6 @@ $def_priority /* configurable options */ -$def_debug $def_sortsub $def_stream_cache $def_pthread_cache -- cgit v1.2.3