~ubuntu-branches/ubuntu/vivid/gzip/vivid

« back to all changes in this revision

Viewing changes to m4/string_h.m4

  • Committer: Steve Langasek
  • Date: 2012-06-29 02:07:40 UTC
  • mfrom: (4.1.9 sid)
  • Revision ID: steve.langasek@canonical.com-20120629020740-qqikrblzana08v2y
Merge version 1.5-1.1 from Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Configure a GNU-like replacement for <string.h>.
2
2
 
3
 
# Copyright (C) 2007-2010 Free Software Foundation, Inc.
 
3
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
4
4
# This file is free software; the Free Software Foundation
5
5
# gives unlimited permission to copy and/or distribute it,
6
6
# with or without modifications, as long as this notice is preserved.
7
7
 
8
 
# serial 10
 
8
# serial 21
9
9
 
10
10
# Written by Paul Eggert.
11
11
 
20
20
[
21
21
  AC_REQUIRE([AC_C_RESTRICT])
22
22
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
23
 
  gl_CHECK_NEXT_HEADERS([string.h])
 
23
  gl_NEXT_HEADERS([string.h])
 
24
 
 
25
  dnl Check for declarations of anything we want to poison if the
 
26
  dnl corresponding gnulib module is not in use, and which is not
 
27
  dnl guaranteed by C89.
 
28
  gl_WARN_ON_USE_PREPARE([[#include <string.h>
 
29
    ]],
 
30
    [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
 
31
     strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
 
32
     strerror_r strsignal strverscmp])
24
33
])
25
34
 
26
35
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
27
36
[
28
37
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
29
38
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
30
 
  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
 
39
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 
40
  dnl Define it also as a C macro, for the benefit of the unit tests.
 
41
  gl_MODULE_INDICATOR_FOR_TESTS([$1])
31
42
])
32
43
 
33
44
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
34
45
[
 
46
  GNULIB_FFSL=0;        AC_SUBST([GNULIB_FFSL])
 
47
  GNULIB_FFSLL=0;       AC_SUBST([GNULIB_FFSLL])
35
48
  GNULIB_MEMCHR=0;      AC_SUBST([GNULIB_MEMCHR])
36
49
  GNULIB_MEMMEM=0;      AC_SUBST([GNULIB_MEMMEM])
37
50
  GNULIB_MEMPCPY=0;     AC_SUBST([GNULIB_MEMPCPY])
41
54
  GNULIB_STPNCPY=0;     AC_SUBST([GNULIB_STPNCPY])
42
55
  GNULIB_STRCHRNUL=0;   AC_SUBST([GNULIB_STRCHRNUL])
43
56
  GNULIB_STRDUP=0;      AC_SUBST([GNULIB_STRDUP])
 
57
  GNULIB_STRNCAT=0;     AC_SUBST([GNULIB_STRNCAT])
44
58
  GNULIB_STRNDUP=0;     AC_SUBST([GNULIB_STRNDUP])
45
59
  GNULIB_STRNLEN=0;     AC_SUBST([GNULIB_STRNLEN])
46
60
  GNULIB_STRPBRK=0;     AC_SUBST([GNULIB_STRPBRK])
63
77
  GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
64
78
  GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
65
79
  GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
 
80
  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
66
81
  GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
67
82
  GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
68
83
  HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
69
84
  dnl Assume proper GNU behavior unless another module says otherwise.
 
85
  HAVE_FFSL=1;                  AC_SUBST([HAVE_FFSL])
 
86
  HAVE_FFSLL=1;                 AC_SUBST([HAVE_FFSLL])
 
87
  HAVE_MEMCHR=1;                AC_SUBST([HAVE_MEMCHR])
70
88
  HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
71
89
  HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
72
90
  HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
81
99
  HAVE_STRSEP=1;                AC_SUBST([HAVE_STRSEP])
82
100
  HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
83
101
  HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
84
 
  HAVE_DECL_STRERROR=1;         AC_SUBST([HAVE_DECL_STRERROR])
 
102
  HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
85
103
  HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
86
104
  HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
87
105
  REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
88
106
  REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
 
107
  REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
89
108
  REPLACE_STRDUP=0;             AC_SUBST([REPLACE_STRDUP])
90
109
  REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
91
110
  REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
 
111
  REPLACE_STRCHRNUL=0;          AC_SUBST([REPLACE_STRCHRNUL])
92
112
  REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
 
113
  REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
 
114
  REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
93
115
  REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
 
116
  REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
94
117
  REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
95
118
  REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
96
119
  UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])