diff options
Diffstat (limited to 'ext/digest/sha2/extconf.rb')
-rw-r--r-- | ext/digest/sha2/extconf.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb index 144f266b20..412b2d4301 100644 --- a/ext/digest/sha2/extconf.rb +++ b/ext/digest/sha2/extconf.rb @@ -17,12 +17,18 @@ have_header("inttypes.h") have_header("unistd.h") -unless try_link(<<SRC, $defs.join(' ')) +if try_run(<<SRC, $defs.join(' ')) #include "../defs.h" -main(){} +int main(void) { +#ifdef NO_UINT64_T + return 1; +#else + return 0; +#endif +} SRC +then + create_makefile("digest/sha2") +else puts "** Cannot find a 64bit integer type - skipping the SHA2 module." - exit 1 end - -create_makefile("digest/sha2") |