• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/gnulib-m4/
1# sys_stat_h.m4 serial 6   -*- Autoconf -*-
2dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Eric Blake.
8dnl Test whether <sys/stat.h> contains lstat and mkdir or must be substituted.
9
10AC_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
49