summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2005-12-19 21:38:10 +0000
committerYang Tse <yangsita@gmail.com>2005-12-19 21:38:10 +0000
commit74ed5b5ebd0265af4a1605aa15d03f0188a52338 (patch)
treef3b25906c98fa8d09a21a88c70bb0f52c79e0da1 /configure.ac
parent178afd81a992b651416c9afffaa7200f61edc548 (diff)
downloadcurl-74ed5b5ebd0265af4a1605aa15d03f0188a52338.tar.gz
Adjust more windows header includes
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
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);
],[