summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-11-30 00:19:01 (GMT)
committerhobbs <hobbs>2005-11-30 00:19:01 (GMT)
commit0805428fc70c423c555452caba933228486c7c5d (patch)
treee93af74ffc560c427f348a51fef41a992ed9136d
parentc74cc400ab2d9838a5a39b9b39101e005bf97f47 (diff)
downloadtk-0805428fc70c423c555452caba933228486c7c5d.zip
tk-0805428fc70c423c555452caba933228486c7c5d.tar.gz
tk-0805428fc70c423c555452caba933228486c7c5d.tar.bz2
* win/tcl.m4: Add build support for Windows-x64 builds.
* win/configure: --enable-64bit now accepts =amd64|ia64 for * win/Makefile.in: Windows 64-bit build variants (default: amd64) * win/makefile.vc: [Bug 1369597] * win/configure.in: * win/wish.exe.manifest.in (new): manifest must map in MACHINE * win/rc/wish.exe.manifest (removed): and VERSION to be correct.
-rw-r--r--ChangeLog10
-rw-r--r--win/Makefile.in7
-rwxr-xr-xwin/configure100
-rw-r--r--win/configure.in15
-rw-r--r--win/makefile.vc24
-rw-r--r--win/tcl.m453
-rw-r--r--win/wish.exe.manifest.in (renamed from win/rc/wish.exe.manifest)6
7 files changed, 150 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index 26ad083..c70fa9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/tcl.m4: Add build support for Windows-x64 builds.
+ * win/configure: --enable-64bit now accepts =amd64|ia64 for
+ * win/Makefile.in: Windows 64-bit build variants (default: amd64)
+ * win/makefile.vc: [Bug 1369597]
+ * win/configure.in:
+ * win/wish.exe.manifest.in (new): manifest must map in MACHINE
+ * win/rc/wish.exe.manifest (removed): and VERSION to be correct.
+
2005-11-27 Daniel Steffen <das@users.sourceforge.net>
* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
diff --git a/win/Makefile.in b/win/Makefile.in
index fe3ab8e..c346c5a 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.59.2.1 2005/07/25 01:33:54 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.59.2.2 2005/11/30 00:19:01 hobbs Exp $
TCLVERSION = @TCL_VERSION@
VERSION = @TK_VERSION@
@@ -535,7 +535,7 @@ cat32.${OBJEXT}: $(TCL_SRC_DIR)/win/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) $(LIBS) $(LDFLAGS_CONSOLE)
# The following targets are configured by autoconf to generate either
# a shared library or static library
@@ -597,7 +597,8 @@ clean: cleanhelp
$(RM) *.pch *.ilk *.pdb
distclean: clean
- $(RM) Makefile config.status config.cache config.log tkConfig.sh
+ $(RM) Makefile config.status config.cache config.log tkConfig.sh \
+ wish.exe.manifest
Makefile: $(SRC_DIR)/Makefile.in
./config.status
diff --git a/win/configure b/win/configure
index 0813db3..abf25a8 100755
--- a/win/configure
+++ b/win/configure
@@ -16,7 +16,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-shared build and link with shared libraries [--enable-shared]"
ac_help="$ac_help
- --enable-64bit enable 64bit support (where applicable)"
+ --enable-64bit enable 64bit support (where applicable = amd64|ia64)"
ac_help="$ac_help
--enable-symbols build with debugging symbols [--disable-symbols]"
ac_help="$ac_help
@@ -1224,7 +1224,7 @@ echo "configure:1205: checking for Windows native path bug in windres" >&5
echo $ac_n "checking compiler flags""... $ac_c" 1>&6
echo "configure:1226: checking compiler flags" >&5
if test "${GCC}" = "yes" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
fi
SHLIB_LD=""
@@ -1364,34 +1364,49 @@ echo "configure:1226: checking compiler flags" >&5
# 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
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
MSSDK=`echo "$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
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ echo "configure: warning: Could not find 64-bit $MACHINE SDK to enable 64bit mode" 1>&2
+ echo "configure: warning: Ensure latest Platform SDK is installed" 1>&2
do64bit="no"
+ else
+ echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6
fi
fi
- if test "$do64bit" = "yes" ; then
- # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called. TEA has the
- # TEA_PATH_NOSPACE to avoid this issue.
- CC="\"${MSSDK}/Bin/Win64/cl.exe\" \
- -I\"${MSSDK}/Include/prerelease\" \
- -I\"${MSSDK}/Include/Win64/crt\" \
- -I\"${MSSDK}/Include/Win64/crt/sys\" \
- -I\"${MSSDK}/Include\""
+ # not work if AC_TRY_COMPILE is called.
+ CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
+ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
RC="\"${MSSDK}/bin/rc.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-MACHINE:IA64 -LIBPATH:\"${MSSDK}/Lib/IA64\" \
- -LIBPATH:\"${MSSDK}/Lib/Prerelease/IA64\" -nologo"
- LINKBIN="\"${MSSDK}/bin/win64/link.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ # Avoid 'unresolved external symbol __security_cookie' errors.
+ # c.f. http://support.microsoft.com/?id=894573
+ LIBS="user32.lib advapi32.lib bufferoverflowU.lib"
else
RC="rc"
# -Od - no optimization
@@ -1401,9 +1416,9 @@ echo "configure:1226: checking compiler flags" >&5
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="-nologo"
LINKBIN="link"
+ LIBS="user32.lib advapi32.lib"
fi
- LIBS="user32.lib advapi32.lib"
LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
# link -lib only works when -lib is the first arg
@@ -1445,7 +1460,7 @@ echo "configure:1226: checking compiler flags" >&5
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1449: checking how to run the C preprocessor" >&5
+echo "configure:1464: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1460,13 +1475,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 1464 "configure"
+#line 1479 "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:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1485: \"$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
:
@@ -1477,13 +1492,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1481 "configure"
+#line 1496 "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:1487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1502: \"$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
:
@@ -1494,13 +1509,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1498 "configure"
+#line 1513 "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:1504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1519: \"$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
:
@@ -1526,17 +1541,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:1530: checking for errno.h" >&5
+echo "configure:1545: 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 1535 "configure"
+#line 1550 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1555: \"$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*
@@ -1568,7 +1583,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1572: checking for build with symbols" >&5
+echo "configure:1587: 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"
@@ -1629,7 +1644,7 @@ TK_DBGX=${DBGX}
echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1633: checking the location of tclConfig.sh" >&5
+echo "configure:1648: 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
@@ -1657,7 +1672,7 @@ fi
echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1661: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+echo "configure:1676: 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
@@ -1710,14 +1725,14 @@ echo "configure:1661: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6
-echo "configure:1714: checking for tclsh in Tcl build directory" >&5
+echo "configure:1729: checking for tclsh in Tcl build directory" >&5
BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
echo "$ac_t""$BUILD_TCLSH" 1>&6
echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:1721: checking for tclsh" >&5
+echo "configure:1736: checking for tclsh" >&5
if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1814,6 +1829,17 @@ else
TK_RES='tk.$(RES)'
fi
+# The wish.exe.manifest requires these
+# TK_WIN_VERSION is the 4 dotted pair Windows version format
+case "$TK_PATCH_LEVEL" in
+ a*) TK_WIN_VERSION="$TK_VERSION.0.`echo $TK_PATCH_LEVEL | tr -d a`" ;;
+ b*) TK_WIN_VERSION="$TK_VERSION.1.`echo $TK_PATCH_LEVEL | tr -d b`" ;;
+ .*) TK_WIN_VERSION="$TK_VERSION.2$TK_PATCH_LEVEL" ;;
+esac
+
+# X86|AMD64|IA64 for manifest
+
+
@@ -2005,7 +2031,7 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "Makefile tkConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile tkConfig.sh wish.exe.manifest" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2066,6 +2092,8 @@ s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
s%@TCL_DEFS@%$TCL_DEFS%g
s%@BUILD_TCLSH@%$BUILD_TCLSH%g
s%@TCLSH_PROG@%$TCLSH_PROG%g
+s%@TK_WIN_VERSION@%$TK_WIN_VERSION%g
+s%@MACHINE@%$MACHINE%g
s%@TK_VERSION@%$TK_VERSION%g
s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
@@ -2167,7 +2195,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile tkConfig.sh"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile tkConfig.sh wish.exe.manifest"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/win/configure.in b/win/configure.in
index 8dab534..d70066d 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,7 +3,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.49.2.16 2005/11/16 22:07:39 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.49.2.17 2005/11/30 00:19:01 hobbs Exp $
AC_INIT(../generic/tk.h)
AC_PREREQ(2.13)
@@ -196,6 +196,17 @@ else
TK_RES='tk.$(RES)'
fi
+# The wish.exe.manifest requires these
+# TK_WIN_VERSION is the 4 dotted pair Windows version format
+case "$TK_PATCH_LEVEL" in
+ a*) TK_WIN_VERSION="$TK_VERSION.0.`echo $TK_PATCH_LEVEL | tr -d a`" ;;
+ b*) TK_WIN_VERSION="$TK_VERSION.1.`echo $TK_PATCH_LEVEL | tr -d b`" ;;
+ .*) TK_WIN_VERSION="$TK_VERSION.2$TK_PATCH_LEVEL" ;;
+esac
+AC_SUBST(TK_WIN_VERSION)
+# X86|AMD64|IA64 for manifest
+AC_SUBST(MACHINE)
+
AC_SUBST(TK_VERSION)
AC_SUBST(TK_MAJOR_VERSION)
AC_SUBST(TK_MINOR_VERSION)
@@ -275,4 +286,4 @@ AC_SUBST(TK_BUILD_STUB_LIB_PATH)
AC_SUBST(TK_CC_SEARCH_FLAGS)
AC_SUBST(TK_LD_SEARCH_FLAGS)
-AC_OUTPUT(Makefile tkConfig.sh)
+AC_OUTPUT([Makefile tkConfig.sh wish.exe.manifest])
diff --git a/win/makefile.vc b/win/makefile.vc
index b8d6c91..cfb133a 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.67.2.9 2005/03/08 21:54:01 hobbs Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.67.2.10 2005/11/30 00:19:01 hobbs Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -440,6 +440,11 @@ conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows
baselibs = kernel32.lib advapi32.lib user32.lib
+# Avoid 'unresolved external symbol __security_cookie' errors.
+# c.f. http://support.microsoft.com/?id=894573
+!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
+baselibs = $(baselibs) bufferoverflowU.lib
+!endif
guilibs = $(baselibs) shell32.lib gdi32.lib comdlg32.lib winspool.lib imm32.lib comctl32.lib
@@ -723,6 +728,21 @@ $(TMP_DIR)\tkStubImg.obj : $(GENERICDIR)\tkStubImg.c
# Dedependency rules
#---------------------------------------------------------------------
+$(TMP_DIR)\wish.exe.manifest: $(WINDIR)\wish.exe.manifest.in
+ $(TCLSH) <<
+puts "Creating wish.exe.manifest ..."
+set f [open "$(WINDIR:\=/)/wish.exe.manifest.in" r]
+set data [read $$f]
+close $$f
+set f [open "$(TMPDIR:\=/)/wish.exe.manifest" w]
+set mach "$(MACHINE)"
+if {[regexp -nocase {^(|IX86)$$} $$mach]} { set mach "X86" }
+# Exact version is not critical in the manifest
+set winver "$(DOTVERSION).0.0"
+puts $$f -nonewline [string map [list @MACHINE@ $$mach @TK_WIN_VERSION@ $$winver] $$data]
+close $$f
+<<
+
$(TMP_DIR)\tk.res: \
$(RCDIR)\buttons.bmp \
$(RCDIR)\cursor*.cur \
@@ -794,7 +814,7 @@ $<
$<
<<
-{$(RCDIR)}.rc{$(TMP_DIR)}.res:
+{$(RCDIR)}.rc{$(TMP_DIR)}.res: $(TMP_DIR)\wish.exe.manifest
$(rc32) -fo $@ -r -i "$(GENERICDIR)" $(TCL_INCLUDES) \
!if $(DEBUG)
-d DEBUG \
diff --git a/win/tcl.m4 b/win/tcl.m4
index 540fcc1..680c999 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -382,7 +382,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Step 0: Enable 64 bit support?
AC_MSG_CHECKING([if 64bit support is requested])
- AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
+ AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable = amd64|ia64)], [do64bit=$enableval], [do64bit=no])
AC_MSG_RESULT($do64bit)
# Set some defaults (may get changed below)
@@ -427,7 +427,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_MSG_CHECKING([compiler flags])
if test "${GCC}" = "yes" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
AC_MSG_WARN("64bit mode not supported with GCC on Windows")
fi
SHLIB_LD=""
@@ -567,34 +567,49 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# 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
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
MSSDK=`echo "$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")
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+ AC_MSG_WARN([Ensure latest Platform SDK is installed])
do64bit="no"
+ else
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
fi
fi
- if test "$do64bit" = "yes" ; then
- # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called. TEA has the
- # TEA_PATH_NOSPACE to avoid this issue.
- CC="\"${MSSDK}/Bin/Win64/cl.exe\" \
- -I\"${MSSDK}/Include/prerelease\" \
- -I\"${MSSDK}/Include/Win64/crt\" \
- -I\"${MSSDK}/Include/Win64/crt/sys\" \
- -I\"${MSSDK}/Include\""
+ # not work if AC_TRY_COMPILE is called.
+ CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
+ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
RC="\"${MSSDK}/bin/rc.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-MACHINE:IA64 -LIBPATH:\"${MSSDK}/Lib/IA64\" \
- -LIBPATH:\"${MSSDK}/Lib/Prerelease/IA64\" -nologo"
- LINKBIN="\"${MSSDK}/bin/win64/link.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ # Avoid 'unresolved external symbol __security_cookie' errors.
+ # c.f. http://support.microsoft.com/?id=894573
+ LIBS="user32.lib advapi32.lib bufferoverflowU.lib"
else
RC="rc"
# -Od - no optimization
@@ -604,9 +619,9 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="-nologo"
LINKBIN="link"
+ LIBS="user32.lib advapi32.lib"
fi
- LIBS="user32.lib advapi32.lib"
LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
# link -lib only works when -lib is the first arg
diff --git a/win/rc/wish.exe.manifest b/win/wish.exe.manifest.in
index 424000f..236768e 100644
--- a/win/rc/wish.exe.manifest
+++ b/win/wish.exe.manifest.in
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
- version="8.4.0.4"
- processorArchitecture="X86"
+ version="@TK_WIN_VERSION@"
+ processorArchitecture="@MACHINE@"
name="Tcl.Tk.wish"
type="win32"
/>
@@ -13,7 +13,7 @@
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
- processorArchitecture="X86"
+ processorArchitecture="@MACHINE@"
publicKeyToken="6595b64144ccf1df"
language="*"
/>