diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-04-13 16:06:59 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-04-13 16:06:59 +0000 |
| commit | 91e7127396a3dbb91f7eb46020182e8f7ebd5065 (patch) | |
| tree | 74bb0c88f71f1bcd482df47ff961743098b29184 /configure.ac | |
| parent | 7e22cc38bbb415a65c9b852316cd6b4c2d1edd4b (diff) | |
2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Implemented clock_gettime() using mach_absolute_time in Mac OS X.
* configure.ac
* src/Makefile.am
* src/a2time.h
* src/clock_gettime_osx.cc
* src/clock_gettime_osx.h
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 025732ff..4df00780 100644 --- a/configure.ac +++ b/configure.ac @@ -387,6 +387,12 @@ AM_CONDITIONAL([HAVE_DAEMON], [test "x$have_daemon" = "xyes"]) AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes]) +if test "x$have_clock_gettime" != "xyes"; then + AC_CHECK_FUNCS([mach_absolute_time], [have_mach_absolute_time=yes]) +fi +AM_CONDITIONAL([HAVE_MACH_ABSOLUTE_TIME], + [test "x$have_mach_absolute_time" = "xyes"]) + case "$target" in *mingw*) dnl defined in ws2tcpip.h, but only if _WIN32_WINNT >= 0x0501 @@ -394,9 +400,12 @@ case "$target" in dnl defined in ws2tcpip.h, but missing in C:\mingw\lib\libws2_32.a AM_CONDITIONAL([HAVE_GAI_STRERROR], false) if test "x$have_clock_gettime" != "xyes"; then - AM_CONDITIONAL([HAVE_TIMEGETTIME], true) + AM_CONDITIONAL([HAVE_TIMEGETTIME], true) fi ;; + *) + AM_CONDITIONAL([HAVE_TIMEGETTIME], false) + ;; esac AC_CHECK_MEMBER([struct sockaddr_in.sin_len], |
