2 dnl Copyright (C) 2005 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 AC_DEFUN([gl_FUNC_FTS],
9 AC_LIBSOURCES([fts.c, fts_.h, intprops.h])
11 dnl Use this version of fts unconditionally, since the GNU libc and
12 dnl NetBSD versions have bugs and/or unnecessary limitations.
15 dnl Prerequisites of lib/fts.c.
17 # Checks for header files.
18 AC_REQUIRE([AC_HEADER_DIRENT])
19 AC_REQUIRE([AC_HEADER_STDC])
20 AC_CHECK_HEADERS_ONCE([fcntl.h inttypes.h stddef.h stdint.h])
21 AC_CHECK_HEADERS_ONCE([stdlib.h string.h sys/param.h unistd.h])
23 # Checks for typedefs, structures, and compiler characteristics.
24 AC_REQUIRE([AM_STDBOOL_H])
25 AC_REQUIRE([AC_C_CONST])
26 AC_REQUIRE([AC_TYPE_SIZE_T])
27 AC_REQUIRE([gt_INTTYPES_PRI])
28 AC_CHECK_TYPES([ptrdiff_t])
30 # Checks for library functions.
31 AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
32 AC_REQUIRE([AC_FUNC_LSTAT])
33 AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
34 AC_REQUIRE([AC_FUNC_STAT])
35 AC_CHECK_FUNCS_ONCE([fchdir memmove memset strrchr])