Description:
------------
The changes made in Rev 305329 break the --enable-dtrace configuration option on
both Solaris and OS X.
The main problems I was able to identify are:
1.) The steps required to build DTrace-enabled binaries are different on Solaris
and OS X (see references below). 305329 removed the platform check that allowed
OS X to bypass the extra linking step required by Solaris (dtrace -G -s ...).
2.) The generation of the DTrace header file (zend_dtrace_gen.h via 'dtrace -h
...') was moved to Makefile (from configure) - this broke various targets that
depended on the header file prior to it's generation (late in the Makefile).
3.) A typo (I think) in the path variable used to generate the DTrace targets
injected junk into the pathnames, breaking the build.
The included patch file "dtrace_build.patch" may be applied to Rev 305455 to
resolve these issues. It essentially re-enlists some of the functionality that
existed prior to 305329. This has been tested on both OS X and Solaris.
Examples of how to build DTrace USDT probes on Solaris, see:
http://dtrace.org/blogs/ahl/2006/05/08/user-land-tracing-gets-better-and-better/
and
http://blogs.sun.com/dap/entry/writing_a_dtrace_usdt_provider
For the relevant documentation on OS X, see the dtrace(1M) man page:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/
man1/dtrace.1.html
Expected result:
----------------
--enable-dtrace should configure and build on platforms that have DTrace (Solaris
and OS X - maybe FreeBSD?)
Actual result:
--------------
--enable-dtrace fails on both platforms for the reasons mentioned in the
Description section.

1) So providerdesc.o is only build and linked with when under Solaris?
2) What in Makefile did depend on the header file before it was created?
3) I need the generated Makefile you got with current trunk (without your patch!)

1) So providerdesc.o is only build and linked with when under Solaris?
yes because dtrace on Solaris generates stubs that need to be compiled in. On Mac
OS the necessary switch to generate providerdesc.o doesn't exist on Mac OS.

[2010-11-18 16:34 UTC] mike at harschsystems dot com

2.) I think it was main/main.c which includes zend_dtrace.h which includes
zend_dtrace_gen.h, but this problem seems to be fixed by placing the 'dtrace -h'
line earlier in the Makefile (which now seems to be the case as of
201011181330).
3.) http://pastebin.com/33TJyLC2 - see line 498. I was able to work around this
problem by changing the following line in acinclude.m4:
dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && \$(SED) -ibak
's,PHP_,DTRACE_,g' \$[]@
to
dtrace -h -C -s $abs_srcdir/[$]ac_provsrc -o \$[]@ && \$(SED) -ibak
's,PHP_,DTRACE_,g' \$[]@
Once this is fixed, the build appears to work on both Solaris and OS X using Rev
305487.