From 6c6aabeecf031de7c74df411b420ce8ac1d3e998 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Aug 2011 12:24:28 +0100 Subject: [PATCH 4/4] If --enable-tests=yes, require Python modules for complete test coverage The two relevant tests already exit 0 with a message if importing those modules fails. --- configure.ac | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index c631506..515d613 100644 --- a/configure.ac +++ b/configure.ac @@ -229,8 +229,15 @@ AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS], if test "x$enable_tests" = xyes; then # full test coverage is required, Python is a hard dependency - AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python]) + AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject]) AM_PATH_PYTHON([2.6]) + AC_MSG_CHECKING([for Python modules for full test coverage]) + if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules]) + fi else # --enable-tests not given: do not abort if Python is missing AM_PATH_PYTHON([2.6], [], [:]) -- 1.7.5.4