annotate m4/dirent_h.m4 @ 17480:f40b3156a43e

selinux-at: omit unnecessary include * lib/selinux-at.c: Don't include dosname.h; not needed, since this source file doesn't use its macros, and subsidiary files that use the macros already include it.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 23 Aug 2013 13:53:46 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15610
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
1 # dirent_h.m4 serial 16
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl Written by Bruno Haible.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_DEFUN([gl_DIRENT_H],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 dnl once only, before all statements that occur in other macros.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
12547
6d50d2a81c7d Further updates, following today's commits.
Bruno Haible <bruno@clisp.org>
parents: 12536
diff changeset
15 dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 gl_CHECK_NEXT_HEADERS([dirent.h])
15603
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
17 if test $ac_cv_header_dirent_h = yes; then
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
18 HAVE_DIRENT_H=1
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
19 else
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
20 HAVE_DIRENT_H=0
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
21 fi
550b8b7d6140 dirent: Don't assume <dirent.h> exists.
Bruno Haible <bruno@clisp.org>
parents: 14685
diff changeset
22 AC_SUBST([HAVE_DIRENT_H])
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
23
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
24 dnl Check for declarations of anything we want to poison if the
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
25 dnl corresponding gnulib module is not in use.
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
26 gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
15610
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
27 ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 ])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
13066
fc8c984b0733 Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents: 12954
diff changeset
34 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
12954
b1a410092484 Tests of module 'dirent' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12766
diff changeset
35 dnl Define it also as a C macro, for the benefit of the unit tests.
13071
b2385e7b332e Distinguish two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 13066
diff changeset
36 gl_MODULE_INDICATOR_FOR_TESTS([$1])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 ])
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 AC_DEFUN([gl_DIRENT_H_DEFAULTS],
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 [
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
15610
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
42 GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
43 GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
44 GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
45 GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
46 GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
47 GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
48 GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
49 GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 dnl Assume proper GNU behavior unless another module says otherwise.
15610
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
51 HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
52 HAVE_READDIR=1; AC_SUBST([HAVE_READDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
53 HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR])
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
54 HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
55 HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
13095
c47c56095752 fdopendir: work around FreeBSD bug
Eric Blake <eblake@redhat.com>
parents: 13071
diff changeset
56 HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
57 HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
58 HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
59 HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
15610
de2ecfd7fc4a New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
Bruno Haible <bruno@clisp.org>
parents: 15603
diff changeset
60 REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
61 REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
13508
abc6ebd285a3 dirfd: Avoid link error on AIX 7.1.
Bruno Haible <bruno@clisp.org>
parents: 13095
diff changeset
62 REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
12127
bda9467a9d66 fdopendir: fix GNU/Hurd bug
Eric Blake <ebb9@byu.net>
parents: 11992
diff changeset
63 REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
10659
fb8bcb95d71a New module 'dirent'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 ])