summaryrefslogtreecommitdiffstats
path: root/win/tcl.m4
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-10-22 18:56:28 (GMT)
committerhobbs <hobbs>2002-10-22 18:56:28 (GMT)
commit0cbe334420539d186cd5ff193bc294db21a6ae3f (patch)
treee4451ce772d44695b34a70b31e822a2aeef251cb /win/tcl.m4
parentcd83bd4f9b2b62007d4f9eed42dffba1e49e70f0 (diff)
downloadtcl-0cbe334420539d186cd5ff193bc294db21a6ae3f.zip
tcl-0cbe334420539d186cd5ff193bc294db21a6ae3f.tar.gz
tcl-0cbe334420539d186cd5ff193bc294db21a6ae3f.tar.bz2
* win/Makefile.in: removed @MEM_DEBUG_FLAGS@ subst.
* win/configure: regen * win/configure.in: removed SC_ENABLE_MEMDEBUG call * win/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 'win/tcl.m4')
-rw-r--r--win/tcl.m466
1 files changed, 26 insertions, 40 deletions
diff --git a/win/tcl.m4 b/win/tcl.m4
index 50cb459..be3ec6b 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -267,6 +267,8 @@ AC_DEFUN(SC_ENABLE_THREADS, [
# SC_ENABLE_SYMBOLS --
#
# Specify if debugging symbols should be used
+# Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
+# can also be enabled.
#
# Arguments:
# none
@@ -292,57 +294,41 @@ AC_DEFUN(SC_ENABLE_THREADS, [
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])
-
- if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
- LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=d
- AC_MSG_RESULT([yes])
- else
+# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
+ 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
-#------------------------------------------------------------------------
-# 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
-#
-#------------------------------------------------------------------------
+ if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_COMPILE_DEBUG)
+ AC_DEFINE(TCL_COMPILE_STATS)
+ fi
-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])
+ 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
- AC_SUBST(MEM_DEBUG_FLAGS)
])
-
#--------------------------------------------------------------------
# SC_CONFIG_CFLAGS
#