1 dnl ---------------------------------------------------------------------------
2 dnl Macro: ENABLE_DTRACE
3 dnl ---------------------------------------------------------------------------
4 AC_DEFUN([ENABLE_DTRACE],[
5 AC_ARG_ENABLE([dtrace],
6 [AS_HELP_STRING([--enable-dtrace],
7 [Build with support for the DTRACE. @<:@default=off@:>@])],
8 [ac_cv_enable_dtrace="yes"],
9 [ac_cv_enable_dtrace="no"])
11 if test "$ac_cv_enable_dtrace" = "yes"
13 AC_PATH_PROG([DTRACE], [dtrace], "no", [/usr/sbin:$PATH])
14 if test "x$DTRACE" != "xno"; then
15 AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
16 DTRACE_HEADER=dtrace_probes.h
18 # DTrace on MacOSX does not use -G option
19 $DTRACE -G -o conftest.$$ -s libmemcached/libmemcached_probes.d 2>/dev/zero
22 DTRACE_OBJ=libmemcached_probes.lo
26 ac_cv_enable_dtrace="yes"
29 AC_MSG_ERROR([Need dtrace binary and OS support.])
34 AC_SUBST(DTRACE_HEADER)
36 AM_CONDITIONAL([HAVE_DTRACE], [ test "$ac_cv_enable_dtrace" = "yes" ])
38 dnl ---------------------------------------------------------------------------
39 dnl End Macro: ENABLE_DTRACE
40 dnl ---------------------------------------------------------------------------