@@ -196,6 +196,7 @@ AS_VAR_IF([php_cv_have_stack_limit], [yes],
196
196
197
197
ZEND_CHECK_FLOAT_PRECISION
198
198
ZEND_DLSYM_CHECK
199
+ ZEND_CHECK_CPUID_COUNT
199
200
200
201
AC_MSG_CHECKING ( whether to enable thread-safety )
201
202
AC_MSG_RESULT ( $ZEND_ZTS )
@@ -384,18 +385,21 @@ if test "$ZEND_GCC_GLOBAL_REGS" = "yes"; then
384
385
fi
385
386
AC_MSG_RESULT ( $ZEND_GCC_GLOBAL_REGS )
386
387
388
+ dnl
389
+ dnl ZEND_CHECK_CPUID_COUNT
390
+ dnl
387
391
dnl Check whether __cpuid_count is available.
388
- AC_CACHE_CHECK ( whether __cpuid_count is available , ac_cv_cpuid_count_available , [
389
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
390
- #include <cpuid.h>
391
- ] ] , [ [
392
- unsigned eax, ebx, ecx, edx;
393
- __cpuid_count(0, 0, eax, ebx, ecx, edx) ;
394
- ] ] ) ] , [
395
- ac_cv_cpuid_count_available=yes
396
- ] , [
397
- ac_cv_cpuid_count_available =no
398
- ] ) ] )
399
- if test "$ac_cv_cpuid_count_available" = "yes"; then
400
- AC_DEFINE ( [ HAVE_CPUID_COUNT ] , 1 , [ whether __cpuid_count is available] )
401
- fi
392
+ dnl
393
+ AC_DEFUN ( [ ZEND_CHECK_CPUID_COUNT ] ,
394
+ [ AC_CACHE_CHECK ( [ whether __cpuid_count is available ] ,
395
+ [ php_cv_have___cpuid_count ] ,
396
+ [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <cpuid.h> ] , [ dnl
397
+ unsigned eax, ebx, ecx, edx;
398
+ __cpuid_count(0, 0, eax, ebx, ecx, edx);
399
+ ] ) ] ,
400
+ [ php_cv_have___cpuid_count=yes ] ,
401
+ [ php_cv_have___cpuid_count =no] ) ] )
402
+ AS_VAR_IF ( [ php_cv_have___cpuid_count ] , [ yes ] ,
403
+ [ AC_DEFINE ( [ HAVE_CPUID_COUNT ] , [ 1 ] ,
404
+ [ Define to 1 if ' __cpuid_count' is available. ] ) ] )
405
+ ] )
0 commit comments