-AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
-[
- AC_TRY_COMPILE(
- [#include <sys/socket.h>],
- [socklen_t len = 42; return len;],
- ac_cv_type_socklen_t=yes,
- ac_cv_type_socklen_t=no)
-])
-if test $ac_cv_type_socklen_t = yes; then
- AC_DEFINE(HAVE_SOCKLEN_T)
-fi
+AC_CHECK_TYPES([socklen_t, struct addrinfo, struct in6_addr, struct sockaddr_in6], , ,
+ [#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ #include <netinet/in.h>
+ ]
+)