Merge in solution for lp:581030.
[m6w6/libmemcached] / m4 / pandora_enable_dtrace.m4
index 1e034a0203ba6a2491ffcf85939443e045757470..390efc57ce0250b367c996cba72a9ab5c146a148 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.
 
@@ -11,11 +11,13 @@ AC_DEFUN([PANDORA_ENABLE_DTRACE],[
     [AS_HELP_STRING([--disable-dtrace],
             [Build with support for the DTRACE. @<:@default=on@:>@])],
     [ac_cv_enable_dtrace="$enableval"],
-    [ac_cv_enable_dtrace="no"])
+    [ac_cv_enable_dtrace="yes"])
 
   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