$2=no
fi
AC_SUBST($2)])
+
+
+dnl AC_CHECK_OCAML_WORD_SIZE(var) sets var=32 or var=64
+dnl according to the compiler word size.
+dnl Contributed by Richard W.M. Jones <rjones@redhat.com>
+dnl XXX This completely fails to deal with cross-compiler case.
+AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
+[dnl
+AC_MSG_CHECKING(for OCaml compiler word size)
+cat > conftest.ml <<EOF
+print_endline (string_of_int Sys.word_size)
+EOF
+$1=`ocaml conftest.ml`
+AC_MSG_RESULT($$1)
+AC_SUBST($1)])
AC_MSG_ERROR([OCaml findlib is required])
fi
+AC_CHECK_OCAML_WORD_SIZE(OCAML_WORD_SIZE)
+
dnl Use ocamlfind to find the required packages ...
dnl Check for required OCaml packages.