Debian Codegraph @

m4/ctype_h.m4

raw
1 # ctype_h.m4
2 # serial 23
3 dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7 dnl This file is offered as-is, without any warranty.
8
9 AC_DEFUN_ONCE([gl_CTYPE_H],
10 [
11 AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
12
13 dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
14 gl_NEXT_HEADERS([ctype.h])
15
16 dnl Check for declarations of anything we want to poison if the
17 dnl corresponding gnulib module is not in use.
18 gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
19 ]], [isalnum_l isalpha_l isblank isblank_l iscntrl_l isdigit_l isgraph_l
20 islower_l isprint_l ispunct_l isspace_l isupper_l isxdigit_l
21 tolower_l toupper_l])
22 ])
23
24 # gl_CTYPE_MODULE_INDICATOR([modulename])
25 # sets the shell variable that indicates the presence of the given module
26 # to a C preprocessor expression that will evaluate to 1.
27 # This macro invocation must not occur in macros that are AC_REQUIREd.
28 AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
29 [
30 dnl Ensure to expand the default settings once only.
31 gl_CTYPE_H_REQUIRE_DEFAULTS
32 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
33 ])
34
35 # Initializes the default values for AC_SUBSTed shell variables.
36 # This macro must not be AC_REQUIREd. It must only be invoked, and only
37 # outside of macros or in macros that are not AC_REQUIREd.
38 AC_DEFUN([gl_CTYPE_H_REQUIRE_DEFAULTS],
39 [
40 m4_defun(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS], [
41 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISALNUM_L])
42 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISALPHA_L])
43 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISBLANK])
44 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISBLANK_L])
45 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISCNTRL_L])
46 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISDIGIT_L])
47 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISGRAPH_L])
48 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISLOWER_L])
49 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISPRINT_L])
50 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISPUNCT_L])
51 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISSPACE_L])
52 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISUPPER_L])
53 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISXDIGIT_L])
54 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOLOWER_L])
55 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOUPPER_L])
56 ])
57 m4_require(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS])
58 AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
59 ])
60
61 AC_DEFUN([gl_CTYPE_H_DEFAULTS],
62 [
63 dnl Assume proper GNU behavior unless another module says otherwise.
64 HAVE_ISALNUM_L=1; AC_SUBST([HAVE_ISALNUM_L])
65 HAVE_ISALPHA_L=1; AC_SUBST([HAVE_ISALPHA_L])
66 HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
67 HAVE_ISBLANK_L=1; AC_SUBST([HAVE_ISBLANK_L])
68 HAVE_ISCNTRL_L=1; AC_SUBST([HAVE_ISCNTRL_L])
69 HAVE_ISDIGIT_L=1; AC_SUBST([HAVE_ISDIGIT_L])
70 HAVE_ISGRAPH_L=1; AC_SUBST([HAVE_ISGRAPH_L])
71 HAVE_ISLOWER_L=1; AC_SUBST([HAVE_ISLOWER_L])
72 HAVE_ISPRINT_L=1; AC_SUBST([HAVE_ISPRINT_L])
73 HAVE_ISPUNCT_L=1; AC_SUBST([HAVE_ISPUNCT_L])
74 HAVE_ISSPACE_L=1; AC_SUBST([HAVE_ISSPACE_L])
75 HAVE_ISUPPER_L=1; AC_SUBST([HAVE_ISUPPER_L])
76 HAVE_ISXDIGIT_L=1; AC_SUBST([HAVE_ISXDIGIT_L])
77 HAVE_TOLOWER_L=1; AC_SUBST([HAVE_TOLOWER_L])
78 HAVE_TOUPPER_L=1; AC_SUBST([HAVE_TOUPPER_L])
79 ])