aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build_options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/build_options.rb')
-rw-r--r--Library/Homebrew/build_options.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index f35295758..1c410bf6f 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -61,7 +61,13 @@ class BuildOptions
args.include? '--' + name
end
- def with? name
+ def with? val
+ if val.respond_to?(:option_name)
+ name = val.option_name
+ else
+ name = val
+ end
+
if has_option? "with-#{name}"
include? "with-#{name}"
elsif has_option? "without-#{name}"