On 64-bit HPUX, gdb fails to compile with -Werror because of an incorrect iconv() prototype. gdb's configure script checks for this, but because the configure script test is compiled without -Werror even when -Werror is enabled, the test doesn't detect the condition properly. The attached patch forces this test to use the value of WERROR_CFLAGS so that the check uses the same flags that will be used to build gdb. tbh I think this is really a hack and we should somehow make all the autoconf test use the -Werror flag when running the compile tests, but it's not obvious to me how I can do this without redoing a lot of the Makefile logic (for example, why do we use a separate WERROR_CFLAGS and not just append the -Werror into CFLAGS?)... Anyway, is this ok? Tested on hppa64-hp-hpux11.11; may also help other archs that need ICONV_CONST to be defined. randolph