diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index e16aaae4d466..5610b9611286 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -65,6 +65,10 @@ OS_INCLUDES = $(NSPR_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) OS_LIBS = @LDFLAGS@ @LIBS@ AC_DEFINES = @DEFS@ +ifdef MOZ_DEBUG +OS_CFLAGS := $(filter-out -O%, $(OS_CFLAGS)) +endif + USE_CPP_INCLUDE_FLAG = @USE_CPP_INCLUDE_FLAG@ ifdef USE_CPP_INCLUDE_FLAG AC_INCLUDE_OR_DEFINES := -include @CONFIG_DEFS_H@ diff --git a/configure.in b/configure.in index e305881caec4..0407f5cfa0e4 100644 --- a/configure.in +++ b/configure.in @@ -48,9 +48,8 @@ dnl unset d dnl Build optimized by default dnl ======================================================== -OPTIMIZE_CFLAGS="${OPTIMIZE_CFLAGS=-O}" -CFLAGS="${CFLAGS}" -CXXFLAGS="${CXXFLAGS}" +CFLAGS="${CFLAGS=-O}" +CXXFLAGS="${CXXFLAGS=-O}" dnl Set the version number of the libs included with mozilla dnl ======================================================== @@ -634,7 +633,7 @@ MOZ_ARG_DISABLE_BOOL(asserts, MOZ_ARG_ENABLE_BOOL_OR_STRING(debug, [ --enable-debug Enable debug symbols], - [ MOZ_DEBUG=1 OPTIMIZE_CFLAGS="-g" ], + [ MOZ_DEBUG=1 CFLAGS="$CFLAGS -g" ], [], [MOZ_DEBUG_MODULES=`echo $enableval | sed 's|,| |g'` ]) @@ -1180,7 +1179,6 @@ dnl ======================================================== dnl Echo the CFLAGS to remove extra whitespace. CFLAGS=`echo \ $WARNINGS_CFLAGS \ - $OPTIMIZE_CFLAGS \ $GPROF_CFLAGS \ $DEPEND_CFLAGS \ $CFLAGS`