Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,35 @@ AC_CHECK_FUNC([sigsetjmp],,
[AC_MSG_FAILURE([Required sigsetjmp not found.])],
[#include <setjmp.h>])])


ZEND_CHECK_STACK_DIRECTION
ZEND_CHECK_FLOAT_PRECISION
ZEND_DLSYM_CHECK
ZEND_CHECK_GLOBAL_REGISTER_VARIABLES
ZEND_CHECK_PRESERVE_NONE

case $host_os in
darwin*)
dnl versions prior to this lead to compilation failure
dnl Prefer __apple_build_version__ (reliable, numeric) when available.
dnl The known-good minimum corresponds to 17000404 (see PR discussion).
min_apple_build_version=17000404
apple_build_version=`echo | $CC -dM -E -x c - 2>/dev/null | sed -n 's/^#define __apple_build_version__ \([0-9][0-9]*\)$/\1/p'`

AS_IF([test -n "$apple_build_version"], [
AC_MSG_CHECKING([Apple clang __apple_build_version__ >= $min_apple_build_version])
AS_IF([test "$apple_build_version" -ge "$min_apple_build_version"], [
ZEND_CHECK_PRESERVE_NONE
])
], [
dnl Not Apple clang (could be Homebrew clang, GCC, etc.) -> keep enabled
ZEND_CHECK_PRESERVE_NONE
])
;;
*)
ZEND_CHECK_PRESERVE_NONE
;;
esac

ZEND_CHECK_CPUID_COUNT

AC_MSG_CHECKING([whether to enable thread safety])
Expand Down