Skip to content
Permalink
Browse files

configure.ml: select better Sosa module implem if none provided by co…

…mmand line
  • Loading branch information
sagotch committed Nov 27, 2019
1 parent d5d5a4b commit 17a72ea76a3f22992e4073c4a6c3fc7306483d02
Showing with 12 additions and 1 deletion.
  1. +12 −1 configure.ml
@@ -19,6 +19,8 @@ let gwdb = ref `None

let set_api () = api := true

let set_sosa_legacy () = assert (!sosa = `None) ; sosa := `Legacy

let set_sosa_zarith () = assert (!sosa = `None) ; sosa := `Zarith

let set_sosa_num () = assert (!sosa = `None) ; sosa := `Num
@@ -32,6 +34,9 @@ let speclist =
; ( "--gwdb-legacy"
, Arg.Unit set_gwdb_legacy
, "Use legacy backend" )
; ( "--sosa-legacy"
, Arg.Unit set_sosa_legacy
, "Use Sosa module implementation" )
; ( "--sosa-num"
, Arg.Unit set_sosa_num
, "Use Sosa module implementation based on `num` library" )
@@ -49,9 +54,14 @@ let () =
| true -> "-D API", "piqirun.ext redis-sync yojson curl"
| false -> "", ""
in
if !sosa = `None then begin
if installed "zarith" then set_sosa_zarith ()
else if installed "num" then set_sosa_num ()
else set_sosa_legacy ()
end ;
let sosa_pkg =
match !sosa with
| `None ->
| `Legacy ->
exclude_dir "sosa.num" ;
exclude_dir "sosa.zarith" ;
"geneweb-sosa"
@@ -63,6 +73,7 @@ let () =
exclude_dir "sosa.array" ;
exclude_dir "sosa.num" ;
"geneweb-sosa-zarith"
| `None -> assert false
in
let wserver_pkg = "geneweb-wserver" in
let gwdb_d, gwdb_pkg =

0 comments on commit 17a72ea

Please sign in to comment.
You can’t perform that action at this time.