Meson: Fix intl support when included in libc

This commit is contained in:
Alastair Poole 2020-05-03 15:57:47 +01:00
parent bda2a51124
commit e4a940d898
1 changed files with 12 additions and 0 deletions

View File

@ -33,6 +33,18 @@ intl_lib = cc.find_library('intl', required: false)
if intl_lib.found()
translate_enabled = true
deps_nls = [intl_lib]
else
gettext_code = '''
#include <libintl.h>
int main(int argc, char *argv[]) {
(void)ngettext("", "", 0);
return 0;
}
'''
if cc.links(gettext_code)
translate_enabled = true
message('Intl Support Enabled')
endif
endif
##### config.h