1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

Improve the configure checks.

This commit is contained in:
Andreas Schneider
2009-08-20 11:50:49 +02:00
parent 461e46b814
commit fd83d69440

View File

@@ -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)