Re: How to cancel flags set by AC_LANG_WERROR?

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux