2 dnl Copyright (C) 2008-2010 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.
7 dnl Written by Bruno Haible.
9 AC_DEFUN([gl_DIRENT_H],
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])
15 dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
16 gl_CHECK_NEXT_HEADERS([dirent.h])
19 dnl Unconditionally enables the replacement of <dirent.h>.
20 AC_DEFUN([gl_REPLACE_DIRENT_H],
22 dnl This is a no-op, because <dirent.h> is always overridden.
26 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
28 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
29 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
30 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
33 AC_DEFUN([gl_DIRENT_H_DEFAULTS],
35 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
36 GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
37 GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
38 GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
39 GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
40 dnl Assume proper GNU behavior unless another module says otherwise.
41 HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
42 HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
43 HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
44 HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
45 REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
46 REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
47 REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])