Skip to content

Commit f07d423

Browse files
andredMylesBorins
authored andcommittedMar 9, 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 50c5eb4 commit f07d423

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
@@ -680,7 +680,11 @@ def pkg_config(pkg):
680680
retval = ()
681681
for flag in ['--libs-only-l', '--cflags-only-I',
682682
'--libs-only-L', '--modversion']:
683-
args += [flag, pkg]
683+
args += [flag]
684+
if isinstance(pkg, list):
685+
args += pkg
686+
else:
687+
args += [pkg]
684688
try:
685689
proc = subprocess.Popen(shlex.split(pkg_config) + args,
686690
stdout=subprocess.PIPE)

0 commit comments

Comments
 (0)
Please sign in to comment.