From 54b509164606717adb3fbeacf71524f0a6e940f4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 18 Aug 2026 12:44:06 +0000 Subject: [PATCH] Fix [4bd630]: --without-tzdata on windows --- changes.md | 1 + win/Makefile.in | 3 ++- win/configure | 40 ++++++++++++++++++++++++++++++++++++++++ win/configure.ac | 28 ++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) diff --git a/changes.md b/changes.md index 9338ab91f0..c321c11b6f 100644 --- a/changes.md +++ b/changes.md @@ -16,6 +16,7 @@ to the userbase. - [Windows: file normalize drops a component when parent enumeration is denied](https://core.tcl-lang.org/tcl/tktview/d40d8d) - [Windows: busy loop when conhost process is killed](https://core.tcl-lang.org/tcl/tktview/f10d91) - [glob -dir . returns corrupted entries in zipfs](https://core.tcl-lang.org/tcl/tktview/4676f5) + - [--without-tzdata on windows](https://core.tcl-lang.org/tcl/tktview/4bd630) # Updated bundled packages, libraries, standards, data - platform 1.1.1 diff --git a/win/Makefile.in b/win/Makefile.in index 2dcb16cff9..325d1e2f79 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -241,6 +241,7 @@ ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@ SHARED_BUILD = @SHARED_BUILD@ INSTALL_MSGS = @INSTALL_MSGS@ INSTALL_LIBRARIES = @INSTALL_LIBRARIES@ +INSTALL_TZDATA = @INSTALL_TZDATA@ # Fully qualify library path so that `make test` # does not depend on the current directory. @@ -918,7 +919,7 @@ install-binaries: binaries @$(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/pkgconfig" @$(INSTALL_DATA) tcl.pc "$(LIB_INSTALL_DIR)/pkgconfig/tcl.pc" -install-libraries: libraries install-tzdata install-msgs +install-libraries: libraries @for i in "$(prefix)/lib" "$(INCLUDE_INSTALL_DIR)" \ "$(SCRIPT_INSTALL_DIR)" "$(MODULE_INSTALL_DIR)"; \ do \ diff --git a/win/configure b/win/configure index 065ad0cd7b..de326349be 100755 --- a/win/configure +++ b/win/configure @@ -665,6 +665,7 @@ VC_MANIFEST_EMBED_DLL CPP LDFLAGS_DEFAULT CFLAGS_DEFAULT +INSTALL_TZDATA INSTALL_MSGS INSTALL_LIBRARIES TCL_ZIP_FILE @@ -750,6 +751,7 @@ with_encoding enable_shared enable_64bit enable_zipfs +with_tzdata enable_symbols enable_embedded_manifest ' @@ -1391,6 +1393,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-encoding encoding for configuration values + --with-tzdata install timezone data (default: yes) Some influential environment variables: CC C compiler command @@ -5319,6 +5322,43 @@ fi +#-------------------------------------------------------------------- +# Timezone data +#-------------------------------------------------------------------- + +{ printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for timezone data" >&5 +printf %s "checking for timezone data... " >&6; } + +# Check whether --with-tzdata was given. +if test ${with_tzdata+y} +then : + withval=$with_tzdata; tcl_ok=$withval +else case e in #( + e) tcl_ok=yes ;; +esac +fi + +# +# Unlike on Unix there is no system copy to fall back on, so the default is +# to install ours. Saying no is for a build that supplies the data by some +# other means. +# +case $tcl_ok in + no) + { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: supplied by other means" >&5 +printf '%s\n' "supplied by other means" >&6; } + ;; + yes) + { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: supplied by Tcl" >&5 +printf '%s\n' "supplied by Tcl" >&6; } + INSTALL_TZDATA=install-tzdata + ;; + *) + as_fn_error $? "invalid argument: $tcl_ok" "$LINENO" 5 + ;; +esac + + #-------------------------------------------------------------------- # Perform additinal compiler tests. diff --git a/win/configure.ac b/win/configure.ac index 8ff2b92709..8fea91d956 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -208,6 +208,34 @@ AC_SUBST(TCL_ZIP_FILE) AC_SUBST(INSTALL_LIBRARIES) AC_SUBST(INSTALL_MSGS) +#-------------------------------------------------------------------- +# Timezone data +#-------------------------------------------------------------------- + +AC_MSG_CHECKING([for timezone data]) +AC_ARG_WITH(tzdata, + AS_HELP_STRING([--with-tzdata], + [install timezone data (default: yes)]), + [tcl_ok=$withval], [tcl_ok=yes]) +# +# Unlike on Unix there is no system copy to fall back on, so the default is +# to install ours. Saying no is for a build that supplies the data by some +# other means. +# +case $tcl_ok in + no) + AC_MSG_RESULT([supplied by other means]) + ;; + yes) + AC_MSG_RESULT([supplied by Tcl]) + INSTALL_TZDATA=install-tzdata + ;; + *) + AC_MSG_ERROR([invalid argument: $tcl_ok]) + ;; +esac +AC_SUBST(INSTALL_TZDATA) + #-------------------------------------------------------------------- # Perform additinal compiler tests.