[OCaml] [autoconf] Migrate to ocamlfind.
authorPeter Zotov <whitequark@whitequark.org>
Thu, 30 Oct 2014 08:29:45 +0000 (08:29 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Thu, 30 Oct 2014 08:29:45 +0000 (08:29 +0000)
commit668f9670a650f775f033e11d164d03bbaef61317
tree109757eae144d7ce1aa84345c74aad5e7dd2f9f8
parent1b254f9a56b8647ea0101ee49ff00fd4a810b6d4
[OCaml] [autoconf] Migrate to ocamlfind.

This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.

Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.

The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.

Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.

llvm-svn: 220899
21 files changed:
llvm/Makefile.config.in
llvm/autoconf/configure.ac
llvm/bindings/ocaml/Makefile.ocaml
llvm/configure
llvm/test/Bindings/Ocaml/analysis.ml
llvm/test/Bindings/Ocaml/bitreader.ml
llvm/test/Bindings/Ocaml/bitwriter.ml
llvm/test/Bindings/Ocaml/executionengine.ml
llvm/test/Bindings/Ocaml/ext_exc.ml
llvm/test/Bindings/Ocaml/ipo_opts.ml
llvm/test/Bindings/Ocaml/irreader.ml
llvm/test/Bindings/Ocaml/linker.ml
llvm/test/Bindings/Ocaml/lit.local.cfg
llvm/test/Bindings/Ocaml/passmgr_builder.ml
llvm/test/Bindings/Ocaml/scalar_opts.ml
llvm/test/Bindings/Ocaml/target.ml
llvm/test/Bindings/Ocaml/vectorize_opts.ml
llvm/test/Bindings/Ocaml/vmcore.ml
llvm/test/Makefile
llvm/test/lit.cfg
llvm/test/lit.site.cfg.in