configure: added automatic depency checking for check
Until now, the configure script just checked for check to be installed, which is needed to compile the tests. Now, configure provides a conditional (MISSING_CHECK) depending on its presence for use by automake. If check is missing, the tests aren't compiled. Instead a special script is executed to inform the user of the problem and stops the testsuite. Note, that it was not possible to directly stop the generation of the testsuite by injecting a rule to a Makefile without relying on implementation details of automake. See: https://stackoverflow.com/questions/76376806/automake-how-to-portably-throw-an-error-and-aborting-the-target/76382437 To allow the script to issue messages to stderr, AM_TESTS_FD_REDIRECT is used, because the parallel test harness redirects output of its tests to logfiles. This isn't used for the serial test harness, because there is no redirection to logfiles, but there AM_TESTS_FD_REDIRECT is also not taken into account. See: https://www.gnu.org/software/automake/manual/html_node/Testsuite-Environment-Overrides.html Additionaly configure also provides an argument to enforce both behaviours. When specifying --enable-tests=no the tests are not compiled regardless of the presence of check. If --enable-tests=yes, it is assumed, that tests are really needed and the mandantory check for check is performed thus providing the former behaviour. If not specified --enable-tests default to auto, which results in the same behaviour as --enable-tests=yes, if check is present, and like --enable-tests=no otherwise.
tests/no_test.sh.in
0 → 100644
Please register or sign in to comment