+ AC_SUBST([HAVE_XLOCALE_H])
+
+ dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([locale.h])
+
+ if test -n "$STDDEF_H" \
+ || test $gl_cv_header_locale_h_posix2001 = no \
+ || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
+ gl_REPLACE_LOCALE_H
+ fi
+])
+
+dnl Unconditionally enables the replacement of <locale.h>.
+AC_DEFUN([gl_REPLACE_LOCALE_H],
+[
+ dnl This is a no-op, because <locale.h> is always overridden.
+ :
+])
+
+AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_LOCALE_H_DEFAULTS],
+[
+ GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])