* fts.c: Include fts_.h first, to check interface.
[pspp] / m4 / fts.m4
1 #serial 3
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.
6
7 AC_DEFUN([gl_FUNC_FTS],
8 [
9   AC_LIBSOURCES([fts.c, fts_.h])
10
11   dnl Use this version of fts unconditionally, since the GNU libc and
12   dnl NetBSD versions have bugs and/or unnecessary limitations.
13   AC_LIBOBJ([fts])
14
15   dnl Prerequisites of lib/fts.c.
16
17   # Checks for header files.
18   AC_REQUIRE([AC_HEADER_DIRENT])
19   AC_CHECK_HEADERS_ONCE([inttypes.h stdint.h])
20   AC_CHECK_HEADERS_ONCE([sys/param.h])
21
22   # Checks for typedefs, structures, and compiler characteristics.
23   AC_REQUIRE([gt_INTTYPES_PRI])
24
25   # Checks for library functions.
26   AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
27 ])