Index: configure
--- configure.orig	2015-11-09 03:10:41.000000000 +0100
+++ configure	2017-02-12 10:34:02.115836000 +0100
@@ -3697,7 +3697,6 @@
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
-   CFLAGS="-g"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -3712,7 +3711,6 @@
 if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -3728,7 +3726,6 @@
 
 else
   ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
 	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -15681,11 +15678,6 @@
 then
 	if test "x$GXX" = xyes
 	then
-		# reset to preferred options
-		# replace -O? with -O3
-		CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[0-9]*/-O3/'`;
-		# enable useful warnings
-		CXXFLAGS="$CXXFLAGS -Wall -Wwrite-strings -Woverloaded-virtual"
 		# avoid disk I/O
 		CXXFLAGS="$CXXFLAGS -pipe"
 
