]> git.ipfire.org Git - thirdparty/xz.git/commit
Build: Use AC_LINK_IFELSE instead of -Werror
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 24 Jun 2024 20:35:59 +0000 (23:35 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 6 Sep 2024 16:25:52 +0000 (19:25 +0300)
commitb45270d88f0de1b2e8bf510f0e370a5db4067e1f
treebc8ea472aa0698f600efcabdae3381e67c989801
parent2c3e4cbbdcefe214ef3033a725049034b73e9756
Build: Use AC_LINK_IFELSE instead of -Werror

AC_COMPILE_IFELSE needed -Werror because Clang <= 14 would merely
warn about the unsupported attribute and implicit function declaration.
Changing to AC_LINK_IFELSE handles the implicit declaration because
the symbol __crc32d is unlikely to exist in libc.

Note that the other part of the check is that #include <arm_acle.h>
must work. If the header is missing, most compilers give an error
and the linking step won't be attempted.

Avoiding -Werror makes the check more robust in case CFLAGS contains
warning flags that break -Werror anyway (but this isn't the only check
in configure.ac that has this problem). Using AC_LINK_IFELSE also makes
the check more similar to how it is done in CMakeLists.txt.

(cherry picked from commit 35eb57355ad1c415a838d26192d5af84abb7cf39)
configure.ac