| 1 |
# pthread-cond.m4 |
| 2 |
# serial 3 |
| 3 |
dnl Copyright (C) 2019-2025 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. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_PTHREAD_COND], |
| 10 |
[ |
| 11 |
AC_REQUIRE([gl_PTHREAD_H]) |
| 12 |
AC_REQUIRE([AC_CANONICAL_HOST]) |
| 13 |
|
| 14 |
if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \ |
| 15 |
&& test $gl_threads_api = windows; then |
| 16 |
dnl Choose function names that don't conflict with the mingw-w64 winpthreads |
| 17 |
dnl library. |
| 18 |
REPLACE_PTHREAD_COND_INIT=1 |
| 19 |
REPLACE_PTHREAD_CONDATTR_INIT=1 |
| 20 |
REPLACE_PTHREAD_CONDATTR_DESTROY=1 |
| 21 |
REPLACE_PTHREAD_COND_WAIT=1 |
| 22 |
REPLACE_PTHREAD_COND_TIMEDWAIT=1 |
| 23 |
REPLACE_PTHREAD_COND_SIGNAL=1 |
| 24 |
REPLACE_PTHREAD_COND_BROADCAST=1 |
| 25 |
REPLACE_PTHREAD_COND_DESTROY=1 |
| 26 |
else |
| 27 |
if test $HAVE_PTHREAD_H = 0; then |
| 28 |
HAVE_PTHREAD_COND_INIT=0 |
| 29 |
HAVE_PTHREAD_CONDATTR_INIT=0 |
| 30 |
HAVE_PTHREAD_CONDATTR_DESTROY=0 |
| 31 |
HAVE_PTHREAD_COND_WAIT=0 |
| 32 |
HAVE_PTHREAD_COND_TIMEDWAIT=0 |
| 33 |
HAVE_PTHREAD_COND_SIGNAL=0 |
| 34 |
HAVE_PTHREAD_COND_BROADCAST=0 |
| 35 |
HAVE_PTHREAD_COND_DESTROY=0 |
| 36 |
fi |
| 37 |
fi |
| 38 |
]) |