aboutsummaryrefslogtreecommitdiff
path: root/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'extconf.rb')
-rw-r--r--extconf.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/extconf.rb b/extconf.rb
new file mode 100644
index 0000000..2256e40
--- /dev/null
+++ b/extconf.rb
@@ -0,0 +1,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")