From ff8fc10a65108ec384f754e5182d1cfedfe9c5c5 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 26 Oct 2014 00:31:41 +0200 Subject: [PATCH] configure: add detection for 'nanosleep' function with appropriate headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As reported by Milan Čermák, Solaris needs extra library 'rt' to have access to that POSIX function, so we properly check for it. Signed-off-by: Christophe CURIS --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index a73f7038..7097e9d9 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,12 @@ AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \ setsid mallinfo mkstemp sysconf) AC_SEARCH_LIBS([strerror], [cposix]) +dnl nanosleep is generally available in standard libc, although not always the +dnl case. One known example is Solaris which needs -lrt +AC_SEARCH_LIBS([nanosleep], [rt], [], + [AC_MSG_ERROR([function 'nanosleep' not found, please report to wmaker-dev@lists.windowmaker.org])]) + + dnl Check for strlcat/strlcpy dnl ========================= AC_ARG_WITH([libbsd],