~ubuntu-branches/ubuntu/natty/diffutils/natty

« back to all changes in this revision

Viewing changes to m4/strings_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2010-05-04 20:38:00 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100504203800-f67xd9rsa9xl9qqj
Tags: 1:3.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Configure a replacement for <string.h>.
 
2
# serial 3
 
3
 
 
4
# Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
AC_DEFUN([gl_HEADER_STRINGS_H],
 
10
[
 
11
  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
 
12
  dnl once only, before all statements that occur in other macros.
 
13
  AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
 
14
])
 
15
 
 
16
AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
 
17
[
 
18
  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
 
19
  gl_CHECK_NEXT_HEADERS([strings.h])
 
20
 
 
21
  dnl Check for declarations of anything we want to poison if the
 
22
  dnl corresponding gnulib module is not in use.
 
23
  gl_WARN_ON_USE_PREPARE([[#include <strings.h>
 
24
    ]], [strcasecmp strncasecmp])
 
25
])
 
26
 
 
27
AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
 
28
[
 
29
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
 
30
  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
 
31
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 
32
])
 
33
 
 
34
AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
 
35
[
 
36
  dnl Assume proper GNU behavior unless another module says otherwise.
 
37
  HAVE_STRCASECMP=1;       AC_SUBST([HAVE_STRCASECMP])
 
38
  HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
 
39
])