summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSven Neumann <sven@gimp.org>2008-03-03 17:45:08 -0500
committerDavid Zeuthen <davidz@redhat.com>2008-03-03 17:45:08 -0500
commit0c9383d363c6dd29da64ed4383ab9819f7f1fc99 (patch)
tree4c7f69477316a9b002c4e112736ad7463f8de176 /configure.in
parent4caf585c66f5490a40f458015eaac8af1c277fe8 (diff)
use g_timeout_add_seconds() where appropriate if glib 2.14 is available
As you probably know already, glib 2.14 introduced variants of the g_timeout_add() functions that operate at whole second granularity. This allows timers to be grouped, which results in a more power and CPU efficient behavior. Attached is a patch that adds a configure check for GLib 2.14 and changes some code (notably in the Linux specific parts) to use the new functions when possible.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 44bffb81..8424170e 100644
--- a/configure.in
+++ b/configure.in
@@ -622,6 +622,15 @@ PKG_CHECK_MODULES(GLIB, [$glib_module])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
+AC_MSG_CHECKING([if GLib is version 2.14.0 or newer])
+if $PKG_CONFIG --atleast-version=2.14.0 glib-2.0; then
+ have_glib_2_14=yes
+ AC_DEFINE(HAVE_GLIB_2_14, 1, [Define to 1 if GLib is version 2.14 or newer])
+else
+ have_glib_2_14=no
+fi
+AC_MSG_RESULT($have_glib_2_14)
+
# volume_id
case "$host" in
*-*-solaris*)