aboutsummaryrefslogtreecommitdiff
path: root/extconf.rb
blob: 2256e4068b2cf4305cca916c2326eb26600ac41d (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
29
30
31
32
33
#!/usr/bin/ruby -w
# See the LICENSE file for copyright and distribution information

require "mkmf"

$LIBPATH.push(Config::CONFIG['libdir'])

def crash(str)
  printf(" extconf failure: #{str}\n")
  exit 1
end


if dir_config( "ivy" ) != [nil, nil]
   inc, lib = dir_config( 'ivy' ) 
   $LDFLAGS << " -L#{lib} -livy"
   $CFLAGS << " -I#{inc}"
else
  crash(<<EOL)
need libivy (see http://www.tls.cena.fr/products/ivy/index.html)

        Install the library or try one of the following options to extconf.rb:

        --with-ivy-dir=/path/to/libivy
        --with-ivy-lib=/path/to/libivy/lib
        --with-ivy-include=/path/to/libivy/include
EOL
end

$CFLAGS = '-DMEMWATCH ' + $CFLAGS

create_header()
create_makefile("ivy")