mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-14 00:31:47 +08:00
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:
parent
19274eebbb
commit
ecd0384a31
11
configure.ac
11
configure.ac
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user