diff options
Diffstat (limited to 'gl/m4/string_h.m4')
-rw-r--r-- | gl/m4/string_h.m4 | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 new file mode 100644 index 0000000..766d7e9 --- /dev/null +++ b/gl/m4/string_h.m4 | |||
@@ -0,0 +1,87 @@ | |||
1 | # Configure a GNU-like replacement for <string.h>. | ||
2 | |||
3 | # Copyright (C) 2007, 2008 Free Software Foundation, Inc. | ||
4 | # This file is free software; the Free Software Foundation | ||
5 | # gives unlimited permission to copy and/or distribute it, | ||
6 | # with or without modifications, as long as this notice is preserved. | ||
7 | |||
8 | # serial 4 | ||
9 | |||
10 | # Written by Paul Eggert. | ||
11 | |||
12 | AC_DEFUN([gl_HEADER_STRING_H], | ||
13 | [ | ||
14 | dnl Use AC_REQUIRE here, so that the default behavior below is expanded | ||
15 | dnl once only, before all statements that occur in other macros. | ||
16 | AC_REQUIRE([gl_HEADER_STRING_H_BODY]) | ||
17 | ]) | ||
18 | |||
19 | AC_DEFUN([gl_HEADER_STRING_H_BODY], | ||
20 | [ | ||
21 | AC_REQUIRE([AC_C_RESTRICT]) | ||
22 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) | ||
23 | gl_CHECK_NEXT_HEADERS([string.h]) | ||
24 | ]) | ||
25 | |||
26 | AC_DEFUN([gl_STRING_MODULE_INDICATOR], | ||
27 | [ | ||
28 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | ||
29 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) | ||
30 | GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | ||
31 | ]) | ||
32 | |||
33 | AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], | ||
34 | [ | ||
35 | GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) | ||
36 | GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) | ||
37 | GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) | ||
38 | GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) | ||
39 | GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) | ||
40 | GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) | ||
41 | GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) | ||
42 | GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) | ||
43 | GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) | ||
44 | GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) | ||
45 | GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) | ||
46 | GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) | ||
47 | GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) | ||
48 | GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) | ||
49 | GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) | ||
50 | GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) | ||
51 | GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) | ||
52 | GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) | ||
53 | GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) | ||
54 | GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) | ||
55 | GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) | ||
56 | GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) | ||
57 | GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) | ||
58 | GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) | ||
59 | GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) | ||
60 | GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) | ||
61 | GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) | ||
62 | GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) | ||
63 | GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) | ||
64 | GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) | ||
65 | dnl Assume proper GNU behavior unless another module says otherwise. | ||
66 | HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) | ||
67 | HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) | ||
68 | HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) | ||
69 | HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) | ||
70 | HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) | ||
71 | HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) | ||
72 | HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) | ||
73 | HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP]) | ||
74 | HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) | ||
75 | HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) | ||
76 | HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) | ||
77 | HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) | ||
78 | HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) | ||
79 | HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) | ||
80 | HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) | ||
81 | HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) | ||
82 | REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) | ||
83 | REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) | ||
84 | REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) | ||
85 | REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) | ||
86 | REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) | ||
87 | ]) | ||