Really disable -O2 when --enable-debug is used.

Originally committed to SVN as r2731.
This commit is contained in:
Amar Takhar 2009-02-14 19:05:40 +00:00
parent acea1a7e35
commit ef269acdd3
1 changed files with 5 additions and 4 deletions

View File

@ -226,12 +226,13 @@ if test "$enable_compiler_flags" != "no"; then
AC_CXX_FLAG([-fpermissive])
AC_CXX_FLAG([-fno-strict-aliasing])
AC_CXX_FLAG([-std=c++98])
fi
if test "$enable_compiler_flags" != "no" || test "$enable_debug" != "yes"; then
# -O* messes with debugging.
if test "$enable_debug" != "yes"; then
AC_C_FLAG([-O2])
AC_CXX_FLAG([-O2])
fi
fi
######################################
# Check Headers / Features / Libraries