Skip to content

Commit 66687c0

Browse files
rvaggMylesBorins
authored andcommitted
build: prioritise --shared-X-Y over pkg-config
PR-URL: #9368 Reviewed-By: Johan Bergstrom <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 3c09579 commit 66687c0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -884,26 +884,26 @@ def configure_library(lib, output):
884884
if getattr(options, shared_lib):
885885
(pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib)
886886

887-
if pkg_cflags:
887+
if options.__dict__[shared_lib + '_includes']:
888+
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
889+
elif pkg_cflags:
888890
output['include_dirs'] += (
889891
filter(None, map(str.strip, pkg_cflags.split('-I'))))
890-
elif options.__dict__[shared_lib + '_includes']:
891-
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
892892

893893
# libpath needs to be provided ahead libraries
894-
if pkg_libpath:
895-
output['libraries'] += [pkg_libpath]
896-
elif options.__dict__[shared_lib + '_libpath']:
894+
if options.__dict__[shared_lib + '_libpath']:
897895
output['libraries'] += [
898896
'-L%s' % options.__dict__[shared_lib + '_libpath']]
897+
elif pkg_libpath:
898+
output['libraries'] += [pkg_libpath]
899899

900900
default_libs = getattr(options, shared_lib + '_libname')
901901
default_libs = map('-l{0}'.format, default_libs.split(','))
902902

903-
if pkg_libs:
904-
output['libraries'] += pkg_libs.split()
905-
elif default_libs:
903+
if default_libs:
906904
output['libraries'] += default_libs
905+
elif pkg_libs:
906+
output['libraries'] += pkg_libs.split()
907907

908908

909909
def configure_v8(o):

0 commit comments

Comments
 (0)