From 74ed5b5ebd0265af4a1605aa15d03f0188a52338 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 19 Dec 2005 21:38:10 +0000 Subject: Adjust more windows header includes --- configure.ac | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'configure.ac') 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 ], + AC_TRY_LINK([ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif + ], [select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);], [ dnl worked! AC_MSG_RESULT([yes]) @@ -1596,14 +1611,26 @@ 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 +#ifdef HAVE_WINSOCK2_H #include +#ifdef HAVE_WS2TCPIP_H #include +#endif +#endif #else +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_NETDB_H #include +#endif #endif ],[ getnameinfo(0, 0, 0, 0, 0, 0, 0); -- cgit v1.2.1