Skip to content

Commit 0e92bb9

Browse files
committed
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 b9f6a2d commit 0e92bb9

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
@@ -864,26 +864,26 @@ def configure_library(lib, output):
864864
if getattr(options, shared_lib):
865865
(pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib)
866866

867-
if pkg_cflags:
867+
if options.__dict__[shared_lib + '_includes']:
868+
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
869+
elif pkg_cflags:
868870
output['include_dirs'] += (
869871
filter(None, map(str.strip, pkg_cflags.split('-I'))))
870-
elif options.__dict__[shared_lib + '_includes']:
871-
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
872872

873873
# libpath needs to be provided ahead libraries
874-
if pkg_libpath:
875-
output['libraries'] += [pkg_libpath]
876-
elif options.__dict__[shared_lib + '_libpath']:
874+
if options.__dict__[shared_lib + '_libpath']:
877875
output['libraries'] += [
878876
'-L%s' % options.__dict__[shared_lib + '_libpath']]
877+
elif pkg_libpath:
878+
output['libraries'] += [pkg_libpath]
879879

880880
default_libs = getattr(options, shared_lib + '_libname')
881881
default_libs = map('-l{0}'.format, default_libs.split(','))
882882

883-
if pkg_libs:
884-
output['libraries'] += pkg_libs.split()
885-
elif default_libs:
883+
if default_libs:
886884
output['libraries'] += default_libs
885+
elif pkg_libs:
886+
output['libraries'] += pkg_libs.split()
887887

888888

889889
def configure_v8(o):

0 commit comments

Comments
 (0)