summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-17 23:26:05 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-17 23:26:05 +0000
commitd119a5daa2214f0d3420b964f27542bed3096020 (patch)
tree5e1f21cc1c5abd08b125fd34a47a9f6101c8b4ef /acinclude.m4
parent32ac51cb2720108543d44961ed4cbcd23f519317 (diff)
Check for D-Bus GLib bindings if GLib was found
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m422
1 files changed, 16 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 95705f92..9b65fca0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -71,19 +71,24 @@ AC_DEFUN([AC_PATH_BLUEZ], [
AC_SUBST(BLUEZ_LIBS)
])
+AC_DEFUN([AC_PATH_GLIB], [
+ PKG_CHECK_MODULES(GLIB, glib-2.0, glib_found=yes, glib_found=no)
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+])
+
AC_DEFUN([AC_PATH_DBUS], [
PKG_CHECK_MODULES(DBUS, dbus-1 > 0.35, dummy=yes, AC_MSG_ERROR(dbus > 0.35 is required))
PKG_CHECK_EXISTS(dbus-1 < 0.95, DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE")
+ if (test "${glib_found}" = "yes"); then
+ PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 > 0.70, dbus_glib_found=yes, dbus_glib_found=no)
+ else
+ dbus_glib_found=no
+ fi
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
])
-AC_DEFUN([AC_PATH_GLIB], [
- PKG_CHECK_MODULES(GLIB, glib-2.0, glib_found=yes, glib_found=no)
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
-])
-
AC_DEFUN([AC_PATH_OPENOBEX], [
PKG_CHECK_MODULES(OPENOBEX, openobex > 1.1, openobex_found=yes, openobex_found=no)
AC_SUBST(OPENOBEX_CFLAGS)
@@ -262,6 +267,11 @@ AC_DEFUN([AC_ARG_BLUEZ], [
if (test "${glib_enable}" = "yes" && test "${glib_found}" = "yes"); then
AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have GLib support.])
+ if (test "${dbus_glib_found}" = "yes"); then
+ AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define to 1 if you have D-Bus GLib bindings.])
+ DBUS_CFLAGS="$DBUS_CFLAGS $DBUS_GLIB_CFLAGS"
+ DBUS_LIBS="$DBUS_GLIB_LIBS"
+ fi
fi
AM_CONDITIONAL(INOTIFY, test "${inotify_enable}" = "yes" && test "${inotify_found}" = "yes")