sys_socket tests: Improve tests for macro definitions.
[gnulib.git] / m4 / posix_spawn_faction_addfchdir.m4
blob052dd1ce24dd3292223f9bc9747d8c7c2da44966
1 # posix_spawn_faction_addfchdir.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.
8 AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR],
10   AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
11   AC_REQUIRE([AC_PROG_CC])
12   gl_POSIX_SPAWN
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
20   else
21     HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0
22   fi