From 9c464a03487feb8089a95519c4ddf983bca21f83 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 19 Apr 2024 18:26:07 +0200 Subject: [PATCH] [meson] Check for setlocale and LC_MESSAGES --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meson.build b/meson.build index 6556dc17..e42727e1 100644 --- a/meson.build +++ b/meson.build @@ -1092,6 +1092,10 @@ if compiler.has_function('mkstemps', prefix: '#include ', args: '-D_GN conf_data.set('HAVE_MKSTEMPS', 1) endif +if compiler.has_function('setlocale', prefix: '#include ') + conf_data.set('HAVE_SETLOCALE', 1) +endif + if compiler.has_function('strtoul', prefix: '#include ') conf_data.set('HAVE_STRTOUL', 1) endif @@ -1106,6 +1110,12 @@ int func(void) { return sysconf(_SC_PAGE_SIZE); } conf_data.set('HAVE_SC_PAGE_SIZE', 1) endif +if compiler.compiles('''#include +int func(void) { return LC_MESSAGES; } +''', name: 'LC_MESSAGES') + conf_data.set('HAVE_LC_MESSAGES', 1) +endif + conf_data.set('ICONV_CONST', true) sysconfdir = get_option('prefix') / get_option('sysconfdir')/'elinks'