mc-tests.m4 669 B

12345678910111213141516171819202122232425
  1. dnl @synopsis MC_UNIT_TESTS
  2. dnl
  3. dnl Check if unit tests enabled
  4. dnl
  5. dnl @author Slava Zanko <slavazanko@gmail.com>
  6. dnl @version 2011-02-10
  7. dnl @license GPL
  8. dnl @copyright Free Software Foundation, Inc.
  9. AC_DEFUN([MC_UNIT_TESTS],[
  10. AC_ARG_ENABLE(
  11. [tests],
  12. AS_HELP_STRING([--enable-tests], [Enable unit tests (see http://check.sourceforge.net/)])
  13. )
  14. if test x$enable_tests != xno; then
  15. PKG_CHECK_MODULES(
  16. CHECK,
  17. [check >= 0.9.0],
  18. [have_check=yes],
  19. [AC_MSG_WARN(['Check' utility not found. Check your environment])])
  20. fi
  21. AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes")
  22. ])