From b2236891533a3b3e661914bc75bea1346351f0f1 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Mon, 10 Apr 2023 13:19:22 +0000 Subject: Add notcl8api to OPTS to mirror --disable-tcl8api in configure --- win/rules.vc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/win/rules.vc b/win/rules.vc index 0dd6ef2..4ab549d 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -817,11 +817,14 @@ DOTSEPARATED=$(DOTSEPARATED:b=.) # _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build # (CRT library should support this, not needed for Tcl 9.x) # TCL_UTF_MAX=3 - forces a build using UTF-16 internally (not recommended). +# TCL_8_API - 0 -> Tcl 8 compatible API is disabled +# 1 -> Tcl 8 API enabled (default) # Further, LINKERFLAGS are modified based on above. # Default values for all the above STATIC_BUILD = 0 TCL_THREADS = 1 +TCL_8_API = 1 DEBUG = 0 SYMBOLS = 0 PROFILE = 0 @@ -877,10 +880,19 @@ TCL_THREADS = 0 USE_THREAD_ALLOC= 0 !endif +!if [nmakehlp -f $(OPTS) "notcl8api"] +!message *** Disable Tcl 8 API compatibility macros +TCL_8_API = 0 +!endif + +# NOTE: THIS MUST COME AFTER THE notcl8api CHECK ABOVE because the "-f" option +# does *substring* checks, not exact checks so "tcl8" will match "notcl8api" as well. +!if $(TCL_8_API) !if [nmakehlp -f $(OPTS) "tcl8"] !message *** Build for Tcl8 TCL_BUILD_FOR = 8 !endif +!endif !if $(TCL_MAJOR_VERSION) == 8 !if [nmakehlp -f $(OPTS) "time64bit"] @@ -1451,12 +1463,16 @@ OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1 # _ATL_XP_TARGETING - Newer SDK's need this to build for XP COMPILERFLAGS = /D_ATL_XP_TARGETING !endif + !if "$(TCL_UTF_MAX)" == "3" OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=3 !endif !if "$(TCL_BUILD_FOR)" == "8" OPTDEFINES = $(OPTDEFINES) /DTCL_MAJOR_VERSION=8 !endif +!if $(TCL_8_API) +OPTDEFINES = $(OPTDEFINES) /DTCL_8_API=1 +!endif # Like the TEA system only set this non empty for non-Tk extensions # Note: some extensions use PACKAGE_NAME and others use PACKAGE_TCLNAME -- cgit v0.12