APIdock / Ruby
/
method

find_header

ruby latest stable - Class: Object

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

find_header(header, *paths)
public

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).

# File lib/mkmf.rb, line 966
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

AltStyle によって変換されたページ (->オリジナル) /