diff --git a/build/config/ax_cflags_warn_all_ansi.m4 b/build/config/ax_cflags_warn_all_ansi.m4 index 634055d6b3..262306f507 100644 --- a/build/config/ax_cflags_warn_all_ansi.m4 +++ b/build/config/ax_cflags_warn_all_ansi.m4 @@ -1,5 +1,5 @@ AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl -AS_VAR_PUSHDEF([FLAGS],[SWITCH_AM_CFLAGS])dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings], VAR,[VAR="no, unknown" @@ -47,7 +47,7 @@ AS_VAR_POPDEF([FLAGS])dnl dnl the only difference - the LANG selection... and the default FLAGS AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl -AS_VAR_PUSHDEF([FLAGS],[SWITCH_AM_CXXFLAGS])dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings], VAR,[VAR="no, unknown" diff --git a/configure.in b/configure.in index e3a2db228d..cfd78b9b56 100644 --- a/configure.in +++ b/configure.in @@ -261,7 +261,10 @@ AC_ARG_ENABLE(debug, if test "${enable_debug}" = "yes"; then AC_DEFINE([DEBUG],[],[Enable extra debugging.]) + saved_CFLAGS=$CFLAGS AX_CFLAGS_WARN_ALL_ANSI + APR_ADDTO(SWITCH_AM_CFLAGS, $CFLAGS) + CFLAGS=$saved_CFLAGS if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then APR_ADDTO(SWITCH_AM_CFLAGS, -g -ggdb)