havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS.
[gnulib.git] / m4 / posix_spawn_faction_addfchdir.m4
blob6c2561228e4992a3c6b6aea2d0a858b61788a63c
1 # posix_spawn_faction_addfchdir.m4 serial 1
2 dnl Copyright (C) 2018-2020 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_ADDFCHDIR],
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_addfchdir posix_spawn_file_actions_addfchdir_np])
13   if test $ac_cv_func_posix_spawn_file_actions_addfchdir = 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_ADDFCHDIR=1
17   else
18     HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0
19   fi