mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 10:09:43 -05:00
Check for pthread with -mt (for Solaris 2.x).
Still requires user to workaround Solaris pthread_create in -lc issue.
This commit is contained in:
parent
aa17fdd0bd
commit
9e2fc1ed06
2 changed files with 381 additions and 321 deletions
21
configure.in
21
configure.in
|
|
@ -493,6 +493,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
|
||||
dnl pthread_create() with -pthreads (?)
|
||||
dnl pthread_create() with -thread (?)
|
||||
dnl pthread_create() with -mt (Solaris)
|
||||
dnl
|
||||
dnl Check pthread (final) libraries
|
||||
dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
|
||||
|
|
@ -595,6 +596,26 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
fi
|
||||
fi
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try -mt
|
||||
AC_CACHE_CHECK([for pthread_create with -mt],
|
||||
[ol_cv_thread_flag], [
|
||||
dnl save the flags
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="-mt $LIBS"
|
||||
AC_TRY_LINK([char pthread_create();],
|
||||
[pthread_create();],
|
||||
[ol_cv_thread_flag=yes], [ol_cv_thread_flag=no])
|
||||
dnl restore the LIBS
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
|
||||
if test $ol_cv_thread_flag = yes ; then
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -mt"
|
||||
ol_link_threads=posix
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try DEC Threads -lpthread -lmach -lexc -lc_r
|
||||
save_LIBS="$LIBS"
|
||||
|
|
|
|||
Loading…
Reference in a new issue