From 7e8d1bfad188854ad45550a2c2467b5caf83923c Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Fri, 27 Feb 2009 06:29:26 +0800 Subject: [PATCH] Check dbus-python in configure.ac. --- configure.ac | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 07f8491..2302dd3 100644 --- a/configure.ac +++ b/configure.ac @@ -90,11 +90,18 @@ PKG_CHECK_MODULES(GDK2, [ # check for gtk-doc GTK_DOC_CHECK(1.9) + # check for dbus-glib PKG_CHECK_MODULES(DBUS, [ dbus-1 ]) +# check gconf +PKG_CHECK_MODULES(GCONF, + [gconf-2.0 >= 2.12], +) + + # Check for Qt4 PKG_CHECK_MODULES(QT, [QtCore >= 4.4.0 QtDBus >= 4.4.0], @@ -180,9 +187,25 @@ fi enable_qt4=no AM_CONDITIONAL(IBUS_BUILD_QT4, [test x"$enable_qt4" = x"yes" ]) -PKG_CHECK_MODULES(GCONF, - [gconf-2.0 >= 2.12], +# check for dbus-python +AC_ARG_ENABLE(dbus-python-check, + AS_HELP_STRING([--disable-dbus-python-check], + [Do not check dbus-python]), + [enable_dbus_python_check=$enableval], + [enable_dbus_python_check=yes], +) +PKG_CHECK_MODULES(DBUS_PYTHON, + [dbus-python >= 0.83.0], + [IBUS_HAS_DBUS_PYTHON=yes], + [IBUS_HAS_DBUS_PYTHON=no] ) +if test x"$IBUS_HAS_DBUS_PYTHON" != x"yes"; then + if test x"$enable_dbus_python_check" != x"no"; then + AC_MSG_ERROR([can not find dbus-python >= 0.83.0. Please install or update dbus-python.]) + else + AC_MSG_WARN([can not find dbus-python >= 0.83.0. It is required.]) + fi +fi # check iso-codes AC_ARG_ENABLE(iso-codes-check, -- 2.7.4