diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-04-13 15:36:56 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-04-13 15:36:56 +0000 |
| commit | 7e22cc38bbb415a65c9b852316cd6b4c2d1edd4b (patch) | |
| tree | 87495a6aea4d6f5c6e7e3e5de767dd60673d4f76 /configure.ac | |
| parent | aa08af99283d39dc471e3e04d93eb0ef0f34453d (diff) | |
2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Implemented clock_gettime() using timeGetTime in mingw.
* configure.ac
* src/Makefile.am
* src/a2time.h
* src/clock_gettime_mingw.cc
* src/clock_gettime_mingw.h
* src/timespec.h
* test/Makefile.am
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 8d37fb09..025732ff 100644 --- a/configure.ac +++ b/configure.ac @@ -12,8 +12,9 @@ AC_CONFIG_HEADERS([config.h]) case "$target" in *mingw*|*cygwin*) - WINSOCK_LIBS="-lws2_32 -lpthread" + WINSOCK_LIBS="-lws2_32" AC_SUBST(WINSOCK_LIBS) + LIBS="-lws2_32 -lcrypto -lwsock32 -lgdi32 -lwinmm $LIBS" ;; esac @@ -222,8 +223,14 @@ AC_HEADER_STDC case "$target" in *mingw*) - AC_CHECK_HEADERS([winsock2.h \ - ws2tcpip.h]) + AC_CHECK_HEADERS([windows.h \ + winsock2.h \ + ws2tcpip.h \ + mmsystem.h], [], [], +[[#ifdef HAVE_WINDOWS_H +# include <windows.h> +#endif +]]) ;; esac @@ -299,7 +306,6 @@ AC_CHECK_FUNCS([__argz_count \ __argz_next \ __argz_stringify \ atexit \ - clock_gettime \ ftruncate \ getcwd \ gethostbyaddr \ @@ -379,12 +385,17 @@ AC_CHECK_FUNCS([timegm], AC_CHECK_FUNCS([daemon], [have_daemon=yes]) AM_CONDITIONAL([HAVE_DAEMON], [test "x$have_daemon" = "xyes"]) +AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes]) + case "$target" in *mingw*) dnl defined in ws2tcpip.h, but only if _WIN32_WINNT >= 0x0501 AM_CONDITIONAL([HAVE_GETADDRINFO], true) 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) + fi ;; esac |
