I've looked over the gnulib warnings module. > Date: Mon, 10 Feb 2014 16:00:11 -0700 > From: ebl...@redhat.com > Ah, but it IS a killer to anyone compiling with -Werror. > ... > You really want to borrow some of the ideas from here: > http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=m4/warnings.m4 > > gl_COMPILER_OPTION_IF sounds like your proposed AC_APPEND_FLAG_IFVALID, > with the added benefit of converting -Wno- into -W when probing (gcc > ... > Furthermore, that file also has gl_UNKNOWN_WARNINGS_ARE_ERRORS, which > has various ways of making clang confess which warnings it understands > ...
All in all, this really looks *much* better than AC_APPEND_FLAG_IFVALID. I will try to substitute in something very close to gl_WARN_ADD for AC_APPEND_FLAG_IFVALID. I don't know the numbers, but I suspect gcc and clang together represent a majority of autoconf usage. I will post back when I have tested something I am happy with.