cmake
[m6w6/libmemcached] / m4 / pandora_enable_dtrace.m4
index 627fd3d027e38fb9d89107d8e42a54495921f933..4edf46f23ed58b88eeb5b78267c939c5bf336810 100644 (file)
@@ -1,5 +1,5 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
+dnl  Copyright (C) 2009 Sun Microsystems, Inc.
+dnl This file is free software; Sun Microsystems, Inc.
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
@@ -8,14 +8,16 @@ dnl Macro: PANDORA_ENABLE_DTRACE
 dnl ---------------------------------------------------------------------------
 AC_DEFUN([PANDORA_ENABLE_DTRACE],[
   AC_ARG_ENABLE([dtrace],
-    [AS_HELP_STRING([--disable-dtrace],
-            [Build with support for the DTRACE. @<:@default=on@:>@])],
+    [AS_HELP_STRING([--enable-dtrace],
+            [Build with support for the DTRACE. @<:@default=no@:>@])],
     [ac_cv_enable_dtrace="$enableval"],
-    [ac_cv_enable_dtrace="yes"])
+    [ac_cv_enable_dtrace="no"])
 
   AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
     AC_CHECK_PROGS([DTRACE], [dtrace])
-    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
+    AC_CHECK_HEADERS(sys/sdt.h)
+
+    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[
 
       AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
         cat >conftest.d <<_ACEOF