Skip to content

Commit

Permalink
[fix] build: fix for FreeBSD iconv compilation and linking
Browse files Browse the repository at this point in the history
in OCaml, if ... then only applies on the next element
  • Loading branch information
Frederic Ye committed Jun 12, 2012
1 parent 181e5dd commit 3c35753
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/myocamlbuild_prefix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,15 @@ let _ = dispatch begin function
flag ["ocaml"; "native"; "link"; tag] (S[A"-ccopt";A("-L"^dir);A"-cclib";A("-l"^name)]);
in

if is_fbsd then
if is_fbsd then (
(* In the memory.c in FreeBSD part that uses kvm_getprocs() required
link with -lkvm. *)
flag ["use_stubs"; "link"] (S[A "-cclib";A "-lkvm"]);
(* Build with converters/libiconv port, which it installs in the
/usr/local by default *)
flag ["iconv"; "compile"] (S[A"-I";A "/usr/local/include"]);
flag ["iconv"; "link"] (S[A"-ccopt";A "-L/usr/local/lib";A "-cclib";A "-liconv"]);
);

(* -- Don't forget that the rest of the "mlstate build stdlib" is in --
-- myocamlbuild_suffix.ml. The rest comes from the build_rules*.ml in each repo -- *)

0 comments on commit 3c35753

Please sign in to comment.