1
0
Fork 0

[meson] Check for setlocale and LC_MESSAGES

This commit is contained in:
Witold Filipczyk 2024-04-19 18:26:07 +02:00
parent be622c69ea
commit 9c464a0348
1 changed files with 10 additions and 0 deletions

View File

@ -1092,6 +1092,10 @@ if compiler.has_function('mkstemps', prefix: '#include <stdlib.h>', args: '-D_GN
conf_data.set('HAVE_MKSTEMPS', 1)
endif
if compiler.has_function('setlocale', prefix: '#include <locale.h>')
conf_data.set('HAVE_SETLOCALE', 1)
endif
if compiler.has_function('strtoul', prefix: '#include <stdlib.h>')
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 <locale.h>
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'