Summary: This gives a better error message when `rebuild` is missing. Reviewed By: jberdine Differential Revision: D3528761 fbshipit-source-id: b5be810
@ -183,8 +183,6 @@ AC_PROG_OCAMLLEX
AC_ASSERT_PROG([ocamllex], [$OCAMLLEX])
AC_PROG_OCAMLYACC
AC_ASSERT_PROG([ocamlyacc], [$OCAMLYACC])
AC_CHECK_TOOL([REBUILD], [rebuild], [no])
AC_ASSERT_PROG([rebuild], [$REBUILD])
AC_ASSERT_OCAML_PKG([atdgen], [], [1.6.0])
AC_ASSERT_OCAML_PKG([biniou])
AC_ASSERT_OCAML_PKG([camlzip], [zip])
@ -193,6 +191,10 @@ AC_ASSERT_OCAML_PKG([extlib], [], [1.5.4])
AC_ASSERT_OCAML_PKG([oUnit], [], [2.0.0])
AC_ASSERT_OCAML_PKG([reason])
AC_ASSERT_OCAML_PKG([yojson])
# check for rebuild after checking for Reason since `rebuild` is normally provided by Reason. This
# way if Reason is missing we get a more helpful error message and not "rebuild not found".
if test "x$enable_java_analyzers" = "xyes"; then
AC_CHECK_TOOL([JAVA], [java], [no])
@ -30,12 +30,12 @@ AC_DEFUN([AC_ASSERT_OCAML_PKG],
has_pkg=$AS_TR_SH[OCAML_PKG_$1]
pkg=$1
version=
AS_IF([test "x$3" = "x"], [dnl
AS_IF([test "x$3" != "x"], [dnl
version=" version $3"
])
AS_IF([test "$has_pkg" = "no"], [dnl
AC_MSG_ERROR([missing dependency: $pkg$version.
AC_MSG_ERROR([missing OCaml dependency: $pkg$version
If you are using opam, please run