Fix detection of warning flags for clang
Using ./configure CC=clang, the following flags are detected
as supported:
checking whether clang supports "-Wgnu89-inline"... yes
checking whether clang supports "-Wno-strict-aliasing"... yes
Which results in a lot of warnings during make:
warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
warning: unknown warning option '-Wgnu89-inline'
[-Wunknown-warning-option]
Clang doesn't support these flags, but the compile check returns a
warning, not an error:
configure:16649: checking whether clang supports "-Wunsigned-char"
configure:16662: clang -E -Wunsigned-char conftest.c
warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
1 warning generated.
configure:16662: $? = 0
configure:16663: result: yes
Use -Wunknown-warning-option -Werror if supported
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>