From 1268ac3113dd4f5b5627c98afd15addcf608875a Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 16 Jun 2003 18:36:44 +0000 Subject: * win/Makefile.in: Haven't heard back from David for a week. * win/configure: Now committing the remaining changes. * win/configure.in: Note: In active contact with Helmut Giese * win/makefile.vc: about the borland relatedchanges. This part * win/rules.vc: will see future updates. * win/tcl.m4: * win/makefile.bc: --- ChangeLog | 10 ++++++++ win/Makefile.in | 29 +++++++++++++++++++++- win/configure | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- win/configure.in | 8 +++++- win/makefile.bc | 33 ++++++++++++++++++++++++- win/makefile.vc | 29 ++++++++++++++++++++-- win/rules.vc | 20 +++++++++++++-- win/tcl.m4 | 59 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 254 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 892b422..0b5ea23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-06-16 Andreas Kupries + + * win/Makefile.in: Haven't heard back from David for a week. + * win/configure: Now committing the remaining changes. + * win/configure.in: Note: In active contact with Helmut Giese + * win/makefile.vc: about the borland relatedchanges. This part + * win/rules.vc: will see future updates. + * win/tcl.m4: + * win/makefile.bc: + 2003-06-10 Andreas Kupries * generic/tclConfig.c (ASSOC_KEY): Changed the key to diff --git a/win/Makefile.in b/win/Makefile.in index a008ab1..195ccab 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.71 2003/04/15 00:18:58 mdejong Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.72 2003/06/16 18:36:45 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -218,6 +218,7 @@ GENERIC_OBJS = \ tclCompCmds.$(OBJEXT) \ tclCompExpr.$(OBJEXT) \ tclCompile.$(OBJEXT) \ + tclConfig.$(OBJEXT) \ tclDate.$(OBJEXT) \ tclDictObj.$(OBJEXT) \ tclEncoding.$(OBJEXT) \ @@ -250,6 +251,7 @@ GENERIC_OBJS = \ tclPathObj.$(OBJEXT) \ tclPipe.$(OBJEXT) \ tclPkg.$(OBJEXT) \ + tclPkgConfig.$(OBJEXT) \ tclPosixStr.$(OBJEXT) \ tclPreserve.$(OBJEXT) \ tclProc.$(OBJEXT) \ @@ -413,6 +415,31 @@ tclWinReg.${OBJEXT} : tclWinReg.c tclWinDde.${OBJEXT} : tclWinDde.c $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME) +# TIP #59, embedding of configuration information into the binary library. +# +# Part of Tcl's configuration information are the paths where it was +# installed and where it will look for its libraries (which can be +# different). We derive this information from the variables which can +# be overridden by the user. As every path can be configured +# separately we do not remember one general prefix/exec_prefix but all +# the different paths individually. + +tclPkgConfig.${OBJEXT}: tclPkgConfig.c + $(CC) -c $(CC_SWITCHES) \ + -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \ + -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \ + -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \ + -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \ + -DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \ + \ + -DCFG_RUNTIME_LIBDIR=\"$(libdir)\" \ + -DCFG_RUNTIME_BINDIR=\"$(bindir)\" \ + -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY)\" \ + -DCFG_RUNTIME_INCDIR=\"$(includedir)\" \ + -DCFG_RUNTIME_DOCDIR=\"$(mandir)\" \ + \ + -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME) + # The following objects are part of the stub library and should not # be built as DLL objects but none of the symbols should be exported diff --git a/win/configure b/win/configure index 2597646..2a31e26 100755 --- a/win/configure +++ b/win/configure @@ -844,6 +844,11 @@ Optional Features: --enable-64bit enable 64bit support (where applicable) --enable-symbols build with debugging symbols --disable-symbols +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-encoding encoding for configuration values + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -2076,12 +2081,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ - '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ - 'void exit (int);' + 'void exit (int);' \ + '#include ' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" @@ -2908,6 +2913,32 @@ echo "${ECHO_T}no (default)" >&6 +#------------------------------------------------------------------------ +# Embedded configuration information, encoding to use for the values, TIP #59 +#------------------------------------------------------------------------ + + + +# Check whether --with-encoding or --without-encoding was given. +if test "${with_encoding+set}" = set; then + withval="$with_encoding" + with_tcencoding=${withval} +fi; + + if test x"${with_tcencoding}" != x ; then + cat >>confdefs.h <<_ACEOF +#define TCL_CFGVAL_ENCODING "${with_tcencoding}" +_ACEOF + + else + # Default encoding on windows is not "iso8859-1" + cat >>confdefs.h <<\_ACEOF +#define TCL_CFGVAL_ENCODING "cp1252" +_ACEOF + + fi + + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. @@ -3236,6 +3267,25 @@ echo "$as_me: WARNING: \"could not find 64-bit SDK to enable 64bit mode\"" >&2;} CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" STLIB_LD="lib -nologo" LINKBIN="link -link50compat" + + # TIP #59 + # A check borrowed from 'rules.vc' to determine if the + # compiler actually supports optimization. If not we do + # not try to use this feature. + + lines=`$(CC) -nologo -Ox -c -Zs -TC -Fdtemp nul 2>&1 | grep "D4002" | wc -l` + + for f in temp.idb temp.pdb ; do + if -f $f ; then + rm -f $f + fi + done + if $lines -gt 0 ; then + OPTIMIZING=1 + else + OPTIMIZING=0 + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + fi fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" @@ -3266,6 +3316,13 @@ echo "$as_me: WARNING: \"could not find 64-bit SDK to enable 64bit mode\"" >&2;} LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi + if test "$do64bit" = "yes" ; then + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DO64BIT 1 +_ACEOF + + fi + # DL_LIBS is empty, but then we match the Unix version @@ -3296,6 +3353,16 @@ fi; DBGX="" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + + # Use result from SC_CONFIG_CFLAGS to determine if + # optimization is truly active. + + if $OPTIMIZING -eq 1 ; then + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_OPTIMIZED 1 +_ACEOF + + fi else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' @@ -3307,6 +3374,10 @@ echo "${ECHO_T}yes (standard debugging)" >&6 fi + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DEBUG 1 +_ACEOF + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then cat >>confdefs.h <<\_ACEOF diff --git a/win/configure.in b/win/configure.in index f1b5bbd..2a7a79e 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.74 2003/04/18 20:02:27 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.75 2003/06/16 18:36:45 andreas_kupries Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.57) @@ -300,6 +300,12 @@ AC_EXEEXT SC_ENABLE_THREADS +#------------------------------------------------------------------------ +# Embedded configuration information, encoding to use for the values, TIP #59 +#------------------------------------------------------------------------ + +SC_TCL_CFG_ENCODING + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. diff --git a/win/makefile.bc b/win/makefile.bc index eb01228..54b4600 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -7,7 +7,17 @@ # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. + +# TIP #59 information. +# +# This makefile does not set the following configuration cpp +# defines. Behind the defines are the makefile variables listed to set +# to -D... when that feature is enabled. # +# - TCL_CFG_PROFILED PROFDEFINES +# - TCL_CFG_OPTIMIZED OPTDEFINES +# - TCL_CFG_DO64BIT SIXFOURDEFINES + # Have a look at the complete description on how to build and test Tcl with # the current Borland compilers at www.ratiosoft.com/tcl/borland. # @@ -88,6 +98,13 @@ libpath32 = -L"$(TOOLS32)\lib" NODEBUG = 1 !endif +# CFG_ENCODING=encoding +# name of encoding for configuration information. Defaults +# to cp1252 +!if !defined(CFG_ENCODING) +CFG_ENCODING = \"cp1252\" +!endif + # The following defines can be used to control the amount of debugging # code that is added to the compilation. # @@ -120,10 +137,12 @@ BINROOT = .. !IF "$(NODEBUG)" == "1" TMPDIRNAME = Release DBGX = +SYMDEFINES = !ELSE TMPDIRNAME = Debug #DBGX = d DBGX = +SYMDEFINES = -DTCL_CFG_DEBUG !ENDIF TMPDIR = $(BINROOT)\$(TMPDIRNAME) OUTDIRNAME = $(TMPDIRNAME) @@ -189,6 +208,7 @@ TCLOBJS = \ $(TMPDIR)\tclCompCmds.obj \ $(TMPDIR)\tclCompExpr.obj \ $(TMPDIR)\tclCompile.obj \ + $(TMPDIR)\tclConfig.obj \ $(TMPDIR)\tclDate.obj \ $(TMPDIR)\tclDictObj.obj \ $(TMPDIR)\tclEncoding.obj \ @@ -220,6 +240,7 @@ TCLOBJS = \ $(TMPDIR)\tclParseExpr.obj \ $(TMPDIR)\tclPipe.obj \ $(TMPDIR)\tclPkg.obj \ + $(TMPDIR)\tclPkgConfig.obj \ $(TMPDIR)\tclPosixStr.obj \ $(TMPDIR)\tclPreserve.obj \ $(TMPDIR)\tclProc.obj \ @@ -258,7 +279,9 @@ WINDIR = $(ROOT)\win GENERICDIR = $(ROOT)\generic TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) +TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) $(SYMDEFINES) \ + $(PROFDEFINES) $(OPTDEFINES) $(SIXFOURDEFINES) \ + -DTCL_CFGVAL_ENCODING=${CFG_ENCODING} ###################################################################### # Compiler flags @@ -491,6 +514,14 @@ $(TMPDIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c $(TMPDIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? +$(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c + $(cc32) $(TCL_CFLAGS) \ + -DCFG_INSTALL_EXEC_PREFIX=\"$(INSTALL_EXEC_PREFIX)\" \ + -DCFG_INSTALL_PREFIX=\"$(INSTALL_PREFIX)\" \ + -DCFG_RUNTIME_EXEC_PREFIX=\"$(RUNTIME_EXEC_PREFIX)\" \ + -DCFG_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ + -o$(TMPDIR)\$@ $? + $(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? diff --git a/win/makefile.vc b/win/makefile.vc index c518aaa..b71344f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.107 2003/04/30 09:23:30 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.108 2003/06/16 18:36:45 andreas_kupries Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -110,6 +110,10 @@ the environment. Jump to this line to read the new instructions. # TESTPAT= # Reads the tests requested to be run from this file. # +# CFG_ENCODING=encoding +# name of encoding for configuration information. Defaults +# to cp1252 +# # 5) Examples: # # Basic syntax of calling nmake looks like this: @@ -235,6 +239,7 @@ TCLOBJS = \ $(TMP_DIR)\tclCompCmds.obj \ $(TMP_DIR)\tclCompExpr.obj \ $(TMP_DIR)\tclCompile.obj \ + $(TMP_DIR)\tclConfig.obj \ $(TMP_DIR)\tclDate.obj \ $(TMP_DIR)\tclDictObj.obj \ $(TMP_DIR)\tclEncoding.obj \ @@ -267,6 +272,7 @@ TCLOBJS = \ $(TMP_DIR)\tclPathObj.obj \ $(TMP_DIR)\tclPipe.obj \ $(TMP_DIR)\tclPkg.obj \ + $(TMP_DIR)\tclPkgConfig.obj \ $(TMP_DIR)\tclPosixStr.obj \ $(TMP_DIR)\tclPreserve.obj \ $(TMP_DIR)\tclProc.obj \ @@ -426,6 +432,7 @@ test: setup $(TCLTEST) dlls $(CAT32) !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) !else + @echo Please wait while the tests are collected... $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) > tests.log type tests.log | more !endif @@ -469,8 +476,10 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(link32) $(conlflags) -out:$@ $(TMP_DIR)\stub16.obj $(baselibs) !if $(STATIC_BUILD) +!if !$(TCL_USE_STATIC_PACKAGES) $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj +!endif !else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tcldde -out:$@ \ @@ -480,8 +489,10 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) !endif !if $(STATIC_BUILD) +!if !$(TCL_USE_STATIC_PACKAGES) $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj +!endif !else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tclreg -out:$@ \ @@ -610,6 +621,20 @@ $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c $(TMP_DIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c $(cc32) $(TCL_CFLAGS) -Fo$@ $? +$(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c + $(cc32) -DBUILD_tcl $(TCL_CFLAGS) \ + -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \ + -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \ + -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \ + -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \ + -DCFG_INSTALL_DOCDIR=\"$(DOC_INSTALL_DIR)\" \ + -DCFG_RUNTIME_LIBDIR=\"$(LIB_INSTALL_DIR)\" \ + -DCFG_RUNTIME_BINDIR=\"$(BIN_INSTALL_DIR)\" \ + -DCFG_RUNTIME_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \ + -DCFG_RUNTIME_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \ + -DCFG_RUNTIME_DOCDIR=\"$(DOC_INSTALL_DIR)\" \ + -Fo$@ $? + $(TMP_DIR)\tclAppInit.obj: $(WINDIR)\tclAppInit.c !if $(TCL_USE_STATIC_PACKAGES) $(cc32) $(TCL_CFLAGS) -DTCL_USE_STATIC_PACKAGES -Fo$@ $? @@ -641,7 +666,7 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c ### specific c-runtime. $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c - $(cc32) $(cdebug) $(cflags) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? + $(cc32) $(cflags) $(cdebug) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? #--------------------------------------------------------------------- diff --git a/win/rules.vc b/win/rules.vc index fee4792..068c338 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -10,7 +10,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.12 2003/03/06 03:05:00 davygrvy Exp $ +# RCS: @(#) $Id: rules.vc,v 1.13 2003/06/16 18:36:45 andreas_kupries Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -33,6 +33,9 @@ _INSTALLDIR = $(INSTALLDIR:/=\) MACHINE = IX86 !endif +!ifndef CFG_ENCODING +CFG_ENCODING = \"cp1252\" +!endif #---------------------------------------------------------- # Set the proper copy method to avoid overwrite questions @@ -266,7 +269,8 @@ TCL_COMPILE_DEBUG = 0 # Set our defines now armed with our options. #---------------------------------------------------------- -OPTDEFINES = +OPTDEFINES = -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) + !if $(TCL_MEM_DEBUG) OPTDEFINES = -DTCL_MEM_DEBUG !endif @@ -283,6 +287,18 @@ OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1 OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD !endif +!if $(DEBUG) +OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DEBUG +!elseif $(OPTIMIZING) +OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED +!endif +!if $(PROFILE) +OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED +!endif +!if "$(MACHINE)" == "IA64" +OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT +!endif + #---------------------------------------------------------- # Get common info used when building extensions. diff --git a/win/tcl.m4 b/win/tcl.m4 index 4a2037b..e459fec 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -301,6 +301,13 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" AC_MSG_RESULT([no]) + + # Use result from SC_CONFIG_CFLAGS to determine if + # optimization is truly active. + + if [ $OPTIMIZING -eq 1 ]; then + AC_DEFINE(TCL_CFG_OPTIMIZED) + fi else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' @@ -311,6 +318,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) + AC_DEFINE(TCL_CFG_DEBUG) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG) @@ -600,6 +608,25 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" STLIB_LD="lib -nologo" LINKBIN="link -link50compat" + + # TIP #59 + # A check borrowed from 'rules.vc' to determine if the + # compiler actually supports optimization. If not we do + # not try to use this feature. + + lines=`$(CC) -nologo -Ox -c -Zs -TC -Fdtemp nul 2>&1 | grep "D4002" | wc -l` + + for f in temp.idb temp.pdb ; do + if [ -f $f ]; then + rm -f $f + fi + done + if [ $lines -gt 0 ]; then + OPTIMIZING=1 + else + OPTIMIZING=0 + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + fi fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" @@ -630,6 +657,10 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi + if test "$do64bit" = "yes" ; then + AC_DEFINE(TCL_CFG_DO64BIT) + fi + # DL_LIBS is empty, but then we match the Unix version AC_SUBST(DL_LIBS) AC_SUBST(CFLAGS_DEBUG) @@ -726,3 +757,31 @@ AC_DEFUN(SC_PROG_TCLSH, [ fi AC_SUBST(TCLSH_PROG) ]) + +#-------------------------------------------------------------------- +# SC_TCL_CFG_ENCODING TIP #59 +# +# Declare the encoding to use for embedded configuration information. +# +# Arguments: +# None. +# +# Results: +# Might append to the following vars: +# DEFS (implicit) +# +# Will define the following vars: +# TCL_CFGVAL_ENCODING +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_TCL_CFG_ENCODING, [ + AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval}) + + if test x"${with_tcencoding}" != x ; then + AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}") + else + # Default encoding on windows is not "iso8859-1" + AC_DEFINE(TCL_CFGVAL_ENCODING,"cp1252") + fi +]) -- cgit v0.12