version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
Line 1
|
Line 1
|
# Configure a GNU-like replacement for <string.h>. |
# Configure a GNU-like replacement for <string.h>. |
|
|
# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. | # Copyright (C) 2007-2011 Free Software Foundation, Inc. |
# This file is free software; the Free Software Foundation |
# This file is free software; the Free Software Foundation |
# gives unlimited permission to copy and/or distribute it, |
# gives unlimited permission to copy and/or distribute it, |
# with or without modifications, as long as this notice is preserved. |
# with or without modifications, as long as this notice is preserved. |
|
|
# serial 7 | # serial 21 |
|
|
# Written by Paul Eggert. |
# Written by Paul Eggert. |
|
|
Line 20 AC_DEFUN([gl_HEADER_STRING_H_BODY],
|
Line 20 AC_DEFUN([gl_HEADER_STRING_H_BODY],
|
[ |
[ |
AC_REQUIRE([AC_C_RESTRICT]) |
AC_REQUIRE([AC_C_RESTRICT]) |
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) |
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) |
gl_CHECK_NEXT_HEADERS([string.h]) | gl_NEXT_HEADERS([string.h]) |
| |
| dnl Check for declarations of anything we want to poison if the |
| dnl corresponding gnulib module is not in use, and which is not |
| dnl guaranteed by C89. |
| gl_WARN_ON_USE_PREPARE([[#include <string.h> |
| ]], |
| [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul |
| strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r |
| strerror_r strsignal strverscmp]) |
]) |
]) |
|
|
AC_DEFUN([gl_STRING_MODULE_INDICATOR], |
AC_DEFUN([gl_STRING_MODULE_INDICATOR], |
[ |
[ |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) |
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) |
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
| dnl Define it also as a C macro, for the benefit of the unit tests. |
| gl_MODULE_INDICATOR_FOR_TESTS([$1]) |
]) |
]) |
|
|
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], |
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], |
[ |
[ |
|
GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) |
|
GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) |
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) |
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) |
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) |
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) |
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) |
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) |
Line 41 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
|
Line 54 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
|
GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) |
GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) |
GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) |
GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) |
GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) |
GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) |
|
GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) |
GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) |
GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) |
GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) |
GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) |
GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) |
GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) |
Line 63 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
|
Line 77 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
|
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) |
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) |
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) |
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) |
GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) |
GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) |
|
GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) |
GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) |
GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) |
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) | GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) |
| HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) |
dnl Assume proper GNU behavior unless another module says otherwise. |
dnl Assume proper GNU behavior unless another module says otherwise. |
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) | HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) |
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) | HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) |
HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) | HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) |
HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) | HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) |
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) | HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) |
HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) | HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) |
HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) | HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) |
HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) | HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) |
HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP]) | HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) |
HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) | HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) |
HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) | HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) |
HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) | HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) |
HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) | HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) |
HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) | HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) |
HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) | HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) |
HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) | HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) |
HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) | HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) |
HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) | HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) |
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) | HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) |
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) | HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) |
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) | REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) |
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) | REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) |
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) | REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) |
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) | REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) |
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) | REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) |
| REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) |
| REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) |
| REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) |
| REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) |
| REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) |
| REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) |
| REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) |
| REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) |
| REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) |
| UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) |
]) |
]) |