Commit 5b4ce3ce authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

fix solaris build - inet_aton is in non-default library

parent db1b3d2d
...@@ -58,17 +58,11 @@ TARGET_LINK_LIBRARIES(perror mysys) ...@@ -58,17 +58,11 @@ TARGET_LINK_LIBRARIES(perror mysys)
ADD_EXECUTABLE(resolveip resolveip.c) ADD_EXECUTABLE(resolveip resolveip.c)
TARGET_LINK_LIBRARIES(resolveip mysys) TARGET_LINK_LIBRARIES(resolveip mysys)
# On Solaris, inet_aton() function used by resolveip could be in resolv library
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists) INCLUDE(CheckLibraryExists)
CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON) MY_SEARCH_LIBS(inet_aton "nsl;socket;resolv" SOLARIS_NSL)
IF(NOT HAVE_INET_ATON) TARGET_LINK_LIBRARIES(resolveip ${SOLARIS_NSL})
CHECK_LIBRARY_EXISTS(resolv inet_aton "" HAVE_INET_ATON_IN_RESOLV)
IF(HAVE_INET_ATON_IN_RESOLV)
TARGET_LINK_LIBRARIES(resolveip resolv)
ENDIF()
ENDIF()
ENDIF() ENDIF()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment