mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Add support for FreeBSD -kthread (kernel pthreads)
This commit is contained in:
parent
6edeeeffd4
commit
7cd4e05a27
2 changed files with 404 additions and 343 deletions
20
configure.in
20
configure.in
|
|
@ -418,6 +418,26 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
dnl Check for pthread support in current $LIBS
|
||||
AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes])
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try -kthread
|
||||
AC_CACHE_CHECK([for pthread_create with -kthread],
|
||||
[ol_cv_kthread_flag], [
|
||||
dnl save the flags
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="-kthread $LIBS"
|
||||
AC_TRY_LINK([char pthread();],[
|
||||
pthread_create();
|
||||
], ol_cv_kthread_flag=yes, ol_cv_kthread_flag=no)
|
||||
dnl restore the LIBS
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
|
||||
if test $ol_cv_kthread_flag = yes ; then
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
|
||||
ol_link_threads=posix
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try -pthread
|
||||
AC_CACHE_CHECK([for pthread_create with -pthread],
|
||||
|
|
|
|||
Loading…
Reference in a new issue