@@ -6,18 +6,15 @@ PHP_ARG_ENABLE([fpm],,
6
6
7
7
dnl Configure checks.
8
8
AC_DEFUN ( [ AC_FPM_CLOCK] ,
9
- [
10
- AC_CHECK_FUNCS ( [ clock_gettime] ,,
11
- [ AC_SEARCH_LIBS ( [ clock_gettime] , [ rt] ,
12
- [ ac_cv_func_clock_gettime=yes
13
- AC_DEFINE ( [ HAVE_CLOCK_GETTIME] , [ 1] ) ] ) ] )
14
-
15
- have_clock_get_time=no
16
-
17
- if test "$ac_cv_func_clock_gettime" = "no"; then
18
- AC_MSG_CHECKING ( [ for clock_get_time] )
19
-
20
- AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [ #include <mach/mach.h>
9
+ [ AC_CHECK_FUNCS ( [ clock_gettime] ,,
10
+ [ AC_SEARCH_LIBS ( [ clock_gettime] , [ rt] ,
11
+ [ ac_cv_func_clock_gettime=yes
12
+ AC_DEFINE ( [ HAVE_CLOCK_GETTIME] , [ 1] ) ] ) ] )
13
+
14
+ AS_VAR_IF ( [ ac_cv_func_clock_gettime] , [ no] ,
15
+ [ AC_CACHE_CHECK ( [ for clock_get_time] , [ php_cv_func_clock_get_time] ,
16
+ [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [
17
+ #include <mach/mach.h>
21
18
#include <mach/clock.h>
22
19
#include <mach/mach_error.h>
23
20
@@ -37,18 +34,14 @@ AC_DEFUN([AC_FPM_CLOCK],
37
34
38
35
return 0;
39
36
}
40
- ] ] ) ] , [
41
- have_clock_get_time=yes
42
- AC_MSG_RESULT ( [ yes] )
43
- ] , [
44
- AC_MSG_RESULT ( [ no] )
45
- ] , [ AC_MSG_RESULT ( [ no (cross-compiling)] ) ] )
46
- fi
47
-
48
- if test "$have_clock_get_time" = "yes"; then
49
- AC_DEFINE ( [ HAVE_CLOCK_GET_TIME] , 1 , [ do we have clock_get_time?] )
50
- fi
51
- ] )
37
+ ] ) ] ,
38
+ [ php_cv_func_clock_get_time=yes] ,
39
+ [ php_cv_func_clock_get_time=no] ,
40
+ [ php_cv_func_clock_get_time=no] ) ] )
41
+ AS_VAR_IF ( [ php_cv_func_clock_get_time] , [ yes] ,
42
+ [ AC_DEFINE ( [ HAVE_CLOCK_GET_TIME] , [ 1] ,
43
+ [ Define to 1 if you have the 'clock_get_time' function.] ) ] )
44
+ ] ) ] )
52
45
53
46
AC_DEFUN ( [ AC_FPM_TRACE] ,
54
47
[
0 commit comments