summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure32
-rw-r--r--win/makefile.bc2
-rw-r--r--win/rules.vc2
-rw-r--r--win/tcl.m427
-rw-r--r--win/tclWinInit.c2
5 files changed, 37 insertions, 28 deletions
diff --git a/win/configure b/win/configure
index 4d837b0..fd09f73 100755
--- a/win/configure
+++ b/win/configure
@@ -3329,7 +3329,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #ifdef __WIN32__
+ #ifndef __WIN32__
#error cross-compiler
#endif
@@ -3363,12 +3363,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_cross=yes
+ ac_cv_cross=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_cross=no
+ac_cv_cross=yes
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -3617,8 +3617,8 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #ifdef _WIN64
- #error 64-bit
+ #ifndef _WIN64
+ #error 32-bit
#endif
int
@@ -3651,12 +3651,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- tcl_win_64bit=no
+ tcl_win_64bit=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-tcl_win_64bit=yes
+tcl_win_64bit=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -4629,6 +4629,11 @@ fi;
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
DBGX=""
+
+cat >>confdefs.h <<\_ACEOF
+#define NDEBUG 1
+_ACEOF
+
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
@@ -4647,24 +4652,23 @@ echo "${ECHO_T}yes (standard debugging)" >&6
fi
- cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_DEBUG 1
-_ACEOF
-
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_MEM_DEBUG 1
_ACEOF
fi
if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_COMPILE_DEBUG 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_COMPILE_STATS 1
_ACEOF
diff --git a/win/makefile.bc b/win/makefile.bc
index 6ba4420..2faf415 100644
--- a/win/makefile.bc
+++ b/win/makefile.bc
@@ -137,7 +137,7 @@ BINROOT = ..
!IF "$(NODEBUG)" == "1"
TMPDIRNAME = Release
DBGX =
-SYMDEFINES =
+SYMDEFINES = -DNDEBUG
!ELSE
TMPDIRNAME = Debug
#DBGX = d
diff --git a/win/rules.vc b/win/rules.vc
index e18dca9..63ecf01 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -446,6 +446,8 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED
OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DEBUG
!elseif $(OPTIMIZING)
OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED
+!else
+OPTDEFINES = $(OPTDEFINES) -DNDEBUG
!endif
!if $(PROFILE)
OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED
diff --git a/win/tcl.m4 b/win/tcl.m4
index 9a5fa7b..9320d89 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -34,7 +34,10 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
fi
if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
- AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
+ if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then
+ AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
+ fi
+ TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../unix; pwd`
fi
AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh)
])
@@ -300,6 +303,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
DBGX=""
+ AC_DEFINE(NDEBUG, 1, [Is no debugging enabled?])
AC_MSG_RESULT([no])
AC_DEFINE(TCL_CFG_OPTIMIZED)
@@ -313,15 +317,14 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
fi
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(LDFLAGS_DEFAULT)
- AC_DEFINE(TCL_CFG_DEBUG)
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- AC_DEFINE(TCL_MEM_DEBUG)
+ AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
fi
if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
- AC_DEFINE(TCL_COMPILE_DEBUG)
- AC_DEFINE(TCL_COMPILE_STATS)
+ AC_DEFINE(TCL_COMPILE_DEBUG, 1, [Is bytecode debugging enabled?])
+ AC_DEFINE(TCL_COMPILE_STATS, 1, [Are bytecode statistics enabled?])
fi
if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
@@ -416,12 +419,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK(for cross-compile version of gcc,
ac_cv_cross,
AC_TRY_COMPILE([
- #ifdef __WIN32__
+ #ifndef __WIN32__
#error cross-compiler
#endif
], [],
- ac_cv_cross=yes,
- ac_cv_cross=no)
+ ac_cv_cross=no,
+ ac_cv_cross=yes)
)
if test "$ac_cv_cross" = "yes"; then
@@ -593,12 +596,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
;;
*)
AC_TRY_COMPILE([
- #ifdef _WIN64
- #error 64-bit
+ #ifndef _WIN64
+ #error 32-bit
#endif
], [],
- tcl_win_64bit=no,
- tcl_win_64bit=yes
+ tcl_win_64bit=yes,
+ tcl_win_64bit=no
)
if test "$tcl_win_64bit" = "yes" ; then
do64bit=amd64
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index a1087c9..d80fa28 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -532,7 +532,7 @@ TclpSetVariables(
TCL_GLOBAL_ONLY);
}
-#ifdef _DEBUG
+#ifndef NDEBUG
/*
* The existence of the "debug" element of the tcl_platform array
* indicates that this particular Tcl shell has been compiled with debug