summaryrefslogtreecommitdiff
path: root/build/php.m4
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-11-04 11:34:02 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-11-04 11:34:02 +0100
commitb509d67554f729b8b81ce906a46262357f79a87b (patch)
tree7b268d2cd948968ef1b9ffd4a53608982fbacc30 /build/php.m4
parent5b447d4b42416eb5c5ef94cf0b374e5a60ec4f39 (diff)
parent451314111b9942c8389415f04e9017c3e3d3cb56 (diff)
downloadphp-git-b509d67554f729b8b81ce906a46262357f79a87b.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Revert "Remove configure checks for supported instruction sets"
Diffstat (limited to 'build/php.m4')
-rw-r--r--build/php.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/build/php.m4 b/build/php.m4
index ec4998426c..f5351ad4eb 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -2678,6 +2678,30 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [
])
dnl
+dnl PHP_CHECK_CPU_SUPPORTS
+dnl
+AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [
+ AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT])
+ AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS])
+ have_ext_instructions=0
+ if test $have_builtin_cpu_supports = 1; then
+ AC_MSG_CHECKING([for $1 instructions supports])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+int main() {
+ return __builtin_cpu_supports("$1")? 0 : 1;
+}
+ ]])], [
+ have_ext_instructions=1
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ], [AC_MSG_RESULT([no])])
+ fi
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]),
+ [$have_ext_instructions], [Whether the compiler supports $1 instructions])
+])
+
+dnl
dnl PHP_PATCH_CONFIG_HEADERS([FILE])
dnl
dnl PACKAGE_* symbols are automatically defined by Autoconf. When including