summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Phoenix <ephoenix@engineyard.com>2010-06-29 14:22:13 +0800
committerFlorian Frank <flori@ping.de>2010-08-03 06:09:44 +0800
commit8f3cca95154e53dedcc77442807d9a423deb19e0 (patch)
tree91cbeebf528d16076c154f8a11a9f8c8b5a64d6c
parent317fd6e94324458ea6bd55b31158e0dd53f31c39 (diff)
downloadjson-8f3cca95154e53dedcc77442807d9a423deb19e0.tar.gz
Fix header conflict problem with OSX's ruby.framework
Only look for ruby/re.h if compiling under 1.9, otherwise OS X stupidly picks up ruby/re.h from the ruby.framework, which conflicts.
-rw-r--r--ext/json/ext/generator/extconf.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/json/ext/generator/extconf.rb b/ext/json/ext/generator/extconf.rb
index b0eab0d..149f22c 100644
--- a/ext/json/ext/generator/extconf.rb
+++ b/ext/json/ext/generator/extconf.rb
@@ -11,6 +11,10 @@ if CONFIG['CC'] =~ /gcc/
#end
end
-have_header("ruby/re.h") || have_header("re.h")
-have_header("ruby/encoding.h")
+if RUBY_VERSION < "1.9"
+ have_header("re.h")
+else
+ have_header("ruby/re.h")
+ have_header("ruby/encoding.h")
+end
create_makefile 'json/ext/generator'