| 1 |
# posix_spawn_faction_addchdir.m4 |
| 2 |
# serial 2 |
| 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. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR], |
| 10 |
[ |
| 11 |
AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) |
| 12 |
AC_REQUIRE([AC_PROG_CC]) |
| 13 |
gl_POSIX_SPAWN |
| 14 |
AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addchdir]) |
| 15 |
gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir_np], |
| 16 |
[[#include <spawn.h>]]) |
| 17 |
if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then |
| 18 |
dnl This function is not yet standardized. Therefore override the |
| 19 |
dnl system's implementation always. |
| 20 |
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1 |
| 21 |
else |
| 22 |
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0 |
| 23 |
fi |
| 24 |
]) |