~ubuntu-branches/ubuntu/hardy/renameutils/hardy

« back to all changes in this revision

Viewing changes to m4/sys_stat_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2007-12-05 09:13:21 UTC
  • mfrom: (0.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071205091321-iu0q6zqtayoz2n6n
Tags: 0.9.0-1
* New upstream release (closes: #347253)
* Bump Standards-Version to 3.7.3 (no changes)
* Tweak the watch file to avoid picking up -latest
* debian/copyright: update year and link to GPLv2 explicitely

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# sys_stat_h.m4 serial 6   -*- Autoconf -*-
 
2
dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
dnl From Eric Blake.
 
8
dnl Test whether <sys/stat.h> contains lstat and mkdir or must be substituted.
 
9
 
 
10
AC_DEFUN([gl_HEADER_SYS_STAT_H],
 
11
[
 
12
  dnl Check for lstat.  Systems that lack it (mingw) also lack symlinks, so
 
13
  dnl stat is a good replacement.
 
14
  AC_CHECK_FUNCS_ONCE([lstat])
 
15
  if test $ac_cv_func_lstat = yes; then
 
16
    HAVE_LSTAT=1
 
17
  else
 
18
    HAVE_LSTAT=0
 
19
  fi
 
20
  AC_SUBST([HAVE_LSTAT])
 
21
 
 
22
  dnl Check for mkdir.  Mingw has _mkdir(name) in the nonstandard <io.h>
 
23
  dnl instead.
 
24
  AC_CHECK_DECLS([mkdir],
 
25
    [],
 
26
    [AC_CHECK_HEADERS([io.h])],
 
27
    [#include <sys/stat.h>])
 
28
  if test $ac_cv_have_decl_mkdir = yes; then
 
29
    HAVE_DECL_MKDIR=1
 
30
  else
 
31
    HAVE_DECL_MKDIR=0
 
32
  fi
 
33
  AC_SUBST([HAVE_DECL_MKDIR])
 
34
  if test "$ac_cv_header_io_h" = yes; then
 
35
    HAVE_IO_H=1
 
36
  else
 
37
    HAVE_IO_H=0
 
38
  fi
 
39
  AC_SUBST([HAVE_IO_H])
 
40
  AC_REQUIRE([AC_C_INLINE])
 
41
 
 
42
  dnl Check for broken stat macros.
 
43
  AC_REQUIRE([AC_HEADER_STAT])
 
44
 
 
45
  gl_CHECK_NEXT_HEADERS([sys/stat.h])
 
46
  SYS_STAT_H='sys/stat.h'
 
47
  AC_SUBST([SYS_STAT_H])
 
48
]) # gl_HEADER_SYS_STAT_H