tests: fix 'invalid path dir' error
[gnulib.git] / m4 / monetary_h.m4
blob3ef6a0b004c00a841597502743dd8a0438d04278
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
26       HAVE_MONETARY_H=1
27     else
28       HAVE_MONETARY_H=0
29     fi
30     AC_SUBST([HAVE_MONETARY_H])
32     AC_CHECK_HEADERS_ONCE([xlocale.h])
33     if test $ac_cv_header_xlocale_h = yes; then
34       HAVE_XLOCALE_H=1
35     else
36       HAVE_XLOCALE_H=0
37     fi
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([[
43       #include <monetary.h>
44       ]], [strfmon_l])
45   else
46     MONETARY_H=''
47   fi
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])