autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with AC_LANG_WERROR


From: Peter O'Gorman
Subject: Re: Problems with AC_LANG_WERROR
Date: Fri, 04 Jan 2008 10:34:04 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Stefan Bienert wrote:
> Hi there,
> 
> I have a problem with AC_LANG_WERROR together with AC_REPLACE_FUNCS.
> When I introduce the werror macro to configure.ac, the configure script
> is not recognising any functions checked in AC_REPLACE_FUNCS, any more.
> This is because the "conftest-mechanism" uses -werror as a CFLAG while
> compiling the conftest.c files. Of course, compiling with gcc fails at
> that point, no binary is produced, test for the function fails, ... to
> put it short: It's like being a steak when the foosas are attacking. The
> result of this series of unfortunate events is that the corresponding
> function is put into @LIBOBJS@ and the Makefile tries to put a
> replacement function into a library. For existing functions this is a
> bad thing...
> Is there any standard approach to treat this case?
> On the web I found something like reseting ac_c_werror_flag but this
> does not occur like an elegant way to me...
> 
> Please excuse my use of language here, I'm very new to this whole GNU
> build system - thingi and do not know the right terms for everything.

Hi Stefan,

AC_LANG_WERROR does not, in fact, set the -Werror flag in CFLAGS,
instead it looks at the output on stderr, and if there is any, it will
cause the compile test to fail. (this way it can work with multiple
compilers).

You should look at config.log to see what the warnings are and try to
fix them. If you are unable to fix them, then consider removing
AC_LANG_WERROR.

That being said, I agree that there should be a public method to turn it
on and off for individual tests without resorting to changing the value
of ac_c_werror_flag (it is set to yes or no).

Peter
-- 
Peter O'Gorman
http://pogma.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]