diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-02-13 13:22:25 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-02-13 17:39:11 +0100 |
commit | 242e1c342ca016f2de23261e2b7aff3d9549e325 (patch) | |
tree | 8323611ad727110680724cc55cfe3ca85bf739f9 | |
parent | 935e3b70aea8ee98a1dd5acb6589fd6842fb3380 (diff) | |
download | libssh-242e1c342ca016f2de23261e2b7aff3d9549e325.tar.gz libssh-242e1c342ca016f2de23261e2b7aff3d9549e325.tar.xz libssh-242e1c342ca016f2de23261e2b7aff3d9549e325.zip |
build: Try to fix the build on Solaris.
(cherry picked from commit 9baa491b0b2cbc0cb9269dc4052a29bee494e244)
-rw-r--r-- | ConfigureChecks.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 1860219d..fecfe340 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -91,13 +91,21 @@ if (UNIX) if (HAVE_LIBSOCKET) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} socket) endif (HAVE_LIBSOCKET) + # 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) + + # libnsl/inet_pton (Solaris) + check_library_exists(nsl inet_pton "" HAVE_LIBNSL) + if (HAVE_LIBNSL) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} nsl) + endif (HAVE_LIBNSL) + # librt + check_library_exists(rt nanosleep "" HAVE_LIBRT) if (HAVE_LIBRT) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} rt) endif (HAVE_LIBRT) |