configure: Use a hopefully more robust way to fix AX_CHECK_COMPILE_FLAG

The check for -Wno-extra-semi-stmt failed on Linux with clang++-7.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-05-21 12:19:24 +02:00 committed by zdenop
parent 19274eebbb
commit ecd0384a31

View File

@ -112,12 +112,11 @@ case "${host_os}" in
esac
WERROR=-Werror
# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement.
# clang++-8 can emit a warning for that which must be disabled.
AX_CHECK_COMPILE_FLAG([-Wno-extra-semi-stmt], [WERROR="$WERROR -Wno-extra-semi-stmt"])
# The test code used by AX_CHECK_COMPILE_FLAG uses macros which are unused.
# That must not break the check, so disable a related warning if necessary.
AX_CHECK_COMPILE_FLAG([-Wno-unused-macros], [WERROR="$WERROR -Wno-unused-macros"])
# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement
# and unused macros which must not raise a compiler error, but it must
# be an error if flags like -avx are ignored on ARM and other
# architectures because they are unsupported.
AX_CHECK_COMPILE_FLAG([-Werror=unused-command-line-argument], [WERROR=-Werror=unused-command-line-argument])
## Checks for supported compiler options.