From 9baa491b0b2cbc0cb9269dc4052a29bee494e244 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 13 Feb 2011 13:22:25 +0100 Subject: build: Try to fix the build on Solaris. --- ConfigureChecks.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 1860219..fecfe34 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) -- cgit v1.2.3