AC_DEFINE(LINUX_SYSINFO_UNIT, 1,
[Define to 1 if Linux sysinfo sizes are in multiples of mem_unit bytes.]))
fi
-fi
+fi
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define `bool'.
AC_SUBST(LIBS_TERMCAP)
AC_SUBST(TERMCAP_OBJ)
+# GNU/Linux-specific timer functions.
+AC_CACHE_CHECK([for timerfd interface], [emacs_cv_have_timerfd],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/timerfd.h>
+ ]],
+ [[timerfd_create (CLOCK_REALTIME,
+ TFD_CLOEXEC | TFD_NONBLOCK);
+ timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);]])],
+ [emacs_cv_have_timerfd=yes],
+ [emacs_cv_have_timerfd=no])])
+if test "$emacs_cv_have_timerfd" = yes; then
+ AC_DEFINE([HAVE_TIMERFD], 1,
+ [Define to 1 if timerfd functions are supported as in GNU/Linux.])
+fi
# Do we have res_init, for detecting changes in /etc/resolv.conf?
# On Darwin, res_init appears not to be useful: see bug#562 and