From 836ea885b2fc62cc7b483149937b91c93815e8ae Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 13 Oct 2016 01:50:32 +0200 Subject: build: disable all tests if some dep not found --- configure.ac | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9926099..081dfbc 100644 --- a/configure.ac +++ b/configure.ac @@ -156,16 +156,32 @@ AS_IF([test "x$enable_tests" != "xno"], [ ]) ]) -AS_IF([test "x$enable_tests" = "xyes"], [ - AS_IF([test "x$have_cmocka" = "xyes"],, [ +AS_IF([test "x$have_cmocka" = "xyes"],, [ + have_tests=no + TESTS="disabled" + AS_IF([test "x$enable_tests" = "xyes"], [ AC_MSG_ERROR([tests requested but cmocka not found]) + ], [ + AC_MSG_WARN([cmocka not found, install it to run tests]) ]) - AS_IF([test "x$have_blogc_deps" = "xyes"],, [ +]) +AS_IF([test "x$have_blogc_deps" = "xyes"],, [ + have_tests=no + TESTS="disabled" + AS_IF([test "x$enable_tests" = "xyes"], [ AC_MSG_ERROR([tests requested but bash and/or tee not found]) + ], [ + AC_MSG_WARN([bash and/or tee not found, install it to run tests]) ]) - AS_IF([test "x$have_bgr_deps" = "xyes"], , [ - AS_IF([test "x$have_git_receiver" = "xyes"], [ +]) +AS_IF([test "x$have_bgr_deps" = "xyes"], , [ + AS_IF([test "x$have_git_receiver" = "xyes"], [ + have_tests=no + TESTS="disabled" + AS_IF([test "x$enable_tests" = "xyes"], [ AC_MSG_ERROR([tests requested for blogc-git-receiver but git and/or tar not found]) + ], [ + AC_MSG_WARN([git and/or tar not found, install it to run blogc-git-receiver tests]) ]) ]) ]) -- cgit v1.2.3-18-g5258