aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-13 16:03:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-13 16:03:15 +0000
commit829a44822d5e3fd4457f44c401d82eb14c52c8e9 (patch)
tree769c0b1007ca976ec66e03576e4abf78dcda287f /lib/mkmf.rb
parentbe1de4f8db9626be0341d588b6b36aaae06a52d2 (diff)
downloadruby-829a44822d5e3fd4457f44c401d82eb14c52c8e9.tar.gz
* re.c (KR_REHASH): wrong hash value on sizeof(long) > sizeof(int).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index f9fe4608a3..6315e1f8bf 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -538,6 +538,26 @@ def have_header(header, &b)
end
end
+def find_header(header, *paths)
+ checking_for header do
+ if try_cpp(cpp_include(header))
+ true
+ else
+ found = false
+ paths.each do |dir|
+ opt = "-I#{dir}"
+ if try_cpp(cpp_include(header), opt)
+ $INCFLAGS += " "
+ $INCFLAGS += opt
+ found = true
+ break
+ end
+ end
+ found
+ end
+ end
+end
+
def have_struct_member(type, member, header = nil, &b)
checking_for "#{type}.#{member}" do
if try_compile(<<"SRC", &b)