aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 19 insertions, 1 deletions
diff --git a/configure b/configure
index 919b2b9e..64a61f2b 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,7 @@
#!/bin/sh
#
+# $Id: configure,v 1.47 2016/07/20 14:03:06 schwarze Exp $
+#
# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
@@ -39,6 +41,7 @@ CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
CFLAGS="${CFLAGS} -Wno-unused-parameter"
LDADD=
LDFLAGS=
+LD_NANOSLEEP=
LD_OHASH=
STATIC="-static"
@@ -52,6 +55,7 @@ HAVE_GETLINE=
HAVE_GETSUBOPT=
HAVE_ISBLANK=
HAVE_MKDTEMP=
+HAVE_NANOSLEEP=
HAVE_OHASH=
HAVE_PLEDGE=
HAVE_PROGNAME=
@@ -197,6 +201,20 @@ runtest strtonum STRTONUM || true
runtest vasprintf VASPRINTF || true
runtest wchar WCHAR || true
+# --- nanosleep ---
+if [ -n "${LD_NANOSLEEP}" ]; then
+ runtest nanosleep NANOSLEEP "${LD_NANOSLEEP}" || true
+elif singletest nanosleep NANOSLEEP; then
+ :
+elif runtest nanosleep NANOSLEEP "-lrt"; then
+ LD_NANOSLEEP="-lrt"
+fi
+if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
+ echo "FATAL: nanosleep: no" 1>&2
+ echo "FATAL: nanosleep: no" 1>&3
+ exit 1
+fi
+
# --- ohash ---
if ismanual ohash "${HAVE_OHASH}"; then
:
@@ -212,7 +230,7 @@ if [ "${HAVE_OHASH}" -eq 0 ]; then
fi
# --- LDADD ---
-LDADD="${LDADD} ${LD_OHASH} -lz"
+LDADD="${LDADD} ${LD_NANOSLEEP} ${LD_OHASH} -lz"
echo "LDADD=\"${LDADD}\"" 1>&2
echo "LDADD=\"${LDADD}\"" 1>&3
echo 1>&3