diff options
Diffstat (limited to 'win/tcl.m4')
-rw-r--r-- | win/tcl.m4 | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -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]) |