Conditionalize GCCisms and make options like --with-opt separate from debugging etc. I swear I had a patch to do part of this but I can't find it now.
Debugging, warning, and optimization flags are separate now, because I found my patch, but more cleanups would be good.
Fixed: commit 608058ec80edb041ca012d530b42d97474f80320 Author: Josh Triplett <josh@freedesktop.org> Date: Wed Nov 22 22:47:15 2006 -0800 Remove --with-opt and --with-debug options from configure.ac; use CFLAGS instead configure supports using custom CFLAGS, so remove the --with-opt and --with-debug options from configure.ac, and the corresponding usage of COPTFLAGS and CDEBUGFLAGS in src/Makefile.am.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.