diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | doc/colors.n | 10 | ||||
-rw-r--r-- | doc/keysyms.n | 13 | ||||
-rw-r--r-- | win/Makefile.in | 111 | ||||
-rw-r--r-- | win/aclocal.m4 | 489 | ||||
-rw-r--r-- | win/configure.in | 76 | ||||
-rw-r--r-- | win/tcl.m4 | 625 |
7 files changed, 553 insertions, 785 deletions
@@ -1,17 +1,3 @@ -2000-07-20 Brent Welch <welch@ajubasolutions.com> - - * win/tkConfig.sh.in: - Made corresponding changes to match gcc for windows mods - to the rest of the files. - -2000-07-28 Mo DeJong <mdejong@redhat.com> - - * win/Makefile.in: - * win/aclocal.m4: - * win/configure.in: - * win/tcl.m4: Back port of gcc for windows - build system from 8.4. - 2000-07-26 Jeff Hobbs <hobbs@scriptics.com> * unix/configure.in (TK_PATCH_LEVEL): updated to 8.3.2 diff --git a/doc/colors.n b/doc/colors.n index b96848f..4fa8966 100644 --- a/doc/colors.n +++ b/doc/colors.n @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: colors.n,v 1.1.2.1 2000/06/30 20:33:44 ericm Exp $ +'\" RCS: @(#) $Id: colors.n,v 1.1 2000/04/27 18:28:54 ericm Exp $ '\" '\" .so man.macros @@ -11,7 +11,7 @@ '\" Note: do not modify the .SH NAME line immediately below! .SH NAME colors \- symbolic color names recognized by Tk -.BE + .SH DESCRIPTION .PP Tk recognizes many symbolic color names (eg, \fBred\fR) when @@ -218,8 +218,6 @@ gray12 31 31 31 gray13 33 33 33 gray14 36 36 36 gray15 38 38 38 -.CE -.CS gray16 41 41 41 gray17 43 43 43 gray18 46 46 46 @@ -420,8 +418,6 @@ honeydew2 224 238 238 honeydew3 193 205 205 honeydew4 131 139 139 hot pink 255 105 105 -.CE -.CS HotPink 255 105 105 HotPink1 255 110 110 HotPink2 238 106 106 @@ -622,8 +618,6 @@ PaleTurquoise1 187 255 255 PaleTurquoise2 174 238 238 PaleTurquoise3 150 205 205 PaleTurquoise4 102 139 139 -.CE -.CS PaleVioletRed 219 112 112 PaleVioletRed1 255 130 130 PaleVioletRed2 238 121 121 diff --git a/doc/keysyms.n b/doc/keysyms.n index 6375438..7c8cfe2 100644 --- a/doc/keysyms.n +++ b/doc/keysyms.n @@ -2,16 +2,15 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: keysyms.n,v 1.2.2.1 2000/06/30 20:33:44 ericm Exp $ +'\" RCS: @(#) $Id: keysyms.n,v 1.2 2000/04/28 00:46:04 ericm Exp $ '\" '\" .so man.macros -.TH keysyms n 8.3 Tk "Tk Built-In Commands" +.TH colors n 8.3 Tk "Tk Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME keysyms \- keysyms recognized by Tk -.BE .SH DESCRIPTION .PP @@ -224,8 +223,6 @@ Scaron 425 0x01a9 Scedilla 426 0x01aa Tcaron 427 0x01ab Zacute 428 0x01ac -.CE -.CS Zcaron 430 0x01ae Zabovedot 431 0x01af aogonek 433 0x01b1 @@ -426,8 +423,6 @@ Arabic_qaf 1506 0x05e2 Arabic_kaf 1507 0x05e3 Arabic_lam 1508 0x05e4 Arabic_meem 1509 0x05e5 -.CE -.CS Arabic_noon 1510 0x05e6 Arabic_heh 1511 0x05e7 Arabic_waw 1512 0x05e8 @@ -628,8 +623,6 @@ botvertsummationconnector 2228 0x08b4 toprightsummation 2229 0x08b5 botrightsummation 2230 0x08b6 rightmiddlesummation 2231 0x08b7 -.CE -.CS lessthanequal 2236 0x08bc notequal 2237 0x08bd greaterthanequal 2238 0x08be @@ -831,8 +824,6 @@ End 65367 0xff57 Begin 65368 0xff58 Win_L 65371 0xff5b Win_R 65372 0xff5c -.CE -.CS App 65373 0xff5d Select 65376 0xff60 Print 65377 0xff61 diff --git a/win/Makefile.in b/win/Makefile.in index 64647a4..7d7a74a 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.24.2.3 2000/07/28 08:12:05 mo Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.24.2.2 2000/07/23 04:48:16 welch Exp $ TCLVERSION = @TCL_VERSION@ VERSION = @TK_VERSION@ @@ -83,18 +83,15 @@ TCL_BIN_DIR = @TCL_BIN_DIR@ # The directory containing the Tcl sources and headers appropriate # for this version of Tk ("srcdir" will be replaced or has already # been replaced by the configure script): -TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic +TCL_GENERIC_DIR = @TCL_SRC_DIR@/../generic # This is a switch passed to a Cygwin script that generates file # names based on the platform. -PATHTYPE = @PATHTYPE@ - -# This program converts between Windows native and Cygwin POSIX pathnames. -CYGPATH = @CYGPATH@ +PATHTYPE = @PATHTYPE@ # The name of the Tcl library. -TCL_LIB_FILE = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')" -TCL_STUB_LIB_FILE = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')" +TCL_LIB_FILE = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')" +TCL_STUB_LIB_FILE = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')" SRC_DIR = @srcdir@ ROOT_DIR = $(SRC_DIR)/.. @@ -105,15 +102,14 @@ BITMAP_DIR = $(ROOT_DIR)/bitmaps XLIB_DIR = $(ROOT_DIR)/xlib RC_DIR = $(WIN_DIR)/rc -ROOT_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)') -WIN_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(WIN_DIR)') -GENERIC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(GENERIC_DIR)') -BITMAP_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/bitmaps') -XLIB_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/xlib') -TCL_GENERIC_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_GENERIC_DIR)') -TCL_SRC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_SRC_DIR)') -TCL_BIN_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_BIN_DIR)') -RC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(RC_DIR)') +ROOT_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)') +WIN_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(WIN_DIR)') +GENERIC_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(GENERIC_DIR)') +BITMAP_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/bitmaps') +XLIB_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/xlib') +TCL_GENERIC_NATIVE = $(shell cygpath $(PATHTYPE) '$(TCL_GENERIC_DIR)') +TCL_SRC_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(TCL_SRC_DIR)') +TCL_BIN_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(TCL_BIN_DIR)') DLLSUFFIX = @DLLSUFFIX@ LIBSUFFIX = @LIBSUFFIX@ @@ -139,14 +135,14 @@ MAN2TCL = man2tcl$(EXEEXT) # Macro that expands to the first dependency argument with the appropriate # path type already resolved. -DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)" +DEPARG = "$(shell cygpath $(PATHTYPE) $<)" # Setting the VPATH variable to a list of paths will cause the # makefile to look into these paths when resolving .c to .obj # dependencies. Note the ':' to avoid autoconf's habit of deleting # all VPATH lines without an explicit ':' in it. -VPATH = $(GENERIC_DIR)@VPSEP@$(WIN_DIR)@VPSEP@$(UNIX_DIR)@VPSEP@$(XLIB_DIR)@VPSEP@$(RC_DIR) # : +VPATH = $(GENERIC_DIR);$(WIN_DIR);$(UNIX_DIR);$(XLIB_DIR);$(RC_DIR) # : # warning flags CFLAGS_WARNING = @CFLAGS_WARNING@ @@ -170,10 +166,8 @@ CFLAGS = @CFLAGS@ MAN2TCLFLAGS = @MAN2TCLFLAGS@ AR = @AR@ -RANLIB = @RANLIB@ CC = @CC@ RC = @RC@ -RES = @RES@ AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @@ -181,19 +175,21 @@ LDFLAGS_CONSOLE = @LDFLAGS_CONSOLE@ LDFLAGS_WINDOW = @LDFLAGS_WINDOW@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ -LIBS_GUI = @LIBS_GUI@ +GRAPHIC_LIBS = @GRAPHIC_LIBS@ SHLIB_LD = @SHLIB_LD@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ -SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) $(LIBS_GUI) +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) $(GRAPHIC_LIBS) SHLIB_SUFFIX = @SHLIB_SUFFIX@ VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@ DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@ -LIBS = @LIBS@ $(LIBS_GUI) +LIBS = @LIBS@ $(GRAPHIC_LIBS) RMDIR = rm -rf MKDIR = mkdir -p SHELL = @SHELL@ RM = rm -f COPY = cp +CC_OBJNAME = @CC_OBJNAME@ +CC_EXENAME = @CC_EXENAME@ TCLSH_PROG = @TCLSH_PROG@ @@ -202,9 +198,6 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ -I"${TCL_GENERIC_NATIVE}" ${AC_FLAGS} -CC_OBJNAME = @CC_OBJNAME@ -CC_EXENAME = @CC_EXENAME@ - STUB_CC_SWITCHES = ${CC_SWITCHES} -DUSE_TCL_STUBS CON_CC_SWITCHES = ${CC_SWITCHES} -DCONSOLE @@ -351,7 +344,7 @@ STUB_OBJS = \ tkStubLib.$(OBJEXT) \ tkStubImg.$(OBJEXT) -TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/doc/*.[13n] +TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/../doc/*.[13n] TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] CORE_DOCS = $(TCL_DOCS) $(TK_DOCS) @@ -367,31 +360,31 @@ binaries: @LIBRARIES@ $(WISH) libraries: $(ROOT_DIR)/doc/man.macros: - $(INSTALL_DATA) @TCL_SRC_DIR@/doc/man.macros $(ROOT_DIR)/doc/man.macros + $(INSTALL_DATA) @TCL_SRC_DIR@/../doc/man.macros $(ROOT_DIR)/doc/man.macros doc: $(ROOT_DIR)/doc/man.macros -winhelp: $(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl $(MAN2TCL) - TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ +winhelp: $(TCL_SRC_DIR_NATIVE)/../tools/man2help.tcl $(MAN2TCL) + TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/../library"; export TCL_LIBRARY; \ TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ - $(TCLSH_PROG) "$(TCL_SRC_DIR_NATIVE)"/tools/man2help.tcl tcl "$(VER)" $(CORE_DOCS) + $(TCLSH_PROG) "$(TCL_SRC_DIR_NATIVE)"/../tools/man2help.tcl tcl "$(VER)" $(CORE_DOCS) $(COPY) "$(TCL_BIN_DIR)"/tcl.hpj ./ hcw /c /e tcl.hpj - $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)"/tools/ + $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)"/../tools/ -$(MAN2TCL): $(TCL_SRC_DIR_NATIVE)/tools/man2tcl.c - $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)"/tools/man2tcl.c +$(MAN2TCL): $(TCL_SRC_DIR_NATIVE)/../tools/man2tcl.c + $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)"/../tools/man2tcl.c test: binaries $(TKTEST) - @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ + @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/../library"; export TCL_LIBRARY; \ TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ | ./$(CAT32) runtest: tktest - @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ + @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/../library"; export TCL_LIBRARY; \ TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ ./$(TKTEST) @@ -428,8 +421,7 @@ install-binaries: fi install-libraries: - @for i in $(INSTALL_ROOT)$(prefix)/lib \ - $(INCLUDE_INSTALL_DIR) $(INCLUDE_INSTALL_DIR)/X11 \ + @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \ $(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images; \ do \ if [ ! -d $$i ] ; then \ @@ -440,15 +432,10 @@ install-libraries: fi; \ done; @echo "Installing header files"; - @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h \ - $(GENERIC_DIR)/tkIntXlibDecls.h ; \ + @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h ; \ do \ $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \ done; - @for i in $(XLIB_DIR)/X11/*.h; \ - do \ - $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR)/X11; \ - done; @echo "Installing library files to $(SCRIPT_INSTALL_DIR)"; @for i in $(ROOT_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps \ $(ROOT_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \ @@ -500,35 +487,33 @@ install-doc: $(WISH): $(TK_LIB_FILE) $(WISH_OBJS) $(WISH_RES) $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS) \ - $(WISH_RES) $(CC_EXENAME) $(LDFLAGS_WINDOW) + $(WISH_RES) $(CC_EXENAME) -link $(LDFLAGS_WINDOW) tktest : $(TKTEST) $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) $(WISH_RES) $(CAT32) $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TCL_LIB_FILE) \ $(TK_LIB_FILE) $(LIBS) \ - $(WISH_RES) $(CC_EXENAME) $(LDFLAGS_WINDOW) + $(WISH_RES) $(CC_EXENAME) -link $(LDFLAGS_WINDOW) cat32.${OBJEXT}: $(TCL_SRC_DIR)/cat.c $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME) $(CAT32): cat32.${OBJEXT} - $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE) + $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) -link $(LDFLAGS_CONSOLE) # WISH_RES $(RC_DIR)/wish_static.rc : $(RC_DIR)/wish.rc $(RC_DIR)/tk_base.rc cat $(RC_DIR)/wish.rc $(RC_DIR)/tk_base.rc > $(RC_DIR)/wish_static.rc - -wish_static.$(RES) : $(RC_DIR)/wish_static.rc - $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG) +wish_static.res : $(RC_DIR)/wish_static.rc + $(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" -i "$(TCL_GENERIC_NATIVE)" $(DEPARG) # TK_RES $(RC_DIR)/tk_dll.rc : $(RC_DIR)/tk.rc $(RC_DIR)/tk_base.rc cat $(RC_DIR)/tk.rc $(RC_DIR)/tk_base.rc > $(RC_DIR)/tk_dll.rc - -tk_dll.$(RES) : $(RC_DIR)/tk_dll.rc - $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG) +tk_dll.res : $(RC_DIR)/tk_dll.rc + $(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" -i "$(TCL_GENERIC_NATIVE)" $(DEPARG) # The following targets are configured by autoconf to generate either # a shared library or static library @@ -536,16 +521,14 @@ tk_dll.$(RES) : $(RC_DIR)/tk_dll.rc ${TK_STUB_LIB_FILE}: ${STUB_OBJS} @$(RM) ${TK_STUB_LIB_FILE} @MAKE_LIB@ ${STUB_OBJS} - @POST_MAKE_LIB@ ${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) @$(RM) ${TK_DLL_FILE} - @MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS) + @MAKE_DLL@ ${TK_OBJS} $(TK_RES) ${TK_LIB_FILE}: ${TK_OBJS} @$(RM) ${TK_LIB_FILE} @MAKE_LIB@ ${TK_OBJS} - @POST_MAKE_LIB@ # Special case object file targets @@ -570,29 +553,29 @@ tclThreadTest.$(OBJEXT): $(TCL_BIN_DIR)/tclThreadTest.$(OBJEXT) # automatically added. .SUFFIXES: .${OBJEXT} -.SUFFIXES: .$(RES) +.SUFFIXES: .res .SUFFIXES: .rc # Implicit rule for all object files that will end up in the Tcl library -.c.$(OBJEXT): +.c.${OBJEXT}: $(CC) -c $(STUB_CC_SWITCHES) -DBUILD_tk ${DEPARG} $(CC_OBJNAME) -.rc.$(RES): - $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG) +.rc.res: + $(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" -i "$(TCL_GENERIC_NATIVE)" $(DEPARG) depend: cleanhelp: - $(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl${EXEEXT} + $(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl.exe clean: cleanhelp - $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out + $(RM) *.lib *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(WISH) $(TKTEST) $(CAT32) $(RM) *.pch *.ilk *.pdb distclean: clean $(RM) Makefile config.status config.cache config.log tkConfig.sh -Makefile: $(SRC_DIR)/Makefile.in +Makefile: Makefile.in ./config.status diff --git a/win/aclocal.m4 b/win/aclocal.m4 index bc7540d..f10cc28 100644 --- a/win/aclocal.m4 +++ b/win/aclocal.m4 @@ -1 +1,488 @@ -builtin(include,tcl.m4) +#------------------------------------------------------------------------ +# SC_PATH_TCLCONFIG -- +# +# Locate the tclConfig.sh file and perform a sanity check on +# the Tcl compile flags +# Currently a no-op for Windows +# +# Arguments: +# PATCH_LEVEL The patch level for Tcl if any. +# +# Results: +# +# Adds the following arguments to configure: +# --with-tcl=... +# +# Sets the following vars: +# TCL_BIN_DIR Full path to the tclConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PATH_TCLCONFIG, [ + AC_MSG_CHECKING([the location of tclConfig.sh]) + + if test -d ../../tcl8.3$1/win; then + TCL_BIN_DIR_DEFAULT=../../tcl8.3$1/win + else + TCL_BIN_DIR_DEFAULT=../../tcl8.3/win + fi + + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.3 binaries from DIR], + TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) + if test ! -d $TCL_BIN_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) + fi + 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/tclConfig.sh) +]) + +#------------------------------------------------------------------------ +# SC_PATH_TKCONFIG -- +# +# Locate the tkConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tk=... +# +# Sets the following vars: +# TK_BIN_DIR Full path to the tkConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PATH_TKCONFIG, [ + AC_MSG_CHECKING([the location of tkConfig.sh]) + + if test -d ../../tk8.3$1/win; then + TK_BIN_DIR_DEFAULT=../../tk8.3$1/win + else + TK_BIN_DIR_DEFAULT=../../tk8.3/win + fi + + AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.3 binaries from DIR], + TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`) + if test ! -d $TK_BIN_DIR; then + AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist) + fi + if test ! -f $TK_BIN_DIR/tkConfig.sh; then + 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/tkConfig.sh) +]) + +#------------------------------------------------------------------------ +# SC_LOAD_TCLCONFIG -- +# +# Load the tclConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# +# Requires the following vars to be set: +# TCL_BIN_DIR +# +# Results: +# +# Subst the following vars: +# TCL_BIN_DIR +# TCL_SRC_DIR +# TCL_LIB_FILE +# +#------------------------------------------------------------------------ + +AC_DEFUN(SC_LOAD_TCLCONFIG, [ + AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) + + if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + AC_MSG_RESULT([loading]) + . $TCL_BIN_DIR/tclConfig.sh + else + AC_MSG_RESULT([file not found]) + 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) +]) + +#------------------------------------------------------------------------ +# SC_LOAD_TKCONFIG -- +# +# Load the tkConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# +# Requires the following vars to be set: +# TK_BIN_DIR +# +# Results: +# +# Sets the following vars that should be in tkConfig.sh: +# TK_BIN_DIR +#------------------------------------------------------------------------ + +AC_DEFUN(SC_LOAD_TKCONFIG, [ + AC_MSG_CHECKING([for existence of $TCLCONFIG]) + + if test -f "$TK_BIN_DIR/tkConfig.sh" ; then + AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh]) + . $TK_BIN_DIR/tkConfig.sh + 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) +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_GCC -- +# +# Allows the use of GCC if available +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-gcc +# +# Sets the following vars: +# CC Command to use for the compiler +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_GCC, [ + AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes"; then + CC=gcc + AC_PROG_CC + else + CC=cl + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_SHARED -- +# +# Allows the building of shared libraries +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --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 +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_SHARED, [ + AC_MSG_CHECKING([how to build libraries]) + AC_ARG_ENABLE(shared, + [ --enable-shared build and link with shared libraries [--enable-shared]], + [tcl_ok=$enableval], [tcl_ok=yes]) + + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + AC_MSG_RESULT([shared]) + SHARED_BUILD=1 + else + AC_MSG_RESULT([static]) + SHARED_BUILD=0 + AC_DEFINE(STATIC_BUILD) + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_THREADS -- +# +# Specify if thread support should be enabled +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-threads=yes|no +# +# 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 +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_SYMBOLS -- +# +# Specify if debugging symbols should be used +# +# Arguments: +# none +# +# Requires the following vars to be set: +# CFLAGS_DEBUG +# CFLAGS_OPTIMIZE +# +# Results: +# +# Adds the following arguments to configure: +# --enable-symbols +# +# Defines the following vars: +# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true +# Sets to CFLAGS_OPTIMIZE if false +# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true +# Sets to LDFLAGS_OPTIMIZE if false +# DBGX Debug library extension +# +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_SYMBOLS, [ + AC_MSG_CHECKING([for build with 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}" + DBGX=d + AC_MSG_RESULT([yes]) + else + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" + LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" + DBGX="" + AC_MSG_RESULT([no]) + fi +]) + + +#-------------------------------------------------------------------- +# SC_CONFIG_CFLAGS +# +# Try to determine the proper flags to pass to the compiler +# for building shared libraries and other such nonsense. +# +# NOTE: The backslashes in quotes below are substituted twice +# due to the fact that they are in a macro and then inlined +# in the final configure script. +# +# Arguments: +# none +# +# Results: +# +# Defines the following vars for all compilers: +# EXTRA_CFLAGS +# CFLAGS_DEBUG +# CFLAGS_OPTIMIZE +# CFLAGS_WARNING +# LDFLAGS_DEBUG +# LDFLAGS_OPTIMIZE +# PATHTYPE +# CC_OBJNAME +# CC_EXENAME +# +# Defines the following vars for non-gcc compilers +# SHLIB_LD +# SHLIB_LD_LIBS +# LIBS +# AR +# MAKE_LIB +# MAKE_EXE +# MAKE_DLL +# +# LIBSUFFIX +# LIBRARIES +# EXESUFFIX +# DLLSUFFIX +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_CONFIG_CFLAGS, [ + AC_MSG_CHECKING([compiler flags]) + EXTRA_CFLAGS="" + # set various compiler flags depending on whether we are using gcc or cl + + if test "${GCC}" = "yes" ; then + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE=-O + CFLAGS_WARNING="-Wall -Wconversion" + LDFLAGS_DEBUG=-g + LDFLAGS_OPTIMIZE=-O + PATHTYPE=-u + + # Specify the CC output file names based on the target name + CC_OBJNAME="-o \[$]@" + CC_EXENAME="-o \[$]@" + else + SHLIB_LD="link -dll -nologo" + SHLIB_LD_LIBS="user32.lib advapi32.lib" + LIBS="user32.lib advapi32.lib" + AR="lib -nologo" + RC="rc" + MAKE_LIB="\${AR} -out:\[$]@" + MAKE_EXE="\${CC} -Fe\[$]@" + + if test "${SHARED_BUILD}" = "0" ; then + # static + AC_MSG_RESULT([using static flags]) + runtime=-MT + MAKE_DLL="echo " + LIBSUFFIX="s\${DBGX}.lib" + LIBRARIES="\${STATIC_LIBRARIES}" + EXESUFFIX="s\${DBGX}.exe" + DLLSUFFIX="" + else + # dynamic + AC_MSG_RESULT([using shared flags]) + runtime=-MD + MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@" + LIBSUFFIX="\${DBGX}.lib" + DLLSUFFIX="\${DBGX}.dll" + EXESUFFIX="\${DBGX}.exe" + LIBRARIES="\${SHARED_LIBRARIES}" + fi + + EXTRA_CFLAGS="-YX" + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" +# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}" + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + CFLAGS_WARNING="-W3" + LDFLAGS_DEBUG="-debug:full -debugtype:cv" + LDFLAGS_OPTIMIZE="-release" + PATHTYPE=-w + + # Specify the CC output file names based on the target name + CC_OBJNAME="-Fo\[$]@" + CC_EXENAME="-Fe\"\$(shell cygpath \$(PATHTYPE) '\[$]@')\"" + + # Specify linker flags depending on the type of app being + # built -- Console vs. Window. + LDFLAGS_CONSOLE="-subsystem:console" + LDFLAGS_WINDOW="-subsystem:windows" + fi +]) + +#------------------------------------------------------------------------ +# SC_WITH_TCL -- +# +# Location of the Tcl build directory. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tcl=... +# +# Defines the following vars: +# TCL_BIN_DIR Full path to the tcl build dir. +#------------------------------------------------------------------------ + +AC_DEFUN(SC_WITH_TCL, [ + if test -d ../../tcl8.3$1/win; then + TCL_BIN_DEFAULT=../../tcl8.3$1/win + else + TCL_BIN_DEFAULT=../../tcl8.3/win + fi + + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.3 binaries from DIR], + TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) + if test ! -d $TCL_BIN_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) + fi + if test ! -f $TCL_BIN_DIR/Makefile; then + AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + else + echo "building against Tcl binaries in: $TCL_BIN_DIR" + fi + AC_SUBST(TCL_BIN_DIR) +]) + +#------------------------------------------------------------------------ +# SC_PROG_TCLSH +# Locate a tclsh shell in the following directories: +# ${exec_prefix}/bin +# ${prefix}/bin +# ${TCL_BIN_DIR} +# ${TCL_BIN_DIR}/../bin +# ${PATH} +# +# Arguments +# none +# +# Results +# Subst's the following values: +# TCLSH_PROG +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PROG_TCLSH, [ + AC_MSG_CHECKING([for tclsh]) + + AC_CACHE_VAL(ac_cv_path_tclsh, [ + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/tclsh[[8-9]]*.exe 2> /dev/null` \ + `ls -r $dir/tclsh* 2> /dev/null` ; do + if test x"$ac_cv_path_tclsh" = x ; then + if test -f "$j" ; then + ac_cv_path_tclsh=$j + break + fi + fi + done + done + ]) + + if test -f "$ac_cv_path_tclsh" ; then + TCLSH_PROG=$ac_cv_path_tclsh + AC_MSG_RESULT($TCLSH_PROG) + else + AC_MSG_ERROR(No tclsh found in PATH: $search_path) + fi + AC_SUBST(TCLSH_PROG) +]) + diff --git a/win/configure.in b/win/configure.in index 9b794bd..1d6f168 100644 --- a/win/configure.in +++ b/win/configure.in @@ -2,7 +2,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.16.2.4 2000/07/28 08:12:06 mo Exp $ +# RCS: @(#) $Id: configure.in,v 1.16.2.3 2000/07/27 01:05:58 hobbs Exp $ AC_INIT(../generic/tk.h) @@ -75,9 +75,9 @@ AC_SUBST(MAN2TCLFLAGS) SC_ENABLE_SYMBOLS +TK_DBGX=${DBGX} CFLAGS=${CFLAGS_DEFAULT} LDFLAGS=${LDFLAGS_DEFAULT} -TK_DBGX=${DBGX} #-------------------------------------------------------------------- # Locate and source the tclConfig.sh file. @@ -88,62 +88,33 @@ SC_LOAD_TCLCONFIG SC_PROG_TCLSH -#------------------------------------------------------------------------ -# tkConfig.sh refers to this by a different name -#------------------------------------------------------------------------ - -TK_SHARED_BUILD=${SHARED_BUILD} - #-------------------------------------------------------------------- # Perform final evaluations of variables with possible substitutions. #-------------------------------------------------------------------- -TK_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" -TK_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" -TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" - -eval "TK_SRC_DIR=`cd $srcdir/..; pwd`" - +eval "TK_SRC_DIR=`cd $srcdir; pwd`" eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}" -eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}" -eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" - -# FIXME: All of this var junk needs to be done in tcl.m4 !!!! -# I left out the other vars that also need to get defined here. -# we also need to double check about including DBGX in lib names -# and spaces in file or directory names for the eval -eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" -eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" - -eval "TCL_DLL_FILE=\"tcl$VER${DLLSUFFIX}\"" -eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl$VER${LIBSUFFIX}\"" - -eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" -eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${TCL_DBGX}\"" - -eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" - -eval "DLLSUFFIX=${DLLSUFFIX}" -eval "LIBPREFIX=${LIBPREFIX}" -eval "LIBSUFFIX=${LIBSUFFIX}" +eval "TK_LIB_FILE=tk$VER${LIBSUFFIX}" +eval "TK_STUB_LIB_FILE=tkstub$VER${LIBSUFFIX}" +eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}" +eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}" +eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}" eval "EXESUFFIX=${EXESUFFIX}" if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then TK_BUILD_LIB_SPEC="`pwd`/${TK_LIB_FILE}" TK_LIB_SPEC="${exec_prefix}/lib/${TK_LIB_FILE}" - WISH_RES=wish_static.${RES} + WISH_RES=wish_static.res TK_RES= else TK_BUILD_LIB_SPEC="`pwd`/${TK_DLL_FILE}" TK_LIB_SPEC="${exec_prefix}/lib/${TK_DLL_FILE}" - WISH_RES=wish_static.${RES} - TK_RES=tk_dll.${RES} + WISH_RES=wish_static.res + TK_RES=tk_dll.res fi TK_SHARED_BUILD=${SHARED_BUILD} -CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX} -CFG_TK_UNSHARED_LIB_SUFFIX=${TK_UNSHARED_LIB_SUFFIX} -CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX} +GRAPHIC_LIBS="gdi32.lib comdlg32.lib" AC_SUBST(TK_VERSION) AC_SUBST(TK_MAJOR_VERSION) @@ -153,13 +124,12 @@ AC_SUBST(TK_DBGX) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_DLL_FILE) AC_SUBST(TK_STUB_LIB_FILE) -AC_SUBST(TK_STUB_LIB_FLAG) -AC_SUBST(TK_BUILD_STUB_LIB_SPEC) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_BUILD_LIB_SPEC) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_SHARED_BUILD) +AC_SUBST(GRAPHIC_LIBS) AC_SUBST(WISH_RES) AC_SUBST(TK_RES) @@ -170,24 +140,16 @@ AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_DLL_FILE) AC_SUBST(TCL_STUB_LIB_FILE) -AC_SUBST(TCL_STUB_LIB_FLAG) -AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_DBGX) -AC_SUBST(CFG_TK_SHARED_LIB_SUFFIX) -AC_SUBST(CFG_TK_UNSHARED_LIB_SUFFIX) -AC_SUBST(CFG_TK_EXPORT_FILE_SUFFIX) -AC_SUBST(TK_SHARED_BUILD) + AC_SUBST(PATHTYPE) -AC_SUBST(CYGPATH) -AC_SUBST(VPSEP) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) -AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) @@ -200,23 +162,13 @@ AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_CONSOLE) AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) -AC_SUBST(RANLIB) AC_SUBST(RC) -AC_SUBST(RC_OUT) -AC_SUBST(RC_TYPE) -AC_SUBST(RC_INCLUDE) -AC_SUBST(RES) -AC_SUBST(LIBS) -AC_SUBST(LIBS_GUI) AC_SUBST(DLLSUFFIX) -AC_SUBST(LIBPREFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) AC_SUBST(LIBRARIES) AC_SUBST(MAKE_LIB) -AC_SUBST(POST_MAKE_LIB) AC_SUBST(MAKE_DLL) -AC_SUBST(MAKE_EXE) AC_SUBST(TK_XINCLUDES) AC_SUBST(XINCLUDES) diff --git a/win/tcl.m4 b/win/tcl.m4 deleted file mode 100644 index 7b5d7fe..0000000 --- a/win/tcl.m4 +++ /dev/null @@ -1,625 +0,0 @@ -#------------------------------------------------------------------------ -# SC_PATH_TCLCONFIG -- -# -# Locate the tclConfig.sh file and perform a sanity check on -# the Tcl compile flags -# Currently a no-op for Windows -# -# Arguments: -# PATCH_LEVEL The patch level for Tcl if any. -# -# Results: -# -# Adds the following arguments to configure: -# --with-tcl=... -# -# Sets the following vars: -# TCL_BIN_DIR Full path to the tclConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TCLCONFIG, [ - AC_MSG_CHECKING([the location of tclConfig.sh]) - - if test -d ../../tcl8.4$1/win; then - TCL_BIN_DIR_DEFAULT=../../tcl8.4$1/win - else - TCL_BIN_DIR_DEFAULT=../../tcl8.4/win - fi - - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], - TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) - if test ! -d $TCL_BIN_DIR; then - AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) - fi - 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/tclConfig.sh) -]) - -#------------------------------------------------------------------------ -# SC_PATH_TKCONFIG -- -# -# Locate the tkConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tk=... -# -# Sets the following vars: -# TK_BIN_DIR Full path to the tkConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TKCONFIG, [ - AC_MSG_CHECKING([the location of tkConfig.sh]) - - if test -d ../../tk8.4$1/win; then - TK_BIN_DIR_DEFAULT=../../tk8.4$1/win - else - TK_BIN_DIR_DEFAULT=../../tk8.4/win - fi - - AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.4 binaries from DIR], - TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`) - if test ! -d $TK_BIN_DIR; then - AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist) - fi - if test ! -f $TK_BIN_DIR/tkConfig.sh; then - 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/tkConfig.sh]) -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TCLCONFIG -- -# -# Load the tclConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# -# Requires the following vars to be set: -# TCL_BIN_DIR -# -# Results: -# -# Subst the following vars: -# TCL_BIN_DIR -# TCL_SRC_DIR -# TCL_LIB_FILE -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TCLCONFIG, [ - AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) - - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then - AC_MSG_RESULT([loading]) - . $TCL_BIN_DIR/tclConfig.sh - else - AC_MSG_RESULT([file not found]) - 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) -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TKCONFIG -- -# -# Load the tkConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# -# Requires the following vars to be set: -# TK_BIN_DIR -# -# Results: -# -# Sets the following vars that should be in tkConfig.sh: -# TK_BIN_DIR -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TKCONFIG, [ - AC_MSG_CHECKING([for existence of $TCLCONFIG]) - - if test -f "$TK_BIN_DIR/tkConfig.sh" ; then - AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh]) - . $TK_BIN_DIR/tkConfig.sh - 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) -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_GCC -- -# -# Allows the use of GCC if available -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-gcc -# -# Sets the following vars: -# CC Command to use for the compiler -# AR Comman for the archive tool -# RANLIB Command for the archive indexing tool -# RC Command for the resource compiler -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_GCC, [ - AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], - [ok=$enableval], [ok=no]) - if test "$ok" = "yes"; then - # Quick hack to simulate a real cross check - # The right way to do this is to use AC_CHECK_TOOL - # correctly, but this is the minimal change - # we need until the real fix is ready. - if test "$host" != "$build" ; then - if test -z "$CC"; then - CC=${host}-gcc - fi - AC_PROG_CC - AC_CHECK_PROG(AR, ${host}-ar, ${host}-ar) - AC_CHECK_PROG(RANLIB, ${host}-ranlib, ${host}-ranlib) - AC_CHECK_PROG(RC, ${host}-windres, ${host}-windres) - else - if test -z "$CC"; then - CC=gcc - fi - AC_PROG_CC - AC_CHECK_PROG(AR, ar, ar) - AC_CHECK_PROG(RANLIB, ranlib, ranlib) - AC_CHECK_PROG(RC, windres, windres) - fi - else - # Allow user to override - if test -z "$CC"; then - CC=cl - fi - fi -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SHARED -- -# -# Allows the building of shared libraries -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --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 -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SHARED, [ - AC_MSG_CHECKING([how to build libraries]) - AC_ARG_ENABLE(shared, - [ --enable-shared build and link with shared libraries [--enable-shared]], - [tcl_ok=$enableval], [tcl_ok=yes]) - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - AC_MSG_RESULT([shared]) - SHARED_BUILD=1 - else - AC_MSG_RESULT([static]) - SHARED_BUILD=0 - AC_DEFINE(STATIC_BUILD) - fi -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_THREADS -- -# -# Specify if thread support should be enabled -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-threads=yes|no -# -# 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 -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SYMBOLS -- -# -# Specify if debugging symbols should be used -# -# Arguments: -# none -# -# Requires the following vars to be set: -# CFLAGS_DEBUG -# CFLAGS_OPTIMIZE -# -# Results: -# -# Adds the following arguments to configure: -# --enable-symbols -# -# Defines the following vars: -# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true -# Sets to CFLAGS_OPTIMIZE if false -# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true -# Sets to LDFLAGS_OPTIMIZE if false -# DBGX Debug library extension -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SYMBOLS, [ - AC_MSG_CHECKING([for build with 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}" - DBGX=d - AC_MSG_RESULT([yes]) - else - CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" - LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" - DBGX="" - AC_MSG_RESULT([no]) - fi -]) - - -#-------------------------------------------------------------------- -# SC_CONFIG_CFLAGS -# -# Try to determine the proper flags to pass to the compiler -# for building shared libraries and other such nonsense. -# -# NOTE: The backslashes in quotes below are substituted twice -# due to the fact that they are in a macro and then inlined -# in the final configure script. -# -# Arguments: -# none -# -# Results: -# -# Can the following vars: -# EXTRA_CFLAGS -# CFLAGS_DEBUG -# CFLAGS_OPTIMIZE -# CFLAGS_WARNING -# LDFLAGS_DEBUG -# LDFLAGS_OPTIMIZE -# LDFLAGS_CONSOLE -# LDFLAGS_WINDOW -# CC_OBJNAME -# CC_EXENAME -# PATHTYPE -# VPSEP -# CYGPATH -# SHLIB_LD -# SHLIB_LD_LIBS -# LIBS -# AR -# RC -# RES -# -# MAKE_LIB -# MAKE_EXE -# MAKE_DLL -# -# LIBSUFFIX -# LIBPREFIX -# LIBRARIES -# EXESUFFIX -# DLLSUFFIX -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_CONFIG_CFLAGS, [ - AC_MSG_CHECKING([compiler flags]) - - # Set some defaults (may get changed below) - EXTRA_CFLAGS="" - PATHTYPE='-w' - CYGPATH='cygpath' - VPSEP=';' - - # set various compiler flags depending on whether we are using gcc or cl - - if test "${GCC}" = "yes" ; then - SHLIB_LD="" - SHLIB_LD_LIBS="" - LIBS="" - LIBS_GUI="-lgdi32 -lcomdlg32" - STLIB_LD="${AR}" - RC_OUT=-o - RC_TYPE= - RC_INCLUDE=--include - RES=res.o - MAKE_LIB="\${AR} crv \[$]@" - POST_MAKE_LIB="\${RANLIB} \[$]@" - MAKE_EXE="\${CC} -o \[$]@" - LIBPREFIX="lib" - - if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[[3-6]]86[[^\/]]*-cygwin' >/dev/null; then - mno_cygwin="yes" - extra_cflags="-mno-cygwin" - extra_ldflags="-mno-cygwin" - else - mno_cygwin="no" - extra_cflags="" - extra_ldflags="" - fi - - if test "$cross_compiling" = "yes" -o "$mno_cygwin" = "yes"; then - PATHTYPE='' - CYGPATH='echo ' - VPSEP=':' - fi - - if test "${SHARED_BUILD}" = "0" ; then - # static - AC_MSG_RESULT([using static flags]) - runtime= - MAKE_DLL="echo " - LIBSUFFIX="s\${DBGX}.a" - LIBRARIES="\${STATIC_LIBRARIES}" - EXESUFFIX="s\${DBGX}.exe" - DLLSUFFIX="" - else - # dynamic - AC_MSG_RESULT([using shared flags]) - - # check to see if ld supports --shared. Libtool does a much - # more extensive test, but not really needed in this case. - if test -z "$LD"; then - ld_prog="`(${CC} -print-prog-name=ld) 2>/dev/null`" - if test -z "$ld_prog"; then - ld_prog=ld - else - # get rid of the potential '\r' from ld_prog. - ld_prog="`(echo $ld_prog | tr -d '\015' | sed 's,\\\\,\\/,g')`" - fi - LD="$ld_prog" - fi - - AC_MSG_CHECKING([whether $ld_prog supports -shared option]) - - # now the ad-hoc check to see if GNU ld supports --shared. - if "$LD" --shared 2>&1 | egrep ': -shared not supported' >/dev/null; then - ld_supports_shared="no" - SHLIB_LD="${DLLWRAP-dllwrap}" - else - ld_supports_shared="yes" - SHLIB_LD="${CC} -shared" - fi - AC_MSG_RESULT([$ld_supports_shared]) - - runtime= - # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags}" - if test "${ld_supports_shared}" = "yes"; then - MAKE_DLL="${MAKE_DLL} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" - else - MAKE_DLL="${MAKE_DLL} --output-lib \$(patsubst %.dll,lib%.a,\[$]@)" - fi - LIBSUFFIX="\${DBGX}.a" - DLLSUFFIX="\${DBGX}.dll" - EXESUFFIX="\${DBGX}.exe" - LIBRARIES="\${SHARED_LIBRARIES}" - fi - - EXTRA_CFLAGS="${extra_cflags}" - - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O - CFLAGS_WARNING="-Wall -Wconversion" - LDFLAGS_DEBUG=-g - LDFLAGS_OPTIMIZE=-O - - # Specify the CC output file names based on the target name - CC_OBJNAME="-o \[$]@" - CC_EXENAME="-o \[$]@" - - # Specify linker flags depending on the type of app being - # built -- Console vs. Window. - LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" - LDFLAGS_WINDOW="-mwindows ${extra_ldflags}" - else - SHLIB_LD="link -dll -nologo" - SHLIB_LD_LIBS="user32.lib advapi32.lib" - LIBS="user32.lib advapi32.lib" - LIBS_GUI="gdi32.lib comdlg32.lib" - AR="lib -nologo" - STLIB_LD="lib -nologo" - RC="rc" - RC_OUT=-fo - RC_TYPE=-r - RC_INCLUDE=-i - RES=res - MAKE_LIB="\${AR} -out:\[$]@" - POST_MAKE_LIB= - MAKE_EXE="\${CC} -Fe\[$]@" - LIBPREFIX="" - - if test "${SHARED_BUILD}" = "0" ; then - # static - AC_MSG_RESULT([using static flags]) - runtime=-MT - MAKE_DLL="echo " - LIBSUFFIX="s\${DBGX}.lib" - LIBRARIES="\${STATIC_LIBRARIES}" - EXESUFFIX="s\${DBGX}.exe" - DLLSUFFIX="" - else - # dynamic - AC_MSG_RESULT([using shared flags]) - runtime=-MD - # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" - LIBSUFFIX="\${DBGX}.lib" - DLLSUFFIX="\${DBGX}.dll" - EXESUFFIX="\${DBGX}.exe" - LIBRARIES="\${SHARED_LIBRARIES}" - fi - - EXTRA_CFLAGS="-YX" - CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" -# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}" - CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" - CFLAGS_WARNING="-W3" - LDFLAGS_DEBUG="-debug:full -debugtype:cv" - LDFLAGS_OPTIMIZE="-release" - - # Specify the CC output file names based on the target name - CC_OBJNAME="-Fo\[$]@" - CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) \$(PATHTYPE) '\[$]@')\"" - - # Specify linker flags depending on the type of app being - # built -- Console vs. Window. - LDFLAGS_CONSOLE="-link -subsystem:console" - LDFLAGS_WINDOW="-link -subsystem:windows" - fi -]) - -#------------------------------------------------------------------------ -# SC_WITH_TCL -- -# -# Location of the Tcl build directory. -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tcl=... -# -# Defines the following vars: -# TCL_BIN_DIR Full path to the tcl build dir. -#------------------------------------------------------------------------ - -AC_DEFUN(SC_WITH_TCL, [ - if test -d ../../tcl8.4$1/win; then - TCL_BIN_DEFAULT=../../tcl8.4$1/win - else - TCL_BIN_DEFAULT=../../tcl8.4/win - fi - - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], - TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) - if test ! -d $TCL_BIN_DIR; then - AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) - fi - if test ! -f $TCL_BIN_DIR/Makefile; then - AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) - else - echo "building against Tcl binaries in: $TCL_BIN_DIR" - fi - AC_SUBST(TCL_BIN_DIR) -]) - -# FIXME : SC_PROG_TCLSH should really look for the installed tclsh and -# not the build version. If we want to use the build version in the -# tk script, it is better to hardcode that! - -#------------------------------------------------------------------------ -# SC_PROG_TCLSH -# Locate a tclsh shell in the following directories: -# ${exec_prefix}/bin -# ${prefix}/bin -# ${TCL_BIN_DIR} -# ${TCL_BIN_DIR}/../bin -# ${PATH} -# -# Arguments -# none -# -# Results -# Subst's the following values: -# TCLSH_PROG -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PROG_TCLSH, [ - AC_MSG_CHECKING([for tclsh]) - - AC_CACHE_VAL(ac_cv_path_tclsh, [ - search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/tclsh[[8-9]]*.exe 2> /dev/null` \ - `ls -r $dir/tclsh* 2> /dev/null` ; do - if test x"$ac_cv_path_tclsh" = x ; then - if test -f "$j" ; then - ac_cv_path_tclsh=$j - break - fi - fi - done - done - ]) - - if test -f "$ac_cv_path_tclsh" ; then - TCLSH_PROG=$ac_cv_path_tclsh - AC_MSG_RESULT($TCLSH_PROG) - else - AC_MSG_ERROR(No tclsh found in PATH: $search_path) - fi - AC_SUBST(TCLSH_PROG) -]) |