1
1

Improve detection for required libraries on Solaris.

Этот коммит содержится в:
Andreas Schneider 2009-08-21 15:15:18 +02:00
родитель fc0af0f0d8
Коммит c497f057a0
2 изменённых файлов: 17 добавлений и 13 удалений

Просмотреть файл

@ -41,20 +41,24 @@ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
# FUNCTIONS
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
if (UNIX)
# libsocket (Solaris)
check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET)
if (HAVE_LIBSOCKET)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} socket)
endif (HAVE_LIBSOCKET)
# libnsl (Solaris)
check_library_exists(nsl gethostbyname "" HAVE_LIBNSL)
if (HAVE_LIBNSL)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} nsl)
endif (HAVE_LIBNSL)
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
if (NOT HAVE_GETADDRINFO)
check_library_exists("socket" "getaddrinfo" "" HAVE_LIB_GETADDRINFO)
set(HAVE_GETADDRINFO 1)
endif (NOT HAVE_GETADDRINFO)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
if (NOT HAVE_GETHOSTBYNAME)
check_library_exists("nsl" "gethostbyname" "" HAVE_LIB_GETHOSTBYNAME)
set(HAVE_GETHOSTBYNAME 1)
endif (NOT HAVE_GETHOSTBYNAME)
check_function_exists(poll HAVE_POLL)
check_function_exists(select HAVE_SELECT)
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
check_function_exists(regcomp HAVE_REGCOMP)
endif (UNIX)

Просмотреть файл

@ -35,19 +35,19 @@ if (WIN32)
)
endif (WIN32)
if (HAVE_LIB_GETHOSTBYNAME)
if (HAVE_LIBNSL)
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_LINK_LIBRARIES}
nsl
)
endif (HAVE_LIB_GETHOSTBYNAME)
endif (HAVE_LIBNSL)
if (HAVE_LIB_GETADDRINFO)
if (HAVE_LIBSOCKET)
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_LINK_LIBRARIES}
socket
)
endif (HAVE_LIB_GETADDRINFO)
endif (HAVE_LIBSOCKET)
if (CRYPTO_LIBRARY)
set(LIBSSH_PRIVATE_INCLUDE_DIRS