Skip to content

Commit e34de0d

Browse files
rvaggMylesBorins
authored andcommitted
build: prioritise --shared-X-Y over pkg-config
PR-URL: #9368 Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent fd9939f commit e34de0d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configure

+9-9
Original file line numberDiff line numberDiff line change
@@ -843,26 +843,26 @@ def configure_library(lib, output):
843843
if getattr(options, shared_lib):
844844
(pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib)
845845

846-
if pkg_cflags:
846+
if options.__dict__[shared_lib + '_includes']:
847+
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
848+
elif pkg_cflags:
847849
output['include_dirs'] += (
848850
filter(None, map(str.strip, pkg_cflags.split('-I'))))
849-
elif options.__dict__[shared_lib + '_includes']:
850-
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
851851

852852
# libpath needs to be provided ahead libraries
853-
if pkg_libpath:
854-
output['libraries'] += [pkg_libpath]
855-
elif options.__dict__[shared_lib + '_libpath']:
853+
if options.__dict__[shared_lib + '_libpath']:
856854
output['libraries'] += [
857855
'-L%s' % options.__dict__[shared_lib + '_libpath']]
856+
elif pkg_libpath:
857+
output['libraries'] += [pkg_libpath]
858858

859859
default_libs = getattr(options, shared_lib + '_libname')
860860
default_libs = map('-l{0}'.format, default_libs.split(','))
861861

862-
if pkg_libs:
863-
output['libraries'] += pkg_libs.split()
864-
elif default_libs:
862+
if default_libs:
865863
output['libraries'] += default_libs
864+
elif pkg_libs:
865+
output['libraries'] += pkg_libs.split()
866866

867867

868868
def configure_v8(o):

0 commit comments

Comments
 (0)