2 dnl Copyright (C) 2008-2009 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 gl_CHECK_NEXT_HEADERS([dirent.h])
18 dnl Unconditionally enables the replacement of <dirent.h>.
19 AC_DEFUN([gl_REPLACE_DIRENT_H],
21 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
25 AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
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
32 AC_DEFUN([gl_DIRENT_H_DEFAULTS],
34 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
35 GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
36 GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
37 GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
38 dnl Assume proper GNU behavior unless another module says otherwise.
39 HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
40 HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
41 HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
42 DIRENT_H=''; AC_SUBST([DIRENT_H])