1 # pthread_sigmask.m4 serial 7-emacs1
2 dnl Copyright (C) 2011 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_PTHREAD_SIGMASK],
9 AC_CHECK_FUNCS_ONCE([pthread_sigmask])
11 dnl gl_THREADLIB is not in use. Assume the application wants
13 if test $ac_cv_func_pthread_sigmask != yes; then
15 AC_SEARCH_LIBS([pthread_sigmask], [pthread c_r])
17 if test "$ac_cv_search_pthread_sigmask" = no; then
18 HAVE_PTHREAD_SIGMASK=0
19 elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then
20 LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
23 AC_SUBST([LIB_PTHREAD_SIGMASK])
24 dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
25 dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
26 dnl same: either both empty or both "-lpthread".