summaryrefslogtreecommitdiff
path: root/ext/digest/sha2/extconf.rb
blob: 144f266b20e26068e845ed4026e42c91aa1c9d62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# $RoughId: extconf.rb,v 1.1 2001/07/13 15:38:27 knu Exp $
# $Id$

require "mkmf"

$CFLAGS << " -DHAVE_CONFIG_H -I$(srcdir)/.."

$objs = [
  "sha2.#{$OBJEXT}",
  "sha2hl.#{$OBJEXT}",
  "sha2init.#{$OBJEXT}",
]

have_header("sys/cdefs.h")

have_header("inttypes.h")

have_header("unistd.h")

unless try_link(<<SRC, $defs.join(' '))
#include "../defs.h"
main(){}
SRC
  puts "** Cannot find a 64bit integer type - skipping the SHA2 module."
  exit 1
end

create_makefile("digest/sha2")