From 07bd90e92d9cb8982ad541dda59bc0f8867e9414 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 8 May 2000 13:41:38 +0000 Subject: [PATCH] Andy Dustman: add GNU pth user-space thread support. --- Include/Python.h | 4 + Python/thread.c | 4 + Python/thread_pth.h | 328 ++++++++++++++++++++++++++++++++ acconfig.h | 3 + config.h.in | 3 + configure | 444 ++++++++++++++++++++++++-------------------- configure.in | 6 +- 7 files changed, 594 insertions(+), 198 deletions(-) create mode 100644 Python/thread_pth.h diff --git a/Include/Python.h b/Include/Python.h index 044ad5f521c..41d0eecccab 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -128,4 +128,8 @@ PERFORMANCE OF THIS SOFTWARE. #define Py_file_input 257 #define Py_eval_input 258 +#ifdef _GNU_PTH +/* GNU pth user-space thread support */ +#include +#endif #endif /* !Py_PYTHON_H */ diff --git a/Python/thread.c b/Python/thread.c index fcaa10d783e..d5e026dba80 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -150,9 +150,13 @@ void PyThread_init_thread _P0() #include "thread_lwp.h" #endif +#ifdef _GNU_PTH +#include "thread_pth.h" +#else #ifdef _POSIX_THREADS #include "thread_pthread.h" #endif +#endif #ifdef C_THREADS #include "thread_cthread.h" diff --git a/Python/thread_pth.h b/Python/thread_pth.h new file mode 100644 index 00000000000..305121e7e1a --- /dev/null +++ b/Python/thread_pth.h @@ -0,0 +1,328 @@ +/*********************************************************** +Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, +The Netherlands. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Stichting Mathematisch +Centrum or CWI or Corporation for National Research Initiatives or +CNRI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +While CWI is the initial source for this software, a modified version +is made available by the Corporation for National Research Initiatives +(CNRI) at the Internet address ftp://ftp.python.org. + +STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH +CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +******************************************************************/ + +/* GNU pth threads interface + http://www.gnu.org/software/pth + 2000-05-03 Andy Dustman + + Adapted from Posix threads interface + 12 May 1997 -- david arnold + */ + +#include +#include +#include + +/* A pth mutex isn't sufficient to model the Python lock type + * because pth mutexes can be acquired multiple times by the + * same thread. + * + * The pth_lock struct implements a Python lock as a "locked?" bit + * and a pair. In general, if the bit can be acquired + * instantly, it is, else the pair is used to block the thread until the + * bit is cleared. + */ + +typedef struct { + char locked; /* 0=unlocked, 1=locked */ + /* a pair to handle an acquire of a locked lock */ + pth_cond_t lock_released; + pth_mutex_t mut; +} pth_lock; + +#define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } + +/* + * Initialization. + */ + +static void PyThread__init_thread _P0() +{ + pth_init(); +} + +/* + * Thread support. + */ + + +int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) +{ + pth_t th; + int success; + dprintf(("PyThread_start_new_thread called\n")); + if (!initialized) + PyThread_init_thread(); + + th = pth_spawn(PTH_ATTR_DEFAULT, + (void* (*)_P((void *)))func, + (void *)arg + ); + + return th == NULL ? 0 : 1; +} + +long PyThread_get_thread_ident _P0() +{ + volatile pth_t threadid; + if (!initialized) + PyThread_init_thread(); + /* Jump through some hoops for Alpha OSF/1 */ + threadid = pth_self(); + return (long) *(long *) &threadid; +} + +static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) +{ + dprintf(("PyThread_exit_thread called\n")); + if (!initialized) { + if (no_cleanup) + _exit(0); + else + exit(0); + } +} + +void PyThread_exit_thread _P0() +{ + do_PyThread_exit_thread(0); +} + +void PyThread__exit_thread _P0() +{ + do_PyThread_exit_thread(1); +} + +#ifndef NO_EXIT_PROG +static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup) +{ + dprintf(("PyThread_exit_prog(%d) called\n", status)); + if (!initialized) + if (no_cleanup) + _exit(status); + else + exit(status); +} + +void PyThread_exit_prog _P1(status, int status) +{ + do_PyThread_exit_prog(status, 0); +} + +void PyThread__exit_prog _P1(status, int status) +{ + do_PyThread_exit_prog(status, 1); +} +#endif /* NO_EXIT_PROG */ + +/* + * Lock support. + */ +PyThread_type_lock PyThread_allocate_lock _P0() +{ + pth_lock *lock; + int status, error = 0; + + dprintf(("PyThread_allocate_lock called\n")); + if (!initialized) + PyThread_init_thread(); + + lock = (pth_lock *) malloc(sizeof(pth_lock)); + memset((void *)lock, '\0', sizeof(pth_lock)); + if (lock) { + lock->locked = 0; + status = pth_mutex_init(&lock->mut); + CHECK_STATUS("pth_mutex_init"); + status = pth_cond_init(&lock->lock_released); + CHECK_STATUS("pth_cond_init"); + if (error) { + free((void *)lock); + lock = NULL; + } + } + dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock)); + return (PyThread_type_lock) lock; +} + +void PyThread_free_lock _P1(lock, PyThread_type_lock lock) +{ + pth_lock *thelock = (pth_lock *)lock; + int status, error = 0; + + dprintf(("PyThread_free_lock(%lx) called\n", (long)lock)); + + free((void *)thelock); +} + +int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag) +{ + int success; + pth_lock *thelock = (pth_lock *)lock; + int status, error = 0; + + dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag)); + + status = pth_mutex_acquire(&thelock->mut, !waitflag, NULL); + CHECK_STATUS("pth_mutex_acquire[1]"); + success = thelock->locked == 0; + if (success) thelock->locked = 1; + status = pth_mutex_release( &thelock->mut ); + CHECK_STATUS("pth_mutex_release[1]"); + + if ( !success && waitflag ) { + /* continue trying until we get the lock */ + + /* mut must be locked by me -- part of the condition + * protocol */ + status = pth_mutex_acquire( &thelock->mut, !waitflag, NULL ); + CHECK_STATUS("pth_mutex_acquire[2]"); + while ( thelock->locked ) { + status = pth_cond_await(&thelock->lock_released, + &thelock->mut, NULL); + CHECK_STATUS("pth_cond_await"); + } + thelock->locked = 1; + status = pth_mutex_release( &thelock->mut ); + CHECK_STATUS("pth_mutex_release[2]"); + success = 1; + } + if (error) success = 0; + dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success)); + return success; +} + +void PyThread_release_lock _P1(lock, PyThread_type_lock lock) +{ + pth_lock *thelock = (pth_lock *)lock; + int status, error = 0; + + dprintf(("PyThread_release_lock(%lx) called\n", (long)lock)); + + status = pth_mutex_acquire( &thelock->mut, 0, NULL ); + CHECK_STATUS("pth_mutex_acquire[3]"); + + thelock->locked = 0; + + status = pth_mutex_release( &thelock->mut ); + CHECK_STATUS("pth_mutex_release[3]"); + + /* wake up someone (anyone, if any) waiting on the lock */ + status = pth_cond_notify( &thelock->lock_released, 0 ); + CHECK_STATUS("pth_cond_notify"); +} + +/* + * Semaphore support. + */ + +struct semaphore { + pth_mutex_t mutex; + pth_cond_t cond; + int value; +}; + +PyThread_type_sema PyThread_allocate_sema _P1(value, int value) +{ + struct semaphore *sema; + int status, error = 0; + + dprintf(("PyThread_allocate_sema called\n")); + if (!initialized) + PyThread_init_thread(); + + sema = (struct semaphore *) malloc(sizeof(struct semaphore)); + if (sema != NULL) { + sema->value = value; + status = pth_mutex_init(&sema->mutex); + CHECK_STATUS("pth_mutex_init"); + status = pth_cond_init(&sema->cond); + CHECK_STATUS("pth_mutex_init"); + if (error) { + free((void *) sema); + sema = NULL; + } + } + dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema)); + return (PyThread_type_sema) sema; +} + +void PyThread_free_sema _P1(sema, PyThread_type_sema sema) +{ + int status, error = 0; + struct semaphore *thesema = (struct semaphore *) sema; + + dprintf(("PyThread_free_sema(%lx) called\n", (long) sema)); + free((void *) thesema); +} + +int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) +{ + int status, error = 0, success; + struct semaphore *thesema = (struct semaphore *) sema; + + dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag)); + status = pth_mutex_acquire(&thesema->mutex, !waitflag, NULL); + CHECK_STATUS("pth_mutex_acquire"); + if (waitflag) { + while (!error && thesema->value <= 0) { + status = pth_cond_await(&thesema->cond, + &thesema->mutex, NULL); + CHECK_STATUS("pth_cond_await"); + } + } + if (error) + success = 0; + else if (thesema->value > 0) { + thesema->value--; + success = 1; + } + else + success = 0; + status = pth_mutex_release(&thesema->mutex); + CHECK_STATUS("pth_mutex_release"); + dprintf(("PyThread_down_sema(%lx) return\n", (long) sema)); + return success; +} + +void PyThread_up_sema _P1(sema, PyThread_type_sema sema) +{ + int status, error = 0; + struct semaphore *thesema = (struct semaphore *) sema; + + dprintf(("PyThread_up_sema(%lx)\n", (long) sema)); + status = pth_mutex_acquire(&thesema->mutex, 0, NULL); + CHECK_STATUS("pth_mutex_acquire"); + thesema->value++; + status = pth_cond_notify(&thesema->cond, 1); + CHECK_STATUS("pth_cond_notify"); + status = pth_mutex_release(&thesema->mutex); + CHECK_STATUS("pth_mutex_release"); +} diff --git a/acconfig.h b/acconfig.h index bc411ab2edf..8192aef889b 100644 --- a/acconfig.h +++ b/acconfig.h @@ -35,6 +35,9 @@ This is the case on Motorola V4 (R40V4.2) */ #undef GETTIMEOFDAY_NO_TZ +/* Define if you have GNU PTH threads */ +#undef _GNU_PTH + /* Define this if your time.h defines altzone */ #undef HAVE_ALTZONE diff --git a/config.h.in b/config.h.in index 97035580731..ce254b8987d 100644 --- a/config.h.in +++ b/config.h.in @@ -103,6 +103,9 @@ This is the case on Motorola V4 (R40V4.2) */ #undef GETTIMEOFDAY_NO_TZ +/* Define if you have GNU PTH threads */ +#undef _GNU_PTH + /* Define this if your time.h defines altzone */ #undef HAVE_ALTZONE diff --git a/configure b/configure index 01d8215866a..581c8a469e6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.119 +# From configure.in Revision: 1.120 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -2921,12 +2921,60 @@ cat >> confdefs.h <<\EOF #define C_THREADS 1 EOF +LIBOBJS="$LIBOBJS thread.o" +else + echo "$ac_t""no" 1>&6 + +echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 +echo "configure:2930: checking for pth_init in -lpth" >&5 +ac_lib_var=`echo pth'_'pth_init | 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="-lpth $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 + cat >> confdefs.h <<\EOF +#define WITH_THREAD 1 +EOF + +cat >> confdefs.h <<\EOF +#define _GNU_PTH 1 +EOF + +LIBS="-lpth $LIBS" LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2930: checking for pthread_create in -lpthread" >&5 +echo "configure:2978: 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 @@ -2934,7 +2982,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:2997: \"$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 @@ -2974,12 +3022,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 -echo "configure:2978: checking for pthread_detach" >&5 +echo "configure:3026: 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:3054: \"$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 @@ -3030,17 +3078,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:3034: checking for kernel/OS.h" >&5 +echo "configure:3082: 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:3044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3092: \"$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* @@ -3069,7 +3117,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:3073: checking for pthread_create in -lpthreads" >&5 +echo "configure:3121: 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 @@ -3077,54 +3125,6 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -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:3121: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" -cat > conftest.$ac_ext <> confdefs.h <<\EOF #define _POSIX_THREADS 1 EOF +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:3169: 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 +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 + 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 + cat >> confdefs.h <<\EOF +#define WITH_THREAD 1 +EOF + +cat >> confdefs.h <<\EOF +#define _POSIX_THREADS 1 +EOF + 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:3169: checking for __d6_pthread_create in -lthread" >&5 +echo "configure:3217: 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 @@ -3173,7 +3221,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:3236: \"$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 @@ -3213,7 +3261,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 -echo "configure:3217: checking for pthread_create in -lcma" >&5 +echo "configure:3265: 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 @@ -3221,7 +3269,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:3284: \"$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 @@ -3276,9 +3324,11 @@ fi fi +fi + echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 -echo "configure:3282: checking for usconfig in -lmpc" >&5 +echo "configure:3332: 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 @@ -3286,7 +3336,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:3351: \"$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 @@ -3323,7 +3373,7 @@ else fi echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:3327: checking for thr_create in -lthread" >&5 +echo "configure:3377: 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 @@ -3331,7 +3381,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:3396: \"$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 @@ -3378,7 +3428,7 @@ fi DLINCLDIR=/ echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 -echo "configure:3382: checking for --with-sgi-dl" >&5 +echo "configure:3432: 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" @@ -3402,7 +3452,7 @@ fi echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 -echo "configure:3406: checking for --with-dl-dld" >&5 +echo "configure:3456: 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" @@ -3429,12 +3479,12 @@ fi # the dlopen() function means we might want to use dynload_shlib.o. some # platforms, such as AIX, have dlopen(), but don't want to use it. echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:3433: checking for dlopen" >&5 +echo "configure:3483: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+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:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -3481,7 +3531,7 @@ fi # loading of modules. echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 -echo "configure:3485: checking DYNLOADFILE" >&5 +echo "configure:3535: checking DYNLOADFILE" >&5 if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in @@ -3520,12 +3570,12 @@ for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \ truncate uname waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3524: checking for $ac_func" >&5 +echo "configure:3574: 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:3602: \"$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 @@ -3577,12 +3627,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:3581: checking for $ac_func" >&5 +echo "configure:3631: 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:3659: \"$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 @@ -3633,12 +3683,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:3637: checking for $ac_func" >&5 +echo "configure:3687: 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:3715: \"$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 @@ -3688,12 +3738,12 @@ done echo $ac_n "checking for getpgrp""... $ac_c" 1>&6 -echo "configure:3692: checking for getpgrp" >&5 +echo "configure:3742: checking for getpgrp" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+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:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getpgrp=yes" else @@ -3731,14 +3781,14 @@ fi if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { getpgrp(0); ; return 0; } EOF -if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define GETPGRP_HAVE_ARG 1 @@ -3754,12 +3804,12 @@ else fi echo $ac_n "checking for setpgrp""... $ac_c" 1>&6 -echo "configure:3758: checking for setpgrp" >&5 +echo "configure:3808: checking for setpgrp" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+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:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setpgrp=yes" else @@ -3797,14 +3847,14 @@ fi if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { setpgrp(0,0); ; return 0; } EOF -if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SETPGRP_HAVE_ARG 1 @@ -3820,12 +3870,12 @@ else fi echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:3824: checking for gettimeofday" >&5 +echo "configure:3874: checking for gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+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:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -3863,14 +3913,14 @@ fi if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { gettimeofday((struct timeval*)0,(struct timezone*)0); ; return 0; } EOF -if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3889,12 +3939,12 @@ fi # checks for structures echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3893: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3943: 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 @@ -3903,7 +3953,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3924,12 +3974,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3928: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3978: 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 @@ -3937,7 +3987,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3958,12 +4008,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3962: checking for tm_zone in struct tm" >&5 +echo "configure:4012: 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> @@ -3971,7 +4021,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3991,12 +4041,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3995: checking for tzname" >&5 +echo "configure:4045: 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. */ @@ -4006,7 +4056,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4029,19 +4079,19 @@ fi echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 -echo "configure:4033: checking for time.h that defines altzone" >&5 +echo "configure:4083: 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:4045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time_altzone=yes else @@ -4063,9 +4113,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:4067: checking whether sys/select.h and sys/time.h may both be included" >&5 +echo "configure:4117: checking whether sys/select.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < @@ -4076,7 +4126,7 @@ int main() { ; ; return 0; } EOF -if { (eval echo configure:4080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SYS_SELECT_WITH_SYS_TIME 1 @@ -4092,14 +4142,14 @@ echo "$ac_t""$was_it_defined" 1>&6 # checks for compiler characteristics echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4096: checking whether char is unsigned" >&5 +echo "configure:4146: 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:4185: \"$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 @@ -4155,12 +4205,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4159: checking for working const" >&5 +echo "configure:4209: 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:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4230,21 +4280,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4234: checking for inline" >&5 +echo "configure:4284: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4272,16 +4322,16 @@ esac works=no echo $ac_n "checking for working volatile""... $ac_c" 1>&6 -echo "configure:4276: checking for working volatile" >&5 +echo "configure:4326: checking for working volatile" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -4298,16 +4348,16 @@ echo "$ac_t""$works" 1>&6 works=no echo $ac_n "checking for working signed char""... $ac_c" 1>&6 -echo "configure:4302: checking for working signed char" >&5 +echo "configure:4352: checking for working signed char" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -4324,16 +4374,16 @@ echo "$ac_t""$works" 1>&6 have_prototypes=no echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:4328: checking for prototypes" >&5 +echo "configure:4378: checking for prototypes" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_PROTOTYPES 1 @@ -4348,9 +4398,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:4352: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:4402: checking for variable length prototypes and stdarg.h" >&5 cat > conftest.$ac_ext < @@ -4367,7 +4417,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STDARG_PROTOTYPES 1 @@ -4383,16 +4433,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:4387: checking for bad exec* prototypes" >&5 +echo "configure:4437: checking for bad exec* prototypes" >&5 cat > conftest.$ac_ext < int main() { char **t;execve("@",t,t); ; return 0; } EOF -if { (eval echo configure:4396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -4409,12 +4459,12 @@ fi bad_forward=no echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 -echo "configure:4413: checking for bad static forward" >&5 +echo "configure:4463: checking for bad static forward" >&5 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:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4449,9 +4499,9 @@ echo "$ac_t""$bad_forward" 1>&6 va_list_is_array=no echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 -echo "configure:4453: checking whether va_list is an array" >&5 +echo "configure:4503: checking whether va_list is an array" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -4480,12 +4530,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:4484: checking for gethostbyname_r" >&5 +echo "configure:4534: 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:4562: \"$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 @@ -4528,11 +4578,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:4532: checking gethostbyname_r with 6 args" >&5 +echo "configure:4582: checking gethostbyname_r with 6 args" >&5 OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat > conftest.$ac_ext < @@ -4549,7 +4599,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -4569,9 +4619,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 -echo "configure:4573: checking gethostbyname_r with 5 args" >&5 +echo "configure:4623: checking gethostbyname_r with 5 args" >&5 cat > conftest.$ac_ext < @@ -4588,7 +4638,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -4608,9 +4658,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 -echo "configure:4612: checking gethostbyname_r with 3 args" >&5 +echo "configure:4662: checking gethostbyname_r with 3 args" >&5 cat > conftest.$ac_ext < @@ -4625,7 +4675,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -4659,12 +4709,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4663: checking for gethostbyname" >&5 +echo "configure:4713: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+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:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4723,7 +4773,7 @@ fi # Linux requires this for correct f.p. operations echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 -echo "configure:4727: checking for __fpu_control in -lieee" >&5 +echo "configure:4777: 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 @@ -4731,7 +4781,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:4796: \"$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 @@ -4772,7 +4822,7 @@ fi # Check for --with-fpectl echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 -echo "configure:4776: checking for --with-fpectl" >&5 +echo "configure:4826: checking for --with-fpectl" >&5 # Check whether --with-fpectl or --without-fpectl was given. if test "${with_fpectl+set}" = set; then withval="$with_fpectl" @@ -4797,7 +4847,7 @@ BeOS) ;; *) LIBM=-lm esac echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 -echo "configure:4801: checking for --with-libm=STRING" >&5 +echo "configure:4851: 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" @@ -4818,7 +4868,7 @@ fi # check for --with-libc=... echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 -echo "configure:4822: checking for --with-libc=STRING" >&5 +echo "configure:4872: 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" @@ -4842,12 +4892,12 @@ LIBS="$LIBS $LIBM" for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4846: checking for $ac_func" >&5 +echo "configure:4896: 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:4924: \"$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 @@ -4897,12 +4947,12 @@ done for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4901: checking for $ac_func" >&5 +echo "configure:4951: 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:4979: \"$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 @@ -4955,7 +5005,7 @@ LIBS=$LIBS_SAVE # check for getopt echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 -echo "configure:4959: checking for genuine getopt" >&5 +echo "configure:5009: checking for genuine getopt" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4963,7 +5013,7 @@ else ac_cv_func_getopt=no else cat > conftest.$ac_ext < extern int optind, opterr, getopt(); @@ -4975,7 +5025,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_getopt=yes else @@ -4993,7 +5043,7 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" # check whether malloc(0) returns NULL or not echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 -echo "configure:4997: checking what malloc(0) returns" >&5 +echo "configure:5047: 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 @@ -5001,7 +5051,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 @@ -5020,7 +5070,7 @@ main() { exit(0); } EOF -if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5074: \"$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 @@ -5046,17 +5096,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:5050: checking for wchar.h" >&5 +echo "configure:5100: 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:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5110: \"$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* @@ -5086,12 +5136,12 @@ fi # check for usable wchar_t usable_wchar_t="unkown" echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6 -echo "configure:5090: checking for usable wchar_t" >&5 +echo "configure:5140: checking for usable wchar_t" >&5 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:5159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define HAVE_USABLE_WCHAR_T 1 @@ -5124,14 +5174,14 @@ echo "$ac_t""$usable_wchar_t" 1>&6 # check for endianness echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:5128: checking whether byte ordering is bigendian" >&5 +echo "configure:5178: 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 @@ -5142,11 +5192,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:5146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5196: \"$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 @@ -5157,7 +5207,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:5161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -5177,7 +5227,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:5244: \"$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 @@ -5216,7 +5266,7 @@ fi # Check for --with-wctype-functions echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 -echo "configure:5220: checking for --with-wctype-functions" >&5 +echo "configure:5270: 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" diff --git a/configure.in b/configure.in index ff43618336d..6a846a29e2b 100644 --- a/configure.in +++ b/configure.in @@ -654,6 +654,10 @@ AC_DEFINE(_REENTRANT) AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD) AC_DEFINE(C_THREADS) LIBOBJS="$LIBOBJS thread.o"],[ +AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD) +AC_DEFINE(_GNU_PTH) +LIBS="-lpth $LIBS" +LIBOBJS="$LIBOBJS thread.o"],[ AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) LIBS="-lpthread $LIBS" @@ -680,7 +684,7 @@ AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) LIBS="$LIBS -lcma" LIBOBJS="$LIBOBJS thread.o"]) -])])])])])])]) +])])])])])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) LIBS="$LIBS -lmpc"