+dnl Check for ocaml-bisect (optional) and --enable-coverage.
+AC_CHECK_PROG(BISECT_REPORT,bisect-report,bisect-report,no)
+AC_ARG_ENABLE([coverage],
+ [AS_HELP_STRING([--enable-coverage],
+ [add code coverage information (slow) @<:@default=no@:>@])],
+ [],
+ [enable_coverage=no])
+
+if test "x$enable_coverage" != "xno" -a "x$BISECT_REPORT" = "xno"; then
+ AC_MSG_ERROR([You must install ocaml-bisect package to get code coverage])
+fi
+AC_SUBST(enable_coverage)
+