https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114101
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- This two depend on _GLIBCXX_USE_NL_LANGINFO_L which is set by: AC_TRY_COMPILE([ #include <locale.h> #if __has_include(<xlocale.h>) # include <xlocale.h> #endif #include <langinfo.h> ],[ locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0); const char* enc = nl_langinfo_l(CODESET, loc); freelocale(loc); ], [ac_nl_langinfo_l=yes], [ac_nl_langinfo_l=no])