diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-16 12:41:28 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-16 12:41:28 +0200 |
commit | 9367adcb7006acc4783ec8d453e73ec14938a92d (patch) | |
tree | 3f014fb19edcf05a27b333a4adcd72989ced7340 /configure.ac | |
parent | 80add780beda1f537994024e8587255c871edf71 (diff) | |
download | blogc-9367adcb7006acc4783ec8d453e73ec14938a92d.tar.gz blogc-9367adcb7006acc4783ec8d453e73ec14938a92d.tar.bz2 blogc-9367adcb7006acc4783ec8d453e73ec14938a92d.zip |
build: fixed test dependency checks
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index 2ec6dcd..3442771 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,16 @@ AS_IF([test "x$enable_tests" != "xno"], [ ], [ have_cmocka=no ]) + 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]) + ]) + ]) + AC_PATH_PROG([git], [git]) AC_PATH_PROG([tar], [tar]) AS_IF([test "x$ac_cv_path_git" = "x" -o "x$ac_cv_path_tar" = "x"], [ @@ -145,6 +155,16 @@ AS_IF([test "x$enable_tests" != "xno"], [ ], [ have_bgr_deps=yes ]) + 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, diff and/or tee not found]) + ], [ + AC_MSG_WARN([bash, diff and/or tee not found, install it to run tests]) + ]) + ]) + AC_PATH_PROG([bash], [bash]) AC_PATH_PROG([diff], [diff]) AC_PATH_PROG([tee], [tee]) @@ -155,34 +175,15 @@ AS_IF([test "x$enable_tests" != "xno"], [ have_tests=yes TESTS="enabled" ]) -]) - -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"],, [ - have_tests=no - TESTS="disabled" - AS_IF([test "x$enable_tests" = "xyes"], [ - AC_MSG_ERROR([tests requested but bash, diff and/or tee not found]) - ], [ - AC_MSG_WARN([bash, diff 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"], [ - 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]) + 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]) + ]) ]) ]) ]) |