From: Rosen Penev Date: Fri, 9 Sep 2022 02:03:49 +0000 (-0700) Subject: meson: enable nls support X-Git-Tag: v2.39-rc1~529^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc63a3d06478bacb8a5d22310053ce7fd3084cec;p=thirdparty%2Futil-linux.git meson: enable nls support This was not implemented in meson, probably because it's a mess to do before version 0.59.0. Speaking of which, restrict it to that. Signed-off-by: Rosen Penev --- diff --git a/meson.build b/meson.build index ee7619658f..2447b631da 100644 --- a/meson.build +++ b/meson.build @@ -272,6 +272,18 @@ lib_readline_static = dependency( static : true, required : need_static_libs ? get_option('readline') : disabler()) +if meson.version().version_compare('>= 0.59.0') + lib_intl = dependency( + 'intl', + required : get_option('nls')) + conf.set('ENABLE_NLS', lib_intl.found() ? 1 : false) +else + if get_option('nls').enabled() + error('nls is not supported with meson before 0.59.0') + endif + lib_intl = dependency('', required : false) +endif + lib_user = dependency( 'libuser', version : '>= 0.58', diff --git a/meson_options.txt b/meson_options.txt index 5272cb317c..07abf315bf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,6 +9,7 @@ option('cryptsetup', type : 'feature') option('cryptsetup-dlopen', type : 'feature') option('zlib', type : 'feature') option('readline', type : 'feature') +option('nls', type : 'feature') option('libutil', type : 'feature') option('libutempter', type : 'feature') option('libpcre2-posix', type : 'feature')