Since this test is only useful for development, don't fail the build on
platforms that lack shellcheck.
Another approach could be to add a dedicated make target to run the meta
tests but this was easier as a quick fix.
Change-Id: If9d30c7c4e3ee526f028ad82545e631ace272354
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
AC_PATH_PROG([PGREP], [pgrep])
AM_CONDITIONAL([HAVE_PGREP], [test "x$PGREP" != "x"])
+AC_PATH_PROG([SHELLCHECK], [shellcheck])
+AM_CONDITIONAL([HAVE_SHELLCHECK], [test "x$SHELLCHECK" != "x"])
+
# set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file
# is not distributed in tarballs
AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no])
LOG_DRIVER = env PGREP='$(PGREP)' AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/tests/utils/tap-driver.sh
-TESTS = test_shellcheck
+TESTS =
+
+if HAVE_SHELLCHECK
+TESTS += test_shellcheck
+endif
EXTRA_DIST = $(TESTS)