diff options
author | André Draszik <git@andred.net> | 2020-03-02 15:17:09 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-09 15:20:45 +0300 |
commit | d3af52715271920294d244f2e7aea02757899be2 (patch) | |
tree | aa74874cdf4d38681f603aa41b398f24ae4b8391 /configure.py | |
parent | ef95de3492152290321f1f8a811401146c464138 (diff) |
build: allow passing multiple libs to pkg_config
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 <git@andred.net>
PR-URL: https://github.com/nodejs/node/pull/32046
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |