From 46dc02f06b80d9ce2a17fcb01ffd75c77fc7c4cf Mon Sep 17 00:00:00 2001 From: Ash Moran Date: Sun, 7 Aug 2011 08:54:38 +0100 Subject: [PATCH] Re-order the directories mkmf searches for BDB so that a Homebrew install in /usr/local is detected --- ext/extconf.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index fd1a9dc..25a1b5f 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -1,7 +1,9 @@ #!/usr/bin/env ruby require 'mkmf' -%w[/usr/local /usr / /usr/local/db* /usr/local/BerkeleyDB*].each do |pdir| +# This list is checked in reverse order, so this order allows mkmf on my Mac +# to find BDB installed via Homebrew (/usr/local) before system installs +%w[/usr / /usr/local /usr/local/db* /usr/local/BerkeleyDB*].each do |pdir| Dir[pdir].each do |dir| dir_config('db', "#{dir}/include", "#{dir}/lib") end