diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-14 13:32:11 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-14 13:32:11 (GMT) |
commit | 9b6fa1e54afb4f824ac6366f8e89439a3ec3be8e (patch) | |
tree | c82eb186ea5557b9639b822eadb8e951de54aa1e /win | |
parent | a2110892447b53f535fd7d7aba9786904a82abf8 (diff) | |
download | tcl-9b6fa1e54afb4f824ac6366f8e89439a3ec3be8e.zip tcl-9b6fa1e54afb4f824ac6366f8e89439a3ec3be8e.tar.gz tcl-9b6fa1e54afb4f824ac6366f8e89439a3ec3be8e.tar.bz2 |
Improve build rules on Win w.r.t. zlib
Improve autoconf magic on Unix and Win
Diffstat (limited to 'win')
-rw-r--r-- | win/configure.in | 35 | ||||
-rw-r--r-- | win/makefile.bc | 4 | ||||
-rw-r--r-- | win/makefile.vc | 4 | ||||
-rw-r--r-- | win/tcl.m4 | 2 |
4 files changed, 27 insertions, 18 deletions
diff --git a/win/configure.in b/win/configure.in index c3a760f..a057344 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.110 2008/12/11 14:45:22 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.111 2008/12/14 13:32:11 dkf Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -147,7 +147,7 @@ fi # # Check to see if the excpt.h include file provided contains the # definition for EXCEPTION_DISPOSITION; if not, which is the case -# with Cygwin's version as of 2002-04-10, define it to be int, +# with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files, @@ -340,20 +340,25 @@ SC_ENABLE_SHARED # Add stuff for zlib #------------------------------------------------------------------------ -zlib_ok=yes -AC_CHECK_HEADER([zlib.h],[],[ - zlib_ok=no - echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... -]) -AC_SEARCH_LIBS([adler32],[z],[],[ - zlib_ok=no -]) -if test $zlib_ok = yes; then - AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) -fi +tcl_ok=yes +AC_CHECK_HEADER([zlib.h],[ + AC_CHECK_TYPE([gz_header],[],[ + tcl_ok=no + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) + ],[#include <zlib.h>])],[ + tcl_ok=no + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) + ]) +AS_IF([test $tcl_ok = yes], [ + AC_SEARCH_LIBS([deflateSetHeader],[z Z zlib Zlib ZLIB],[],[ + tcl_ok=no + AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) + ])]) +AS_IF([test $tcl_ok = yes], [ + AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])]) #-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This +# The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called # after SC_ENABLE_SHARED checks the configure switches. #-------------------------------------------------------------------- @@ -361,7 +366,7 @@ fi SC_CONFIG_CFLAGS #-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols +# Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- diff --git a/win/makefile.bc b/win/makefile.bc index 633eb53..46d7ec3 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -272,7 +272,8 @@ TCLOBJS = \ $(TMPDIR)\tclWinPipe.obj \ $(TMPDIR)\tclWinSock.obj \ $(TMPDIR)\tclWinThrd.obj \ - $(TMPDIR)\tclWinTime.obj + $(TMPDIR)\tclWinTime.obj \ + $(TMPDIR)\tclZlib.obj TCLSTUBOBJS = \ $(TMPDIR)\tclStubLib.obj \ @@ -285,6 +286,7 @@ TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) $(SYMDEFINES) \ $(PROFDEFINES) $(OPTDEFINES) $(SIXFOURDEFINES) \ -DTCL_CFGVAL_ENCODING=${CFG_ENCODING} +### TODO: Add -DHAVE_ZLIB=1 ###################################################################### # Compiler flags diff --git a/win/makefile.vc b/win/makefile.vc index 2db853f..d08f802 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.191 2008/10/14 22:28:52 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.192 2008/12/14 13:32:11 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -338,6 +338,7 @@ TCLOBJS = \ $(TMP_DIR)\tclWinSock.obj \ $(TMP_DIR)\tclWinThrd.obj \ $(TMP_DIR)\tclWinTime.obj \ + $(TMP_DIR)\tclZlib.obj \ $(TMP_DIR)\bncore.obj \ $(TMP_DIR)\bn_reverse.obj \ $(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \ @@ -457,6 +458,7 @@ crt = -MT TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)" TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline +### TODO: Add -DHAVE_ZLIB=1 BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES) @@ -446,7 +446,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi SHLIB_LD="" SHLIB_LD_LIBS="" - LIBS="-lws2_32 -lz" + LIBS="-lws2_32" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' |