3 dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_FTS],
13 AC_DEFUN([gl_FUNC_FTS_CORE],
15 dnl Prerequisites of lib/fts.c.
18 AC_CHECK_FUNCS_ONCE([fstatfs])
19 AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl
20 if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then
21 AC_CHECK_MEMBERS([struct statfs.f_type], [], [],
22 [[$ac_includes_default
25 if test "$ac_cv_member_struct_statfs_f_type" = yes; then
26 AC_CHECK_TYPES([__fsword_t], [], [],
27 [[$ac_includes_default
33 gl_CHECK_FUNCS_ANDROID([fts_open], [[#include <fts.h>]])
34 if case "$gl_cv_onwards_func_fts_open" in \
35 yes | future*) true ;; \
38 dnl The system already has the symbols fts_open, etc. or will have them
39 dnl in a future version.
40 dnl Avoid conflicts between these symbols and ours at the linker level.
41 AC_DEFINE([fts_open], [rpl_fts_open],
42 [Define to the overridden function name])
43 AC_DEFINE([fts_close], [rpl_fts_close],
44 [Define to the overridden function name])
45 AC_DEFINE([fts_read], [rpl_fts_read],
46 [Define to the overridden function name])
47 AC_DEFINE([fts_set], [rpl_fts_set],
48 [Define to the overridden function name])
49 AC_DEFINE([fts_children], [rpl_fts_children],
50 [Define to the overridden function name])
51 AC_DEFINE([fts_cross_check], [rpl_fts_cross_check],
52 [Define to the overridden function name])