#!/usr/bin/env ocaml #directory "utils";; #use "conf.ml";; Conf.start ();; Conf.check_prog "C compiler" "gcc --version";; Conf.check_prog "C++ compiler" "g++ --version";; let _,version, _ = Conf.prog "Ocaml bytecode compiler" "ocamlc -version";; Conf.check "Ocaml version >= 3.11.0" Conf.version version (fun c -> c >= (3,11,0));; Conf.check_prog ~required:false "Ocaml native compiler" "ocamlopt -version";; Conf.check_prog "ocamlbuild" "ocamlbuild -version";; Conf.check_prog "ocamlfind" "ocamlfind printconf";; Conf.check_prog "pkg-config" "pkg-config --version";; Conf.check_prog "camlp4" "ocamlfind query camlp4";; Conf.check_prog "ulex" "ocamlfind query ulex";; Conf.check_prog "expat" "ocamlfind query expat";; Conf.check "XMLTree" (Conf.absolute) ("%s/../XMLTree/libXMLTree.a") (Sys.file_exists);; let libXMLTreeI = [ Conf.absolute "-I%s/../XMLTree"; Conf.absolute "-I%s/../XMLTree/libcds/includes"; Conf.absolute "-I%s/../XMLTree/TextCollection" ] ;; let libXMLTreeL = [ Conf.absolute "-L%s/../XMLTree" ];; let libXMLTreel = [ "-lXMLTree" ];; let _,ocamlI,_ = Conf.exec "ocamlc -where";; let ocamlI = [ "-I" ^ ocamlI ];; Conf.def_str "cxx_cmd" "g++";; Conf.def_list "cxx_includes" (libXMLTreeI @ ocamlI);; Conf.def_list "cxx_lpaths" libXMLTreeL;; Conf.def_list "cxx_libs" libXMLTreel;; Conf.finish ();;