summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 14:17:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 14:17:53 (GMT)
commit27253ccc60a0bf0945eab59d096583087f88d92e (patch)
tree4372da232679abbfd355d5ce189991389f73fd42 /win
parentc0618ccae6d401eddf4d6789789b055f750fcc1f (diff)
parent35166b815b524f015c27c908257e19e12c0686e1 (diff)
downloadtk-27253ccc60a0bf0945eab59d096583087f88d92e.zip
tk-27253ccc60a0bf0945eab59d096583087f88d92e.tar.gz
tk-27253ccc60a0bf0945eab59d096583087f88d92e.tar.bz2
Merge 8.7. Make a --disable-shared build handle the Tk zip file.
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in15
-rwxr-xr-xwin/configure37
-rw-r--r--win/configure.ac2
-rw-r--r--win/tcl.m410
-rw-r--r--win/tkWinDefault.h3
5 files changed, 58 insertions, 9 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index a02dbc2..bdbbdcf 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -656,11 +656,16 @@ install-private-headers: libraries
$(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
done;
-$(WISH): $(WISH_OBJS) @LIBRARIES@ $(TK_STUB_LIB_FILE) wish.$(RES)
+$(WISH): $(WISH_OBJS) @LIBRARIES@ $(TK_STUB_LIB_FILE) wish.$(RES) ${TK_ZIP_FILE}
$(CC) $(CFLAGS) $(WISH_OBJS) $(TK_LIB_FILE) \
$(TK_STUB_LIB_FILE) $(TCL_LIB_FILE) $(LIBS) \
wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)
@VC_MANIFEST_EMBED_EXE@
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
+ cat ${TK_ZIP_FILE} >> ${WISH}; \
+ ${NATIVE_ZIP} -A ${WISH} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
tktest: $(TKTEST)
@@ -697,6 +702,11 @@ ${TK_ZIP_FILE}: ${ZIP_INSTALL_OBJS}
) || ( \
$(COPY) -a $(TOP_DIR)/library/* ${TK_VFS_PATH}; \
)
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
+ (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \
+ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \
+ cd ${TK_VFS_ROOT} && cp ${BUILD_TCLSH}s.exe ../${TK_ZIP_FILE} && $$zip -J ../${TK_ZIP_FILE}) \
+ fi
(zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \
(echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \
cd ${TK_VFS_ROOT} && \
@@ -792,7 +802,8 @@ cleanhelp:
clean: cleanhelp
$(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
$(RM) $(WISH) $(TKTEST) $(CAT32)
- $(RM) *.pch *.ilk *.pdb
+ $(RM) *.pch *.ilk *.pdb *.zip
+ $(RMDIR) *.vfs
distclean: clean
$(RM) Makefile config.status config.cache config.log tkConfig.sh \
diff --git a/win/configure b/win/configure
index dcbfede..d9ef96e 100755
--- a/win/configure
+++ b/win/configure
@@ -4432,6 +4432,39 @@ printf "%s\n" "$ac_cv_nolto" >&6; }
else
CFLAGS_NOLTO=""
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5
+printf %s "checking if the compiler understands -finput-charset... " >&6; }
+if test ${tcl_cv_cc_input_charset+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_cc_input_charset=yes
+else $as_nop
+ tcl_cv_cc_input_charset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5
+printf "%s\n" "$tcl_cv_cc_input_charset" >&6; }
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5
@@ -4495,7 +4528,7 @@ printf "%s\n" "using shared flags" >&6; }
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -5721,7 +5754,7 @@ printf "%s\n" "No zip found on PATH building minizip" >&6; }
ZIPFS_BUILD=1
- TK_ZIP_FILE=libtcl_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
+ TK_ZIP_FILE=libtk_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
else
ZIPFS_BUILD=0
TCL_ZIP_FILE=
diff --git a/win/configure.ac b/win/configure.ac
index 2180b55..456833e 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -195,7 +195,7 @@ if test "$tcl_ok" = "yes" ; then
#
SC_ZIPFS_SUPPORT
ZIPFS_BUILD=1
- TK_ZIP_FILE=libtcl_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
+ TK_ZIP_FILE=libtk_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
else
ZIPFS_BUILD=0
TCL_ZIP_FILE=
diff --git a/win/tcl.m4 b/win/tcl.m4
index 852aa33..b9a164c 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -617,6 +617,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
else
CFLAGS_NOLTO=""
fi
+ AC_CACHE_CHECK([if the compiler understands -finput-charset],
+ tcl_cv_cc_input_charset, [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no])
+ CFLAGS=$hold_cflags])
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
AC_MSG_CHECKING([compiler flags])
@@ -677,7 +685,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index eaceb42..0a747d9 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -91,7 +91,6 @@
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_TRISTATE_VALUE ""
-#define DEF_BUTTON_UNDERLINE "-1"
#define DEF_BUTTON_VALUE ""
#define DEF_BUTTON_WIDTH "0"
#define DEF_BUTTON_WRAP_LENGTH "0"
@@ -270,7 +269,6 @@
#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
#define DEF_MENU_ENTRY_SELECT NULL
-#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
* Defaults for menus overall:
@@ -335,7 +333,6 @@
#define DEF_MENUBUTTON_TAKE_FOCUS "0"
#define DEF_MENUBUTTON_TEXT ""
#define DEF_MENUBUTTON_TEXT_VARIABLE ""
-#define DEF_MENUBUTTON_UNDERLINE "-1"
#define DEF_MENUBUTTON_WIDTH "0"
#define DEF_MENUBUTTON_WRAP_LENGTH "0"