Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix pkg-config search for libnghttp2 #30145

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,23 +298,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)
Expand Down Expand Up @@ -1138,12 +1138,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']]
Expand Down Expand Up @@ -1654,11 +1655,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='libhttp2')
bnoordhuis marked this conversation as resolved.
Show resolved Hide resolved
configure_v8(output)
configure_openssl(output)
configure_intl(output)
Expand Down