diff options
author | Ondřej Surý <ondrej@sury.org> | 2020-05-13 08:22:29 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-14 09:38:05 +0200 |
commit | d4bebc874b1b6dba953b901ee80f6d2a86a8d678 (patch) | |
tree | 4663df5460aa03391f803b684c8b85b5a2a6c3fe /configure.ac | |
parent | 1892e3abaaecff13e7b124ec4b19c2f23e2d8f69 (diff) | |
download | php-git-d4bebc874b1b6dba953b901ee80f6d2a86a8d678.tar.gz |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
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 <arm_acle.h>]],[[__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([[ |