Use Config.ocamlfind instead of running ocamlfind directly.
let package_name = "@PACKAGE_NAME@"
let package_version = "@PACKAGE_VERSION@"
+let have_ocamlc = "@OCAMLC@" <> "no"
+let have_ocamlopt = "@OCAMLOPT@" <> "no"
+
+let ocamlfind = "@OCAMLFIND@"
+
let mailx = "@MAILX@"
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
+(** This module contains config information from the ./configure script. *)
+
val package_name : string
val package_version : string
+(** Package name, version. *)
+
+val have_ocamlc : bool
+val have_ocamlopt : bool
+(** Flags indicating if we have ocamlc (OCaml bytecode) and/or ocamlopt
+ (OCaml native code) compilers. *)
+
+val ocamlfind : string
+(** Name of the [ocamlfind] program. *)
val mailx : string
+(** mailx program. *)
let files = get_multijobs_filenames () in
List.iter (
fun file ->
- let cmd = sprintf "ocamlfind ocamlc -I +camlp4 -I %s -package unix,camlp4.lib -pp 'camlp4o %s/pa_when.cmo' -c %s"
- !libdir !libdir file in
+ let cmd = sprintf "%s c -I +camlp4 -I %s -package unix,camlp4.lib -pp 'camlp4o %s/pa_when.cmo' -c %s"
+ Config.ocamlfind !libdir !libdir file in
if Sys.command cmd <> 0 then (
eprintf "whenjobs: %s: could not compile jobs script, see earlier errors\n"
file;