summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-02 09:48:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-02 09:48:42 +0900
commit5aa28d9d6d8d070a4f29905f3a2c76b0f000ed44 (patch)
tree825dbebbb8b4e7033e1c42e1d484b27079661bcc /ext
parent830afd94fe11335cc7569d47ec863ec24c9a1b54 (diff)
Check if x86intrin.h is available not only existing
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/extconf.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb
index ab856b8..4ad5172 100644
--- a/ext/bigdecimal/extconf.rb
+++ b/ext/bigdecimal/extconf.rb
@@ -46,7 +46,9 @@ have_builtin_func("__builtin_clz", "__builtin_clz(0)")
have_builtin_func("__builtin_clzl", "__builtin_clzl(0)")
have_header("stdbool.h")
-have_header("x86intrin.h")
+if have_func("_lzcnt_u64", "x86intrin.h") # check availability
+ $defs << "-DHAVE_X86INTRIN_H"
+end
have_func("labs", "stdlib.h")
have_func("llabs", "stdlib.h")