diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2017-12-05 09:54:15 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2017-12-05 09:54:15 +0100 |
commit | 14c041012bd375cae018f83d107c836fca3d1f01 (patch) | |
tree | 15e4d5608e4e60b6cbd6ece1bbe8c38100ddc3b5 | |
parent | 04d5253b91f7567a09b950caa420b69fc34c0d0e (diff) | |
parent | 9879cc291512223c72a4cac2ef294c216cf64656 (diff) |
Merge PR #6293: Check for Num lib if OCaml >= 4.06, fixes #6162
-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 *) |