bug-gnulib
[Top][All Lists]
Advanced

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

Re: warning: module to simplify adding compiler warnings


From: Paolo Bonzini
Subject: Re: warning: module to simplify adding compiler warnings
Date: Tue, 11 Nov 2008 13:41:22 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Bruno Haible wrote:
> An AC_SUBST([WARN_CFLAGS]) is missing somewhere. Why should the user have
> to do it himself? We know that WARN_CFLAGS is meant to be used in 
> Makefile.ams.

I'm committing this:

2008-11-11  Paolo Bonzini  <address@hidden>

        * m4/warnings.m4 (gl_WARN_INIT): Substitute WARN_CFLAGS.
        (gl_WARN_ADD): Substitute $2 if literal.

diff --git a/m4/warnings.m4 b/m4/warnings.m4
index 634b183..ca9bf5e 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -9,8 +9,8 @@ dnl From Simon Josefsson
 # gl_WARN_INIT
 # Initializes WARN_CFLAGS variable.
 AC_DEFUN([gl_WARN_INIT],
-[
-  AC_ARG_VAR(WARN_CFLAGS, [C compiler warning flags])
+[AC_SUBST([WARN_CFLAGS])dnl
+AC_ARG_VAR([WARN_CFLAGS], [C compiler warning flags])
 ])

 # gl_AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
@@ -47,4 +47,5 @@
 gl_AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
 AS_VAR_POPDEF([gl_Flags])dnl
 AS_VAR_POPDEF([gl_Warn])dnl
+AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])dnl
 ])






reply via email to

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