--- install.rb.orig	2009-09-21 00:15:47.000000000 +0900
+++ install.rb	2011-08-07 15:23:54.000000000 +0900
@@ -649,8 +649,10 @@
       sys_version = `uname -r`.to_f
       if sys_version < 8.0 
         xcode_version = 0 # <= Xcode 1.5 on MacOS X 10.3
+      elsif sys_version >= 11.0
+        xcode_version = 620 # Lion uses Xcode 4.1 or later
       elsif /DevToolsCore-(\d+)/.match(`#{buildcommand} -version`)
-        xcode_version = $1.to_i
+        xcode_version = $1.to_i # Xcode 2.x or 3.x
       else
         xcode_version = 0 # unknown
       end
