From d0b69eceb446ac7176f96c3849c6997ec4ce134f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 10 Sep 2001 14:10:54 +0000 Subject: Improve threading on Solaris, according to SF patch #460269, submitted by bbrox@bbrox.org / lionel.ulmer@free.fr. This adds a configure check and if all goes well turns on the PTHREAD_SCOPE_SYSTEM thread attribute for new threads. This should remove the need to add tiny sleeps at the start of threads to allow other threads to be scheduled. --- Python/thread_pthread.h | 11 +- acconfig.h | 3 + configure | 496 +++++++++++++++++++++++++++--------------------- configure.in | 35 +++- pyconfig.h.in | 3 + 5 files changed, 324 insertions(+), 224 deletions(-) diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 6910ccb..26120d6 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -135,17 +135,22 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) { pthread_t th; int success; -#ifdef THREAD_STACK_SIZE +#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) pthread_attr_t attrs; #endif dprintf(("PyThread_start_new_thread called\n")); if (!initialized) PyThread_init_thread(); -#ifdef THREAD_STACK_SIZE +#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) pthread_attr_init(&attrs); +#endif +#ifdef THREAD_STACK_SIZE pthread_attr_setstacksize(&attrs, THREAD_STACK_SIZE); #endif +#ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED + pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM); +#endif success = pthread_create(&th, #if defined(PY_PTHREAD_D4) pthread_attr_default, @@ -160,7 +165,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) func, arg #elif defined(PY_PTHREAD_STD) -#ifdef THREAD_STACK_SIZE +#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) &attrs, #else (pthread_attr_t*)NULL, diff --git a/acconfig.h b/acconfig.h index 69dc3bf..ded68bb 100644 --- a/acconfig.h +++ b/acconfig.h @@ -155,6 +155,9 @@ /* The number of bytes in a pthread_t. */ #undef SIZEOF_PTHREAD_T +/* Defined if PTHREAD_SCOPE_SYSTEM supported. */ +#undef PTHREAD_SYSTEM_SCHED_SUPPORTED + /* sizeof(void *) */ #undef SIZEOF_VOID_P diff --git a/configure b/configure index 436efb7..6ab0a85 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.255 +# From configure.in Revision: 1.257 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -3547,6 +3547,7 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBOBJS="$LIBOBJS thread.o" else if test ! -z "$with_threads" -a -d "$with_threads" @@ -3561,17 +3562,17 @@ EOF ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 -echo "configure:3565: checking for mach/cthreads.h" >&5 +echo "configure:3566: checking for mach/cthreads.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3600,7 +3601,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 -echo "configure:3604: checking for --with-pth" >&5 +echo "configure:3605: checking for --with-pth" >&5 # Check whether --with-pth or --without-pth was given. if test "${with_pth+set}" = set; then withval="$with_pth" @@ -3620,7 +3621,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:3624: checking for pthread_create in -lpthread" >&5 +echo "configure:3625: 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 @@ -3628,7 +3629,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3663,7 +3664,9 @@ EOF *) cat >> confdefs.h <<\EOF #define _POSIX_THREADS 1 EOF -;; + + posix_threads=yes + ;; esac LIBS="-lpthread $LIBS" LIBOBJS="$LIBOBJS thread.o" @@ -3671,12 +3674,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 -echo "configure:3675: checking for pthread_detach" >&5 +echo "configure:3678: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" else @@ -3722,7 +3725,9 @@ EOF *) cat >> confdefs.h <<\EOF #define _POSIX_THREADS 1 EOF -;; + + posix_threads=yes + ;; esac LIBOBJS="$LIBOBJS thread.o" else @@ -3730,17 +3735,17 @@ else ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 -echo "configure:3734: checking for kernel/OS.h" >&5 +echo "configure:3739: checking for kernel/OS.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3769,7 +3774,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:3773: checking for pthread_create in -lpthreads" >&5 +echo "configure:3778: 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 @@ -3777,7 +3782,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3811,13 +3816,14 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBS="$LIBS -lpthreads" LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:3821: checking for pthread_create in -lc_r" >&5 +echo "configure:3827: 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 @@ -3825,7 +3831,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3859,13 +3865,14 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBS="$LIBS -lc_r" LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 -echo "configure:3869: checking for __d6_pthread_create in -lthread" >&5 +echo "configure:3876: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_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 @@ -3873,7 +3880,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3907,13 +3914,14 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -echo "configure:3917: checking for __pthread_create_system in -lpthread" >&5 +echo "configure:3925: checking for __pthread_create_system in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3921,7 +3929,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3955,13 +3963,14 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBS="$LIBS -lpthread" LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 -echo "configure:3965: checking for pthread_create in -lcma" >&5 +echo "configure:3974: checking for pthread_create in -lcma" >&5 ac_lib_var=`echo cma'_'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 @@ -3969,7 +3978,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcma $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4003,6 +4012,7 @@ EOF #define _POSIX_THREADS 1 EOF + posix_threads=yes LIBS="$LIBS -lcma" LIBOBJS="$LIBOBJS thread.o" else @@ -4031,8 +4041,56 @@ fi fi + if test "$posix_threads" = "yes"; then + echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 +echo "configure:4047: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 + if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < + void *foo(void *parm) { + return NULL; + } + main() { + pthread_attr_t attr; + if (pthread_attr_init(&attr)) exit(-1); + if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); + if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); + exit(0); + } +EOF +if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_pthread_system_supported=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_pthread_system_supported=no +fi +rm -fr conftest* +fi + + +fi + + echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 + if test "$ac_cv_pthread_system_supported" = "yes"; then + cat >> confdefs.h <<\EOF +#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 +EOF + + fi + fi + echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 -echo "configure:4036: checking for usconfig in -lmpc" >&5 +echo "configure:4094: checking for usconfig in -lmpc" >&5 ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4040,7 +4098,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4078,7 +4136,7 @@ else fi echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:4082: checking for thr_create in -lthread" >&5 +echo "configure:4140: checking for thr_create in -lthread" >&5 ac_lib_var=`echo thread'_'thr_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 @@ -4086,7 +4144,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4136,7 +4194,7 @@ fi # Check for enable-ipv6 echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 -echo "configure:4140: checking if --enable-ipv6 is specified" >&5 +echo "configure:4198: checking if --enable-ipv6 is specified" >&5 # Check whether --enable-ipv6 or --disable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval="$enable_ipv6" @@ -4161,7 +4219,7 @@ else else cat > conftest.$ac_ext < @@ -4175,7 +4233,7 @@ main() } EOF -if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 ipv6=yes @@ -4192,9 +4250,9 @@ fi if test "$ipv6" = "yes"; then echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 -echo "configure:4196: checking if RFC2553 API is available" >&5 +echo "configure:4254: checking if RFC2553 API is available" >&5 cat > conftest.$ac_ext < #include @@ -4203,7 +4261,7 @@ struct sockaddr_in6 x; x.sin6_scope_id; ; return 0; } EOF -if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ipv6=yes @@ -4233,13 +4291,13 @@ ipv6trylibc=no if test "$ipv6" = "yes"; then echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 -echo "configure:4237: checking ipv6 stack type" >&5 +echo "configure:4295: checking ipv6 stack type" >&5 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do case $i in inria) cat > conftest.$ac_ext < @@ -4258,7 +4316,7 @@ rm -f conftest* ;; kame) cat > conftest.$ac_ext < @@ -4280,7 +4338,7 @@ rm -f conftest* ;; linux-glibc) cat > conftest.$ac_ext < @@ -4317,7 +4375,7 @@ rm -f conftest* ;; toshiba) cat > conftest.$ac_ext < @@ -4338,7 +4396,7 @@ rm -f conftest* ;; v6d) cat > conftest.$ac_ext < @@ -4359,7 +4417,7 @@ rm -f conftest* ;; zeta) cat > conftest.$ac_ext < @@ -4404,7 +4462,7 @@ fi # Check for GC support echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 -echo "configure:4408: checking for --with-cycle-gc" >&5 +echo "configure:4466: checking for --with-cycle-gc" >&5 # Check whether --with-cycle-gc or --without-cycle-gc was given. if test "${with_cycle_gc+set}" = set; then withval="$with_cycle_gc" @@ -4426,7 +4484,7 @@ echo "$ac_t""$with_cycle_gc" 1>&6 # Check for Python-specific malloc support echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 -echo "configure:4430: checking for --with-pymalloc" >&5 +echo "configure:4488: checking for --with-pymalloc" >&5 # Check whether --with-pymalloc or --without-pymalloc was given. if test "${with_pymalloc+set}" = set; then withval="$with_pymalloc" @@ -4445,7 +4503,7 @@ fi # Check for --with-wctype-functions echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 -echo "configure:4449: checking for --with-wctype-functions" >&5 +echo "configure:4507: checking for --with-wctype-functions" >&5 # Check whether --with-wctype-functions or --without-wctype-functions was given. if test "${with_wctype_functions+set}" = set; then withval="$with_wctype_functions" @@ -4467,7 +4525,7 @@ fi DLINCLDIR=. echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 -echo "configure:4471: checking for --with-sgi-dl" >&5 +echo "configure:4529: checking for --with-sgi-dl" >&5 # Check whether --with-sgi-dl or --without-sgi-dl was given. if test "${with_sgi_dl+set}" = set; then withval="$with_sgi_dl" @@ -4491,7 +4549,7 @@ fi echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 -echo "configure:4495: checking for --with-dl-dld" >&5 +echo "configure:4553: checking for --with-dl-dld" >&5 # Check whether --with-dl-dld or --without-dl-dld was given. if test "${with_dl_dld+set}" = set; then withval="$with_dl_dld" @@ -4520,12 +4578,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4524: checking for $ac_func" >&5 +echo "configure:4582: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4577,7 +4635,7 @@ done # loading of modules. echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 -echo "configure:4581: checking DYNLOADFILE" >&5 +echo "configure:4639: checking DYNLOADFILE" >&5 if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in @@ -4608,7 +4666,7 @@ fi echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 -echo "configure:4612: checking MACHDEP_OBJS" >&5 +echo "configure:4670: checking MACHDEP_OBJS" >&5 if test -z "$MACHDEP_OBJS" then MACHDEP_OBJS=$extra_machdep_objs @@ -4631,12 +4689,12 @@ for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ truncate uname waitpid _getpty getpriority do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4635: checking for $ac_func" >&5 +echo "configure:4693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4689,12 +4747,12 @@ done for ac_func in openpty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4693: checking for $ac_func" >&5 +echo "configure:4751: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4739,7 +4797,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 -echo "configure:4743: checking for openpty in -lutil" >&5 +echo "configure:4801: checking for openpty in -lutil" >&5 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4747,7 +4805,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4787,12 +4845,12 @@ done for ac_func in forkpty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4791: checking for $ac_func" >&5 +echo "configure:4849: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4837,7 +4895,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 -echo "configure:4841: checking for forkpty in -lutil" >&5 +echo "configure:4899: checking for forkpty in -lutil" >&5 ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4845,7 +4903,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4887,12 +4945,12 @@ done for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4891: checking for $ac_func" >&5 +echo "configure:4949: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4943,12 +5001,12 @@ done for ac_func in dup2 getcwd strdup strerror memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4947: checking for $ac_func" >&5 +echo "configure:5005: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5000,12 +5058,12 @@ done for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5004: checking for $ac_func" >&5 +echo "configure:5062: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5047,14 +5105,14 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF cat > conftest.$ac_ext < int main() { getpgrp(0); ; return 0; } EOF -if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define GETPGRP_HAVE_ARG 1 @@ -5073,12 +5131,12 @@ done for ac_func in setpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5077: checking for $ac_func" >&5 +echo "configure:5135: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5120,14 +5178,14 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF cat > conftest.$ac_ext < int main() { setpgrp(0,0); ; return 0; } EOF -if { (eval echo configure:5131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SETPGRP_HAVE_ARG 1 @@ -5146,12 +5204,12 @@ done for ac_func in gettimeofday do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5150: checking for $ac_func" >&5 +echo "configure:5208: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5193,14 +5251,14 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF cat > conftest.$ac_ext < int main() { gettimeofday((struct timeval*)0,(struct timezone*)0); ; return 0; } EOF -if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -5221,12 +5279,12 @@ done for ac_func in getaddrinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5225: checking for $ac_func" >&5 +echo "configure:5283: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5268,13 +5326,13 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 -echo "configure:5272: checking getaddrinfo bug" >&5 +echo "configure:5330: checking getaddrinfo bug" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""buggy" 1>&6 buggygetaddrinfo=yes else cat > conftest.$ac_ext < @@ -5363,7 +5421,7 @@ main() } EOF -if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""good" 1>&6 buggygetaddrinfo=no @@ -5394,12 +5452,12 @@ fi for ac_func in getnameinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5398: checking for $ac_func" >&5 +echo "configure:5456: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5449,12 +5507,12 @@ done # checks for structures echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5453: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5511: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5463,7 +5521,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5484,12 +5542,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5488: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5546: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5497,7 +5555,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5518,12 +5576,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:5522: checking for tm_zone in struct tm" >&5 +echo "configure:5580: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -5531,7 +5589,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:5535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -5551,12 +5609,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:5555: checking for tzname" >&5 +echo "configure:5613: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -5566,7 +5624,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -5589,19 +5647,19 @@ fi echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 -echo "configure:5593: checking for time.h that defines altzone" >&5 +echo "configure:5651: checking for time.h that defines altzone" >&5 if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return altzone; ; return 0; } EOF -if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time_altzone=yes else @@ -5623,9 +5681,9 @@ fi was_it_defined=no echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5627: checking whether sys/select.h and sys/time.h may both be included" >&5 +echo "configure:5685: checking whether sys/select.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < @@ -5636,7 +5694,7 @@ int main() { ; ; return 0; } EOF -if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SYS_SELECT_WITH_SYS_TIME 1 @@ -5650,12 +5708,12 @@ rm -f conftest* echo "$ac_t""$was_it_defined" 1>&6 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 -echo "configure:5654: checking for addrinfo" >&5 +echo "configure:5712: checking for addrinfo" >&5 if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5663,7 +5721,7 @@ int main() { struct addrinfo a ; return 0; } EOF -if { (eval echo configure:5667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_addrinfo=yes else @@ -5684,12 +5742,12 @@ EOF fi echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 -echo "configure:5688: checking for sockaddr_storage" >&5 +echo "configure:5746: checking for sockaddr_storage" >&5 if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5698,7 +5756,7 @@ int main() { struct sockaddr_storage s ; return 0; } EOF -if { (eval echo configure:5702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_sockaddr_storage=yes else @@ -5721,14 +5779,14 @@ fi # checks for compiler characteristics echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:5725: checking whether char is unsigned" >&5 +echo "configure:5783: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -5784,12 +5842,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5788: checking for working const" >&5 +echo "configure:5846: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5861,16 +5919,16 @@ fi works=no echo $ac_n "checking for working volatile""... $ac_c" 1>&6 -echo "configure:5865: checking for working volatile" >&5 +echo "configure:5923: checking for working volatile" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -5887,16 +5945,16 @@ echo "$ac_t""$works" 1>&6 works=no echo $ac_n "checking for working signed char""... $ac_c" 1>&6 -echo "configure:5891: checking for working signed char" >&5 +echo "configure:5949: checking for working signed char" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -5913,16 +5971,16 @@ echo "$ac_t""$works" 1>&6 have_prototypes=no echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:5917: checking for prototypes" >&5 +echo "configure:5975: checking for prototypes" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_PROTOTYPES 1 @@ -5937,9 +5995,9 @@ echo "$ac_t""$have_prototypes" 1>&6 works=no echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 -echo "configure:5941: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:5999: checking for variable length prototypes and stdarg.h" >&5 cat > conftest.$ac_ext < @@ -5956,7 +6014,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:5960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STDARG_PROTOTYPES 1 @@ -5972,16 +6030,16 @@ echo "$ac_t""$works" 1>&6 if test "$have_prototypes" = yes; then bad_prototypes=no echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 -echo "configure:5976: checking for bad exec* prototypes" >&5 +echo "configure:6034: checking for bad exec* prototypes" >&5 cat > conftest.$ac_ext < int main() { char **t;execve("@",t,t); ; return 0; } EOF -if { (eval echo configure:5985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -5998,9 +6056,9 @@ fi # check if sockaddr has sa_len member echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 -echo "configure:6002: checking if sockaddr has sa_len member" >&5 +echo "configure:6060: checking if sockaddr has sa_len member" >&5 cat > conftest.$ac_ext < #include @@ -6009,7 +6067,7 @@ struct sockaddr x; x.sa_len = 0; ; return 0; } EOF -if { (eval echo configure:6013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -6025,7 +6083,7 @@ fi rm -f conftest* echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 -echo "configure:6029: checking for bad static forward" >&5 +echo "configure:6087: checking for bad static forward" >&5 if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6033,7 +6091,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_bad_static_forward=no else @@ -6073,9 +6131,9 @@ fi va_list_is_array=no echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 -echo "configure:6077: checking whether va_list is an array" >&5 +echo "configure:6135: checking whether va_list is an array" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -6104,12 +6162,12 @@ echo "$ac_t""$va_list_is_array" 1>&6 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 -echo "configure:6108: checking for gethostbyname_r" >&5 +echo "configure:6166: checking for gethostbyname_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname_r=yes" else @@ -6152,11 +6210,11 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then EOF echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 -echo "configure:6156: checking gethostbyname_r with 6 args" >&5 +echo "configure:6214: checking gethostbyname_r with 6 args" >&5 OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat > conftest.$ac_ext < @@ -6173,7 +6231,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -6193,9 +6251,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 -echo "configure:6197: checking gethostbyname_r with 5 args" >&5 +echo "configure:6255: checking gethostbyname_r with 5 args" >&5 cat > conftest.$ac_ext < @@ -6212,7 +6270,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -6232,9 +6290,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 -echo "configure:6236: checking gethostbyname_r with 3 args" >&5 +echo "configure:6294: checking gethostbyname_r with 3 args" >&5 cat > conftest.$ac_ext < @@ -6249,7 +6307,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -6285,12 +6343,12 @@ else for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6289: checking for $ac_func" >&5 +echo "configure:6347: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6351,12 +6409,12 @@ fi # Linux requires this for correct f.p. operations echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 -echo "configure:6355: checking for __fpu_control" >&5 +echo "configure:6413: checking for __fpu_control" >&5 if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func___fpu_control=yes" else @@ -6397,7 +6455,7 @@ if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 -echo "configure:6401: checking for __fpu_control in -lieee" >&5 +echo "configure:6459: checking for __fpu_control in -lieee" >&5 ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6405,7 +6463,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6449,7 +6507,7 @@ fi # Check for --with-fpectl echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 -echo "configure:6453: checking for --with-fpectl" >&5 +echo "configure:6511: checking for --with-fpectl" >&5 # Check whether --with-fpectl or --without-fpectl was given. if test "${with_fpectl+set}" = set; then withval="$with_fpectl" @@ -6474,7 +6532,7 @@ BeOS) ;; *) LIBM=-lm esac echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 -echo "configure:6478: checking for --with-libm=STRING" >&5 +echo "configure:6536: checking for --with-libm=STRING" >&5 # Check whether --with-libm or --without-libm was given. if test "${with_libm+set}" = set; then withval="$with_libm" @@ -6495,7 +6553,7 @@ fi # check for --with-libc=... echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 -echo "configure:6499: checking for --with-libc=STRING" >&5 +echo "configure:6557: checking for --with-libc=STRING" >&5 # Check whether --with-libc or --without-libc was given. if test "${with_libc+set}" = set; then withval="$with_libc" @@ -6519,12 +6577,12 @@ LIBS="$LIBS $LIBM" for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6523: checking for $ac_func" >&5 +echo "configure:6581: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6577,7 +6635,7 @@ LIBS=$LIBS_SAVE # check whether malloc(0) returns NULL or not echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 -echo "configure:6581: checking what malloc(0) returns" >&5 +echo "configure:6639: checking what malloc(0) returns" >&5 if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6585,7 +6643,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #ifdef HAVE_STDLIB @@ -6604,7 +6662,7 @@ main() { exit(0); } EOF -if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_malloc_zero=nonnull else @@ -6630,17 +6688,17 @@ fi # check for wchar.h ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 -echo "configure:6634: checking for wchar.h" >&5 +echo "configure:6692: checking for wchar.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6671,7 +6729,7 @@ fi if test "$wchar_h" = yes then echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 -echo "configure:6675: checking size of wchar_t" >&5 +echo "configure:6733: checking size of wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6679,7 +6737,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -6690,7 +6748,7 @@ main() exit(0); } EOF -if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_wchar_t=`cat conftestval` else @@ -6712,7 +6770,7 @@ EOF fi echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 -echo "configure:6716: checking what type to use for unicode" >&5 +echo "configure:6774: checking what type to use for unicode" >&5 # Check whether --enable-unicode or --disable-unicode was given. if test "${enable_unicode+set}" = set; then enableval="$enable_unicode" @@ -6787,14 +6845,14 @@ fi # check for endianness echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:6791: checking whether byte ordering is bigendian" >&5 +echo "configure:6849: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -6805,11 +6863,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:6809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -6820,7 +6878,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:6824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -6840,7 +6898,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -6880,7 +6938,7 @@ fi # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 -echo "configure:6884: checking whether right shift extends the sign bit" >&5 +echo "configure:6942: checking whether right shift extends the sign bit" >&5 if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6889,7 +6947,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_rshift_extends_sign=yes else @@ -6923,13 +6981,13 @@ fi # check for getc_unlocked and related locking functions echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 -echo "configure:6927: checking for getc_unlocked() and friends" >&5 +echo "configure:6985: checking for getc_unlocked() and friends" >&5 if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -6941,7 +6999,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_have_getc_unlocked=yes else @@ -6964,7 +7022,7 @@ fi # check for readline 4.2 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:6968: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:7026: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6972,7 +7030,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline -ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7008,7 +7066,7 @@ fi echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 -echo "configure:7012: checking for broken nice()" >&5 +echo "configure:7070: checking for broken nice()" >&5 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7017,7 +7075,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_broken_nice=yes else @@ -7060,12 +7118,12 @@ cat >> confdefs.h <<\EOF #endif EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:7064: checking for socklen_t" >&5 +echo "configure:7122: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7114,7 +7172,7 @@ done SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 -echo "configure:7118: checking for build directories" >&5 +echo "configure:7176: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then mkdir $dir diff --git a/configure.in b/configure.in index 8f4b0b9..7ade904 100644 --- a/configure.in +++ b/configure.in @@ -903,6 +903,7 @@ then CC="$CC -Kpthread" AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBOBJS="$LIBOBJS thread.o" else if test ! -z "$with_threads" -a -d "$with_threads" @@ -927,14 +928,18 @@ else AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD) case $ac_sys_system in Darwin*) ;; - *) AC_DEFINE(_POSIX_THREADS);; + *) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes + ;; esac LIBS="-lpthread $LIBS" LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD) case $ac_sys_system in Darwin*) ;; - *) AC_DEFINE(_POSIX_THREADS);; + *) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes + ;; esac LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD) @@ -942,27 +947,53 @@ else LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBS="$LIBS -lpthreads" LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBS="$LIBS -lc_r" LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBS="$LIBS -lpthread" LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) + posix_threads=yes LIBS="$LIBS -lcma" LIBOBJS="$LIBOBJS thread.o"],[ USE_THREAD_MODULE="#"]) ])])])])])])])])]) + if test "$posix_threads" = "yes"; then + AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) + AC_CACHE_VAL(ac_cv_pthread_system_supported, + [AC_TRY_RUN([#include + void *foo(void *parm) { + return NULL; + } + main() { + pthread_attr_t attr; + if (pthread_attr_init(&attr)) exit(-1); + if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); + if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); + exit(0); + }], ac_cv_pthread_system_supported=yes, ac_cv_pthread_system_supported=no) + ]) + AC_MSG_RESULT($ac_cv_pthread_system_supported) + if test "$ac_cv_pthread_system_supported" = "yes"; then + AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED) + fi + fi + AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) LIBS="$LIBS -lmpc" LIBOBJS="$LIBOBJS thread.o" diff --git a/pyconfig.h.in b/pyconfig.h.in index c47a8fb..9250e66 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -214,6 +214,9 @@ /* The number of bytes in a pthread_t. */ #undef SIZEOF_PTHREAD_T +/* Defined if PTHREAD_SCOPE_SYSTEM supported. */ +#undef PTHREAD_SYSTEM_SCHED_SUPPORTED + /* Define to `int' if doesn't define. */ #undef socklen_t -- cgit v0.12