check_cfg: print something
This commit is contained in:
parent
add9f9c50d
commit
a1c1cc1855
@ -85,12 +85,14 @@ module Rscons
|
|||||||
|
|
||||||
# Check for a package or configure program output.
|
# Check for a package or configure program output.
|
||||||
def check_cfg(options = {})
|
def check_cfg(options = {})
|
||||||
program = options[:program] || "pkg-config"
|
if package = options[:package]
|
||||||
args = options[:args] || %w[--cflags --libs]
|
Ansi.write($stdout, "Checking for package '", :cyan, package, :reset, "'... ")
|
||||||
command = [program] + args
|
elsif program = options[:program]
|
||||||
if options[:package]
|
Ansi.write($stdout, "Checking ", :cyan, program, :reset, "... ")
|
||||||
command += [options[:package]]
|
|
||||||
end
|
end
|
||||||
|
program ||= "pkg-config"
|
||||||
|
args = options[:args] || %w[--cflags --libs]
|
||||||
|
command = [program, *args, package].compact
|
||||||
stdout, _, status = log_and_test_command(command)
|
stdout, _, status = log_and_test_command(command)
|
||||||
if status == 0
|
if status == 0
|
||||||
parse_flags(stdout)
|
parse_flags(stdout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user