From 2286b3310edf3b0211fc1a94e7ef71ccd9751da2 Mon Sep 17 00:00:00 2001 From: hypnotoad Date: Tue, 2 Sep 2014 21:16:20 +0000 Subject: Fix for the cases where a dynamic build is used --- win/configure | 41 ++++++++++++++++++++++++++++++++--------- win/configure.in | 24 +++++++++++++++++++----- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/win/configure b/win/configure index d8ee198..4414f2d 100755 --- a/win/configure +++ b/win/configure @@ -678,8 +678,9 @@ VC_MANIFEST_EMBED_EXE VC_MANIFEST_EMBED_DLL LDFLAGS_DEFAULT CFLAGS_DEFAULT -ZLIB_LIBS ZLIB_OBJS +ZLIB_LIBS +ZLIB_DLL_FILE CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG @@ -4669,20 +4670,42 @@ else fi -if test "with_zlib" = "NO_ZLIB"; then : - ZLIB_OBJS=\${ZLIB_OBJS} +if test "$tcl_ok" = "yes"; then : -elif test "$tcl_ok" != "yes"; then : - ZLIB_OBJS=\${ZLIB_OBJS} + ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} -elif test "$do64bit" = "yes"; then : - ZLIB_OBJS=\${ZLIB_OBJS} +fi +tcl_no_zlib_dll=no +if test "$with_zlib" = "NO_ZLIB"; then : + tcl_no_zlib_dll=yes +elif test "$tcl_ok" != "yes"; then : + tcl_no_zlib_dll=yes +elif test "$do64bit" = "yes"; then : + tcl_no_zlib_dll=yes elif test "$with_zlib" = "yes" ; then : - ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib + + ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} + + ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib + else - ZLIB_LIBS=$with_zlib + + ZLIB_DLL_FILE=${with_zlib} + + ZLIB_LIBS=$with_zlib + + + +fi +if test "$tcl_no_zlib_dll" = "yes"; then : + + ZLIB_OBJS=\${ZLIB_OBJS} + + ZLIB_DLL_FILE="" + + ZLIB_LIBS="" fi diff --git a/win/configure.in b/win/configure.in index 01366f5..dec470a 100644 --- a/win/configure.in +++ b/win/configure.in @@ -129,13 +129,27 @@ AS_IF([test "${enable_shared+set}" = "set"], [ AC_ARG_WITH(zlib, [ --with-zlib use Native Zlib library], with_zlib=$withval, with_zlib=NO_ZLIB ) +AS_IF([test "$tcl_ok" = "yes"], [ + AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}]) +]) +tcl_no_zlib_dll=no AS_IF( - [test "with_zlib" = "NO_ZLIB"], [AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])], - [test "$tcl_ok" != "yes"], [AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])], - [test "$do64bit" = "yes"], [AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])], - [test "$with_zlib" = "yes"] , [AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib])], - [AC_SUBST(ZLIB_LIBS,[$with_zlib])] + [test "$with_zlib" = "NO_ZLIB"], [tcl_no_zlib_dll=yes], + [test "$tcl_ok" != "yes"], [tcl_no_zlib_dll=yes], + [test "$do64bit" = "yes"], [tcl_no_zlib_dll=yes], + [test "$with_zlib" = "yes"] , [ + AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}]) + AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib]) + ], [ + AC_SUBST(ZLIB_DLL_FILE,[${with_zlib}]) + AC_SUBST(ZLIB_LIBS,[$with_zlib]) + ] ) +AS_IF([test "$tcl_no_zlib_dll" = "yes"], [ + AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}]) + AC_SUBST(ZLIB_DLL_FILE,[""]) + AC_SUBST(ZLIB_LIBS,[""]) +]) AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) AC_CHECK_TYPE([intptr_t], [ -- cgit v0.12