@@ -131,6 +131,26 @@ parser.add_option("--shared-zlib-libname",
131131 dest = "shared_zlib_libname" ,
132132 help = "Alternative lib name to link to (default: 'z')" )
133133
134+ parser .add_option ("--shared-http-parser" ,
135+ action = "store_true" ,
136+ dest = "shared_http_parser" ,
137+ help = "Link to a shared http_parser DLL instead of static linking" )
138+
139+ parser .add_option ("--shared-http-parser-includes" ,
140+ action = "store" ,
141+ dest = "shared_http_parser_includes" ,
142+ help = "Directory containing http_parser header files" )
143+
144+ parser .add_option ("--shared-http-parser-libpath" ,
145+ action = "store" ,
146+ dest = "shared_http_parser_libpath" ,
147+ help = "A directory to search for the shared http_parser DLL" )
148+
149+ parser .add_option ("--shared-http-parser-libname" ,
150+ action = "store" ,
151+ dest = "shared_http_parser_libname" ,
152+ help = "Alternative lib name to link to (default: 'http_parser')" )
153+
134154parser .add_option ("--with-dtrace" ,
135155 action = "store_true" ,
136156 dest = "with_dtrace" ,
@@ -422,6 +442,20 @@ def configure_libz(o):
422442 o ['include_dirs' ] += [options .shared_zlib_includes ]
423443
424444
445+ def configure_http_parser (o ):
446+ o ['variables' ]['node_shared_http_parser' ] = b (options .shared_http_parser )
447+
448+ # assume shared http_parser if one of these is set?
449+ if options .shared_http_parser_libpath :
450+ o ['libraries' ] += ['-L%s' % options .shared_http_parser_libpath ]
451+ if options .shared_http_parser_libname :
452+ o ['libraries' ] += ['-l%s' % options .shared_http_parser_libname ]
453+ elif options .shared_http_parser :
454+ o ['libraries' ] += ['-lhttp_parser' ]
455+ if options .shared_http_parser_includes :
456+ o ['include_dirs' ] += [options .shared_http_parser_includes ]
457+
458+
425459def configure_v8 (o ):
426460 o ['variables' ]['v8_use_snapshot' ] = b (not options .without_snapshot )
427461 o ['variables' ]['node_shared_v8' ] = b (options .shared_v8 )
@@ -475,6 +509,7 @@ output = {
475509
476510configure_node (output )
477511configure_libz (output )
512+ configure_http_parser (output )
478513configure_v8 (output )
479514configure_openssl (output )
480515
0 commit comments