Make the tests subdirectory optional.

Otherwise build breaks when check is not installed.
This commit is contained in:
Arnaud Cornet 2018-12-09 15:08:58 -05:00
parent 4d7f243777
commit e27b84f15e
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,7 @@
SUBDIRS = src . tests
if COND_WANT_TESTS
MAYBE_TESTS = tests
endif
SUBDIRS = src . $(MAYBE_TESTS)
dist_man_MANS = bip.1 bip.conf.5 bipmkpw.1

View File

@ -44,6 +44,7 @@ PKG_CHECK_MODULES([CHECK], [check >= 0.9.6], [
AC_CONFIG_FILES([tests/Makefile])
enable_tests=yes
], [ enable_tests=no ])
AM_CONDITIONAL([COND_WANT_TESTS], [test "$enable_tests" = yes])
AC_CHECK_FUNC(backtrace_symbols_fd, [
AC_DEFINE(HAVE_BACKTRACE, [], [Use glibc backtrace on fatal()])