Check for <sys/sdt.h> as well when determining to enable dtrace probes

Avoids auto-detecting dtrace is present on systems with the ISDN trace tool
named dtrace installed, but not the dynamic tracing facility named dtrace
This commit is contained in:
Alan Coopersmith 2007-12-07 17:28:37 -08:00
parent 67907904f0
commit 4fc288a13f
1 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,8 @@ AC_SYS_LARGEFILE
XORG_PROG_RAWCPP
dnl Check for dtrace program (needed to build Xserver dtrace probes)
dnl Also checks for <sys/sdt.h>, since some Linux distros have an
dnl ISDN trace program named dtrace
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
[Enable dtrace probes (default: enabled if dtrace found)]),
[WDTRACE=$withval], [WDTRACE=auto])
@ -82,6 +84,11 @@ if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
AC_MSG_FAILURE([dtrace requested but not found])
fi
WDTRACE="no"
else
AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"])
if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then
WDTRACE="no"
fi
fi
fi
if test "x$WDTRACE" != "xno" ; then