[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

Only override the AC_PROG_CC determined CFLAGS if they were set by the user.
This restores the default behavior in the common case of not having CFLAGS
defined when running configure.
diff --git a/configure.in b/configure.in
index 8e19ec2..4def2d4 100644
--- a/configure.in
+++ b/configure.in
@@ -531,9 +531,14 @@
 (it is also a good idea to do 'make clean' before compiling)])
 fi
 
-save_CFLAGS=$CFLAGS
+# If the user set CFLAGS, use this instead of the automatically
+# determined setting
+preset_cflags="$CFLAGS"
 AC_PROG_CC
-CFLAGS=$save_CFLAGS
+if test ! -z "$preset_cflags"
+then
+	CFLAGS=$preset_cflags
+fi
 
 AC_SUBST(CXX)
 AC_SUBST(MAINCC)