+ # Clang supports many of GCC's -W options, but only issues warnings
+ # on the ones it does not recognize. In that case, gl_WARN_ADD
+ # thinks the option is supported, and unknown options are then added
+ # to CFLAGS. But then, when -Werror is added in the test suite for
+ # instance, the warning about the unknown option turns into an
+ # error.
+ #
+ # This should be addressed by gnulib's gl_WARN_ADD, but in the
+ # meanwhile, turn warnings about unknown options into errors in
+ # CFLAGS, and restore CFLAGS after the tests.
+ save_CFLAGS=$CFLAGS
+ gl_WARN_ADD([-Werror=unknown-warning-option], [CFLAGS])