mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 07:10:20 +02:00
Do not check for fast or recursive mutexes. Check
for pthread_attr_getstack. (SCM_I_GSC_USE_COOP_THREADS): Dot not subst. (pthread_mutexattr_settype): Do not check for it.
This commit is contained in:
parent
896df2d58b
commit
49aaa6d2a3
1 changed files with 6 additions and 44 deletions
50
configure.in
50
configure.in
|
@ -991,10 +991,8 @@ fi
|
||||||
|
|
||||||
SCM_I_GSC_USE_PTHREAD_THREADS=0
|
SCM_I_GSC_USE_PTHREAD_THREADS=0
|
||||||
SCM_I_GSC_USE_NULL_THREADS=0
|
SCM_I_GSC_USE_NULL_THREADS=0
|
||||||
SCM_I_GSC_USE_COOP_THREADS=0
|
|
||||||
AC_SUBST([SCM_I_GSC_USE_PTHREAD_THREADS])
|
AC_SUBST([SCM_I_GSC_USE_PTHREAD_THREADS])
|
||||||
AC_SUBST([SCM_I_GSC_USE_NULL_THREADS])
|
AC_SUBST([SCM_I_GSC_USE_NULL_THREADS])
|
||||||
AC_SUBST([SCM_I_GSC_USE_COOP_THREADS])
|
|
||||||
|
|
||||||
### What thread package has the user asked for?
|
### What thread package has the user asked for?
|
||||||
AC_ARG_WITH(threads, [ --with-threads thread interface],
|
AC_ARG_WITH(threads, [ --with-threads thread interface],
|
||||||
|
@ -1007,48 +1005,12 @@ case "$with_threads" in
|
||||||
SCM_I_GSC_USE_PTHREAD_THREADS=1
|
SCM_I_GSC_USE_PTHREAD_THREADS=1
|
||||||
with_threads="pthreads",
|
with_threads="pthreads",
|
||||||
with_threads="null")
|
with_threads="null")
|
||||||
|
|
||||||
AC_MSG_CHECKING(if pthread_mutexattr_settype is declared)
|
old_CFLAGS="$CFLAGS"
|
||||||
AC_CACHE_VAL(guile_cv_mutexattr_settype_declared,
|
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
|
||||||
[AC_TRY_COMPILE([#include <pthread.h>],
|
AC_CHECK_FUNCS(pthread_attr_getstack)
|
||||||
[int pthread_mutexattr_settype (int, int);],
|
CFLAGS="$old_CFLAGS"
|
||||||
guile_cv_mutexattr_settype_declared=no,
|
|
||||||
guile_cv_mutexattr_settype_declared=yes)])
|
|
||||||
AC_MSG_RESULT($guile_cv_mutexattr_settype_declared)
|
|
||||||
if test $guile_cv_mutexattr_settype_declared = yes; then
|
|
||||||
AC_DEFINE(SCM_MUTEXATTR_SETTYPE_DECLARED, 1,
|
|
||||||
[Define if pthread.h declares pthread_mutexattr_settype.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(how to get a fast mutex)
|
|
||||||
AC_CACHE_VAL(guile_cv_have_mutex_fast,
|
|
||||||
[AC_TRY_COMPILE([#include <pthread.h>],
|
|
||||||
[int a = PTHREAD_MUTEX_ADAPTIVE_NP;],
|
|
||||||
guile_cv_have_mutex_fast=PTHREAD_MUTEX_ADAPTIVE_NP,
|
|
||||||
guile_cv_have_mutex_fast=none)])
|
|
||||||
AC_MSG_RESULT($guile_cv_have_mutex_fast)
|
|
||||||
if test ! $guile_cv_have_mutex_fast = none; then
|
|
||||||
AC_DEFINE_UNQUOTED(SCM_MUTEX_FAST, $guile_cv_have_mutex_fast,
|
|
||||||
[The mutex kind enum for fast mutexes.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(how to get a recursive mutex)
|
|
||||||
AC_CACHE_VAL(guile_cv_have_mutex_recursive,
|
|
||||||
[AC_TRY_COMPILE([#include <pthread.h>],
|
|
||||||
[int a = PTHREAD_MUTEX_RECURSIVE_NP;],
|
|
||||||
guile_cv_have_mutex_recursive=PTHREAD_MUTEX_RECURSIVE_NP)
|
|
||||||
if test -z "$guile_cv_have_mutex_recursive"; then
|
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
|
||||||
[int a = PTHREAD_MUTEX_RECURSIVE;],
|
|
||||||
guile_cv_have_mutex_recursive=PTHREAD_MUTEX_RECURSIVE,
|
|
||||||
guile_cv_have_mutex_recursive=none)
|
|
||||||
fi])
|
|
||||||
AC_MSG_RESULT($guile_cv_have_mutex_recursive)
|
|
||||||
if test ! $guile_cv_have_mutex_recursive = none; then
|
|
||||||
AC_DEFINE_UNQUOTED(SCM_MUTEX_RECURSIVE, $guile_cv_have_mutex_recursive,
|
|
||||||
[The mutex kind enum for recursive mutexes.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# On Solaris, sched_yield lives in -lrt.
|
# On Solaris, sched_yield lives in -lrt.
|
||||||
AC_SEARCH_LIBS(sched_yield, rt)
|
AC_SEARCH_LIBS(sched_yield, rt)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue