]> granicus.if.org Git - curl/commitdiff
Check for winsock.h to work with win32. Only include system headers we know
authorDaniel Stenberg <daniel@haxx.se>
Fri, 11 Mar 2005 08:14:36 +0000 (08:14 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 11 Mar 2005 08:14:36 +0000 (08:14 +0000)
exist.

ares/configure.ac

index f4ed76f4fdc616b25328ccc02f2e2f93af0ea1e9..30f92b31d0eea78a208f6d3a00b6f08b650d9ada 100644 (file)
@@ -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.])
 )