summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/util/extconf.rb
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-05 11:30:24 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-05 11:30:24 +0000
commit2810c12a99fed7297d558d8b1aaaf755eb8b8a2d (patch)
tree03ded624e1b6eab7bcf9059c5193c25f10ee26ae /ext/bigdecimal/util/extconf.rb
parentae88d2fc93e887f22d025b4738ebbb00f6ae53e9 (diff)
Import bigdecimal 1.4.0.pre.20181205a
* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181205a git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/util/extconf.rb')
-rw-r--r--ext/bigdecimal/util/extconf.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/bigdecimal/util/extconf.rb b/ext/bigdecimal/util/extconf.rb
new file mode 100644
index 0000000000..8750db1c52
--- /dev/null
+++ b/ext/bigdecimal/util/extconf.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: false
+require 'mkmf'
+
+checking_for(checking_message("Windows")) do
+ case RUBY_PLATFORM
+ when /cygwin|mingw/
+ if defined?($extlist)
+ build_dir = "$(TARGET_SO_DIR)../"
+ else
+ base_dir = File.expand_path('../../../..', __FILE__)
+ build_dir = File.join(base_dir, "tmp", RUBY_PLATFORM, "bigdecimal", RUBY_VERSION, "")
+ end
+ $libs << " #{build_dir}bigdecimal.so"
+ true
+ when /mswin/
+ $DLDFLAGS << " -libpath:.."
+ $libs << " bigdecimal-$(arch).lib"
+ true
+ else
+ false
+ end
+end
+
+create_makefile('bigdecimal/util')