From d3af52715271920294d244f2e7aea02757899be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= Date: Mon, 2 Mar 2020 12:17:09 +0000 Subject: [PATCH] build: allow passing multiple libs to pkg_config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes it's necessary to pass multiple library names to pkg-config, e.g. the brotli shared libraries can be pulled in with pkg-config libbrotlienc libbrotlidec Update the code to handle both, strings (as used so far), and lists of strings. Signed-off-by: André Draszik PR-URL: https://github.com/nodejs/node/pull/32046 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Ben Noordhuis Reviewed-By: Richard Lau --- configure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index beb08df0884..e3f78f2fed0 100755 --- a/configure.py +++ b/configure.py @@ -680,7 +680,11 @@ def pkg_config(pkg): retval = () for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L', '--modversion']: - args += [flag, pkg] + args += [flag] + if isinstance(pkg, list): + args += pkg + else: + args += [pkg] try: proc = subprocess.Popen(shlex.split(pkg_config) + args, stdout=subprocess.PIPE)