According to the autoconf docs, AC_PROG_CC_C99 will put the flag in the CC variable. I am not yet sure what is the right thing for scan-build to do, but in the meantime you may be able to work around this with
scan-build make CFLAGS=-std=gnu99
or by putting the flag in AM_CFLAGS in configure.ac.
The autoconf people seem to believe that CC should not be overridden except via the environment variable during ./configure, so they feel free to add flags to it. However, there is currently no way for scan-build to be passed a “make” command and know whether it will run a handwritten makefile or one generated by autoconf. Therefore, with or without r189372, some user will have to do extra work. From what I understand, running an autoconf-generated make through scan-build is only necessary to collect and generate the bug reports and not to override CC with ccc-analyzer, as that step is done when running “scan-build ./configure”. If I’m right, maybe the solution would be to simply add another flag to scan-build, e.g. -a, which will prevent scan-build from passing CC and CXX to make, and the autoconf example of scan-build.html could change to use this flag. Anybody have thoughts on that?