4.1.2 Checking for a Header File

The following methods can be used to check for the presence of a header file:

  • check_c_header will check for a C header to be present
  • check_cxx_header will check for a C++ header to be present

Each of these methods take the name of the header file to check for as the first argument, and take an optional Hash of arguments as the second argument.

Example calls:

configure do
  check_c_header "getopt.h", set_define: "HAVE_GETOPT_H"
  check_c_header "FreeType2.h"
  check_cxx_header "memory"
end

4.1.2.1 Options

4.1.2.1.1 :check_cpppath

Optionally specifies an array of paths to look for the header file in.