diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index db893e2ad6..22a9dd8142 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -273,12 +273,6 @@ class FormulaInstaller @paths ||= ENV['PATH'].split(':').map{ |p| File.expand_path p } end - def in_aclocal_dirlist? - File.open("/usr/share/aclocal/dirlist") do |dirlist| - dirlist.grep(%r{^#{HOMEBREW_PREFIX}/share/aclocal$}).length > 0 - end rescue false - end - def check_PATH # warn the user if stuff was installed outside of their PATH [f.bin, f.sbin].each do |bin| @@ -385,8 +379,12 @@ class FormulaInstaller def check_m4 return if MacOS.xcode_version.to_f >= 4.3 + return if File.open("/usr/share/aclocal/dirlist") do |dirlist| + dirlist.grep(%r{^#{HOMEBREW_PREFIX}/share/aclocal$}).length > 0 + end rescue false + # Check for m4 files - if Dir[f.share+"aclocal/*.m4"].length > 0 and not in_aclocal_dirlist? + if Dir[f.share+"aclocal/*.m4"].length > 0 opoo 'm4 macros were installed to "share/aclocal".' puts "Homebrew does not append \"#{HOMEBREW_PREFIX}/share/aclocal\"" puts "to \"/usr/share/aclocal/dirlist\". If an autoconf script you use"