diff options
author | Yang Tse <yangsita@gmail.com> | 2005-12-19 21:38:10 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2005-12-19 21:38:10 +0000 |
commit | 74ed5b5ebd0265af4a1605aa15d03f0188a52338 (patch) | |
tree | f3b25906c98fa8d09a21a88c70bb0f52c79e0da1 /configure.ac | |
parent | 178afd81a992b651416c9afffaa7200f61edc548 (diff) | |
download | curl-74ed5b5ebd0265af4a1605aa15d03f0188a52338.tar.gz |
Adjust more windows header includes
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 34de0bfa5..1abe464a1 100644 --- a/configure.ac +++ b/configure.ac @@ -1579,7 +1579,22 @@ dnl For some reason, the check above doesn't properly detect select() with dnl Msys/Mingw if test "$ac_cv_func_select" != "yes"; then AC_MSG_CHECKING([for select in ws2_32]) - AC_TRY_LINK([#include <winsock2.h>], + AC_TRY_LINK([ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include <windows.h> +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#else +#ifdef HAVE_WINSOCK_H +#include <winsock.h> +#endif +#endif +#endif + ], [select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);], [ dnl worked! AC_MSG_RESULT([yes]) @@ -1596,15 +1611,27 @@ if test "$ac_cv_func_getnameinfo" = "no"; then AC_TRY_LINK([ #undef inline #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#ifdef HAVE_WINSOCK2_H #include <winsock2.h> +#ifdef HAVE_WS2TCPIP_H #include <ws2tcpip.h> +#endif +#endif #else +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H #include <netdb.h> #endif +#endif ],[ getnameinfo(0, 0, 0, 0, 0, 0, 0); ],[ |