Index: configure
--- configure.orig
+++ configure
@@ -4163,17 +4163,9 @@ $as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
     CFLAGS="-g"
-  fi
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
     CFLAGS=
-  fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
@@ -5078,17 +5070,9 @@ $as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
     CFLAGS="-g"
-  fi
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
     CFLAGS=
-  fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
@@ -5612,17 +5596,9 @@ $as_echo "$ac_cv_prog_cxx_g" >&6; }
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
 elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
     CXXFLAGS="-g"
-  fi
 else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
     CXXFLAGS=
-  fi
 fi
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -5764,7 +5740,7 @@ if test "x$remember_set_CFLAGS" = "x"
 then
   if test "$CFLAGS" = "-g -O2"
   then
-    CFLAGS="-O2"
+    CFLAGS=""
   elif test "$CFLAGS" = "-g"
   then
     CFLAGS=""
@@ -5775,7 +5751,7 @@ if test "x$remember_set_CXXFLAGS" = "x"
 then
   if test "$CXXFLAGS" = "-g -O2"
   then
-    CXXFLAGS="-O2"
+    CXXFLAGS=""
   elif test "$CXXFLAGS" = "-g"
   then
     CXXFLAGS=""
