diff options
author | Eddie Kohler <ekohler@gmail.com> | 2020-06-27 09:01:06 -0400 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-30 14:26:48 +0200 |
commit | ff69a8a78917fe20153fe5383f022cd7ec6a489d (patch) | |
tree | e42a6f7424bbbcabddd02098942240e8936cb02e /configure.ac | |
parent | 1e9ff7e75743432d0676814561875e73ee259036 (diff) | |
download | php-git-ff69a8a78917fe20153fe5383f022cd7ec6a489d.tar.gz |
Move __alignof__ support check into main configure.ac.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index df64a61015..2516677328 100644 --- a/configure.ac +++ b/configure.ac @@ -491,6 +491,20 @@ PHP_CHECK_BUILTIN_CPU_INIT dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS +dnl Check for __alignof__ support in the compiler +AC_CACHE_CHECK(whether the compiler supports __alignof__, ac_cv_alignof_exists,[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +]],[[ + int align = __alignof__(int); +]])],[ + ac_cv_alignof_exists=yes +],[ + ac_cv_alignof_exists=no +])]) +if test "$ac_cv_alignof_exists" = "yes"; then + AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__]) +fi + dnl Check for structure members. AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>]) AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev]) |