From 2d0ca0293a47a239cc6a6739ed48f03d37892d92 Mon Sep 17 00:00:00 2001 From: Markus Tzoe Date: Thu, 1 Oct 2015 02:27:17 +0800 Subject: [PATCH] build: fix configuring with prebuilt libraries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Johan Bergström Reviewed-By: Sakthipriyan Vairamani --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2e4cc087c1..381ddd471b 100755 --- a/configure +++ b/configure @@ -753,11 +753,15 @@ def configure_library(lib, output): if pkg_cflags: output['include_dirs'] += ( 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 if pkg_libpath: - output['libraries'] += ( - filter(None, map(str.strip, pkg_cflags.split('-L')))) + output['libraries'] += [pkg_libpath] + elif options.__dict__[shared_lib + '_libpath']: + output['libraries'] += [ + '-L%s' % options.__dict__[shared_lib + '_libpath']] default_libs = getattr(options, shared_lib + '_libname') default_libs = map('-l{0}'.format, default_libs.split(','))