summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-21 19:50:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-21 19:50:55 (GMT)
commit0bd8358dd35a5f6622307115e77879cc0684a188 (patch)
tree48b6279685fee9969557915df8cd212a614ae628
parentdc5969ead1a2f587a241cdc21ee424be987309a2 (diff)
downloadtcl-0bd8358dd35a5f6622307115e77879cc0684a188.zip
tcl-0bd8358dd35a5f6622307115e77879cc0684a188.tar.gz
tcl-0bd8358dd35a5f6622307115e77879cc0684a188.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 e832422..79e7050 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1128,6 +1128,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 092f19c..85e66bc 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 a74d494..f1f66be 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 cc75c29..4b677c1 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -453,6 +453,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 94e04f5..c783189 100755
--- a/win/configure
+++ b/win/configure
@@ -5044,6 +5044,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 25fa29f..f0288c7 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -169,6 +169,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 b79e8ee..f1d1d84 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -471,6 +471,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