On 01/11/2007, at 19:46, Adam Leventhal wrote:

> 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.

FWIW, for the Tcl USDT provider, I test for presence of /usr/include/ 
sys/sdt.h and /usr/sbin/dtrace in configure to determine if DTrace is  
available; and I only generate a makefile dependency on the -G  
objectfile  when not running on Darwin:
        http://rutherglen.ics.mq.edu.au/fisheye/changelog/Tcl/tcl? 
cs=MAIN:das:20070913152706
        http://sourceforge.net/support/tracker.php?aid=1793984

Cheers,

Daniel

-- 
** Daniel A. Steffen                   **
** <mailto:[EMAIL PROTECTED]>  **


_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to