diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-17 09:30:22 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-17 09:30:22 +0000 |
commit | 370182a28879eaa9ffbe25bf32bc21d6140e116f (patch) | |
tree | d8b9dce3a86c48e237a97288161fb0d8bce5879e /configure.ac | |
parent | 6a4809a9ca5609c43f02a2c9ea240f2bf763f08e (diff) |
timersub is a macro not a function, so write the check in a way
that detects both formats.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89363 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index aa8966802..d2bd34c90 100644 --- a/configure.ac +++ b/configure.ac @@ -287,7 +287,14 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf]) AC_CHECK_FUNCS([glob]) -AC_CHECK_FUNCS([timersub]) +AC_LINK_IFELSE( + AC_LANG_PROGRAM([#include <sys/time.h>], + [struct timeval *a; timersub(a, a, a);]), + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system defines timersub.]), + AC_MSG_RESULT(no) +) + AC_CHECK_HEADER([sys/poll.h], [HAS_POLL=1] AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]), |