summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>2017-01-10 00:38:07 +0100
committerAdrian Knoth <adi@drcomp.erfurt.thur.de>2017-01-10 00:38:07 +0100
commit3e26d4ff92789d8e4b379d50fec2de9c4471c2e1 (patch)
tree80335bdb9fdabaea3bb7ccd2cc3c4b83c1ba20ba
parent0dc6f4a0aba1c5efe6020bfd107023f3a153252b (diff)
downloadjack1-3e26d4ff92789d8e4b379d50fec2de9c4471c2e1.tar.gz
Fix detection of clock_gettime() and clock_nanosleep()
glibc above 2.17 has these functions builtin, so no need to link against librt. When the macro succeeds, it needs to set the define to 1, not 0. Also clarify the text message if librt is linked in.
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a937019..5d0c2f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,28 +258,28 @@ AC_EGREP_CPP( ppoll,
AC_CHECK_FUNC(clock_gettime,
[
- AC_DEFINE(HAVE_CLOCK_GETTIME,0,"Whether or not clock_gettime can be found in system libraries")
+ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
],
#
# if not found, check librt specifically
#
AC_CHECK_LIB(rt, clock_gettime,
[
- AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
+ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries (via -lrt)")
OS_LDFLAGS="$OS_LDFLAGS -lrt"
])
)
AC_CHECK_FUNC(clock_nanosleep,
[
- AC_DEFINE(HAVE_CLOCK_NANOSLEEP,0,"Whether or not clock_nanosleep can be found in system libraries")
+ AC_DEFINE(HAVE_CLOCK_NANOSLEEP,1,"Whether or not clock_nanosleep can be found in system libraries")
],
#
# if not found, check librt specifically
#
AC_CHECK_LIB(rt, clock_nanosleep,
[
- AC_DEFINE(HAVE_CLOCK_NANOSLEEP,1,"Whether or not clock_nanosleep can be found in system libraries")
+ AC_DEFINE(HAVE_CLOCK_NANOSLEEP,1,"Whether or not clock_nanosleep can be found in system libraries (via -lrt)")
OS_LDFLAGS="$OS_LDFLAGS -lrt"
])
)