Browse Source

build: fix configuring with prebuilt libraries

Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.

PR-URL: https://github.com/nodejs/node/pull/3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
process-exit-stdio-flushing
Markus Tzoe 9 years ago
committed by Ben Noordhuis
parent
commit
e2eb33483d
  1. 8
      configure

8
configure

@ -753,11 +753,15 @@ def configure_library(lib, output):
if pkg_cflags: if pkg_cflags:
output['include_dirs'] += ( output['include_dirs'] += (
filter(None, map(str.strip, pkg_cflags.split('-I')))) filter(None, map(str.strip, pkg_cflags.split('-I'))))
elif options.__dict__[shared_lib + '_includes']:
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
# libpath needs to be provided ahead libraries # libpath needs to be provided ahead libraries
if pkg_libpath: if pkg_libpath:
output['libraries'] += ( output['libraries'] += [pkg_libpath]
filter(None, map(str.strip, pkg_cflags.split('-L')))) elif options.__dict__[shared_lib + '_libpath']:
output['libraries'] += [
'-L%s' % options.__dict__[shared_lib + '_libpath']]
default_libs = getattr(options, shared_lib + '_libname') default_libs = getattr(options, shared_lib + '_libname')
default_libs = map('-l{0}'.format, default_libs.split(',')) default_libs = map('-l{0}'.format, default_libs.split(','))

Loading…
Cancel
Save