1 # Configure a GNU-like replacement for <string.h>.
3 # Copyright (C) 2007 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.
8 # Written by Paul Eggert.
10 AC_DEFUN([gl_HEADER_STRING_H],
12 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
13 dnl once only, before all statements that occur in other macros.
14 AC_REQUIRE([gl_HEADER_STRING_H_BODY])
17 AC_DEFUN([gl_HEADER_STRING_H_BODY],
19 AC_REQUIRE([AC_C_RESTRICT])
20 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
21 gl_CHECK_NEXT_HEADERS([string.h])
24 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
26 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
27 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
28 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
31 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
33 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
34 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
35 GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
36 GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
37 GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
38 GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
39 GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
40 GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
41 GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
42 GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
43 GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
44 GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
45 GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
46 GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
47 GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
48 GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
49 GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
50 GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
51 GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
52 GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
53 GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
54 GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
55 GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
56 GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
57 GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
58 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
59 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
60 dnl Assume proper GNU behavior unless another module says otherwise.
61 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
62 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
63 HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
64 HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
65 HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
66 HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
67 HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
68 HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
69 HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
70 HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
71 HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
72 HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
73 HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
74 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
75 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
76 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])