aboutsummaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 07bcaec5..93e3c1ac 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -28,8 +28,12 @@ if (WIN32)
if (NOT HAVE_WSPIAPI_H)
message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions")
endif (NOT HAVE_WSPIAPI_H)
- set(HAVE_GETADDRINFO TRUE)
- set(HAVE_GETHOSTBYNAME TRUE)
+ check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)
+ if (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H)
+ set(HAVE_GETADDRINFO TRUE)
+ set(HAVE_GETHOSTBYNAME TRUE)
+ endif (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H)
+
set(HAVE_SELECT TRUE)
endif (WIN32)