immutable: Add tests.
[gnulib.git] / m4 / posix_spawn_faction_addchdir.m4
blob8ad40ed6de38300992fe074dc7544547e56f8d03
1 # posix_spawn_faction_addchdir.m4 serial 1
2 dnl Copyright (C) 2018-2021 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.
7 AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR],
9   AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
10   AC_REQUIRE([AC_PROG_CC])
11   gl_POSIX_SPAWN
12   AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addchdir posix_spawn_file_actions_addchdir_np])
13   if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
14     dnl This function is not yet standardized. Therefore override the
15     dnl system's implementation always.
16     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
17   else
18     HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
19   fi