From e75441e027362e19bfce82c642cf37d739eced04 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Mar 2005 08:14:36 +0000 Subject: Check for winsock.h to work with win32. Only include system headers we know exist. --- ares/configure.ac | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/ares/configure.ac b/ares/configure.ac index f4ed76f4f..30f92b31d 100644 --- a/ares/configure.ac +++ b/ares/configure.ac @@ -61,13 +61,23 @@ AC_CHECK_HEADERS( sys/time.h \ sys/select.h \ sys/socket.h \ - ) + winsock.h \ + netinet/in.h \ + ) dnl check for AF_INET6 CARES_CHECK_CONSTANT( [ - #include - #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WINSOCK_H +#include +#endif + ], [PF_INET6], AC_DEFINE_UNQUOTED(HAVE_PF_INET6,1,[Define to 1 if you have PF_INET6.]) ) @@ -75,8 +85,16 @@ CARES_CHECK_CONSTANT( dnl check for PF_INET6 CARES_CHECK_CONSTANT( [ - #include - #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WINSOCK_H +#include +#endif + ], [AF_INET6], AC_DEFINE_UNQUOTED(HAVE_AF_INET6,1,[Define to 1 if you have AF_INET6.]) ) @@ -85,8 +103,15 @@ CARES_CHECK_CONSTANT( dnl check for the in6_addr structure CARES_CHECK_STRUCT( [ - #include - #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_WINSOCK_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif ], [in6_addr], AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.]) ) -- cgit v1.2.3