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_ABSOLUTE_HEADER([string.h])
22 ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
23 AC_SUBST([ABSOLUTE_STRING_H])
26 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
28 dnl Assume proper GNU behavior unless another module says otherwise.
29 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
30 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
31 HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
32 HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
33 HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
34 HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
35 HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
36 HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
37 HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
38 HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
39 HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
40 HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
41 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
42 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
43 REPLACE_STRCASECMP=0; AC_SUBST([REPLACE_STRCASECMP])
44 REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
45 REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])