diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-06 06:59:24 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-06 06:59:24 +0000 |
commit | 4bada8b864e445b6eebe1a341e30cad94dbcaf84 (patch) | |
tree | bb7e4ed991aa16eda953d536265c6f9e5dc03a5d /ext/fiddle/extconf.rb | |
parent | ca3c007f058f17b2f0bf3c5ccc6701f3f6d49ca5 (diff) | |
download | ruby-4bada8b864e445b6eebe1a341e30cad94dbcaf84.tar.gz |
* ext/fiddle/*: Adding fiddle library to wrap libffi
* test/fiddle/*: testing fiddle extension
* ext/dl/lib/dl.rb: Requiring fiddle if it is available
* ext/dl/lib/dl/callback.rb: using Fiddle if it is available
* ext/dl/lib/dl/func.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle/extconf.rb')
-rw-r--r-- | ext/fiddle/extconf.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb new file mode 100644 index 0000000000..87c5c9e633 --- /dev/null +++ b/ext/fiddle/extconf.rb @@ -0,0 +1,23 @@ +require 'mkmf' + +# :stopdoc: + +dir_config 'libffi' + +unless have_header('ffi.h') + if have_header('ffi/ffi.h') + $defs.push(format('-DUSE_HEADER_HACKS')) + else + abort "ffi.h is missing. Please install libffi." + end +end + +unless have_library('ffi') + abort "libffi is missing. Please install libffi." +end + +have_header 'sys/mman.h' + +create_makefile 'fiddle' + +# :startdoc: |