On Solaris 10, the configuration aborts: $ ../configure ... checking for raise... yes checking for sigprocmask... ../configure: test: argument expected
The reason is that gl_cv_func_sigprocmask_v16 is not set in the statement if test $gl_cv_func_sigprocmask_v16 != yes; then (signalblocking.m4 line 28). Why? Because the Solaris /bin/sh, unlike other shells, does redirected compound statements in a subshell. /bin/sh -c '{ gl_foo=yes; } 6>/dev/null; echo $gl_foo' produces 'yes' on most platforms, but empty output on Solaris 10. This patch fixes it. 2020-09-17 Bruno Haible <br...@clisp.org> sigprocmask: Fix configuration failure on Solaris 10 (regr. 2020-07-25). * m4/gnulib-common.m4 (GL_TMP_FD): New macro. (gl_SILENT): Use 'exec', not a compound statement, to redirect AS_MESSAGE_FD. diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 33e56fa..35be4d3 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 57 +# gnulib-common.m4 serial 58 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -630,13 +630,18 @@ AC_DEFUN([gl_BIGENDIAN], AC_C_BIGENDIAN ]) +# A temporary file descriptor. +# Must be less than 10, because dash 0.5.8 does not support redirections +# with multi-digit file descriptors. +m4_define([GL_TMP_FD], 9) + # gl_SILENT(command) # executes command, but without the normal configure output. AC_DEFUN([gl_SILENT], [ - { - $1 - } AS_MESSAGE_FD>/dev/null + exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null + $1 + exec AS_MESSAGE_FD>&GL_TMP_FD AS_MESSAGE_FD>&- ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)