- ] ,[
- dnl gl_THREADLIB is not in use. Assume the application wants
- dnl POSIX semantics.
- if test $ac_cv_func_pthread_sigmask != yes; then
- gl_save_LIBS=$LIBS
- AC_SEARCH_LIBS([pthread_sigmask], [pthread c_r])
- LIBS=$gl_save_LIBS
- if test "$ac_cv_search_pthread_sigmask" = no; then
- HAVE_PTHREAD_SIGMASK=0
- elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then
- LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
- fi
+ ], [
+ dnl The module 'threadlib' is not in use, due to --avoid=threadlib being
+ dnl specified.
+ dnl The package either has prepared CPPFLAGS and LIBS for use of POSIX:2008
+ dnl threads, or wants to build single-threaded programs.
+ if test $ac_cv_func_pthread_sigmask = yes; then
+ dnl pthread_sigmask exists and does not require extra libraries.
+ dnl Assume that it is declared.
+ :
+ else
+ dnl pthread_sigmask either does not exist or needs extra libraries.
+ HAVE_PTHREAD_SIGMASK=0
+ dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask,
+ dnl so as to not accidentally override the system's pthread_sigmask
+ dnl symbol from libpthread. This is necessary on IRIX 6.5.
+ REPLACE_PTHREAD_SIGMASK=1