summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure43
-rw-r--r--win/tcl.m431
2 files changed, 54 insertions, 20 deletions
diff --git a/win/configure b/win/configure
index b0767b7..36c0512 100755
--- a/win/configure
+++ b/win/configure
@@ -1520,17 +1520,36 @@ else
tcl_ok=no
fi
-
- if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
- LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=d
- echo "$ac_t""yes" 1>&6
- 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=""
echo "$ac_t""no" 1>&6
+ else
+ CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
+ LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
+ DBGX=g
+ if test "$tcl_ok" = "yes"; then
+ echo "$ac_t""yes (standard debugging)" 1>&6
+ fi
+ fi
+
+
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ cat >> confdefs.h <<\EOF
+#define TCL_MEM_DEBUG 1
+EOF
+
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ echo "$ac_t""enabled symbols mem debugging" 1>&6
+ else
+ echo "$ac_t""enabled $tcl_ok debugging" 1>&6
+ fi
fi
@@ -1542,7 +1561,7 @@ TK_DBGX=${DBGX}
echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1546: checking the location of tclConfig.sh" >&5
+echo "configure:1565: checking the location of tclConfig.sh" >&5
if test -d ../../tcl8.4$TK_PATCH_LEVEL/win; then
TCL_BIN_DIR_DEFAULT=../../tcl8.4$TK_PATCH_LEVEL/win
@@ -1570,7 +1589,7 @@ fi
echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1574: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+echo "configure:1593: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
echo "$ac_t""loading" 1>&6
@@ -1621,7 +1640,7 @@ echo "configure:1574: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:1625: checking for tclsh" >&5
+echo "configure:1644: checking for tclsh" >&5
if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1953,6 +1972,8 @@ s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
s%@CPP@%$CPP%g
s%@MAN2TCLFLAGS@%$MAN2TCLFLAGS%g
+s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
+s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
s%@TCL_VERSION@%$TCL_VERSION%g
s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
@@ -1986,7 +2007,6 @@ s%@CFG_TK_UNSHARED_LIB_SUFFIX@%$CFG_TK_UNSHARED_LIB_SUFFIX%g
s%@CFG_TK_EXPORT_FILE_SUFFIX@%$CFG_TK_EXPORT_FILE_SUFFIX%g
s%@TK_SHARED_BUILD@%$TK_SHARED_BUILD%g
s%@DEPARG@%$DEPARG%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
s%@STLIB_LD@%$STLIB_LD%g
s%@SHLIB_LD@%$SHLIB_LD%g
@@ -1995,7 +2015,6 @@ s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
s%@CC_OBJNAME@%$CC_OBJNAME%g
s%@CC_EXENAME@%$CC_EXENAME%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
s%@LDFLAGS_CONSOLE@%$LDFLAGS_CONSOLE%g
diff --git a/win/tcl.m4 b/win/tcl.m4
index 4b8cd22..cc7f95a 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -289,20 +289,35 @@ 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
-])
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ AC_MSG_RESULT([enabled symbols mem debugging])
+ else
+ AC_MSG_RESULT([enabled $tcl_ok debugging])
+ fi
+ fi
+])
#--------------------------------------------------------------------
# SC_CONFIG_CFLAGS