@@ -145,26 +145,25 @@ AC_DEFUN([PHP_FPM_TRACE],
145
145
AC_DEFINE ( [ HAVE_PTRACE] , 1 , [ do we have ptrace?] )
146
146
fi
147
147
148
- have_mach_vm_read=no
149
-
150
- if test "$have_broken_ptrace" = "yes"; then
151
- AC_MSG_CHECKING ( [ for mach_vm_read] )
152
-
153
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <mach/mach.h>
154
- #include <mach/mach_vm.h>
155
- ] ] , [ [
156
- mach_vm_read((vm_map_t)0, (mach_vm_address_t)0, (mach_vm_size_t)0, (vm_offset_t *)0, (mach_msg_type_number_t*)0);
157
- ] ] ) ] , [
158
- have_mach_vm_read=yes
159
- AC_MSG_RESULT ( [ yes] )
160
- ] , [
161
- AC_MSG_RESULT ( [ no] )
162
- ] )
163
- fi
148
+ AS_VAR_IF ( [ have_broken_ptrace] , [ yes] ,
149
+ [ AC_CACHE_CHECK ( [ for mach_vm_read] , [ php_cv_have_mach_vm_read] ,
150
+ [ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <mach/mach.h>
151
+ #include <mach/mach_vm.h>
152
+ ] , [
153
+ mach_vm_read(
154
+ (vm_map_t)0,
155
+ (mach_vm_address_t)0,
156
+ (mach_vm_size_t)0,
157
+ (vm_offset_t *)0,
158
+ (mach_msg_type_number_t*)0);
159
+ ] ) ] ,
160
+ [ php_cv_have_mach_vm_read=yes] ,
161
+ [ php_cv_have_mach_vm_read=no] ) ] )
162
+ ] )
164
163
165
- if test "$have_mach_vm_read" = " yes"; then
166
- AC_DEFINE ( [ HAVE_MACH_VM_READ] , 1 , [ do we have mach_vm_read? ] )
167
- fi
164
+ AS_VAR_IF ( [ php_cv_have_mach_vm_read ] , [ yes] ,
165
+ [ AC_DEFINE ( [ HAVE_MACH_VM_READ] , [ 1 ] ,
166
+ [ Define to 1 if you have the 'mach_vm_read'. ] ) ] )
168
167
169
168
proc_mem_file=""
170
169
@@ -229,7 +228,7 @@ AC_DEFUN([PHP_FPM_TRACE],
229
228
elif test -n "$proc_mem_file"; then
230
229
fpm_trace_type=pread
231
230
232
- elif test "$have_mach_vm_read " = "yes" ; then
231
+ elif test "$php_cv_have_mach_vm_read " = "yes" ; then
233
232
fpm_trace_type=mach
234
233
235
234
else
0 commit comments