4.1.8 Global Configuration Check Options
4.1.8.1 :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.8.2 :on_fail
The :on_fail option can be set to a String or a Proc object. If the
configuration operation fails (or would fail), the given message is printed
or the Proc is called.
Examples:
configure do
check_c_compiler "special-gcc", on_fail: "First install special gcc!"
end
configure do
package_hint = lambda do
puts "The following packages must be installed to build this project:"
puts "- libsdl2-dev"
puts "- libsdl2-image-dev"
puts "- libsdl2-net-dev"
end
check_lib "SDL2", on_fail: package_hint
check_lib "SDL2_image", on_fail: package_hint
check_lib "SDL2_net", on_fail: package_hint
end
4.1.8.3 :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.
|