> The Apple Xorg maintainer had to add this code to keep it from
> building on Leopard for now:
> 
> dnl Darwin 9 has dtrace, but it doesn't support compilation into ELF...
> if test "x$WDTRACE" = xauto; then
>         case $host_os in
>                 darwin*) WDTRACE="no" ;;
>         esac
> fi

First, while Apple's implementation doesn't support the -G option, it does
support USDT compilation -- the -G step is just redundant. The folks at
Apple have mades some noise about implementing it for compatibility.

> Is there a better way to check for dtrace USDT provider build
> support for autoconf?   I've been trying to avoid making it
> just check OS type so that we can support the probes on any
> OS that DTrace may be ported to.

The plan was that including <sys/unistd.h> would conditionally define
_DTRACE_VERSION if USDT was available, but the Apple folks don't seem to
have implemented this (though the FreeBSD folks have, I think). I suppose
you could determine if DTrace exists on the system by doing something like
this and checking the exit status:

  dtrace -n BEGIN -e

You'll need to include a special-casse for Mac OS X until their -G does
something.

Adam

-- 
Adam Leventhal, FishWorks                        http://blogs.sun.com/ahl
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to