diff options
Diffstat (limited to 'win')
-rwxr-xr-x | win/configure | 111 | ||||
-rw-r--r-- | win/makefile.vc | 16 | ||||
-rw-r--r-- | win/tcl.m4 | 79 |
3 files changed, 130 insertions, 76 deletions
diff --git a/win/configure b/win/configure index aea3a16..ae25dfa 100755 --- a/win/configure +++ b/win/configure @@ -1132,14 +1132,13 @@ fi echo "$ac_t""$do64bit" 1>&6 - # Set some defaults (may get changed below) EXTRA_CFLAGS="" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1143: checking for $ac_word" >&5 +echo "configure:1142: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1176,7 +1175,7 @@ fi # set various compiler flags depending on whether we are using gcc or cl echo $ac_n "checking compiler flags""... $ac_c" 1>&6 -echo "configure:1180: checking compiler flags" >&5 +echo "configure:1179: checking compiler flags" >&5 if test "${GCC}" = "yes" ; then if test "$do64bit" = "yes" ; then echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2 @@ -1263,22 +1262,6 @@ echo "configure:1180: checking compiler flags" >&5 LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" else - SHLIB_LD="link -dll -nologo -incremental:no" - SHLIB_LD_LIBS="user32.lib advapi32.lib" - LIBS="user32.lib advapi32.lib" - LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib" - STLIB_LD="lib -nologo" - RC="rc" - RC_OUT=-fo - RC_TYPE=-r - RC_INCLUDE=-i - RC_DEFINE=-d - RES=res - MAKE_LIB="\${STLIB_LD} -out:\$@" - POST_MAKE_LIB= - MAKE_EXE="\${CC} -Fe\$@" - LIBPREFIX="" - if test "${SHARED_BUILD}" = "0" ; then # static echo "$ac_t""using static flags" 1>&6 @@ -1301,10 +1284,58 @@ echo "configure:1180: checking compiler flags" >&5 # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + # This is a 2-stage check to make sure we have the 64-bit SDK + # We have to know where the SDK is installed. + if test "$do64bit" = "yes" ; then + if test "x${MSSDK}x" = "xx" ; then + MSSDK="C:/Progra~1/Microsoft SDK" + fi + # In order to work in the tortured autoconf environment, + # we need to ensure that this path has no spaces + MSSDK=$(cygpath -w -s "$MSSDK" | sed -e 's!\\!/!g') + if test ! -d "${MSSDK}/bin/win64" ; then + echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2 + do64bit="no" + fi + fi + + if test "$do64bit" = "yes" ; then + # All this magic is necessary for the Win64 SDK RC1 - hobbs + CC="${MSSDK}/Bin/Win64/cl.exe \ + -I${MSSDK}/Include/prerelease \ + -I${MSSDK}/Include/Win64/crt \ + -I${MSSDK}/Include/Win64/crt/sys \ + -I${MSSDK}/Include" + RC="${MSSDK}/bin/rc.exe" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -Gs ${runtime}" + lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \ + -LIBPATH:${MSSDK}/Lib/Prerelease/IA64" + STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}" + LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" + else + RC="rc" + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + STLIB_LD="lib -nologo" + LINKBIN="link -link50compat" + fi + + SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" + SHLIB_LD_LIBS="user32.lib advapi32.lib" + LIBS="user32.lib advapi32.lib" + LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib" + RC_OUT=-fo + RC_TYPE=-r + RC_INCLUDE=-i + RC_DEFINE=-d + RES=res + MAKE_LIB="\${STLIB_LD} -out:\$@" + POST_MAKE_LIB= + MAKE_EXE="\${CC} -Fe\$@" + LIBPREFIX="" + 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" @@ -1315,12 +1346,8 @@ echo "configure:1180: checking compiler flags" >&5 # Specify linker flags depending on the type of app being # built -- Console vs. Window. - LDFLAGS_CONSOLE="-link -subsystem:console" - LDFLAGS_WINDOW="-link -subsystem:windows" - - if test "$do64bit" = "yes" ; then - EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_TCLALLOC=0" - fi + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi @@ -1329,7 +1356,7 @@ echo "configure:1180: checking compiler flags" >&5 #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1333: checking how to run the C preprocessor" >&5 +echo "configure:1360: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1344,13 +1371,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1348 "configure" +#line 1375 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1361,13 +1388,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1365 "configure" +#line 1392 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1378,13 +1405,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1382 "configure" +#line 1409 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1410,17 +1437,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:1414: checking for errno.h" >&5 +echo "configure:1441: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1419 "configure" +#line 1446 "configure" #include "confdefs.h" #include <errno.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1452,7 +1479,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1456: checking for build with symbols" >&5 +echo "configure:1483: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1483,7 +1510,7 @@ TK_DBGX=${DBGX} echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1487: checking the location of tclConfig.sh" >&5 +echo "configure:1514: checking the location of tclConfig.sh" >&5 if test -d ../../tcl8.4$TK_PATCH_LEVEL/win; then TCL_BIN_DIR_DEFAULT=../../tcl8.4$TK_PATCH_LEVEL/win @@ -1509,7 +1536,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1513: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1540: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1531,7 +1558,7 @@ echo "configure:1513: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:1535: checking for tclsh" >&5 +echo "configure:1562: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/win/makefile.vc b/win/makefile.vc index 2c4ebd6..48fc1e0 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -5,8 +5,9 @@ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Ajuba Solutions. +# Copyright (c) 2001 ActiveState Corporation. # -# RCS: @(#) $Id: makefile.vc,v 1.40 2001/03/30 23:50:17 hobbs Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.41 2001/10/01 21:04:37 hobbs Exp $ # Does not depend on the presence of any environment variables in # order to compile tcl; all needed information is derived from @@ -38,10 +39,10 @@ MACHINE = IX86 !IF "$(MACHINE)" == "IA64" # IA64 support is based on the standard setup with v2 of the -# Microsoft Platform SDK for Whistler, build 2267 +# Microsoft SDK for XP, RC1 -TOOLS32 = C:\Progra~1\Microsoft Platform SDK -TOOLS32_rc = C:\Progra~1\Microsoft Platform SDK +TOOLS32 = C:\Progra~1\Microsoft SDK +TOOLS32_rc = C:\Progra~1\Microsoft SDK cc32 = "$(TOOLS32)\bin\Win64\cl.exe" link32 = "$(TOOLS32)\bin\Win64\link.exe" @@ -255,16 +256,15 @@ RCDIR = $(WINDIR)\rc TK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \ -I$(TCLDIR)\generic -TK_DEFINES = -D__WIN32__ $(DEBUGDEFINES) $(THREADDEFINES) +TK_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) ###################################################################### # Compile flags ###################################################################### !IF "$(NODEBUG)" == "1" -!IF "$(MACHINE)" == "ALPHA" -# MSVC on Alpha doesn't understand -Ot -cdebug = -O2i -Gs -GD +!IF "$(MACHINE)" == "IA64" +cdebug = -O2i -Gs !ELSE # NOTE: Due to a bug in MSVC, we cannot use -O2 here or Tk starts to misbehave. cdebug = -Oti -Gs -GD @@ -326,7 +326,6 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT($do64bit) - # Set some defaults (may get changed below) EXTRA_CFLAGS="" @@ -427,22 +426,6 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" else - SHLIB_LD="link -dll -nologo -incremental:no" - SHLIB_LD_LIBS="user32.lib advapi32.lib" - LIBS="user32.lib advapi32.lib" - LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib" - STLIB_LD="lib -nologo" - RC="rc" - RC_OUT=-fo - RC_TYPE=-r - RC_INCLUDE=-i - RC_DEFINE=-d - RES=res - MAKE_LIB="\${STLIB_LD} -out:\[$]@" - POST_MAKE_LIB= - MAKE_EXE="\${CC} -Fe\[$]@" - LIBPREFIX="" - if test "${SHARED_BUILD}" = "0" ; then # static AC_MSG_RESULT([using static flags]) @@ -465,10 +448,58 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + # This is a 2-stage check to make sure we have the 64-bit SDK + # We have to know where the SDK is installed. + if test "$do64bit" = "yes" ; then + if test "x${MSSDK}x" = "xx" ; then + MSSDK="C:/Progra~1/Microsoft SDK" + fi + # In order to work in the tortured autoconf environment, + # we need to ensure that this path has no spaces + MSSDK=$(cygpath -w -s "$MSSDK" | sed -e 's!\\!/!g') + if test ! -d "${MSSDK}/bin/win64" ; then + AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode") + do64bit="no" + fi + fi + + if test "$do64bit" = "yes" ; then + # All this magic is necessary for the Win64 SDK RC1 - hobbs + CC="${MSSDK}/Bin/Win64/cl.exe \ + -I${MSSDK}/Include/prerelease \ + -I${MSSDK}/Include/Win64/crt \ + -I${MSSDK}/Include/Win64/crt/sys \ + -I${MSSDK}/Include" + RC="${MSSDK}/bin/rc.exe" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -Gs ${runtime}" + lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \ + -LIBPATH:${MSSDK}/Lib/Prerelease/IA64" + STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}" + LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" + else + RC="rc" + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + STLIB_LD="lib -nologo" + LINKBIN="link -link50compat" + fi + + SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" + SHLIB_LD_LIBS="user32.lib advapi32.lib" + LIBS="user32.lib advapi32.lib" + LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib" + RC_OUT=-fo + RC_TYPE=-r + RC_INCLUDE=-i + RC_DEFINE=-d + RES=res + MAKE_LIB="\${STLIB_LD} -out:\[$]@" + POST_MAKE_LIB= + MAKE_EXE="\${CC} -Fe\[$]@" + LIBPREFIX="" + 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" @@ -479,12 +510,8 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # Specify linker flags depending on the type of app being # built -- Console vs. Window. - LDFLAGS_CONSOLE="-link -subsystem:console" - LDFLAGS_WINDOW="-link -subsystem:windows" - - if test "$do64bit" = "yes" ; then - EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_TCLALLOC=0" - fi + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi ]) |