mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Fix bug 2192 - Linux slow effects
Sets the default optimization level for release builds to -O2, though allowing this to be overridden with CFLAGS / CXXFLAGS. When the --enable-debug option is selected, optimizations are overridden by '-O0 -g'.
This commit is contained in:
parent
f5a6a02da0
commit
b2e7350587
17
configure
vendored
17
configure
vendored
@ -7044,9 +7044,9 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
cflags_save="$CFLAGS"
|
||||
cppflags_save="$CPPFLAGS"
|
||||
cxxflags_save="$CXXFLAGS"
|
||||
CFLAGS=${CFLAGS:="-O2"}
|
||||
CXXFLAGS=${CXXFLAGS:="-O2"}
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
|
||||
$as_echo_n "checking for C compiler vendor... " >&6; }
|
||||
@ -8332,9 +8332,6 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in ar lib "link -lib"
|
||||
@ -19280,10 +19277,10 @@ $as_echo "#define ENABLE_SSE 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Adding -g for debugging to CFLAGS and CXXFLAGS ..." >&5
|
||||
$as_echo "$as_me: Adding -g for debugging to CFLAGS and CXXFLAGS ..." >&6;}
|
||||
CFLAGS="${CFLAGS} -g -DwxDEBUG_LEVEL=1"
|
||||
CXXFLAGS="${CXXFLAGS} -g -DwxDEBUG_LEVEL=1"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Adding -O0 -g for debugging to CFLAGS and CXXFLAGS ..." >&5
|
||||
$as_echo "$as_me: Adding -O0 -g for debugging to CFLAGS and CXXFLAGS ..." >&6;}
|
||||
CFLAGS="${CFLAGS} -O0 -g -DwxDEBUG_LEVEL=1"
|
||||
CXXFLAGS="${CXXFLAGS} -O0 -g -DwxDEBUG_LEVEL=1"
|
||||
else
|
||||
CFLAGS="${CFLAGS} -DwxDEBUG_LEVEL=0"
|
||||
CXXFLAGS="${CXXFLAGS} -DwxDEBUG_LEVEL=0"
|
||||
|
18
configure.ac
18
configure.ac
@ -50,19 +50,15 @@ AM_GNU_GETTEXT([external])
|
||||
dnl -------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------
|
||||
dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2"
|
||||
dnl if $CFLAGS is blank and it finds GCC
|
||||
cflags_save="$CFLAGS"
|
||||
cppflags_save="$CPPFLAGS"
|
||||
cxxflags_save="$CXXFLAGS"
|
||||
dnl Supply reasonable defaults
|
||||
CFLAGS=${CFLAGS:="-O2"}
|
||||
CXXFLAGS=${CXXFLAGS:="-O2"}
|
||||
|
||||
AX_COMPILER_VENDOR
|
||||
AC_PROG_CC
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
AM_PROG_AR
|
||||
|
||||
@ -227,9 +223,9 @@ fi
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
dnl we want debuging on
|
||||
AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -g -DwxDEBUG_LEVEL=1"
|
||||
CXXFLAGS="${CXXFLAGS} -g -DwxDEBUG_LEVEL=1"
|
||||
AC_MSG_NOTICE([Adding -O0 -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -O0 -g -DwxDEBUG_LEVEL=1"
|
||||
CXXFLAGS="${CXXFLAGS} -O0 -g -DwxDEBUG_LEVEL=1"
|
||||
else
|
||||
CFLAGS="${CFLAGS} -DwxDEBUG_LEVEL=0"
|
||||
CXXFLAGS="${CXXFLAGS} -DwxDEBUG_LEVEL=0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user