diff options
author | andreas_kupries <akupries@shaw.ca> | 2003-06-16 18:36:44 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2003-06-16 18:36:44 (GMT) |
commit | 1268ac3113dd4f5b5627c98afd15addcf608875a (patch) | |
tree | 2accbcfce059c2893b4f3a4073f383fe5a0487bf /win/tcl.m4 | |
parent | 474a30aa667f24a8686adf6e4054789d5f199484 (diff) | |
download | tcl-1268ac3113dd4f5b5627c98afd15addcf608875a.zip tcl-1268ac3113dd4f5b5627c98afd15addcf608875a.tar.gz tcl-1268ac3113dd4f5b5627c98afd15addcf608875a.tar.bz2 |
* 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:
Diffstat (limited to 'win/tcl.m4')
-rw-r--r-- | win/tcl.m4 | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -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 +]) |