Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set COMMAND_MODE to unix2003 on MacOS (see #issue/9)

  • Loading branch information...
commit 9ffaaac24305a0d0ca04cc0a40a8e3f048690471 1 parent 3c66337
@aurelian authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 ext/lingua/extconf.rb
View
8 ext/lingua/extconf.rb
@@ -7,8 +7,10 @@
# build libstemmer_c
# FreeBSD make is gmake
make= (RUBY_PLATFORM =~ /freebsd/)? 'gmake' : 'make'
+
# MacOS architecture mess up
if RUBY_PLATFORM =~ /darwin/
+ # see: #issue/3, #issue/5
begin
ENV['ARCHFLAGS']= "-arch " + %x[file #{File.expand_path(File.join(Config::CONFIG['bindir'], Config::CONFIG['RUBY_INSTALL_NAME']))}].strip!.match(/executable (.+)$/)[1] unless ENV['ARCHFLAGS'].nil?
rescue
@@ -16,6 +18,12 @@
$stderr << "Please specify one using $ARCHFLAGS environment variable.\n"
exit
end
+ # see: #issue/9, #issue/6
+ # see: man compat
+ if ENV['COMMAND_MODE'] == 'legacy'
+ $stdout << "Setting compat mode to unix2003\n."
+ ENV['COMMAND_MODE']= 'unix2003'
+ end
end
# make libstemmer_c. unless we're cross-compiling.
Please sign in to comment.
Something went wrong with that request. Please try again.