view m4/localename.m4 @ 39257:e942d3d6f756

localename: Add support for musl libc. * m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>. * lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME on Linux platforms which define NL_LOCALE_NAME.
author Bruno Haible <bruno@clisp.org>
date Sat, 24 Feb 2018 12:59:59 +0100
parents 24e347e0e326
children a0d115233cd6
line wrap: on
line source

# localename.m4 serial 3
dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_LOCALENAME],
[
  AC_REQUIRE([gt_LC_MESSAGES])
  AC_REQUIRE([gt_INTL_MACOSX])
  AC_CHECK_HEADERS_ONCE([langinfo.h])
  AC_CHECK_FUNCS([setlocale uselocale])
  dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
  dnl it nor the equivalent.
  if test $ac_cv_func_uselocale = yes; then
    AC_CHECK_FUNCS([getlocalename_l])
  fi
])