Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
MakeMakefile#find_header
find_header(header, *paths)
lib/mkmf.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/mkmf.rb, line 1199
def find_header(header, *paths)
message = checking_message(header, paths)
header = cpp_include(header)
checking_for message do
if try_header(header)
true
else
found = false
paths.each do |dir|
opt = "-I#{dir}".quote
if try_header(header, opt)
$INCFLAGS << " " << opt
found = true
break
end
end
found
end
end
end
Instructs mkmf to search for the given header in any of the paths provided, and returns whether or not it was found in those paths.
If the header is found then the path it was found on is added to the list of included directories that are sent to the compiler (via the -I switch).
See also
#find_executable
#find_library
#enable_config
#find_type
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0