diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 17:43:59 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-15 17:43:59 +0000 |
commit | 0b321028e4e0939ea8c4d39fa53bc34b19bc14c8 (patch) | |
tree | 492f084565e42c52b051a74dee2907d20cf5dde9 /configure.ac | |
parent | b9f2b5a4aa961a7389a42e56b74dae5f293bb2dd (diff) |
Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
(closes issue #13838)
Reported by: ano
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164343 f38db490-d61c-443f-a65b-d21fe96a405b
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]) |