From 6229a20db7a8345b61b4a86484e55825f6ff5e86 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 17 Jun 2012 10:59:01 -0500 Subject: doctor: Mono-specific warning for pkg-config Mono installs its own pkg-config symlink into /usr/bin/pkg-config, which breaks non-Mono builds. Provide a specific warning. Closes Homebrew/homebrew#12859. --- Library/Homebrew/cmd/doctor.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 277ce858f..11eabe281 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -463,7 +463,15 @@ def check_which_pkg_config binary = which 'pkg-config' return if binary.nil? - unless binary.to_s == "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent + mono_config = Pathname.new("/usr/bin/pkg-config") + if mono_config.exist? && mono_config.realpath.to_s.include?("Mono.framework") then <<-EOS.undent + You have a non-Homebrew 'pkg-config' in your PATH: + /usr/bin/pkg-config => #{mono_config.realpath} + + This was most likely created by the Mono installer. `./configure` may + have problems finding brew-installed packages using this other pkg-config. + EOS + elsif binary.to_s != "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent You have a non-Homebrew 'pkg-config' in your PATH: #{binary} -- cgit v1.2.3