])
dnl Check for nanosleep. For nanosleep to work on Solaris, we must
-dnl link with -lt (recently) or with -lposix (older releases).
+dnl link with -lrt (recently) or with -lposix4 (older releases).
AC_DEFUN([WGET_NANOSLEEP], [
AC_CHECK_FUNCS(nanosleep, [], [
])
])
+AC_DEFUN([WGET_POSIX_CLOCK], [
+ AC_CHECK_FUNCS(clock_gettime, [], [
+ AC_CHECK_LIB(rt, clock_gettime)
+ ])
+])
+
dnl Check whether we need to link with -lnsl and -lsocket, as is the
dnl case on e.g. Solaris.
])
-AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
- AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
- [wget_cv_gai_ai_addrconfig],[
- AC_TRY_CPP([
-#include <netdb.h>
-
-#ifndef AI_ADDRCONFIG
- #error Missing AI_ADDRCONFIG
-#endif
- ],[
- wget_cv_gai_ai_addrconfig=yes
- ],[
- wget_cv_gai_ai_addrconfig=no
- ])
- ])
-
- if test "X$wget_cv_gai_ai_addrconfig" = "Xyes"; then :
- $1
- else :
- $2
- fi
-])
-
-
AC_DEFUN([WGET_STRUCT_SOCKADDR_STORAGE],[
AC_CHECK_TYPES([struct sockaddr_storage],[], [], [
#include <sys/types.h>