+if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
+ has_monitoring=True
+ AC_MSG_NOTICE([Enabling the monitoring agent usage])
+fi
+AC_SUBST(ENABLE_MOND, $has_monitoring)
+AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True])
+
+# development modules
+HS_NODEV=
+AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t)
+AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t)
+AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
+# FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...)
+# that are needed to execute the tests, avoiding the duplication
+# of the checks.
+AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([process], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([snap-server], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([regex-pcre], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([Crypto], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([text], [], [HS_NODEV=1])
+AC_GHC_PKG_CHECK([hinotify], [], [HS_NODEV=1])
+if test -n "$HS_NODEV"; then
+ AC_MSG_WARN(m4_normalize([Required development modules were not found,
+ you won't be able to run Haskell unittests]))
+else
+ AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
+fi
+AC_SUBST(HS_NODEV)
+
+HTOOLS=yes