From 17bc58e018d21456aa8dc2d25619ca1fda6848d5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 16 Jun 2023 11:52:10 +0200 Subject: [PATCH] meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h ... which is required for `cal`. Fixes GH-2316 --- meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meson.build b/meson.build index a0c5457c58..37141e7db8 100644 --- a/meson.build +++ b/meson.build @@ -484,6 +484,18 @@ have = cc.compiles(''' name : 'langinfo.h defines _NL_ABALTMON_x constants') conf.set('HAVE_LANGINFO_NL_ABALTMON', have ? 1 : false) +have = cc.compiles(''' + #define _GNU_SOURCE 1 + #include + int main(void) { + char *str; + str = nl_langinfo (_NL_TIME_WEEK_1STDAY); + return 0; + } + ''', + name : 'langinfo.h defines _NL_TIME_WEEK_1STDAY constant') +conf.set('HAVE_DECL__NL_TIME_WEEK_1STDAY', have ? 1 : false) + funcs = ''' clearenv close_range -- 2.47.2