mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Pthread library check. Autoconf uses same cache variable based
upon library and function, but not secondary libraries. Must use different functions in such cases.
This commit is contained in:
parent
4ed85bbbb4
commit
f2aa11550e
20
configure
vendored
20
configure
vendored
@ -2926,9 +2926,9 @@ echo "$ac_t""$ol_cv_thread_flag" 1>&6
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
save_LIBS="$LIBS"
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:2931: checking for pthread_create in -lpthread" >&5
|
||||
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:2931: checking for pthread_join in -lpthread" >&5
|
||||
ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2940,10 +2940,10 @@ cat > conftest.$ac_ext <<EOF
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char pthread_create();
|
||||
char pthread_join();
|
||||
|
||||
int main() {
|
||||
pthread_create()
|
||||
pthread_join()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
@ -2977,9 +2977,9 @@ fi
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
save_LIBS="$LIBS"
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:2982: checking for pthread_create in -lpthreads" >&5
|
||||
ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:2982: checking for pthread_join in -lpthreads" >&5
|
||||
ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2991,10 +2991,10 @@ cat > conftest.$ac_ext <<EOF
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char pthread_create();
|
||||
char pthread_join();
|
||||
|
||||
int main() {
|
||||
pthread_create()
|
||||
pthread_join()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
|
@ -394,7 +394,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try DEC Threads -lpthread -lexc
|
||||
save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(pthread, pthread_create, [
|
||||
AC_CHECK_LIB(pthread, pthread_join, [
|
||||
ol_link_threads=posix
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
|
||||
if test $ol_with_preemptive = auto ; then
|
||||
@ -407,7 +407,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try DEC Threads -lpthreads -lmach -lexc -lc_r
|
||||
save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [
|
||||
AC_CHECK_LIB(pthreads, pthread_join, [
|
||||
ol_link_threads=posix
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
|
||||
if test $ol_with_preemptive = auto ; then
|
||||
|
Loading…
Reference in New Issue
Block a user