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.
7 dnl This file is offered as-is, without any warranty.
9 AC_DEFUN([gl_FUNC_FTS],
14 AC_DEFUN([gl_FUNC_FTS_CORE],
16 dnl Prerequisites of lib/fts.c.
19 AC_CHECK_FUNCS_ONCE([fstatfs])
20 AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl
21 if test "$ac_cv_func_fstatfs,$ac_cv_header_sys_vfs_h" = yes,yes; then
22 AC_CHECK_MEMBERS([struct statfs.f_type], [], [],
23 [[$ac_includes_default
26 if test "$ac_cv_member_struct_statfs_f_type" = yes; then
27 AC_CHECK_TYPES([__fsword_t], [], [],
28 [[$ac_includes_default
34 gl_CHECK_FUNCS_ANDROID([fts_open], [[#include <fts.h>]])
35 if case "$gl_cv_onwards_func_fts_open" in \
36 yes | future*) true ;; \
39 dnl The system already has the symbols fts_open, etc. or will have them
40 dnl in a future version.
41 dnl Avoid conflicts between these symbols and ours at the linker level.
42 AC_DEFINE([fts_open], [rpl_fts_open],
43 [Define to the overridden function name])
44 AC_DEFINE([fts_close], [rpl_fts_close],
45 [Define to the overridden function name])
46 AC_DEFINE([fts_read], [rpl_fts_read],
47 [Define to the overridden function name])
48 AC_DEFINE([fts_set], [rpl_fts_set],
49 [Define to the overridden function name])
50 AC_DEFINE([fts_children], [rpl_fts_children],
51 [Define to the overridden function name])
52 AC_DEFINE([fts_cross_check], [rpl_fts_cross_check],
53 [Define to the overridden function name])