check_cfg: print something

This commit is contained in:
Josh Holtrop 2018-11-15 17:14:11 -05:00
parent add9f9c50d
commit a1c1cc1855

View File

@ -85,12 +85,14 @@ module Rscons
# Check for a package or configure program output.
def check_cfg(options = {})
program = options[:program] || "pkg-config"
args = options[:args] || %w[--cflags --libs]
command = [program] + args
if options[:package]
command += [options[:package]]
if package = options[:package]
Ansi.write($stdout, "Checking for package '", :cyan, package, :reset, "'... ")
elsif program = options[:program]
Ansi.write($stdout, "Checking ", :cyan, program, :reset, "... ")
end
program ||= "pkg-config"
args = options[:args] || %w[--cflags --libs]
command = [program, *args, package].compact
stdout, _, status = log_and_test_command(command)
if status == 0
parse_flags(stdout)