summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-21 20:00:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-21 20:00:17 (GMT)
commit97323bf79bbb53e3df40798e63fb51aeb9b4f177 (patch)
treef9fd4fd8f04f715df29cbd3cf30fd054fe8b8269
parent7b11e86ea84333b45d79d6e1d1d730279b1f4118 (diff)
parent0bd8358dd35a5f6622307115e77879cc0684a188 (diff)
downloadtcl-97323bf79bbb53e3df40798e63fb51aeb9b4f177.zip
tcl-97323bf79bbb53e3df40798e63fb51aeb9b4f177.tar.gz
tcl-97323bf79bbb53e3df40798e63fb51aeb9b4f177.tar.bz2
Add tommath-????/zlib-???? to build-info if libtommath/zlib is statically linked
-rw-r--r--generic/tclEvent.c14
-rwxr-xr-xunix/configure3
-rw-r--r--unix/configure.ac1
-rw-r--r--unix/tclConfig.h.in3
-rwxr-xr-xwin/configure3
-rw-r--r--win/configure.ac1
-rw-r--r--win/makefile.vc4
7 files changed, 29 insertions, 0 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 29d8a0c..60a8924 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1115,6 +1115,20 @@ static const struct {
#ifdef STATIC_BUILD
".static"
#endif
+#ifndef TCL_WITH_EXTERNAL_TOMMATH
+ ".tommath-0103"
+#endif
+#ifdef TCL_WITH_INTERNAL_ZLIB
+ ".zlib-"
+#if ZLIB_VER_MAJOR < 10
+ "0"
+#endif
+ STRINGIFY(ZLIB_VER_MAJOR)
+#if ZLIB_VER_MINOR < 10
+ "0"
+#endif
+ STRINGIFY(ZLIB_VER_MINOR)
+#endif
}};
const char *
diff --git a/unix/configure b/unix/configure
index 6a3d192..b470e3c 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5205,6 +5205,9 @@ then :
ZLIB_INCLUDE=-I\${ZLIB_DIR}
+printf "%s\n" "#define TCL_WITH_INTERNAL_ZLIB 1" >>confdefs.h
+
+
fi
printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h
diff --git a/unix/configure.ac b/unix/configure.ac
index 69c20f7..766392e 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -165,6 +165,7 @@ AS_IF([test $zlib_ok = no], [
AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
AC_SUBST(ZLIB_SRCS,[\${ZLIB_SRCS}])
AC_SUBST(ZLIB_INCLUDE,[-I\${ZLIB_DIR}])
+ AC_DEFINE(TCL_WITH_INTERNAL_ZLIB, 1, [Tcl with internal zlib])
])
AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index eb566dc..4785a07 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -447,6 +447,9 @@
/* Tcl with external libtommath */
#undef TCL_WITH_EXTERNAL_TOMMATH
+/* Tcl with internal zlib */
+#undef TCL_WITH_INTERNAL_ZLIB
+
/* Is getcwd Posix-compliant? */
#undef USEGETWD
diff --git a/win/configure b/win/configure
index 8708050..9d7b11c 100755
--- a/win/configure
+++ b/win/configure
@@ -5017,6 +5017,9 @@ fi
else case e in #(
e)
+
+printf "%s\n" "#define TCL_WITH_INTERNAL_ZLIB 1" >>confdefs.h
+
ZLIB_OBJS=\${ZLIB_OBJS}
TOMMATH_OBJS=\${TOMMATH_OBJS}
diff --git a/win/configure.ac b/win/configure.ac
index 83ed3af..572c3c5 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -155,6 +155,7 @@ AS_IF([test "$tcl_ok" = "yes"], [
AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win32/tommath.lib])
])
], [
+ AC_DEFINE(TCL_WITH_INTERNAL_ZLIB, 1, [Tcl with internal zlib])
AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
AC_SUBST(TOMMATH_OBJS,[\${TOMMATH_OBJS}])
])
diff --git a/win/makefile.vc b/win/makefile.vc
index 13b5396..41872e2 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -472,6 +472,10 @@ LIBTCLVFS = $(OUT_DIR)\$(LIBTCLVFSSUBDIR)
PRJ_INCLUDES = -I"$(TOMMATHDIR)"
PRJ_DEFINES = /DTCL_TOMMATH /DMP_PREC=4 /Dinline=__inline /DHAVE_ZLIB=1 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS
+!if $(STATIC_BUILD)
+PRJ_DEFINES = $(PRJ_DEFINES) /DTCL_WITH_INTERNAL_ZLIB
+!endif
+
# Additional Link libraries needed beyond those in rules.vc
PRJ_LIBS = netapi32.lib user32.lib userenv.lib ws2_32.lib