summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-09-01 12:27:54 -0400
committerColin Walters <walters@verbum.org>2011-09-02 15:09:22 -0400
commit5f65d7d58188ffc75ffded71c741892352411a0c (patch)
tree52d01745277f36f78137b59ad932688b1ba28de1 /configure.ac
parentfb9ee91145db8904f1baf7c60fbbfaf36dd05e47 (diff)
downloadgnome-desktop-5f65d7d58188ffc75ffded71c741892352411a0c.tar.gz
GnomeWallClock: Add support for Linux timerfd()
See https://bugzilla.gnome.org/show_bug.cgi?id=655129 for more background information on timerfd. https://bugzilla.gnome.org/show_bug.cgi?id=657955
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b6916867..35a3244a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,22 @@ dnl pkg-config dependency checks
PKG_CHECK_MODULES(GNOME_DESKTOP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED $RANDR_PACKAGE xext >= $XEXT_REQUIRED)
+AC_CACHE_CHECK(for timerfd_create(2) system call,
+ glib_cv_timerfd,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <sys/timerfd.h>
+#include <unistd.h>
+],[
+int
+main (void)
+{
+ timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC);
+ return 0;
+}
+])],glib_cv_timerfd=yes,glib_cv_timerfd=no))
+if test x"$glib_cv_timerfd" = x"yes"; then
+ AC_DEFINE(HAVE_TIMERFD, 1, [we have the timerfd_create(2) system call])
+fi
+
dnl gnome-doc-utils stuff
GNOME_DOC_INIT