annotate m4/strings_h.m4 @ 17476:6057744acd2c default tip master

autoupdate
author Karl Berry <karl@freefriends.org>
date Fri, 16 Aug 2013 06:32:22 -0700
parents e542fd46ad6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15390
25fd80a52583 ffs: new module
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
1 # Configure a replacement for <strings.h>.
15604
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
2 # serial 6
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
4 # Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 # This file is free software; the Free Software Foundation
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 # gives unlimited permission to copy and/or distribute it,
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 # with or without modifications, as long as this notice is preserved.
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_DEFUN([gl_HEADER_STRINGS_H],
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 dnl once only, before all statements that occur in other macros.
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 ])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 [
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
15604
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
19
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 gl_CHECK_NEXT_HEADERS([strings.h])
15604
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
21 if test $ac_cv_header_strings_h = yes; then
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
22 HAVE_STRINGS_H=1
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
23 else
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
24 HAVE_STRINGS_H=0
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
25 fi
4adac94541e0 strings: Don't assume <strings.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 15488
diff changeset
26 AC_SUBST([HAVE_STRINGS_H])
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
27
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
28 dnl Check for declarations of anything we want to poison if the
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
29 dnl corresponding gnulib module is not in use.
15488
d9061bf1cead strings: Add support for Minix.
Bruno Haible <bruno@clisp.org>
parents: 15390
diff changeset
30 gl_WARN_ON_USE_PREPARE([[
d9061bf1cead strings: Add support for Minix.
Bruno Haible <bruno@clisp.org>
parents: 15390
diff changeset
31 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
d9061bf1cead strings: Add support for Minix.
Bruno Haible <bruno@clisp.org>
parents: 15390
diff changeset
32 <strings.h>. */
d9061bf1cead strings: Add support for Minix.
Bruno Haible <bruno@clisp.org>
parents: 15390
diff changeset
33 #include <sys/types.h>
d9061bf1cead strings: Add support for Minix.
Bruno Haible <bruno@clisp.org>
parents: 15390
diff changeset
34 #include <strings.h>
15390
25fd80a52583 ffs: new module
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
35 ]], [ffs strcasecmp strncasecmp])
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 ])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 [
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
42 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 ])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 [
15390
25fd80a52583 ffs: new module
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
47 GNULIB_FFS=0; AC_SUBST([GNULIB_FFS])
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 dnl Assume proper GNU behavior unless another module says otherwise.
15390
25fd80a52583 ffs: new module
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
49 HAVE_FFS=1; AC_SUBST([HAVE_FFS])
9496
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
d7da1f241448 Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 ])