From d4bebc874b1b6dba953b901ee80f6d2a86a8d678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 13 May 2020 08:22:29 +0200 Subject: Properly detect CRC32 APIs on aarch64 from configure The CRC32 APIs are optional for armv8-a. They became mandatory since armv8.1-a. Closes GH-5564. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fdf35e213b..c589896741 100644 --- a/configure.ac +++ b/configure.ac @@ -720,6 +720,12 @@ if test "x$php_crypt_r" = "x1"; then PHP_CRYPT_R_STYLE fi +AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d, +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])]) +if test "$ac_cv_func___crc32d" = "yes"; then + AC_DEFINE([HAVE_AARCH64_CRC32], [1], [Define when aarch64 CRC32 API is available.]) +fi + dnl Check for asm goto support. AC_CACHE_CHECK([for asm goto], ac_cv__asm_goto, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ -- cgit v1.2.1