From 1939a55c3cae415ae295134d54e34a2daec43438 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 23 Jul 2009 11:57:17 +0200 Subject: Fix getaddrinfo and gethostbyname build problems on Solaris. --- ConfigureChecks.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 15ec4cae..679dea7a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -35,7 +35,15 @@ if (WIN32) set(HAVE_SELECT TRUE) else (WIN32) check_function_exists(getaddrinfo HAVE_GETADDRINFO) + if (NOT HAVE_GETADDRINFO) + check_library_exists("socket" "getaddrinfo" "" HAVE_LIB_GETADDRINFO) + set(HAVE_GETADDRINFO 1) + endif (NOT HAVE_GETADDRINFO) check_function_exists(gethostbyname HAVE_GETHOSTBYNAME) + if (NOT HAVE_GETHOSTBYNAME) + check_library_exists("nsl" "gethostbyname" "" HAVE_LIB_GETHOSTBYNAME) + set(HAVE_GETHOSTBYNAME 1) + endif (NOT HAVE_GETHOSTBYNAME) check_function_exists(poll HAVE_POLL) check_function_exists(select HAVE_SELECT) check_function_exists(regcomp HAVE_REGCOMP) -- cgit v1.2.3