mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 07:09:34 -05:00
Add test for thread specific h_errno and, if yes, add thread libraries
to lib.
This commit is contained in:
parent
e2050a74d0
commit
cc3785eaab
2 changed files with 584 additions and 545 deletions
12
configure.in
12
configure.in
|
|
@ -1122,7 +1122,17 @@ if test $ol_link_threads != no ; then
|
|||
[ol_cv_errno_thread_specific=no])
|
||||
])
|
||||
|
||||
if test $ol_cv_errno_thread_specific != yes ; then
|
||||
dnl The h_errno declaration may dependent upon _REENTRANT.
|
||||
dnl If it does, we must link with thread support.
|
||||
AC_CACHE_CHECK([for thread specific h_errno],
|
||||
[ol_cv_h_errno_thread_specific], [
|
||||
AC_TRY_LINK([#include <netdb.h>], [h_errno = 0;],
|
||||
[ol_cv_h_errno_thread_specific=yes],
|
||||
[ol_cv_h_errno_thread_specific=no])
|
||||
])
|
||||
|
||||
if test $ol_cv_errno_thread_specific != yes \
|
||||
-o $ol_cv_h_errno_thread_specific != yes ; then
|
||||
LIBS="$LTHREAD_LIBS $LIBS"
|
||||
LTHREAD_LIBS=""
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue