Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-10-23 18:27:19 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-11-06 03:18:35 +0400
commit73ff653a8db11cbe0142df4e764434f125e45e6b (patch)
treeda87420c5c0b1c795440c6b8e39bb380146042d6 /configure
parentbfd78b69fc7d0ac97106658e4eb6d475fa08e247 (diff)
build: allow linking against system c-ares
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 35 insertions, 0 deletions
diff --git a/configure b/configure
index 8562033a29c..3417003e560 100755
--- a/configure
+++ b/configure
@@ -151,6 +151,26 @@ parser.add_option("--shared-http-parser-libname",
dest="shared_http_parser_libname",
help="Alternative lib name to link to (default: 'http_parser')")
+parser.add_option("--shared-cares",
+ action="store_true",
+ dest="shared_cares",
+ help="Link to a shared cares DLL instead of static linking")
+
+parser.add_option("--shared-cares-includes",
+ action="store",
+ dest="shared_cares_includes",
+ help="Directory containing cares header files")
+
+parser.add_option("--shared-cares-libpath",
+ action="store",
+ dest="shared_cares_libpath",
+ help="A directory to search for the shared cares DLL")
+
+parser.add_option("--shared-cares-libname",
+ action="store",
+ dest="shared_cares_libname",
+ help="Alternative lib name to link to (default: 'cares')")
+
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
@@ -456,6 +476,20 @@ def configure_http_parser(o):
o['include_dirs'] += [options.shared_http_parser_includes]
+def configure_cares(o):
+ o['variables']['node_shared_cares'] = b(options.shared_cares)
+
+ # assume shared cares if one of these is set?
+ if options.shared_cares_libpath:
+ o['libraries'] += ['-L%s' % options.shared_cares_libpath]
+ if options.shared_cares_libname:
+ o['libraries'] += ['-l%s' % options.shared_cares_libname]
+ elif options.shared_cares:
+ o['libraries'] += ['-lcares']
+ if options.shared_cares_includes:
+ o['include_dirs'] += [options.shared_cares_includes]
+
+
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
@@ -510,6 +544,7 @@ output = {
configure_node(output)
configure_libz(output)
configure_http_parser(output)
+configure_cares(output)
configure_v8(output)
configure_openssl(output)