Fix getaddrinfo and gethostbyname build problems on Solaris.
Этот коммит содержится в:
родитель
2a116bb291
Коммит
1939a55c3c
@ -35,7 +35,15 @@ if (WIN32)
|
|||||||
set(HAVE_SELECT TRUE)
|
set(HAVE_SELECT TRUE)
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
|
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)
|
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(poll HAVE_POLL)
|
||||||
check_function_exists(select HAVE_SELECT)
|
check_function_exists(select HAVE_SELECT)
|
||||||
check_function_exists(regcomp HAVE_REGCOMP)
|
check_function_exists(regcomp HAVE_REGCOMP)
|
||||||
|
@ -35,6 +35,20 @@ if (WIN32)
|
|||||||
)
|
)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
|
if (HAVE_LIB_GETHOSTBYNAME)
|
||||||
|
set(LIBSSH_LINK_LIBRARIES
|
||||||
|
${LIBSSH_LINK_LIBRARIES}
|
||||||
|
nsl
|
||||||
|
)
|
||||||
|
endif (HAVE_LIB_GETHOSTBYNAME)
|
||||||
|
|
||||||
|
if (HAVE_LIB_GETADDRINFO)
|
||||||
|
set(LIBSSH_LINK_LIBRARIES
|
||||||
|
${LIBSSH_LINK_LIBRARIES}
|
||||||
|
socket
|
||||||
|
)
|
||||||
|
endif (HAVE_LIB_GETADDRINFO)
|
||||||
|
|
||||||
if (CRYPTO_LIBRARY)
|
if (CRYPTO_LIBRARY)
|
||||||
set(LIBSSH_PRIVATE_INCLUDE_DIRS
|
set(LIBSSH_PRIVATE_INCLUDE_DIRS
|
||||||
${LIBSSH_PRIVATE_INCLUDE_DIRS}
|
${LIBSSH_PRIVATE_INCLUDE_DIRS}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user