1 # monetary_h.m4 serial 4
2 dnl Copyright (C) 2017-2018 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN_ONCE([gl_MONETARY_H],
9 AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
10 m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
12 AC_CHECK_HEADERS_ONCE([monetary.h])
13 dnl For now, we provide a <monetary.h> wrapper only if
14 dnl - module 'posixcheck' is present, or
15 dnl - C++ GNULIB_NAMESPACE support may be requested, or
16 dnl - the system already has a <monetary.h>.
17 if m4_ifdef([gl_POSIXCHECK], [true], [m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]) || test $ac_cv_header_monetary_h = yes]); then
18 MONETARY_H='monetary.h'
20 gl_CHECK_NEXT_HEADERS([monetary.h])
21 if test $ac_cv_header_monetary_h = yes; then
26 AC_SUBST([HAVE_MONETARY_H])
28 AC_CHECK_HEADERS_ONCE([xlocale.h])
29 if test $ac_cv_header_xlocale_h = yes; then
34 AC_SUBST([HAVE_XLOCALE_H])
36 dnl Check for declarations of anything we want to poison if the
37 dnl corresponding gnulib module is not in use.
38 gl_WARN_ON_USE_PREPARE([[
44 AC_SUBST([MONETARY_H])
45 AM_CONDITIONAL([GL_GENERATE_MONETARY_H], [test -n "$MONETARY_H"])
48 AC_DEFUN([gl_MONETARY_MODULE_INDICATOR],
50 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
51 AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
52 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
55 AC_DEFUN([gl_MONETARY_H_DEFAULTS],
57 GNULIB_STRFMON_L=0; AC_SUBST([GNULIB_STRFMON_L])
58 dnl Assume proper GNU behavior unless another module says otherwise.
59 HAVE_STRFMON_L=1; AC_SUBST([HAVE_STRFMON_L])
60 REPLACE_STRFMON_L=0; AC_SUBST([REPLACE_STRFMON_L])