Skip to content

Commit efb406c

Browse files
bnoordhuisdanbev
authored andcommittedOct 31, 2019
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: nodejs#30145 Fixes: nodejs#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 99247e7 commit efb406c

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
@@ -298,23 +298,23 @@
298298

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

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

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

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

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

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

11451145
if getattr(options, shared_lib):
1146-
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = pkg_config(lib)
1146+
(pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = (
1147+
pkg_config(pkgname or lib))
11471148

11481149
if options.__dict__[shared_lib + '_includes']:
11491150
output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
@@ -1654,11 +1655,8 @@ def make_bin_override():
16541655
configure_library('zlib', output)
16551656
configure_library('http_parser', output)
16561657
configure_library('libuv', output)
1657-
configure_library('libcares', output)
1658-
configure_library('nghttp2', output)
1659-
# stay backwards compatible with shared cares builds
1660-
output['variables']['node_shared_cares'] = \
1661-
output['variables'].pop('node_shared_libcares')
1658+
configure_library('cares', output, pkgname='libcares')
1659+
configure_library('nghttp2', output, pkgname='libnghttp2')
16621660
configure_v8(output)
16631661
configure_openssl(output)
16641662
configure_intl(output)

0 commit comments

Comments
 (0)
Please sign in to comment.