From 169b3be0eefa9ffe5f63a0a3738e3b9e71831a05 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Jan 2014 21:58:51 +0000 Subject: [PATCH] Define wxUSE_UNICODE on compiler command line in Unix builds too. Under Windows we already define _UNICODE which gets picked up and translated to wxUSE_UNICODE by wx/platform.h, but under Unix we didn't do it until now. Do it both for consistency and to fix the build breakage since r75520 which moved the tests for wxUSE_UNICODE being defined before wx/setup.h. This seems like the simplest solution because otherwise there doesn't seem to be any single header order which would work under both Windows and Unix: under Windows we need to include wx/compiler.h, and hence _mingw.h included from it, before wx/setup.h, which implies that wxUSE_UNICODE must be set before doing it, but under Unix wxUSE_UNICODE was only defined in wx/setup.h and so couldn't be tested before including wx/compiler.h. And just the explanation above should convincingly show that defining wxUSE_UNICODE in CPPFLAGS makes things simpler. Closes #15805. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 2 ++ configure.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure b/configure index dde0fd5efe..727221afdb 100755 --- a/configure +++ b/configure @@ -35598,6 +35598,8 @@ if test "$wxUSE_FONTMAP" = "yes" ; then fi if test "$wxUSE_UNICODE" = "yes" ; then + CPPFLAGS="-DwxUSE_UNICODE=1 $CPPFLAGS" + $as_echo "#define wxUSE_UNICODE 1" >>confdefs.h diff --git a/configure.in b/configure.in index 7ecb037249..b2e72c17be 100644 --- a/configure.in +++ b/configure.in @@ -6397,6 +6397,8 @@ if test "$wxUSE_FONTMAP" = "yes" ; then fi if test "$wxUSE_UNICODE" = "yes" ; then + CPPFLAGS="-DwxUSE_UNICODE=1 $CPPFLAGS" + AC_DEFINE(wxUSE_UNICODE) if test "$USE_WIN32" != 1; then