diff options
-rw-r--r-- | win/Makefile.in | 20 | ||||
-rw-r--r-- | win/aclocal.m4 | 50 | ||||
-rw-r--r-- | win/configure.in | 9 |
3 files changed, 57 insertions, 22 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index e624052..0c8178d 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.9 1999/06/16 22:36:24 surles Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.10 1999/06/16 23:18:11 surles Exp $ VERSION = @TCL_VERSION@ @@ -79,6 +79,10 @@ CFLAGS_WARNING = @CFLAGS_WARNING@ CFLAGS_DEBUG = @CFLAGS_DEBUG@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ +# The default switches for optimization or debugging +LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ +LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ + # To change the compiler switches, for example to change from optimization to # debugging symbols, change the following line: #CFLAGS = $(CFLAGS_DEBUG) @@ -115,6 +119,7 @@ STATIC_LIBRARIES = $(TCL_LIB_FILE) TCLSH = tclsh$(VER)${EXESUFFIX} TCLTEST = tcltest${EXEEXT} +CAT32 = cat32 @SET_MAKE@ @@ -134,6 +139,8 @@ CC = @CC@ AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ +LDFLAGS_CONSOLE = @LDFLAGS_CONSOLE@ +LDFLAGS_WINDOW = @LDFLAGS_WINDOW@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ SHLIB_LD = @SHLIB_LD@ @@ -271,9 +278,13 @@ doc: $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME) -$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) +$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME) +$(CAT32): cat.c + $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME) + $(CC) $(CFLAGS) cat32.obj $(CC_EXENAME) -link $(LDFLAGS_CONSOLE) + # The following targets are configured by autoconf to generate either # a shared library or static library @@ -428,8 +439,9 @@ install-libraries: install-doc: test: binaries $(TCLTEST) - @TCL_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TCL_LIBRARY; \ - ./tcltest "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) + TCL_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TCL_LIBRARY; \ + ./$(TCLTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ + | ./$(CAT32) # Useful target to launch a built tcltest with the proper path,... runtest: tcltest diff --git a/win/aclocal.m4 b/win/aclocal.m4 index 9099193..e58d196 100644 --- a/win/aclocal.m4 +++ b/win/aclocal.m4 @@ -13,7 +13,7 @@ # Adds the following arguments to configure: # --with-tcl=... # -# Defines the following vars: +# Sets the following vars: # TCL_BIN_DIR Full path to the tclConfig.sh file #------------------------------------------------------------------------ @@ -34,7 +34,7 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ if test ! -f $TCL_BIN_DIR/tclConfig.sh; then AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) fi - AC_MSG_RESULT([$TCL_BIN_DIR]) + AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh) ]) #------------------------------------------------------------------------ @@ -51,7 +51,7 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ # Adds the following arguments to configure: # --with-tk=... # -# Defines the following vars: +# Sets the following vars: # TK_BIN_DIR Full path to the tkConfig.sh file #------------------------------------------------------------------------ @@ -73,7 +73,7 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR: perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?) fi - AC_MSG_RESULT([$TK_BIN_DIR]) + AC_MSG_RESULT($TK_BIN_DIR/tkConfig.sh) ]) #------------------------------------------------------------------------ @@ -89,12 +89,11 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ # # Results: # -# Sets the following vars that should be in tclConfig.sh: +# Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE -# Defines the following vars: -# TCL_THREADS +# #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TCLCONFIG, [ @@ -107,9 +106,15 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [ AC_MSG_RESULT([file not found]) fi - if test "$TCL_THREADS" = "1"; then - AC_DEFINE(TCL_THREADS) - fi + # The eval is required to do the TCL_DBGX substitution in the + # TCL_LIB_FILE variable. + + eval TCL_LIB_FILE=${TCL_LIB_FILE} + eval TCL_LIB_FLAG=${TCL_LIB_FLAG} + + AC_SUBST(TCL_BIN_DIR) + AC_SUBST(TCL_SRC_DIR) + AC_SUBST(TCL_LIB_FILE) ]) #------------------------------------------------------------------------ @@ -138,6 +143,11 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [ else AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) fi + + + AC_SUBST(TK_BIN_DIR) + AC_SUBST(TK_SRC_DIR) + AC_SUBST(TK_LIB_FILE) ]) #------------------------------------------------------------------------ @@ -153,7 +163,7 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [ # Adds the following arguments to configure: # --enable-gcc # -# Defines the following vars: +# Sets the following vars: # CC Command to use for the compiler #------------------------------------------------------------------------ @@ -162,6 +172,7 @@ AC_DEFUN(SC_ENABLE_GCC, [ [ok=$enableval], [ok=no]) if test "$ok" = "yes"; then CC=gcc + AC_PROG_CC else CC=cl fi @@ -181,8 +192,11 @@ AC_DEFUN(SC_ENABLE_GCC, [ # --enable-shared=yes|no # # Defines the following vars: +# STATIC_BUILD Used for building import/export libraries +# on Windows. +# +# Sets the following vars: # SHARED_BUILD Value of 1 or 0 -# STATIC_BUILD #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SHARED, [ @@ -223,17 +237,19 @@ AC_DEFUN(SC_ENABLE_SHARED, [ # # Defines the following vars: # TCL_THREADS -# #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_THREADS, [ AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) + if test "$tcl_ok" = "yes"; then AC_MSG_RESULT(yes) + TCL_THREADS=1 AC_DEFINE(TCL_THREADS) else + TCL_THREADS=0 AC_MSG_RESULT(no (default)) fi ]) @@ -269,13 +285,13 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='${CFLAGS_DEBUG}' - LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}' + CFLAGS_DEFAULT="${CFLAGS_DEBUG}" + LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" DBGX=d AC_MSG_RESULT([yes]) else - CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}' - LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}' + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" + LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" DBGX="" AC_MSG_RESULT([no]) fi diff --git a/win/configure.in b/win/configure.in index 0a5b99a..2522caa 100644 --- a/win/configure.in +++ b/win/configure.in @@ -2,7 +2,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.7 1999/06/16 22:36:24 surles Exp $ +# RCS: @(#) $Id: configure.in,v 1.8 1999/06/16 23:18:12 surles Exp $ AC_INIT(../generic/tcl.h) @@ -79,6 +79,7 @@ TCL_DBGX=${DBGX} eval "TCL_SRC_DIR=`cd $srcdir; pwd`" eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}" eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}" +eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}" AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) @@ -102,7 +103,13 @@ AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) +AC_SUBST(LDFLAGS) +AC_SUBST(LDFLAGS_DEBUG) +AC_SUBST(LDFLAGS_OPTIMIZE) +AC_SUBST(LDFLAGS_CONSOLE) +AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) +AC_SUBST(RC) AC_SUBST(DLLSUFFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) |