1 # monetary_h.m4 serial 1
2 dnl Copyright (C) 2017 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([gl_MONETARY_H],
9 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
10 dnl once only, before all statements that occur in other macros.
11 AC_REQUIRE([gl_MONETARY_H_BODY])
14 AC_DEFUN([gl_MONETARY_H_BODY],
16 AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
18 AC_CHECK_HEADERS_ONCE([monetary.h])
19 dnl For now, we provide a <monetary.h> wrapper only if the system already
20 dnl has a <monetary.h>.
21 if test $ac_cv_header_monetary_h = yes; then
22 MONETARY_H='monetary.h'
24 gl_CHECK_NEXT_HEADERS([monetary.h])
25 if test $ac_cv_header_monetary_h = yes; then
30 AC_SUBST([HAVE_MONETARY_H])
32 AC_CHECK_HEADERS_ONCE([xlocale.h])
33 if test $ac_cv_header_xlocale_h = yes; then
38 AC_SUBST([HAVE_XLOCALE_H])
40 dnl Check for declarations of anything we want to poison if the
41 dnl corresponding gnulib module is not in use.
42 gl_WARN_ON_USE_PREPARE([[
48 AC_SUBST([MONETARY_H])
49 AM_CONDITIONAL([GL_GENERATE_MONETARY_H], [test -n "$MONETARY_H"])
52 AC_DEFUN([gl_MONETARY_MODULE_INDICATOR],
54 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
55 AC_REQUIRE([gl_MONETARY_H_DEFAULTS])
56 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
59 AC_DEFUN([gl_MONETARY_H_DEFAULTS],
61 GNULIB_STRFMON_L=0; AC_SUBST([GNULIB_STRFMON_L])
62 dnl Assume proper GNU behavior unless another module says otherwise.
63 HAVE_STRFMON_L=1; AC_SUBST([HAVE_STRFMON_L])
64 REPLACE_STRFMON_L=0; AC_SUBST([REPLACE_STRFMON_L])