diff options
author | Paul Steckler <steck@stecksoft.com> | 2017-12-01 13:28:01 -0500 |
---|---|---|
committer | Paul Steckler <steck@stecksoft.com> | 2017-12-01 13:28:01 -0500 |
commit | 9879cc291512223c72a4cac2ef294c216cf64656 (patch) | |
tree | e104527f957e66ef5a1c0225f10f606def04cb80 /configure.ml | |
parent | e29993c250164b9486d4d7ffdebb9bfee4a2828f (diff) |
check for Num lib if OCaml >= 4.06, #6162
Diffstat (limited to 'configure.ml')
-rw-r--r-- | configure.ml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ml b/configure.ml index 1ccb69106..e14eeac7b 100644 --- a/configure.ml +++ b/configure.ml @@ -678,6 +678,22 @@ let operating_system, osdeplibs = else (try Sys.getenv "OS" with Not_found -> ""), osdeplibs +(** Num library *) + +(* since 4.06, the Num library is no longer distributed with OCaml (replaced + by Zarith) +*) + +let check_for_numlib () = + if caml_version_nums >= [4;6;0] then + let numlib,_ = tryrun "ocamlfind" ["query";"num"] in + match numlib with + | "" -> + die "Num library not installed, required for OCaml 4.06 or later" + | _ -> printf "You have the Num library installed. Good!\n" + +let numlib = + check_for_numlib () (** * lablgtk2 and CoqIDE *) |