Revision 73ff653a

View differences:

configure
151 151
    dest="shared_http_parser_libname",
152 152
    help="Alternative lib name to link to (default: 'http_parser')")
153 153

  
154
parser.add_option("--shared-cares",
155
    action="store_true",
156
    dest="shared_cares",
157
    help="Link to a shared cares DLL instead of static linking")
158

  
159
parser.add_option("--shared-cares-includes",
160
    action="store",
161
    dest="shared_cares_includes",
162
    help="Directory containing cares header files")
163

  
164
parser.add_option("--shared-cares-libpath",
165
    action="store",
166
    dest="shared_cares_libpath",
167
    help="A directory to search for the shared cares DLL")
168

  
169
parser.add_option("--shared-cares-libname",
170
    action="store",
171
    dest="shared_cares_libname",
172
    help="Alternative lib name to link to (default: 'cares')")
173

  
154 174
parser.add_option("--with-dtrace",
155 175
    action="store_true",
156 176
    dest="with_dtrace",
......
456 476
        o['include_dirs'] += [options.shared_http_parser_includes]
457 477

  
458 478

  
479
def configure_cares(o):
480
    o['variables']['node_shared_cares'] = b(options.shared_cares)
481

  
482
    # assume shared cares if one of these is set?
483
    if options.shared_cares_libpath:
484
        o['libraries'] += ['-L%s' % options.shared_cares_libpath]
485
    if options.shared_cares_libname:
486
        o['libraries'] += ['-l%s' % options.shared_cares_libname]
487
    elif options.shared_cares:
488
        o['libraries'] += ['-lcares']
489
    if options.shared_cares_includes:
490
        o['include_dirs'] += [options.shared_cares_includes]
491

  
492

  
459 493
def configure_v8(o):
460 494
  o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
461 495
  o['variables']['node_shared_v8'] = b(options.shared_v8)
......
510 544
configure_node(output)
511 545
configure_libz(output)
512 546
configure_http_parser(output)
547
configure_cares(output)
513 548
configure_v8(output)
514 549
configure_openssl(output)
515 550

  
doc/api/process.markdown
299 299
       { host_arch: 'x64',
300 300
         node_install_npm: 'true',
301 301
         node_prefix: '',
302
         node_shared_cares: 'false',
302 303
         node_shared_http_parser: 'false',
303 304
         node_shared_v8: 'false',
304 305
         node_shared_zlib: 'false',
node.gyp
9 9
    'node_shared_v8%': 'false',
10 10
    'node_shared_zlib%': 'false',
11 11
    'node_shared_http_parser%': 'false',
12
    'node_shared_cares%': 'false',
12 13
    'node_use_openssl%': 'true',
13 14
    'node_use_systemtap%': 'false',
14 15
    'node_shared_openssl%': 'false',
......
59 60
      'type': 'executable',
60 61

  
61 62
      'dependencies': [
62
        'deps/cares/cares.gyp:cares',
63 63
        'deps/uv/uv.gyp:libuv',
64 64
        'node_js2c#host',
65 65
      ],
......
205 205
          'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
206 206
        }],
207 207

  
208
        [ 'node_shared_cares=="false"', {
209
          'dependencies': [ 'deps/cares/cares.gyp:cares' ],
210
        }],
211

  
208 212
        [ 'OS=="win"', {
209 213
          'sources': [
210 214
            'src/res/node.rc',

Also available in: Unified diff