4.1.6 Checking for a Package Configuration

The check_cfg method can be used to check for the existence of a package as well as import any build options (e.g. include path, defines, libraries to link against, etc...) required to use the package.

This method takes a Hash of options as its only argument.

Example calls:

configure do
  check_cfg package: "zlib"
  check_cfg program: "freetype-config", fail: false, set_define: "HAVE_FREETYPE"
end

4.1.6.1 Options

4.1.6.1.1 :package

If the :package option is set to a value, the pkg-config program will be used to look for package configuration flags for the specified package.

4.1.6.1.2 :program

If the :program option is given, the program specified will be used to look for configuration flags.

4.1.6.1.3 :use

If not set, the library will be used by default in all Environment objects. If set, the library will only be used in Environment objects that have a matching :use flag set.