~ubuntu-branches/ubuntu/saucy/renameutils/saucy

« back to all changes in this revision

Viewing changes to gnulib-m4/strings_h.m4

  • Committer: Package Import Robot
  • Author(s): Francois Marier
  • Date: 2012-05-06 21:45:54 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20120506214554-k531n9odfuwk2451
Tags: 0.12.0-1
* New upstream release (closes: #600411)
* Patch to fix typo in installation target of Makefile

* Bump Standards-Version up to 3.9.3
* Bump debhelper compatibility to 9
* Switch to a minimal debian/rules file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Configure a replacement for <strings.h>.
 
2
# serial 6
 
3
 
 
4
# Copyright (C) 2007, 2009-2012 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
 
 
20
  gl_CHECK_NEXT_HEADERS([strings.h])
 
21
  if test $ac_cv_header_strings_h = yes; then
 
22
    HAVE_STRINGS_H=1
 
23
  else
 
24
    HAVE_STRINGS_H=0
 
25
  fi
 
26
  AC_SUBST([HAVE_STRINGS_H])
 
27
 
 
28
  dnl Check for declarations of anything we want to poison if the
 
29
  dnl corresponding gnulib module is not in use.
 
30
  gl_WARN_ON_USE_PREPARE([[
 
31
    /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
 
32
       <strings.h>.  */
 
33
    #include <sys/types.h>
 
34
    #include <strings.h>
 
35
    ]], [ffs strcasecmp strncasecmp])
 
36
])
 
37
 
 
38
AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
 
39
[
 
40
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
 
41
  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
 
42
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 
43
])
 
44
 
 
45
AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
 
46
[
 
47
  GNULIB_FFS=0;            AC_SUBST([GNULIB_FFS])
 
48
  dnl Assume proper GNU behavior unless another module says otherwise.
 
49
  HAVE_FFS=1;              AC_SUBST([HAVE_FFS])
 
50
  HAVE_STRCASECMP=1;       AC_SUBST([HAVE_STRCASECMP])
 
51
  HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
 
52
])