aboutsummaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake56
1 files changed, 29 insertions, 27 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index fc17f61d..7c059454 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -81,33 +81,35 @@ if (WIN32)
endif (WIN32)
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)
- # libresolv
- check_library_exists(resolv hstrerror "" HAVE_LIBRESOLV)
- if (HAVE_LIBRESOLV)
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} resolv)
- endif (HAVE_LIBRESOLV)
- check_library_exists(rt nanosleep "" HAVE_LIBRT)
- # librt
- if (HAVE_LIBRT)
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} rt)
- endif (HAVE_LIBRT)
-
- check_function_exists(getaddrinfo HAVE_GETADDRINFO)
- check_function_exists(gethostbyname 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)
+ if (NOT LINUX)
+ # 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)
+ # libresolv
+ check_library_exists(resolv hstrerror "" HAVE_LIBRESOLV)
+ if (HAVE_LIBRESOLV)
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} resolv)
+ endif (HAVE_LIBRESOLV)
+ check_library_exists(rt nanosleep "" HAVE_LIBRT)
+ # librt
+ if (HAVE_LIBRT)
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} rt)
+ endif (HAVE_LIBRT)
+ endif (NOT LINUX)
+
+ check_function_exists(getaddrinfo HAVE_GETADDRINFO)
+ check_function_exists(gethostbyname 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)
set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries")