X.Org has adopted GNU autoconf as its build configuration mechanism,
so when I integrated the dtrace probes, I checked to see if they
should be built using this test, checking for the existence of a
program named "dtrace" in the path:
dnl Check for dtrace program (needed to build Xserver dtrace probes)
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
[Enable dtrace probes (default: enabled if dtrace found)]),
[WDTRACE=$withval], [WDTRACE=auto])
if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
if test "x$DTRACE" = "xnot_found" ; then
if test "x$WDTRACE" = "xyes" ; then
AC_MSG_FAILURE([dtrace requested but not found])
fi
WDTRACE="no"
fi
fi
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
I've gotten a report this weekend from one of the Gentoo Linux X
maintainers that one of their users has found a failure mode:
"There's another program out there called dtrace, which is an
isdn tracer. If it's installed, xorg-server compiles fail."
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.
--
-Alan Coopersmith- [EMAIL PROTECTED]
Sun Microsystems, Inc. - X Window System Engineering
_______________________________________________
dtrace-discuss mailing list
[email protected]