diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-03-11 08:14:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-03-11 08:14:36 +0000 |
commit | e75441e027362e19bfce82c642cf37d739eced04 (patch) | |
tree | 3873fbd9b228312876c1fa3b808f9c63bf51e9ae /ares | |
parent | 0ae8b51230863c0b135c4fcd2ec70a4cba150897 (diff) |
Check for winsock.h to work with win32. Only include system headers we know
exist.
Diffstat (limited to 'ares')
-rw-r--r-- | ares/configure.ac | 39 |
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.]) ) |