From 4f75fdcd1451ae60579209c73f6bccd874ce9382 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 8 Sep 2010 11:19:22 +0200 Subject: build: There is no need to check for system libraries on Linux. --- ConfigureChecks.cmake | 56 ++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) (limited to 'ConfigureChecks.cmake') 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") -- cgit v1.2.3