Skip to content

Commit 468f203

Browse files
bnoordhuistargos
authored andcommitted
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 <[email protected]> PR-URL: #30145 Fixes: #30113 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent 7b50474 commit 468f203

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

configure.py

+9-11
Original file line numberDiff line numberDiff line change
@@ -297,23 +297,23 @@
297297

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

303303
shared_optgroup.add_option('--shared-cares-includes',
304304
action='store',
305-
dest='shared_libcares_includes',
305+
dest='shared_cares_includes',
306306
help='directory containing cares header files')
307307

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

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

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

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

11441144
if getattr(options, shared_lib):
1145-
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = pkg_config(lib)
1145+
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = (
1146+
pkg_config(pkgname or lib))
11461147

11471148
if options.__dict__[shared_lib + '_includes']:
11481149
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
@@ -1621,11 +1622,8 @@ def make_bin_override():
16211622
configure_library('zlib', output)
16221623
configure_library('http_parser', output)
16231624
configure_library('libuv', output)
1624-
configure_library('libcares', output)
1625-
configure_library('nghttp2', output)
1626-
# stay backwards compatible with shared cares builds
1627-
output['variables']['node_shared_cares'] = \
1628-
output['variables'].pop('node_shared_libcares')
1625+
configure_library('cares', output, pkgname='libcares')
1626+
configure_library('nghttp2', output, pkgname='libnghttp2')
16291627
configure_v8(output)
16301628
configure_openssl(output)
16311629
configure_intl(output)

0 commit comments

Comments
 (0)