WRaster: Add initialisation for locale support
commit70f89fd9c5deb8df0968f8a64faa4791f20479c9
authorChristophe CURIS <christophe.curis@free.fr>
Mon, 17 May 2021 14:32:13 +0000 (17 16:32 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 18 May 2021 16:49:17 +0000 (18 17:49 +0100)
tree9b220dad4937dfe01a32f96484b4e467d7c5881d
parent19202fd2db33f5646944dcd03883d91a1f98442c
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>
configure.ac
m4/wm_library_constructors.m4 [new file with mode: 0644]
wrlib/misc.c