diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 44fff243e..1db2519ec 100644 --- a/configure.ac +++ b/configure.ac @@ -267,6 +267,15 @@ AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf ioperm]) +AC_MSG_CHECKING(for timersub in time.h) +AC_LINK_IFELSE( + AC_LANG_PROGRAM([#include <sys/time.h>], + [struct timeval *zombies; timersub(zombies, zombies, zombies);]), + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system has timersub in time.h]), + AC_MSG_RESULT(no) +) + # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c AC_SEARCH_LIBS(gethostbyname_r, [socket nsl]) |