Add support for FreeBSD -kthread (kernel pthreads)

This commit is contained in:
Kurt Zeilenga 1999-01-21 22:25:33 +00:00
parent 6edeeeffd4
commit 7cd4e05a27
2 changed files with 404 additions and 343 deletions

727
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -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],