Hi, There is a problem in autoconf that cannot use AC_PROG_CC_C99 to detect C99 support when configure with CFLAGS="-Werror -Wall".
For example, if we have the following line in configure.ac ... AC_PROG_CC AC_PROG_CC_C99 After autoreconf -i, if we run ./configure CFLAGS="-Werror -Wall", it shows the following message indicating that C99 features are not supported. ... checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... unsupported checking for gcc option to enable C99 features... unsupported checking for gcc option to enable C89 features... none needed This is because the macro used to detect C99 features will generate the following compiling warning when CFLAGS is -Wall, and with -Werror, the autoconf cannot compile the macro. warning: variable ‘fnumber’ set but not used [-Wunused-but-set-variable] warning: variable ‘number’ set but not used [-Wunused-but-set-variable] warning: variable ‘str’ set but not used [-Wunused-but-set-variable] The GCC version is `gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2'. The attached patch can fix the problem by using the unused variables, but I am not sure if that is the correct way to do. Regards, ChangZhuo
c99.patch
Description: Binary data