summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-10-10 04:56:21 (GMT)
committerhobbs <hobbs>2002-10-10 04:56:21 (GMT)
commit6d39e6c0d49b215bea549efde077c593f53b28ea (patch)
treeff90a224e18edb445545b313dd28ffed67c2cc49 /unix/tcl.m4
parent3cb21be3557aec892643f059671997558259e741 (diff)
downloadtcl-6d39e6c0d49b215bea549efde077c593f53b28ea.zip
tcl-6d39e6c0d49b215bea549efde077c593f53b28ea.tar.gz
tcl-6d39e6c0d49b215bea549efde077c593f53b28ea.tar.bz2
* unix/README: doc'ed --enable-symbols options.
* unix/Makefile.in: removed @MEM_DEBUG_FLAGS@ subst. * unix/configure: regen * unix/configure.in: removed SC_ENABLE_MEMDEBUG call * unix/tcl.m4: replaced SC_ENABLE_MEMDEBUG with a more intelligent SC_ENABLE_SYMBOLS that takes yes|no|mem|compile|all as options now.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m471
1 files changed, 28 insertions, 43 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 4ad2d1a..7735236 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -462,7 +462,9 @@ AC_DEFUN(SC_ENABLE_THREADS, [
#------------------------------------------------------------------------
# SC_ENABLE_SYMBOLS --
#
-# Specify if debugging symbols should be used
+# Specify if debugging symbols should be used.
+# Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
+# can also be enabled.
#
# Arguments:
# none
@@ -491,19 +493,38 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
AC_MSG_CHECKING([for build with symbols])
AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
- if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
- LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=g
- AC_MSG_RESULT([yes])
- else
+ if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
DBGX=""
AC_MSG_RESULT([no])
+ else
+ CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
+ LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
+ DBGX=g
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_RESULT([yes (standard debugging)])
+ fi
fi
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(LDFLAGS_DEFAULT)
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_MEM_DEBUG)
+ fi
+
+ if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_COMPILE_DEBUG)
+ AC_DEFINE(TCL_COMPILE_STATS)
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ AC_MSG_RESULT([enabled symbols mem compile debugging])
+ else
+ AC_MSG_RESULT([enabled $tcl_ok debugging])
+ fi
+ fi
])
#------------------------------------------------------------------------
@@ -593,42 +614,6 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [
AC_SUBST(MKLINKS_FLAGS)
])
-#------------------------------------------------------------------------
-# SC_ENABLE_MEMDEBUG --
-#
-# Specify if the memory debugging code should be used
-#
-# Arguments:
-# none
-#
-# Requires the following vars to be set in the Makefile:
-# None.
-#
-# Results:
-#
-# Adds the following arguments to configure:
-# --enable-memdebug
-#
-# Defines the following @vars@:
-# MEM_DEBUG_FLAGS Sets to -DTCL_MEM_DEBUG if true
-# Sets to "" if false
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(SC_ENABLE_MEMDEBUG, [
- AC_MSG_CHECKING([for build with memory debugging])
- AC_ARG_ENABLE(memdebug, [ --enable-memdebug build with memory debugging [--disable-memdebug]], [tcl_ok=$enableval], [tcl_ok=no])
- if test "$tcl_ok" = "yes"; then
- MEM_DEBUG_FLAGS=-DTCL_MEM_DEBUG
- AC_MSG_RESULT([yes])
- else
- MEM_DEBUG_FLAGS=""
- AC_MSG_RESULT([no])
- fi
- AC_SUBST(MEM_DEBUG_FLAGS)
-])
-
-
#--------------------------------------------------------------------
# SC_CONFIG_CFLAGS
#