From fd83d694403834493da20eb4977c7269c2b2ff43 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 20 Aug 2009 11:50:49 +0200 Subject: Improve the configure checks. --- ConfigureChecks.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c2a2def4..1e8fbf5b 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -23,7 +23,12 @@ endif(CMAKE_COMPILER_IS_GNUC) # HEADER FILES check_include_file(pty.h HAVE_PTY_H) check_include_file(terminos.h HAVE_TERMIOS_H) -check_include_file(wspiapi.h HAVE_WSPIAPI_H) +if (WIN32) + check_include_file(wspiapi.h HAVE_WSPIAPI_H) + set(HAVE_GETADDRINFO TRUE) + set(HAVE_GETHOSTBYNAME TRUE) + set(HAVE_SELECT TRUE) +endif (WIN32) set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS}) check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H) @@ -34,11 +39,7 @@ check_include_file(openssl/des.h HAVE_OPENSSL_DES_H) # FUNCTIONS check_function_exists(cfmakeraw HAVE_CFMAKERAW) -if (WIN32) - set(HAVE_GETADDRINFO TRUE) - set(HAVE_GETHOSTBYNAME TRUE) - set(HAVE_SELECT TRUE) -else (WIN32) +if (UNIX) check_function_exists(getaddrinfo HAVE_GETADDRINFO) if (NOT HAVE_GETADDRINFO) check_library_exists("socket" "getaddrinfo" "" HAVE_LIB_GETADDRINFO) @@ -52,7 +53,7 @@ else (WIN32) check_function_exists(poll HAVE_POLL) check_function_exists(select HAVE_SELECT) check_function_exists(regcomp HAVE_REGCOMP) -endif (WIN32) +endif (UNIX) # LIBRARIES if (CRYPTO_FOUND) -- cgit v1.2.3