From a1c1cc1855ca63c007461e30a118a36af5d4f2b1 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 15 Nov 2018 17:14:11 -0500 Subject: [PATCH] check_cfg: print something --- lib/rscons/configure_op.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/rscons/configure_op.rb b/lib/rscons/configure_op.rb index d2ea684..674feb6 100644 --- a/lib/rscons/configure_op.rb +++ b/lib/rscons/configure_op.rb @@ -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)