mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Try to find sched_yield in -lposix4 (Solaris) and -lrt (Digital Unix)
This commit is contained in:
parent
1c0f451699
commit
72ecc42de1
2 changed files with 311 additions and 197 deletions
19
configure.in
19
configure.in
|
|
@ -360,7 +360,24 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
|
||||||
|
|
||||||
if test $ac_cv_func_sched_yield = no -a \
|
if test $ac_cv_func_sched_yield = no -a \
|
||||||
$ac_cv_func_pthread_yield = no ; then
|
$ac_cv_func_pthread_yield = no ; then
|
||||||
|
dnl Digital UNIX has sched_yield() in -lrt
|
||||||
|
AC_CHECK_LIB(rt, sched_yield,
|
||||||
|
[LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
|
||||||
|
AC_DEFINE(HAVE_SCHED_YIELD,1)
|
||||||
|
ac_cv_func_sched_yield=yes],
|
||||||
|
[ac_cv_func_sched_yield=no])
|
||||||
|
fi
|
||||||
|
if test $ac_cv_func_sched_yield = no -a \
|
||||||
|
$ac_cv_func_pthread_yield = no ; then
|
||||||
|
dnl Solaris has sched_yield() in -lposix4
|
||||||
|
AC_CHECK_LIB(posix4, sched_yield,
|
||||||
|
[LTHREAD_LIBS="$LTHREAD_LIBS -lposix4"
|
||||||
|
AC_DEFINE(HAVE_SCHED_YIELD,1)
|
||||||
|
ac_cv_func_sched_yield=yes],
|
||||||
|
[ac_cv_func_sched_yield=no])
|
||||||
|
fi
|
||||||
|
if test $ac_cv_func_sched_yield = no -a \
|
||||||
|
$ac_cv_func_pthread_yield = no ; then
|
||||||
AC_MSG_WARN([could not locate sched_yield() or pthread_yield()])
|
AC_MSG_WARN([could not locate sched_yield() or pthread_yield()])
|
||||||
AC_MSG_ERROR([POSIX Threads are not usable])
|
AC_MSG_ERROR([POSIX Threads are not usable])
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue