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 :fail
If the :fail option is set to false , then the absence of the package or
program requested will not result in the configure option failing.
The :fail option defaults to true if the :set_define option is not
defined, and defaults to false if the :set_define option is defined.
4.1.6.1.4 :set_define
If set, a build define of the specified String will be added to the
CPPDEFINES construction variable array if the requested package is found.
4.1.6.1.5 :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.
|