Skip to content

Commit

Permalink
dune-configurator: respect $PKG_CONFIG
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
  • Loading branch information
anmonteiro committed Apr 2, 2023
1 parent e70afff commit b805176
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion otherlibs/configurator/src/v1.ml
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,12 @@ module Pkg_config = struct
}

let get c =
Option.map (which c "pkg-config") ~f:(fun pkg_config ->
let pkg_config_exe_name =
match Sys.getenv "PKG_CONFIG" with
| s -> s
| exception Not_found -> "pkg-config"
in
Option.map (which c pkg_config_exe_name) ~f:(fun pkg_config ->
{ pkg_config; configurator = c })

type package_conf =
Expand Down

0 comments on commit b805176

Please sign in to comment.