Skip to content
Permalink
Browse files

build: fix pkg-config search for libnghttp2

The configure script was searching for 'nghttp2' whereas the actual name
of the package is 'libnghttp2'.

This change also removes the hack for libcares in one fell swoop.

Co-Authored-By: legendecas <legendecas@gmail.com>

PR-URL: #30145
Fixes: #30113
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
bnoordhuis authored and targos committed Oct 27, 2019
1 parent 7b50474 commit 468f203809b62e0147ad8ed95c9c6c99cd42869d
Showing with 9 additions and 11 deletions.
  1. +9 −11 configure.py
@@ -297,23 +297,23 @@

shared_optgroup.add_option('--shared-cares',
action='store_true',
dest='shared_libcares',
dest='shared_cares',
help='link to a shared cares DLL instead of static linking')

shared_optgroup.add_option('--shared-cares-includes',
action='store',
dest='shared_libcares_includes',
dest='shared_cares_includes',
help='directory containing cares header files')

shared_optgroup.add_option('--shared-cares-libname',
action='store',
dest='shared_libcares_libname',
dest='shared_cares_libname',
default='cares',
help='alternative lib name to link to [default: %default]')

shared_optgroup.add_option('--shared-cares-libpath',
action='store',
dest='shared_libcares_libpath',
dest='shared_cares_libpath',
help='a directory to search for the shared cares DLL')

parser.add_option_group(shared_optgroup)
@@ -1137,12 +1137,13 @@ def configure_napi(output):
version = getnapibuildversion.get_napi_version()
output['variables']['napi_build_version'] = version

def configure_library(lib, output):
def configure_library(lib, output, pkgname=None):
shared_lib = 'shared_' + lib
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))

if getattr(options, shared_lib):
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = pkg_config(lib)
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = (
pkg_config(pkgname or lib))

if options.__dict__[shared_lib + '_includes']:
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
@@ -1621,11 +1622,8 @@ def make_bin_override():
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('libuv', output)
configure_library('libcares', output)
configure_library('nghttp2', output)
# stay backwards compatible with shared cares builds
output['variables']['node_shared_cares'] = \
output['variables'].pop('node_shared_libcares')
configure_library('cares', output, pkgname='libcares')
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_v8(output)
configure_openssl(output)
configure_intl(output)

0 comments on commit 468f203

Please sign in to comment.
You can’t perform that action at this time.