diff options
Diffstat (limited to 'ext/sha1/extconf.rb')
-rw-r--r-- | ext/sha1/extconf.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/sha1/extconf.rb b/ext/sha1/extconf.rb new file mode 100644 index 0000000000..0a293e1248 --- /dev/null +++ b/ext/sha1/extconf.rb @@ -0,0 +1,15 @@ +require 'mkmf' + +i = 0x01020304 + +case [i].pack('l') + when [i].pack('V') + $CFLAGS += " -DLITTLE_ENDIAN" + when [i].pack('N') + $CFLAGS += " -DBIG_ENDIAN" + else + p "Sorry, your machine has an unusual byte order which is not supported." + exit! +end + +create_makefile('sha1') |