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