diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-08-24 11:00:35 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-09-21 11:25:48 +0100 |
commit | d55b3efbdef877642a154dfdca43d760795cdd9c (patch) | |
tree | 3c17baeec61b6dad1234df0a07502554b6c6e124 /configure.ac | |
parent | 5defa43b6f809f39ec79cc426414f2f6b1896065 (diff) | |
download | dbus-d55b3efbdef877642a154dfdca43d760795cdd9c.tar.gz |
Give better diagnostics if --enable-tests=yes is given
We want to indicate why it's a problem that GLib, dbus-glib are missing.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index efe14f4d..7566447c 100644 --- a/configure.ac +++ b/configure.ac @@ -163,7 +163,14 @@ AC_ARG_ENABLE([modular-tests], AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [enable/disable all tests, overriding embedded-tests/modular-tests]), - [enable_embedded_tests=$enableval; enable_modular_tests=$enableval], + [ + if test "x$enableval" = xyes; then + AC_MSG_NOTICE([Full test coverage was requested with --enable-tests=yes]) + AC_MSG_NOTICE([This has many dependencies (GLib, dbus-glib, Python)]) + fi + enable_embedded_tests=$enableval + enable_modular_tests=$enableval + ], []) # DBUS_ENABLE_EMBEDDED_TESTS controls unit tests built in to .c files @@ -187,7 +194,8 @@ if test "x$enable_modular_tests" != xno; then PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22, gio-2.0 >= 2.22], [], [if test "x$enable_modular_tests" = xyes; then - AC_MSG_ERROR([GLib is required by the modular tests]) + AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib]) + AC_MSG_ERROR([$GLIB_ERRORS]) else # assumed to be "auto" enable_modular_tests=no fi]) @@ -195,7 +203,8 @@ if test "x$enable_modular_tests" != xno; then PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1], [], [if test "x$enable_modular_tests" = xyes; then - AC_MSG_ERROR([dbus-glib is required by the modular tests (for now)]) + AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib]) + AC_MSG_ERROR([$DBUS_GLIB_ERRORS]) else # assumed to be "auto" enable_modular_tests=no fi]) |