summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-10-31 12:20:33 +0100
committerWerner Koch <wk@gnupg.org>2016-10-31 12:24:45 +0100
commitad491ceec6145b3781a05dc7b4a36052abeeb4b4 (patch)
treee503edd6bf7e5627eb231d45318d27a7fb2114f9 /configure.ac
parentw32: Fix PKG_CONFIG_LIBDIR in --build-w32 (diff)
downloadgnupg2-ad491ceec6145b3781a05dc7b4a36052abeeb4b4.tar.xz
gnupg2-ad491ceec6145b3781a05dc7b4a36052abeeb4b4.zip
common: New function gnupg_usleep.
* configure.ac (HAVE_NANOSLEEP): Test for nanosleep. * common/sysutils.c: Always include time.h. (gnupg_usleep): New. -- This function has been compiled from nPth and Libassuan. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 91ef5c964..c211979b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1387,6 +1387,16 @@ AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol \
flockfile funlockfile getpwnam getpwuid \
getenv inet_pton strpbrk])
+# On some systems (e.g. Solaris) nanosleep requires linking to librl.
+# Given that we use nanosleep only as an optimization over a select
+# based wait function we want it only if it is available in libc.
+_save_libs="$LIBS"
+AC_SEARCH_LIBS([nanosleep], [],
+ [AC_DEFINE(HAVE_NANOSLEEP,1,
+ [Define to 1 if you have the `nanosleep' function in libc.])])
+LIBS="$_save_libs"
+
+
# See whether libc supports the Linux inotify interface
case "${host}" in
*-*-linux*)