build: fix link errors with gcc < 4.8

* configure.ac: Attempt to link, not only compile, the test programs
with __builtin_cpu_supports, to avoid link errors with cksum and wc.
This commit is contained in:
Bruno Haible 2023-08-14 01:45:39 +02:00 committed by Pádraig Brady
parent 85edb4afbd
commit 049e5b0f87

View File

@ -521,7 +521,7 @@ ac_c_werror_flag=$cu_save_c_werror_flag
ac_save_CFLAGS=$CFLAGS
CFLAGS="-mavx -mpclmul $CFLAGS"
AC_MSG_CHECKING([if pclmul intrinsic exists])
AC_COMPILE_IFELSE(
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
#include <x86intrin.h>
@ -550,7 +550,7 @@ CFLAGS=$ac_save_CFLAGS
CFLAGS="-mavx2 $CFLAGS"
AC_MSG_CHECKING([if avx2 intrinstics exists])
AC_COMPILE_IFELSE(
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
#include <x86intrin.h>