summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authordas <das>2007-09-13 15:28:09 (GMT)
committerdas <das>2007-09-13 15:28:09 (GMT)
commit6727c60fc8fb34e49299e93c7c9ac1502935b9b0 (patch)
tree593d357422c91ee5b5623ed463f7d5629d99a4a5 /unix/configure.in
parent31db1293d7001f8e7aeb25c06df292f43db1154e (diff)
downloadtcl-6727c60fc8fb34e49299e93c7c9ac1502935b9b0.zip
tcl-6727c60fc8fb34e49299e93c7c9ac1502935b9b0.tar.gz
tcl-6727c60fc8fb34e49299e93c7c9ac1502935b9b0.tar.bz2
* generic/tclDTrace.d (new file): add DTrace provider for Tcl; allows
* generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/Makefile: enable DTrace support. * unix/configure: autoconf-2.13
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in31
1 files changed, 30 insertions, 1 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 9c158e9..e3f54c5 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.106.2.38 2007/08/07 05:06:44 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.106.2.39 2007/09/13 15:28:20 das Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.13)
@@ -530,6 +530,31 @@ fi
SC_BLOCKING_STYLE
#--------------------------------------------------------------------
+# DTrace support
+#--------------------------------------------------------------------
+
+AC_ARG_ENABLE(dtrace,
+ [ --enable-dtrace build with DTrace support [--disable-dtrace]],
+ [tcl_ok=$enableval], [tcl_ok=no])
+if test $tcl_ok = yes; then
+ AC_CHECK_HEADER(sys/sdt.h, [tcl_ok=yes], [tcl_ok=no])
+fi
+if test $tcl_ok = yes; then
+ AC_PATH_PROG(DTRACE, dtrace,, [$PATH:/usr/sbin])
+ test -z "$ac_cv_path_DTRACE" && tcl_ok=no
+fi
+AC_MSG_CHECKING([whether to enable DTrace support])
+if test $tcl_ok = yes; then
+ AC_DEFINE(USE_DTRACE)
+ DTRACE_SRC="\${DTRACE_SRC}"
+ DTRACE_HDR="\${DTRACE_HDR}"
+ if test "`uname -s`" != "Darwin" ; then
+ DTRACE_OBJ="\${DTRACE_OBJ}"
+ fi
+fi
+AC_MSG_RESULT([$tcl_ok])
+
+#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtcl as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -718,6 +743,10 @@ AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
AC_SUBST(TCL_HAS_LONGLONG)
+AC_SUBST(DTRACE_SRC)
+AC_SUBST(DTRACE_HDR)
+AC_SUBST(DTRACE_OBJ)
+
AC_SUBST(BUILD_DLTEST)
AC_SUBST(TCL_PACKAGE_PATH)