Check is not running, fix check

This commit is contained in:
c9s 2016-03-12 12:39:58 +08:00
parent 0c5f1f6b5c
commit 43fd09e8a6
2 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,6 @@
SUBDIRS=3rdparty src . examples
if HAVE_CHECK
if ENABLE_CHECK
SUBDIRS += tests
endif

View file

@ -118,15 +118,16 @@ AC_ARG_ENABLE(check,
AS_HELP_STRING([--enable-check],
[enable unit testing]),
, enable_check=unset)
if test "x$enable_check" != "xunset" ; then
PKG_CHECK_MODULES(CHECK,[check >= 0.9.4],:,[
ifdef([AM_PATH_CHECK],
[AM_PATH_CHECK(,[have_check="yes"])],
AC_MSG_WARN([Check not found; cannot run unit tests!])
[have_check="no"])]
[AM_PATH_CHECK(,[have_check="yes"])],
AC_MSG_WARN([Check not found; cannot run unit tests!]) [have_check="no"]
)]
])
fi
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
AM_CONDITIONAL(ENABLE_CHECK, test "x$enable_check" = "xyes")
AC_CONFIG_FILES([
r3.pc