diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index 1c410bf6fea7114700ae08f13dad740bc84bbef3..2406236522a21e41796c71dd14bbe50a8cf4a062 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -33,7 +33,7 @@ class BuildOptions
   end
 
   def add_dep_option(dep)
-    name = dep.name.split("/").last # strip any tap prefix
+    name = dep.option_name
     if dep.optional? && !has_option?("with-#{name}")
       add("with-#{name}", "Build with #{name} support")
     elsif dep.recommended? && !has_option?("without-#{name}")