|
297 | 297 |
|
298 | 298 | shared_optgroup.add_option('--shared-cares',
|
299 | 299 | action='store_true',
|
300 |
| - dest='shared_libcares', |
| 300 | + dest='shared_cares', |
301 | 301 | help='link to a shared cares DLL instead of static linking')
|
302 | 302 |
|
303 | 303 | shared_optgroup.add_option('--shared-cares-includes',
|
304 | 304 | action='store',
|
305 |
| - dest='shared_libcares_includes', |
| 305 | + dest='shared_cares_includes', |
306 | 306 | help='directory containing cares header files')
|
307 | 307 |
|
308 | 308 | shared_optgroup.add_option('--shared-cares-libname',
|
309 | 309 | action='store',
|
310 |
| - dest='shared_libcares_libname', |
| 310 | + dest='shared_cares_libname', |
311 | 311 | default='cares',
|
312 | 312 | help='alternative lib name to link to [default: %default]')
|
313 | 313 |
|
314 | 314 | shared_optgroup.add_option('--shared-cares-libpath',
|
315 | 315 | action='store',
|
316 |
| - dest='shared_libcares_libpath', |
| 316 | + dest='shared_cares_libpath', |
317 | 317 | help='a directory to search for the shared cares DLL')
|
318 | 318 |
|
319 | 319 | parser.add_option_group(shared_optgroup)
|
@@ -1137,12 +1137,13 @@ def configure_napi(output):
|
1137 | 1137 | version = getnapibuildversion.get_napi_version()
|
1138 | 1138 | output['variables']['napi_build_version'] = version
|
1139 | 1139 |
|
1140 |
| -def configure_library(lib, output): |
| 1140 | +def configure_library(lib, output, pkgname=None): |
1141 | 1141 | shared_lib = 'shared_' + lib
|
1142 | 1142 | output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
|
1143 | 1143 |
|
1144 | 1144 | 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)) |
1146 | 1147 |
|
1147 | 1148 | if options.__dict__[shared_lib + '_includes']:
|
1148 | 1149 | output['include_dirs'] += [options.__dict__[shared_lib + '_includes']]
|
@@ -1621,11 +1622,8 @@ def make_bin_override():
|
1621 | 1622 | configure_library('zlib', output)
|
1622 | 1623 | configure_library('http_parser', output)
|
1623 | 1624 | 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') |
1629 | 1627 | configure_v8(output)
|
1630 | 1628 | configure_openssl(output)
|
1631 | 1629 | configure_intl(output)
|
|
0 commit comments