aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
Diffstat (limited to 'ares')
-rw-r--r--ares/configure.ac39
1 files 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 <sys/types.h>
- #include <sys/socket.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#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 <sys/types.h>
- #include <sys/socket.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#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 <sys/types.h>
- #include <netinet/in.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
], [in6_addr],
AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.])
)