1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-19 16:25:50 +01:00

WRaster: Add initialisation for locale support

Because the library does not have an initialisation function, we need to
rely on an automatic called-on-load mechanism, which is provided through
a compiler attribute 'constructor'.

However, as the project aims to still compile on old hard/software, we
include a check in 'configure' to ensure it works, and if not use the
legacy solution.

Note: Because we introduce a new DEFINE, the 'config.h.in' needs to be
regenerated, otherwise you may get a compilation error in wrlib. This is
done by re-running './autogen.sh'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-05-17 16:32:13 +02:00
committed by Carlos R. Mafra
parent 19202fd2db
commit 70f89fd9c5
3 changed files with 98 additions and 0 deletions

View File

@@ -455,6 +455,7 @@ dnl that the gettext environment works
WM_I18N_LANGUAGES
WM_I18N_XGETTEXT
WM_I18N_MENUTEXTDOMAIN
WM_LIBRARY_CONSTRUCTORS
dnl ===========================================
dnl Stuff that uses X
@@ -978,6 +979,15 @@ AS_IF([test "x$enable_jpeg" = xno], [dnl
AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])dnl
])
AS_IF([test "x$LINGUAS" != "x"],
[AS_IF([test "X$wm_cv_library_constructors" = "Xlegacy"],
[AC_MSG_WARN([I18N is enabled, but library constructor attribute is not supported])
AS_ECHO([" If you have translation problems in lib WRaster, yet you know that the translation"])
AS_ECHO([" file (po) is valid, this could be a cause."])
AS_ECHO([])dnl
])dnl
])
dnl This is for Emacs. I'm lazy, I know... (nicolai)
dnl ================================================