Simon Josefsson wrote:
> Paolo Bonzini <[EMAIL PROTECTED]> writes:
>
>>> But gl_WARN_INIT should also accept a VARIABLE argument, then? Or better,
>>> make gl_WARN_INIT automatic upon the first use of gl_WARN_ADD with the
>>> given VARIABLE?
>> You have a point; however, gl_WARN_INIT would then need a second
>> argument for the description too, and then the user can directly use
>> AC_ARG_VAR.
>
> For that reason, I'd be in favor of requiring a gl_WARN_INIT for each
> variable used. That might avoid strange effects due to typos too.
I'm not sure all users want to use AC_ARG_VAR for every warning
variable. Actually, I don't see the point of using AC_ARG_VAR unless
the user can override the variable. Something like
in gl_WARN_INIT:
if test x${WARN_CFLAGS+set} = xset; then
gl_overridden_WARN_CFLAGS=yes
else
gl_overridden_WARN_CFLAGS=no
fi
in gl_WARN_ADD:
do not add -W$1 to variable $2 if gl_overridden_$2=yes
Paolo