string_h.m4 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Configure a GNU-like replacement for <string.h>.
  2. # Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # serial 7
  7. # Written by Paul Eggert.
  8. AC_DEFUN([gl_HEADER_STRING_H],
  9. [
  10. dnl Use AC_REQUIRE here, so that the default behavior below is expanded
  11. dnl once only, before all statements that occur in other macros.
  12. AC_REQUIRE([gl_HEADER_STRING_H_BODY])
  13. ])
  14. AC_DEFUN([gl_HEADER_STRING_H_BODY],
  15. [
  16. AC_REQUIRE([AC_C_RESTRICT])
  17. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
  18. gl_CHECK_NEXT_HEADERS([string.h])
  19. ])
  20. AC_DEFUN([gl_STRING_MODULE_INDICATOR],
  21. [
  22. dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
  23. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
  24. GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
  25. ])
  26. AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
  27. [
  28. GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
  29. GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
  30. GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
  31. GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
  32. GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
  33. GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
  34. GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
  35. GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
  36. GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
  37. GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
  38. GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
  39. GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
  40. GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
  41. GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
  42. GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
  43. GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
  44. GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
  45. GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
  46. GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
  47. GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
  48. GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
  49. GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
  50. GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
  51. GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
  52. GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
  53. GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
  54. GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
  55. GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
  56. GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
  57. GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
  58. GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
  59. GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
  60. GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
  61. dnl Assume proper GNU behavior unless another module says otherwise.
  62. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
  63. HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
  64. HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
  65. HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
  66. HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
  67. HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
  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])
  77. HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
  78. HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
  79. HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
  80. REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
  81. REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
  82. REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
  83. REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
  84. REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
  85. REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
  86. REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
  87. ])