Skip to content

Commit 6605bba

Browse files
andredcodebytere
authored andcommittedMar 30, 2020
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: #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>
1 parent efd20f0 commit 6605bba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎configure.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,11 @@ def pkg_config(pkg):
669669
retval = ()
670670
for flag in ['--libs-only-l', '--cflags-only-I',
671671
'--libs-only-L', '--modversion']:
672-
args += [flag, pkg]
672+
args += [flag]
673+
if isinstance(pkg, list):
674+
args += pkg
675+
else:
676+
args += [pkg]
673677
try:
674678
proc = subprocess.Popen(shlex.split(pkg_config) + args,
675679
stdout=subprocess.PIPE)

0 commit comments

Comments
 (0)
Please sign in to comment.