Skip to content

Commit

Permalink
fixup! fixup! fixup! Use packaged version of mpfr
Browse files Browse the repository at this point in the history
  • Loading branch information
thvnx committed Sep 6, 2024
1 parent c2ba088 commit a640014
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

# setup-ocaml automatically install mlmpfr dependencies (i.e.: gmp/mpfr)
- if: matrix.os == 'macos-latest'
run: |
export "CFLAGS=-I/usr/local/include -L/usr/local/lib"
# rely on dune configurator for C and link flags

- name: Build and test mlmpfr
run: |
Expand Down
8 changes: 4 additions & 4 deletions src/config/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ let () =
let default : C.Pkg_config.package_conf =
{ libs = [ "-lmpfr" ]; cflags }
in
let conf =
let conf p =
match C.Pkg_config.get c with
| None -> default
| Some pc -> (
match C.Pkg_config.query pc ~package:"mpfr" with
match C.Pkg_config.query pc ~package:p with
| None -> default
| Some deps -> deps)
in

C.Flags.write_sexp "c_flags.sexp" (List.concat [ cflags; conf.cflags ]);
C.Flags.write_sexp "c_library_flags.sexp" conf.libs)
C.Flags.write_sexp "c_flags.sexp" (List.concat [ cflags; (conf "mpfr").cflags; (conf "gmp").cflags ]);
C.Flags.write_sexp "c_library_flags.sexp" (conf "mpfr").libs)

0 comments on commit a640014

Please sign in to comment.