]> git.cworth.org Git - tar/blob - m4/dirent_h.m4
Imported Upstream version 1.21
[tar] / m4 / dirent_h.m4
1 # dirent_h.m4 serial 2
2 dnl Copyright (C) 2008 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 Written by Bruno Haible.
8
9 AC_DEFUN([gl_DIRENT_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_DIRENT_H_DEFAULTS])
14
15   gl_CHECK_NEXT_HEADERS([dirent.h])
16 ])
17
18 dnl Unconditionally enables the replacement of <dirent.h>.
19 AC_DEFUN([gl_REPLACE_DIRENT_H],
20 [
21   AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
22   DIRENT_H='dirent.h'
23 ])
24
25 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
26 [
27   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
28   AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
29   GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
30 ])
31
32 AC_DEFUN([gl_DIRENT_H_DEFAULTS],
33 [
34   AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
35   GNULIB_DIRFD=0;    AC_SUBST([GNULIB_DIRFD])
36   dnl Assume proper GNU behavior unless another module says otherwise.
37   HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
38   DIRENT_H='';       AC_SUBST([DIRENT_H])
39 ])