Mercurial > hg > octave-kai > gnulib-hg
annotate m4/dirent_h.m4 @ 13066:fc8c984b0733
Factorize common .m4 code.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 27 Mar 2010 18:38:53 +0100 |
parents | b1a410092484 |
children | b2385e7b332e |
rev | line source |
---|---|
13066
fc8c984b0733
Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents:
12954
diff
changeset
|
1 # dirent_h.m4 serial 11 |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12547
diff
changeset
|
2 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. |
10659 | 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 | |
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 | 16 gl_CHECK_NEXT_HEADERS([dirent.h]) |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
17 |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
18 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
|
19 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
|
20 gl_WARN_ON_USE_PREPARE([[#include <dirent.h> |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
21 ]], [alphasort dirfd fdopendir scandir]) |
10659 | 22 ]) |
23 | |
24 dnl Unconditionally enables the replacement of <dirent.h>. | |
25 AC_DEFUN([gl_REPLACE_DIRENT_H], | |
26 [ | |
12547
6d50d2a81c7d
Further updates, following today's commits.
Bruno Haible <bruno@clisp.org>
parents:
12536
diff
changeset
|
27 dnl This is a no-op, because <dirent.h> is always overridden. |
12536
cd64e80f94e4
link-warning: always build headers with link warnings
Eric Blake <ebb9@byu.net>
parents:
12339
diff
changeset
|
28 : |
10659 | 29 ]) |
30 | |
31 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], | |
32 [ | |
33 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | |
34 AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) | |
13066
fc8c984b0733
Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents:
12954
diff
changeset
|
35 gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
12954
b1a410092484
Tests of module 'dirent' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
36 dnl Define it also as a C macro, for the benefit of the unit tests. |
b1a410092484
Tests of module 'dirent' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
37 gl_MODULE_INDICATOR([$1]) |
10659 | 38 ]) |
39 | |
40 AC_DEFUN([gl_DIRENT_H_DEFAULTS], | |
41 [ | |
42 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR | |
12127 | 43 GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) |
44 GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) | |
45 GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) | |
46 GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) | |
10659 | 47 dnl Assume proper GNU behavior unless another module says otherwise. |
12127 | 48 HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD]) |
49 HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR]) | |
50 HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR]) | |
51 HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT]) | |
52 REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) | |
53 REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) | |
54 REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) | |
10659 | 55 ]) |