summaryrefslogtreecommitdiffstats
path: root/win/tcl.m4
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-11-17 21:06:44 (GMT)
committernijtmans <nijtmans>2010-11-17 21:06:44 (GMT)
commit66874c3272b1f3fb2e69b0f83937da390ea963ff (patch)
treecc9ca0cffc4ff1c8ffab382d855ab705e0015948 /win/tcl.m4
parent6662869a0b47d18184a6f1a08a674ca20e663c13 (diff)
downloadtcl-66874c3272b1f3fb2e69b0f83937da390ea963ff.zip
tcl-66874c3272b1f3fb2e69b0f83937da390ea963ff.tar.gz
tcl-66874c3272b1f3fb2e69b0f83937da390ea963ff.tar.bz2
[FRQ 491789]: "setargv() doesn't support a unicode cmdline" now implemented for mingw-w64
Diffstat (limited to 'win/tcl.m4')
-rw-r--r--win/tcl.m420
1 files changed, 19 insertions, 1 deletions
diff --git a/win/tcl.m4 b/win/tcl.m4
index ff61263..88ec090 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -477,7 +477,7 @@ file for information about building with Mingw.])
MAKE_EXE="\${CC} -o \[$]@"
LIBPREFIX="lib"
- extra_cflags="-pipe -DTCL_BROKEN_MAINARGS"
+ extra_cflags="-pipe"
extra_ldflags="-pipe"
if test "$ac_cv_cygwin" = "yes"; then
@@ -495,6 +495,24 @@ file for information about building with Mingw.])
rm -f ac$$.o ac$$.c
fi
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
+ AC_CACHE_CHECK(for working -municode linker flag,
+ ac_cv_municode,
+ AC_TRY_LINK([
+ #include <windows.h>
+ int APIENTRY wWinMain(HINSTANCE a, HINSTANCE b, LPWSTR c, int d) {return 0;}
+ ],
+ [],
+ ac_cv_municode=yes,
+ ac_cv_municode=no)
+ )
+ CFLAGS=$hold_cflags
+ if test "$ac_cv_municode" = "yes" ; then
+ extra_ldflags="$extra_ldflags -municode"
+ else
+ extra_cflags="$extra_cflags -DTCL_BROKEN_MAINARGS"
+ fi
+
if test "${SHARED_BUILD}" = "0" ; then
# static
AC_MSG_RESULT([using static flags])