Skip to content

Commit

Permalink
build: fix default dtrace flag on Linux
Browse files Browse the repository at this point in the history
DTrace on Linux should not be enabled by default because not all systems will
have the proper headers installed. Only enable when --with-dtrace is passed to
the configure script.
  • Loading branch information
Shigeki Ohtsu authored and bnoordhuis committed Nov 1, 2012
1 parent 2f03eaf commit 148f5e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ parser.add_option("--shared-zlib-libname",
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
help="Build with DTrace (default is true on supported systems)")
help="Build with DTrace (default is true on sunos)")

parser.add_option("--without-dtrace",
action="store_true",
Expand Down Expand Up @@ -386,14 +386,15 @@ def configure_node(o):
o['variables']['node_use_dtrace'] = b(not options.without_dtrace)
elif sys.platform.startswith('linux'):
o['variables']['node_use_dtrace'] = 'false'
o['variables']['node_use_systemtap'] = b(not options.without_dtrace)
o['variables']['node_use_systemtap'] = b(options.with_dtrace)
if options.systemtap_includes:
o['include_dirs'] += [options.systemtap_includes]
elif b(options.with_dtrace) == 'true':
raise Exception(
'DTrace is currently only supported on SunOS or Linux systems.')
else:
o['variables']['node_use_dtrace'] = 'false'
o['variables']['node_use_systemtap'] = 'false'

if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']
Expand Down

0 comments on commit 148f5e6

Please sign in to comment.