summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Drake <dan@reactivated.net>2009-11-21 16:57:25 +0000
committerDaniel Drake <dan@reactivated.net>2009-11-21 16:58:31 +0000
commit0bd7ef5d8697973a026c36c15d6276177b4ec4ea (patch)
treeb1753bb53304a1188e191b8e39f5252089178be4 /configure.ac
parent90d8fcab9018b8e6887a7e0592d1e5f692117234 (diff)
downloadlibusb-0bd7ef5d8697973a026c36c15d6276177b4ec4ea.tar.gz
Refine timerfd header check (#18)
Require glibc-2.9 for the working timerfd support.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 180c14d..8aedfba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,15 +53,19 @@ AC_ARG_ENABLE([timerfd],
[use_timerfd=$enableval], [use_timerfd='auto'])
if test "x$use_timerfd" = "xyes" -a "x$timerfd_h" = "x0"; then
- AC_MSG_ERROR([timerfd header not available; glibc 2.8+ required])
-error
+ AC_MSG_ERROR([timerfd header not available; glibc 2.9+ required])
+fi
+
+AC_CHECK_DECL([TFD_NONBLOCK], [tfd_hdr_ok=yes], [tfd_hdr_ok=no], [#include <sys/timerfd.h>])
+if test "x$use_timerfd" = "xyes" -a "x$tfd_hdr_ok" = "xno"; then
+ AC_MSG_ERROR([timerfd header not usable; glibc 2.9+ required])
fi
AC_MSG_CHECKING([whether to use timerfd for timing])
if test "x$use_timerfd" = "xno"; then
AC_MSG_RESULT([no (disabled by user)])
else
- if test "x$timerfd_h" = "x1"; then
+ if test "x$timerfd_h" = "x1" -a "x$tfd_hdr_ok" = "xyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE(USBI_TIMERFD_AVAILABLE, [], [timerfd headers available])
else