diff options
author | wm4 <wm4@nowhere> | 2012-08-25 20:01:03 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-25 20:04:32 +0200 |
commit | 3a0f40afb485c2fb07b0038bfc824c77bc8efa59 (patch) | |
tree | 9272c958c7225ddc538488d3df74f6af5d2c1532 /configure | |
parent | 6c13b694fb0703097bfc74b33c62f47434460833 (diff) | |
download | mpv-3a0f40afb485c2fb07b0038bfc824c77bc8efa59.tar.bz2 mpv-3a0f40afb485c2fb07b0038bfc824c77bc8efa59.tar.xz |
configure: disable optimization if --enable-debug is used
Enabling optimization _still_ causes annoyances when using a debugger,
and it increaes compilation times too.
Now --enable-debug basically replaces the -O2 flag with -g.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -429,6 +429,8 @@ _pkg_config=auto _windres=auto _cc=auto test "$CC" && _cc="$CC" +_debug= +_opt=-O2 _cross_compile=no _prefix="/usr/local" ffmpeg=auto @@ -603,9 +605,11 @@ 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= @@ -1143,16 +1147,16 @@ if test "$_profile" != "" || test "$_debug" != "" ; then fi if test -z "$CFLAGS" ; then if test "$cc_vendor" = "intel" ; then - CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer" + CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer" WARNFLAGS="-wd167 -wd556 -wd144" elif test "$cc_vendor" = "clang"; then - CFLAGS="-O2 $_debug $_profile $_march $_pipe" + CFLAGS="$_opt $_debug $_profile $_march $_pipe" WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes" ERRORFLAGS="-Werror=implicit-function-declaration" elif test "$cc_vendor" != "gnu" ; then - CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe" + CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe" else - CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" ERRORFLAGS="-Werror-implicit-function-declaration" extra_ldflags="$extra_ldflags -ffast-math" |