aboutsummaryrefslogtreecommitdiffstats
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 29a70287d0..7a447fb234 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -278,7 +278,7 @@ EOS
print <<EOS if $unicode_emoji_version
CONFIG["UNICODE_EMOJI_VERSION"] = #{$unicode_emoji_version.dump}
EOS
-print <<EOS if /darwin/ =~ arch
+print prefix.start_with?("/System/") ? <<EOS : <<EOS if /darwin/ =~ arch
if sdkroot = ENV["SDKROOT"]
sdkroot = sdkroot.dup
elsif File.exist?(File.join(CONFIG["prefix"], "include")) ||
@@ -289,6 +289,8 @@ print <<EOS if /darwin/ =~ arch
end
CONFIG["SDKROOT"] = sdkroot
EOS
+ CONFIG["SDKROOT"] = ""
+EOS
print <<EOS
CONFIG["platform"] = #{platform || '"$(arch)"'}
CONFIG["archdir"] = "$(rubyarchdir)"