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
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
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
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3273 "configure"
#line 3213 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
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`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3303,13 +3243,13 @@ done
if test $ac_cv_header_pthread_h = yes ; then
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3313 "configure"
#line 3253 "configure"
#include "confdefs.h"
# include <pthread.h>
......@@ -3331,7 +3271,7 @@ rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 3335 "configure"
#line 3275 "configure"
#include "confdefs.h"
# include <pthread.h>
......@@ -3384,7 +3324,7 @@ EOF
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
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3410,12 +3350,12 @@ EOF
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3419 "configure"
#line 3359 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_create(); below. */
......@@ -3438,7 +3378,7 @@ pthread_create();
; return 0; }
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*
eval "ac_cv_func_pthread_create=yes"
else
......@@ -3460,7 +3400,7 @@ fi
if test $ol_link_threads = no ; then
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
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3468,7 +3408,7 @@ else
save_LIBS="$LIBS"
LIBS="-pthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3472 "configure"
#line 3412 "configure"
#include "confdefs.h"
char pthread();
int main() {
......@@ -3477,7 +3417,7 @@ int main() {
; return 0; }
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*
ol_cv_pthread_flag=yes
else
......@@ -3501,7 +3441,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6
if test $ol_link_threads = no ; then
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
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3509,7 +3449,7 @@ else
save_LIBS="$LIBS"
LIBS="-pthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3513 "configure"
#line 3453 "configure"
#include "confdefs.h"
char pthread();
int main() {
......@@ -3518,7 +3458,7 @@ int main() {
; return 0; }
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*
ol_cv_pthreads_flag=yes
else
......@@ -3542,7 +3482,7 @@ echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
if test $ol_link_threads = no ; then
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
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3550,7 +3490,7 @@ else
save_LIBS="$LIBS"
LIBS="-thread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3554 "configure"
#line 3494 "configure"
#include "confdefs.h"
char pthread();
int main() {
......@@ -3559,7 +3499,7 @@ int main() {
; return 0; }
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*
ol_cv_thread_flag=yes
else
......@@ -3584,7 +3524,7 @@ 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_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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3592,7 +3532,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread -lexc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3596 "configure"
#line 3536 "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
......@@ -3603,7 +3543,7 @@ int main() {
pthread_join()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3635,7 +3575,7 @@ fi
if test $ol_link_threads = no ; then
save_LIBS="$LIBS"
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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3643,7 +3583,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3647 "configure"
#line 3587 "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
......@@ -3654,7 +3594,7 @@ int main() {
pthread_join()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3686,7 +3626,7 @@ fi
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: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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3694,7 +3634,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3698 "configure"
#line 3638 "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
......@@ -3705,7 +3645,7 @@ int main() {
pthread_create()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3733,7 +3673,7 @@ fi
if test $ol_link_threads = no ; then
save_LIBS="$LIBS"
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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3741,7 +3681,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3745 "configure"
#line 3685 "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
......@@ -3752,7 +3692,7 @@ int main() {
pthread_create()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3777,6 +3717,53 @@ fi
LIBS="$save_LIBS"
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
cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
......@@ -3790,12 +3777,12 @@ EOF
for ac_func in sched_yield pthread_yield
do
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3799 "configure"
#line 3786 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -3818,7 +3805,7 @@ $ac_func();
; return 0; }
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*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -3846,7 +3833,7 @@ done
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then
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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3854,7 +3841,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3858 "configure"
#line 3845 "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
......@@ -3865,7 +3852,7 @@ int main() {
sched_yield()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3895,7 +3882,7 @@ fi
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then
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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3903,7 +3890,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3907 "configure"
#line 3894 "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
......@@ -3914,7 +3901,7 @@ int main() {
sched_yield()
; return 0; }
EOF
if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3905: \"$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
......@@ -3950,12 +3937,12 @@ fi
for ac_func in pthread_kill
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3954: checking for $ac_func" >&5
echo "configure:3941: 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 3959 "configure"
#line 3946 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -3978,7 +3965,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -4009,12 +3996,12 @@ done
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4013: checking for $ac_func" >&5
echo "configure:4000: 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 4018 "configure"
#line 4005 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -4037,7 +4024,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -4068,12 +4055,12 @@ done
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4072: checking for $ac_func" >&5
echo "configure:4059: 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 4077 "configure"
#line 4064 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -4096,7 +4083,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -4122,7 +4109,7 @@ done
echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
echo "configure:4126: checking if pthread_create() works" >&5
echo "configure:4113: checking if pthread_create() works" >&5
if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -4131,7 +4118,7 @@ else
ol_cv_pthread_create_works=yes
else
cat > conftest.$ac_ext <<EOF
#line 4135 "configure"
#line 4122 "configure"
#include "confdefs.h"
#include <pthread.h>
......@@ -4154,7 +4141,7 @@ int main(argc, argv)
}
EOF
if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_create_works=yes
else
......@@ -4176,7 +4163,7 @@ fi
if test $ol_with_yielding_select = auto ; then
echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
echo "configure:4180: checking if select yields when using pthreads" >&5
echo "configure:4167: checking if select yields when using pthreads" >&5
if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -4186,7 +4173,7 @@ else
{ echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 4190 "configure"
#line 4177 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -4218,10 +4205,10 @@ static void *task(p)
if(i < 0) {
perror("select");
exit(0);
exit(10);
}
exit(1); /* if we exit here, the select blocked the whole process */
exit(0); /* if we exit here, the select blocked the whole process */
}
int main(argc, argv)
......@@ -4233,7 +4220,7 @@ int main(argc, argv)
/* create a pipe to select */
if(pipe(&fildes[0])) {
perror("select");
exit(0);
exit(1);
}
#ifdef HAVE_PTHREAD_SETCONCURRENCY
......@@ -4254,17 +4241,18 @@ int main(argc, argv)
pthread_yield(); /* make sure task runs first */
#endif
#endif
exit(0);
exit(2);
}
EOF
if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_select_yields=yes
ol_cv_pthread_select_yields=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ol_cv_pthread_select_yields=no
ol_cv_pthread_select_yields=yes
fi
rm -fr conftest*
fi
......@@ -4278,7 +4266,6 @@ fi
fi
fi
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
else
......@@ -4298,17 +4285,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4302: checking for $ac_hdr" >&5
echo "configure:4289: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4307 "configure"
#line 4294 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4338,12 +4325,12 @@ done
ol_with_threads=found
echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
echo "configure:4342: checking for cthread_fork" >&5
</