Mercurial > jwe > octave
diff configure.ac @ 29545:b6f80b1d448f
Windows: Support non-ASCII characters in command line arguments.
* configure.ac: Define macros necessary for Unicode support on Windows. Add
linker flags for Unicode executables with mingw.
* src/main-cli.cc, src/main-gui.cc, src/main.in.cc, src/mkoctfile.in.cc,
src/octave-config.in.cc, src/octave-svgconvert.cc: Optionally use "wmain"
instead of "main" as primary entry function.
* src/mkoctfile.in.cc (main, wmain): Use Unicode API to open pipe on Windows if
possible.
* src/module.mk: Use flags for linking with Unicode "wmain" function.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 17 Apr 2021 12:21:48 +0200 |
parents | 2a4980872234 |
children | 0f57f0f47216 |
line wrap: on
line diff
--- a/configure.ac Sat Apr 17 12:21:35 2021 +0200 +++ b/configure.ac Sat Apr 17 12:21:48 2021 +0200 @@ -1251,6 +1251,23 @@ AC_MSG_ERROR([MATH DEFINES in math.h such as M_PI are required to build Octave]) fi +## Use Unicode aware functions on Windows +case $host_os in + msdosmsvc | mingw*) + AC_DEFINE(_UNICODE, 1, [Use Unicode CRT functions on Windows by default.]) + AC_DEFINE(UNICODE, 1, [Use Windows Unicode API by default.]) + ;; +esac + +OCTAVE_UNICODE_EXE_LDFLAGS="" +case $host_os in + mingw*) + OCTAVE_UNICODE_EXE_LDFLAGS="-municode" + ;; +esac + +AC_SUBST(OCTAVE_UNICODE_EXE_LDFLAGS) + ## Windows-specific use of functions case $host_os in msdosmsvc | mingw*)