1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/fiddle/extconf.rb
yugui 5ee6b28538 merges r28327,r28329 and r28332 from trunk into ruby_1_9_2.
--
* ext/fiddle/extconf.rb: use pkg_config to find ffi.h.
--
* ext/fiddle/extconf.rb: De Morgan's laws.
--
* ext/fiddle/extconf.rb: check ffi.h even when pkg-config succeeded.
  On Debian/lenny, which is a "supported" platform, ffi.h is installed
  in /usr/include/i486-linux-gnu/.  This causes build error when using
  gcc whose target is not i486-linux-gnu.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24 02:00:46 +00:00

24 lines
394 B
Ruby

require 'mkmf'
# :stopdoc:
dir_config 'libffi'
pkg_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: