1 # posix_spawn_faction_addfchdir.m4
3 dnl Copyright (C) 2018-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_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR],
10 AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
11 AC_REQUIRE([AC_PROG_CC])
13 AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addfchdir])
14 gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addfchdir_np],
15 [[#include <spawn.h>]])
16 if test $ac_cv_func_posix_spawn_file_actions_addfchdir = yes; then
17 dnl This function is not yet standardized. Therefore override the
18 dnl system's implementation always.
19 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1
21 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0