Commit 729fb83d authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Import pthread detection changes from devel.

parent c032cb29
...@@ -3195,66 +3195,6 @@ EOF ...@@ -3195,66 +3195,6 @@ EOF
fi fi
fi fi
if test $ol_link_kerberos = yes ; then
save_LIBS=$LIBS
$LIBS="$KRB_LIBS $LIBS"
for ac_func in des_string_to_key
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3205: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3210 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* 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 $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
LIBS=$save_LIBS
fi
ol_link_threads=no ol_link_threads=no
if test $ol_with_threads = auto -o $ol_with_threads = yes \ if test $ol_with_threads = auto -o $ol_with_threads = yes \
...@@ -3264,17 +3204,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ ...@@ -3264,17 +3204,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3268: checking for $ac_hdr" >&5 echo "configure:3208: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3273 "configure" #line 3213 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3303,13 +3243,13 @@ done ...@@ -3303,13 +3243,13 @@ done
if test $ac_cv_header_pthread_h = yes ; then if test $ac_cv_header_pthread_h = yes ; then
echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
echo "configure:3307: checking POSIX thread version" >&5 echo "configure:3247: checking POSIX thread version" >&5
if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3313 "configure" #line 3253 "configure"
#include "confdefs.h" #include "confdefs.h"
# include <pthread.h> # include <pthread.h>
...@@ -3331,7 +3271,7 @@ rm -f conftest* ...@@ -3331,7 +3271,7 @@ rm -f conftest*
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3335 "configure" #line 3275 "configure"
#include "confdefs.h" #include "confdefs.h"
# include <pthread.h> # include <pthread.h>
...@@ -3384,7 +3324,7 @@ EOF ...@@ -3384,7 +3324,7 @@ EOF
echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
echo "configure:3388: checking for LinuxThreads" >&5 echo "configure:3328: checking for LinuxThreads" >&5
if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3410,12 +3350,12 @@ EOF ...@@ -3410,12 +3350,12 @@ EOF
echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
echo "configure:3414: checking for pthread_create" >&5 echo "configure:3354: checking for pthread_create" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3419 "configure" #line 3359 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_create(); below. */ which can conflict with char pthread_create(); below. */
...@@ -3438,7 +3378,7 @@ pthread_create(); ...@@ -3438,7 +3378,7 @@ pthread_create();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_pthread_create=yes" eval "ac_cv_func_pthread_create=yes"
else else
...@@ -3460,7 +3400,7 @@ fi ...@@ -3460,7 +3400,7 @@ fi
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
echo "configure:3464: checking for pthread_create with -pthread" >&5 echo "configure:3404: checking for pthread_create with -pthread" >&5
if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3468,7 +3408,7 @@ else ...@@ -3468,7 +3408,7 @@ else
save_LIBS="$LIBS" save_LIBS="$LIBS"
LIBS="-pthread $LIBS" LIBS="-pthread $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3472 "configure" #line 3412 "configure"
#include "confdefs.h" #include "confdefs.h"
char pthread(); char pthread();
int main() { int main() {
...@@ -3477,7 +3417,7 @@ int main() { ...@@ -3477,7 +3417,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
ol_cv_pthread_flag=yes ol_cv_pthread_flag=yes
else else
...@@ -3501,7 +3441,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 ...@@ -3501,7 +3441,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
echo "configure:3505: checking for pthread_create with -pthreads" >&5 echo "configure:3445: checking for pthread_create with -pthreads" >&5
if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3509,7 +3449,7 @@ else ...@@ -3509,7 +3449,7 @@ else
save_LIBS="$LIBS" save_LIBS="$LIBS"
LIBS="-pthreads $LIBS" LIBS="-pthreads $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3513 "configure" #line 3453 "configure"
#include "confdefs.h" #include "confdefs.h"
char pthread(); char pthread();
int main() { int main() {
...@@ -3518,7 +3458,7 @@ int main() { ...@@ -3518,7 +3458,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
ol_cv_pthreads_flag=yes ol_cv_pthreads_flag=yes
else else
...@@ -3542,7 +3482,7 @@ echo "$ac_t""$ol_cv_pthreads_flag" 1>&6 ...@@ -3542,7 +3482,7 @@ echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
echo "configure:3546: checking for pthread_create with -thread" >&5 echo "configure:3486: checking for pthread_create with -thread" >&5
if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3550,7 +3490,7 @@ else ...@@ -3550,7 +3490,7 @@ else
save_LIBS="$LIBS" save_LIBS="$LIBS"
LIBS="-thread $LIBS" LIBS="-thread $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3554 "configure" #line 3494 "configure"
#include "confdefs.h" #include "confdefs.h"
char pthread(); char pthread();
int main() { int main() {
...@@ -3559,7 +3499,7 @@ int main() { ...@@ -3559,7 +3499,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
ol_cv_thread_flag=yes ol_cv_thread_flag=yes
else else
...@@ -3584,7 +3524,7 @@ echo "$ac_t""$ol_cv_thread_flag" 1>&6 ...@@ -3584,7 +3524,7 @@ echo "$ac_t""$ol_cv_thread_flag" 1>&6
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
save_LIBS="$LIBS" save_LIBS="$LIBS"
echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6 echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
echo "configure:3588: checking for pthread_join in -lpthread" >&5 echo "configure:3528: checking for pthread_join in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'` ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3592,7 +3532,7 @@ else ...@@ -3592,7 +3532,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lpthread -lexc $LIBS" LIBS="-lpthread -lexc $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3596 "configure" #line 3536 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3603,7 +3543,7 @@ int main() { ...@@ -3603,7 +3543,7 @@ int main() {
pthread_join() pthread_join()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3635,7 +3575,7 @@ fi ...@@ -3635,7 +3575,7 @@ fi
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
save_LIBS="$LIBS" save_LIBS="$LIBS"
echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6 echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
echo "configure:3639: checking for pthread_join in -lpthreads" >&5 echo "configure:3579: checking for pthread_join in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'` ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3643,7 +3583,7 @@ else ...@@ -3643,7 +3583,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3647 "configure" #line 3587 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3654,7 +3594,7 @@ int main() { ...@@ -3654,7 +3594,7 @@ int main() {
pthread_join() pthread_join()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3686,7 +3626,7 @@ fi ...@@ -3686,7 +3626,7 @@ fi
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
save_LIBS="$LIBS" save_LIBS="$LIBS"
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:3690: checking for pthread_create in -lpthread" >&5 echo "configure:3630: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3694,7 +3634,7 @@ else ...@@ -3694,7 +3634,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS" LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3698 "configure" #line 3638 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3705,7 +3645,7 @@ int main() { ...@@ -3705,7 +3645,7 @@ int main() {
pthread_create() pthread_create()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3733,7 +3673,7 @@ fi ...@@ -3733,7 +3673,7 @@ fi
if test $ol_link_threads = no ; then if test $ol_link_threads = no ; then
save_LIBS="$LIBS" save_LIBS="$LIBS"
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:3737: checking for pthread_create in -lc_r" >&5 echo "configure:3677: checking for pthread_create in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3741,7 +3681,7 @@ else ...@@ -3741,7 +3681,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS" LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3745 "configure" #line 3685 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3752,7 +3692,7 @@ int main() { ...@@ -3752,7 +3692,7 @@ int main() {
pthread_create() pthread_create()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3777,6 +3717,53 @@ fi ...@@ -3777,6 +3717,53 @@ fi
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi 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:3724: checking for pthread_create in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_create | 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
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3732 "configure"
#include "confdefs.h"
/* 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();
int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ol_link_threads=posix
LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
else
echo "$ac_t""no" 1>&6
fi
LIBS="$save_LIBS"
fi
if test $ol_link_threads != no ; then if test $ol_link_threads != no ; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1 #define HAVE_PTHREADS 1
...@@ -3790,12 +3777,12 @@ EOF ...@@ -3790,12 +3777,12 @@ EOF
for ac_func in sched_yield pthread_yield for ac_func in sched_yield pthread_yield
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3794: checking for $ac_func" >&5 echo "configure:3781: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3799 "configure" #line 3786 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3818,7 +3805,7 @@ $ac_func(); ...@@ -3818,7 +3805,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3846,7 +3833,7 @@ done ...@@ -3846,7 +3833,7 @@ done
if test $ac_cv_func_sched_yield = no -a \ if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then $ac_cv_func_pthread_yield = no ; then
echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
echo "configure:3850: checking for sched_yield in -lrt" >&5 echo "configure:3837: checking for sched_yield in -lrt" >&5
ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3854,7 +3841,7 @@ else ...@@ -3854,7 +3841,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS" LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3858 "configure" #line 3845 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3865,7 +3852,7 @@ int main() { ...@@ -3865,7 +3852,7 @@ int main() {
sched_yield() sched_yield()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3895,7 +3882,7 @@ fi ...@@ -3895,7 +3882,7 @@ fi
if test $ac_cv_func_sched_yield = no -a \ if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then $ac_cv_func_pthread_yield = no ; then
echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
echo "configure:3899: checking for sched_yield in -lposix4" >&5 echo "configure:3886: checking for sched_yield in -lposix4" >&5
ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3903,7 +3890,7 @@ else ...@@ -3903,7 +3890,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS" LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3907 "configure" #line 3894 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3914,7 +3901,7 @@ int main() { ...@@ -3914,7 +3901,7 @@ int main() {
sched_yield() sched_yield()
; return 0; } ; return 0; }
EOF </