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)
commit653c10ee03ae1c5d17bcb243c176d2dbe4cfbe37 (patch)
treecc9ca0cffc4ff1c8ffab382d855ab705e0015948 /win/tcl.m4
parentac551825f2874d6fbe0d449ac4d9c08da5e75b42 (diff)
downloadtcl-653c10ee03ae1c5d17bcb243c176d2dbe4cfbe37.zip
tcl-653c10ee03ae1c5d17bcb243c176d2dbe4cfbe37.tar.gz
tcl-653c10ee03ae1c5d17bcb243c176d2dbe4cfbe37.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])