autoconf
[Top][All Lists]
Advanced

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

Re: How to cancel flags set by AC_LANG_WERROR?


From: Andrey Simonenko
Subject: Re: How to cancel flags set by AC_LANG_WERROR?
Date: Mon, 22 Jan 2007 13:29:41 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Jan 21, 2007 at 04:06:49PM +0100, Ralf Wildenhues wrote:
> Hello Andrey,
> 
> Aplogies for the delay.
> 
> * Andrey Simonenko wrote on Fri, Dec 22, 2006 at 11:47:03AM CET:
> > 
> > How to cancel flags set by AC_LANG_WERROR in autoconf-2.61?
> > In other words, is there a way to set -Werror flag only for
> > some of tests in configure.ac?  (of course it is possible to
> > modify ac_c_werror_flag in configure.ac)
> 
> At the moment, the only way to do this is to modify $ac_c_werror_flag,
> which however is undocumented in the Autoconf manual.
> 
> We have two choices: document ac_LANG_werror_flag, or add accessor
> macros.  (Or document the current limitation and be done with it.)
> WDYT?

I think that a new macro should be added.

Something like this (may be AC_LANG_NO_WERROR should check that
AC_LANG_WERROR was used before?):

lang.m4:

# AC_LANG_NO_WERROR
# ------------------
# Do not treat warnings from the current language's preprocessor, compiler,
# and linker as fatal errors.
AC_DEFUN([AC_LANG_NO_WERROR],
[ac_[]_AC_LANG_ABBREV[]_werror_flag=])# AC_LANG_NO_WERROR

autoconf.texi:

@defmac AC_LANG_NO_WERROR
@acindex{LANG_NO_WERROR}
This macro cancels effects of @code{AC_LANG_WERROR} macro and Autoconf
will treat all warnings generated by the compiler, linker, and preprocessor
as it does before @code{AC_LANG_WERROR} macro.  This macro must be used
only if @code{AC_LANG_WERROR} macro was used before.
@end defmac




reply via email to

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