Hello, Plase consider simple autoconf.ac script: AC_INIT([bugreport], [0.1]) AC_C_CONST
After processing it with autoconf there is a differnce between the calls: ./configure ./configure CFLAGS="-W -Wall -Werror" The first one returns: checking for an ANSI C-conforming const... yes but the second one: checking for an ANSI C-conforming const... no The reason is: the test program cannot be compiled with -W flags because of following errors: conftest.c: In function 'main': conftest.c:38:10: error: 't' is used uninitialized in this function [-Werror=uninitialized] conftest.c:54:23: error: 'b' may be used uninitialized in this function [-Werror=uninitialized] cc1: all warnings being treated as errors The full report with logs from both calls is attached. I'm using Debian GNU/Linux unstable with gcc and autoconf installed from Debian packages: ii autoconf 2.68-1 automatic configure script builder ii gcc 4:4.6.2-4 GNU C compiler Output of both programs with --version option follows. gcc (Debian 4.6.3-1) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. autoconf (GNU Autoconf) 2.68 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Regards Artur -- http://www.last.fm/user/arturcz/
ac_c_const_bug.tar.bz2
Description: Binary data