timersub is a macro not a function, so write the check in a way

that detects both formats.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2007-11-17 09:30:22 +00:00
parent 49d1248c55
commit 59efa92285
3 changed files with 27 additions and 66 deletions

View File

@@ -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]),