[commit: ghc] master: Configure option to disable dtrace (4b831c2)

git at git.haskell.org git at git.haskell.org
Fri Apr 13 18:48:42 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4b831c27926d643b0b6fad82c1e946d05cde8645/ghc

>---------------------------------------------------------------

commit 4b831c27926d643b0b6fad82c1e946d05cde8645
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Apr 13 14:18:03 2018 -0400

    Configure option to disable dtrace
    
    Reviewers: hvr, bgamari
    
    Subscribers: lelf, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4575


>---------------------------------------------------------------

4b831c27926d643b0b6fad82c1e946d05cde8645
 configure.ac | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 062004d..a8b8681 100644
--- a/configure.ac
+++ b/configure.ac
@@ -806,13 +806,23 @@ dnl if GNU patch is named gpatch, look for it first
 AC_PATH_PROGS(PatchCmd,gpatch patch, patch)
 
 dnl ** check for dtrace (currently only implemented for Mac OS X)
+AC_ARG_ENABLE(dtrace,
+    [AC_HELP_STRING([--enable-dtrace],
+        [Enable DTrace])],
+    EnableDtrace=$enableval,
+    EnableDtrace=yes
+)
+
 HaveDtrace=NO
+
 AC_PATH_PROG(DtraceCmd,dtrace)
-if test -n "$DtraceCmd"; then
-  if test "x$TargetOS_CPP-$TargetVendor_CPP" = "xdarwin-apple" \
-		-o "x$TargetOS_CPP-$TargetVendor_CPP" = "xfreebsd-portbld" \
-		-o "x$TargetOS_CPP-$TargetVendor_CPP" = "xsolaris2-unknown"; then
-    HaveDtrace=YES
+if test "x$EnableDtrace" = "xyes"; then
+  if test -n "$DtraceCmd"; then
+    if test "x$TargetOS_CPP-$TargetVendor_CPP" = "xdarwin-apple" \
+      -o "x$TargetOS_CPP-$TargetVendor_CPP" = "xfreebsd-portbld" \
+      -o "x$TargetOS_CPP-$TargetVendor_CPP" = "xsolaris2-unknown"; then
+      HaveDtrace=YES
+    fi
   fi
 fi
 AC_SUBST(HaveDtrace)



More information about the ghc-commits mailing list