message(FATAL_ERROR "Unknown CPU '${KATIE_PROCESSOR}'")
endif()
+# only Solaris is known to have these
+find_library(SOCKET_LIBRARY NAMES socket)
+find_library(NSL_LIBRARY NAMES nsl)
+
# used in components, tests and JavaScriptCore
katie_check_header("cxxabi.h")
katie_check_function(posix_memalign "stdlib.h")
katie_check_function(prctl "sys/prctl.h")
katie_check_function(feenableexcept "fenv.h")
katie_check_function(madvise "sys/mman.h")
-katie_check_function(getifaddrs "ifaddrs.h")
katie_check_function(timegm "time.h")
katie_check_function(inotify_init1 "sys/inotify.h")
katie_check_function(kevent "sys/event.h")
katie_check_function(pipe2 "unistd.h")
-katie_check_function(accept4 "sys/socket.h")
-katie_check_function(paccept "sys/socket.h")
katie_check_function(getdomainname "unistd.h")
katie_check_function(renameat2 "stdio.h")
katie_check_struct(tm tm_gmtoff "time.h")
katie_check_function(pthread_setname_np "pthread.h")
cmake_reset_check_state()
+cmake_reset_check_state()
+set(socket_and_nls_libraries)
+if(SOCKET_LIBRARY)
+ set(socket_and_nls_libraries
+ ${socket_and_nls_libraries}
+ ${SOCKET_LIBRARY}
+ )
+endif()
+if(NSL_LIBRARY)
+ set(socket_and_nls_libraries
+ ${socket_and_nls_libraries}
+ ${NSL_LIBRARY}
+ )
+endif()
+set(CMAKE_REQUIRED_LIBRARIES ${socket_and_nls_libraries})
+katie_check_function(getifaddrs "ifaddrs.h")
+katie_check_function(accept4 "sys/socket.h")
+katie_check_function(paccept "sys/socket.h")
+cmake_reset_check_state()
+
katie_check_proc(exe)
katie_check_proc(cmdline)