Skip to content
Snippets Groups Projects
configure 291 KiB
Newer Older
  • Learn to ignore specific revisions
  • 		if test $have_ssleay = no ; then
    			echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
    
    echo "configure:4005: checking for ssl3_accept in -lssl" >&5
    
    ac_lib_var=`echo ssl'_'ssl3_accept | 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="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #line 4013 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char ssl3_accept();
    
    int main() {
    ssl3_accept()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4024: \"$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
      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
      have_ssleay=yes
    
    		if test $have_ssleay = yes ; then
    			ol_with_tls=found
    			ol_link_tls=yes
    
    			cat >> confdefs.h <<\EOF
    #define HAVE_SSLEAY 1
    EOF
    
    
    
    			if test $need_rsaref = yes; then
    
    				TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
    			else
    				TLS_LIBS="-lssl -lcrypto"
    			fi
    
    		fi
    	fi
    fi
    
    if test $ol_link_tls = yes ; then
    	cat >> confdefs.h <<\EOF
    #define HAVE_TLS 1
    EOF
    
    fi	
    
    
    	gethostbyname_r	gethostbyaddr_r \
    
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:4084: checking for $ac_func" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #line 4089 "configure"
    
    #include "confdefs.h"
    
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    int main() {
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    ; return 0; }
    
    if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    fi
    
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    
      echo "$ac_t""yes" 1>&6
    
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    
      cat >> confdefs.h <<EOF
    
    if test "$ac_cv_func_ctime_r" = no ; then
    	ol_cv_func_ctime_r_nargs=0
    else
    
    	echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
    
    echo "configure:4141: checking number of arguments of ctime_r" >&5
    
    if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #line 4146 "configure"
    
    #include "confdefs.h"
    
    #include <time.h>
    int main() {
    time_t ti; char *buffer; ctime_r(&ti,buffer,32);
    ; return 0; }
    
    if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
    
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
    
      rm -rf conftest*
    
      cat > conftest.$ac_ext <<EOF
    
    #line 4161 "configure"
    
    #include "confdefs.h"
    
    time_t ti; char *buffer; ctime_r(&ti,buffer);
    
    if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
    
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
    
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
      if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
        cat >> confdefs.h <<EOF
    #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
    
    if test "$ac_cv_func_gethostbyname_r" = yes ; then
     	echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
    
    echo "configure:4194: checking number of arguments of gethostbyname_r" >&5
    
    if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #line 4199 "configure"
    
    #include "confdefs.h"
    
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #define BUFSIZE (sizeof(struct hostent)+10)
    
    int main() {
    
    struct hostent hent; char buffer[BUFSIZE];
    
    		int bufsize=BUFSIZE;int h_errno;
    		(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
    			buffer, bufsize, &h_errno);
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
    
      ol_cv_func_gethostbyname_r_nargs=5
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      cat > conftest.$ac_ext <<EOF
    
    #line 4221 "configure"
    
    #include "confdefs.h"
    
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #define BUFSIZE (sizeof(struct hostent)+10)
    
    int main() {
    
    struct hostent hent;struct hostent *rhent;
    
    			char buffer[BUFSIZE];
    			int bufsize=BUFSIZE;int h_errno;
    			(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
    				&rhent, &h_errno);
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      ol_cv_func_gethostbyname_r_nargs=6
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      ol_cv_func_gethostbyname_r_nargs=0
    
    echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
      if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
    
    	cat >> confdefs.h <<EOF
    
    #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
    EOF
    
    else
     	ol_cv_func_gethostbyname_r_nargs=0
    fi
     
    if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
     	echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
    
    echo "configure:4264: checking number of arguments of gethostbyaddr_r" >&5
    
    if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #line 4269 "configure"
    
    #include "confdefs.h"
    
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #define BUFSIZE (sizeof(struct hostent)+10)
    
    struct hostent hent; char buffer[BUFSIZE]; 
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	    struct in_addr add;
    
    	    size_t alen=sizeof(struct in_addr);
    	    int bufsize=BUFSIZE;int h_errno;
    		(void)gethostbyaddr_r( (void *)&(add.s_addr),
    			alen, AF_INET, &hent, buffer, bufsize, &h_errno);
    
    if { (eval echo configure:4285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
    
      ol_cv_func_gethostbyaddr_r_nargs=7
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      cat > conftest.$ac_ext <<EOF
    
    #line 4293 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #define BUFSIZE (sizeof(struct hostent)+10)
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    int main() {
    
    struct hostent hent;
    			struct hostent *rhent; char buffer[BUFSIZE]; 
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    			struct in_addr add;
    
    			size_t alen=sizeof(struct in_addr);
    			int bufsize=BUFSIZE;int h_errno;
    			(void)gethostbyaddr_r( (void *)&(add.s_addr),
    
    				alen, AF_INET, &hent, buffer, bufsize, 
    				&rhent, &h_errno);
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ; return 0; }
    EOF
    
    if { (eval echo configure:4311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
    
      ol_cv_func_gethostbyaddr_r_nargs=8
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      ol_cv_func_gethostbyaddr_r_nargs=0
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    fi
    rm -f conftest*
    
    echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
      if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
        cat >> confdefs.h <<EOF
    #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
    EOF
    
    else
     	ol_cv_func_gethostbyaddr_r_nargs=0
    fi
    
    if test "$ac_cv_func_ctime_r" = yes \
    
    	-a "$ol_cv_func_ctime_r_nargs" -ge 2 \
    	-a "$ol_cv_func_ctime_r_nargs" -le 3 \
    
    	-a "$ac_cv_func_gethostbyname_r" = yes \
    
    	-a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
    	-a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
     	-a "$ac_cv_func_gethostbyaddr_r" = yes \
     	-a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
    	-a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
     	; then
     
     	cat >> confdefs.h <<\EOF
    
    #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
    EOF
    
    fi
    
    ol_link_threads=no
    if test $ol_with_threads = auto -o $ol_with_threads = yes \
    	-o $ol_with_threads = posix ; then
    
    	for ac_hdr in pthread.h sched.h
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    
    echo "configure:4362: checking for $ac_hdr" >&5
    
    if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #line 4367 "configure"
    
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4372: \"$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
    
      eval "ac_cv_header_$ac_safe=yes"
    
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_hdr 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    	if test $ac_cv_header_pthread_h = yes ; then
    		echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
    
    echo "configure:4401: checking POSIX thread version" >&5
    
    if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    
    #line 4407 "configure"
    
    #include "confdefs.h"
    
    
    #		include <pthread.h>
    		/* this check could be improved */
    #		ifdef PTHREAD_ONCE_INIT
    			pthread_version_final
    #		endif
    	
    
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "pthread_version_final" >/dev/null 2>&1; then
    
    #line 4429 "configure"
    
    #include "confdefs.h"
    
    
    #		include <pthread.h>
    		/* this check could be improved */
    #		ifdef pthread_once_init
    			pthread_version_draft4
    #		endif
    	
    
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "pthread_version_draft4" >/dev/null 2>&1; then
    
      rm -rf conftest*
    
    else
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    
    
    	if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
    		ol_cv_pthread_version=final
    	elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
    		ol_cv_pthread_version=draft4
    	else
    		ol_cv_pthread_version=unknown
    	fi
    
    fi
    
    echo "$ac_t""$ol_cv_pthread_version" 1>&6
    
    
    		if test $ol_cv_pthread_version = final ; then
    			cat >> confdefs.h <<\EOF
    #define HAVE_PTHREADS_FINAL 1
    EOF
    
    		elif test $ol_cv_pthread_version = draft4 ; then
    			cat >> confdefs.h <<\EOF
    #define HAVE_PTHREADS_D4 1
    EOF
    
    		else
    			{ echo "configure: error: unknown pthread version" 1>&2; exit 1; }
    		fi
    
    		# consider threads found
    		ol_with_threads=found
    
    		
    echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
    
    echo "configure:4482: checking for LinuxThreads" >&5
    
    if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    
      
    	res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
    	if test "$res" -gt 0 ; then
    		ol_cv_linux_threads=yes
    	else
    		ol_cv_linux_threads=no
    	fi
    
    
    echo "$ac_t""$ol_cv_linux_threads" 1>&6
    
    
    		if test $ol_cv_linux_threads = yes ; then
    			cat >> confdefs.h <<\EOF
    #define HAVE_LINUX_THREADS 1
    EOF
    
    
    																																																														
    				echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
    
    echo "configure:4508: checking for pthread_create" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #line 4513 "configure"
    
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char pthread_create(); below.  */
    #include <assert.h>
    
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
    choke me
    #else
    pthread_create();
    #endif
    
    
    if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      eval "ac_cv_func_pthread_create=yes"
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      eval "ac_cv_func_pthread_create=no"
    
    
    if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    		if test $ol_link_threads = no ; then
    						echo $ac_n "checking for pthread_create with -mt""... $ac_c" 1>&6
    
    echo "configure:4558: checking for pthread_create with -mt" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    								save_LIBS="$LIBS"
    				LIBS="-mt $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #line 4566 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    char pthread_create();
    int main() {
    pthread_create();
    ; return 0; }
    EOF
    
    if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      ol_cv_thread_flag=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_thread_flag=no
    fi
    rm -f conftest*
    								LIBS="$save_LIBS"
    			
    fi
    
    echo "$ac_t""$ol_cv_thread_flag" 1>&6
    
    			if test $ol_cv_thread_flag = yes ; then
    				LTHREAD_LIBS="$LTHREAD_LIBS -mt"
    				ol_link_threads=posix
    			fi
    		fi
    
    
    		if test $ol_link_threads = no ; then
    
    						echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
    
    echo "configure:4597: checking for pthread_create with -kthread" >&5
    
    if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      
    								save_LIBS="$LIBS"
    				LIBS="-kthread $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #line 4605 "configure"
    
    #include "confdefs.h"
    
    
    #if HAVE_PTHREADS_D4
    	pthread_create(NULL,pthread_attr_default,NULL,NULL);
    #else
    	pthread_create(NULL,NULL,NULL,NULL);
    #endif
    
    
    if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    echo "$ac_t""$ol_cv_kthread_flag" 1>&6
    
    			if test $ol_cv_kthread_flag = yes ; then
    				LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
    				ol_link_threads=posix
    			fi
    
    		fi
    
    		if test $ol_link_threads = no ; then
    
    						echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
    
    echo "configure:4642: checking for pthread_create with -pthread" >&5
    
    if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      
    								save_LIBS="$LIBS"
    				LIBS="-pthread $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #line 4650 "configure"
    
    #include "confdefs.h"
    
    int main() {
    
    
    #if HAVE_PTHREADS_D4
    	pthread_create(NULL,pthread_attr_default,NULL,NULL);
    #else
    	pthread_create(NULL,NULL,NULL,NULL);
    #endif
    
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    echo "$ac_t""$ol_cv_pthread_flag" 1>&6
    
    			if test $ol_cv_pthread_flag = yes ; then
    				LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
    				ol_link_threads=posix
    			fi
    
    		fi
    
    		if test $ol_link_threads = no ; then
    
    						echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
    
    echo "configure:4687: checking for pthread_create with -pthreads" >&5
    
    if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      
    								save_LIBS="$LIBS"
    				LIBS="-pthreads $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #line 4695 "configure"
    
    #include "confdefs.h"
    
    int main() {
    
    
    #if HAVE_PTHREADS_D4
    	pthread_create(NULL,pthread_attr_default,NULL,NULL);
    #else
    	pthread_create(NULL,NULL,NULL,NULL);
    #endif
    
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
    
    			if test $ol_cv_pthreads_flag = yes ; then
    				LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
    				ol_link_threads=posix
    			fi
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    		if test $ol_link_threads = no ; then
    
    						echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
    
    echo "configure:4732: checking for pthread_create with -thread" >&5
    
    if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      
    								save_LIBS="$LIBS"
    				LIBS="-thread $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #line 4740 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    char pthread_create();
    int main() {
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ; return 0; }
    EOF
    
    if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    fi
    rm -f conftest*
    
    echo "$ac_t""$ol_cv_thread_flag" 1>&6
    
    			if test $ol_cv_thread_flag = yes ; then
    				LTHREAD_LIBS="$LTHREAD_LIBS -thread"
    
    				ol_link_threads=posix
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    
    			echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
    
    echo "configure:4772: checking for pthread_mutex_unlock in -lpthread" >&5
    
    ac_lib_var=`echo pthread'_'pthread_mutex_unlock | 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="-lpthread -lmach -lexc -lc_r $LIBS"
    
    cat > conftest.$ac_ext <<EOF
    
    #line 4780 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char pthread_mutex_unlock();
    
    int main() {
    pthread_mutex_unlock()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4791: \"$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
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
    
    				if test $ol_with_yielding_select = auto ; then
    					ol_with_yielding_select=yes
    				fi
    				
    else
      echo "$ac_t""no" 1>&6
    :
    fi
    
    			LIBS="$save_LIBS"
    		fi
    
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    
    			echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
    
    echo "configure:4824: checking for pthread_mutex_lock in -lpthread" >&5
    
    ac_lib_var=`echo pthread'_'pthread_mutex_lock | 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="-lpthread -lmach -lexc $LIBS"
    
    cat > conftest.$ac_ext <<EOF
    
    #line 4832 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char pthread_mutex_lock();
    
    int main() {
    pthread_mutex_lock()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4843: \"$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
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc"
    
    				if test $ol_with_yielding_select = auto ; then
    					ol_with_yielding_select=yes
    				fi
    				
    else
      echo "$ac_t""no" 1>&6
    :
    fi
    
    			LIBS="$save_LIBS"
    		fi
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    
    			echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6
    
    echo "configure:4876: checking for pthread_mutex_trylock in -lpthread" >&5
    
    ac_lib_var=`echo pthread'_'pthread_mutex_trylock | 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"
    
    cat > conftest.$ac_ext <<EOF
    
    #line 4884 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    
    char pthread_mutex_trylock();
    
    pthread_mutex_trylock()
    
    if { (eval echo configure:4895: \"$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
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
    
    				if test $ol_with_yielding_select = auto ; then
    					ol_with_yielding_select=yes
    				fi
    				
    else
      echo "$ac_t""no" 1>&6
    :
    fi
    
    			LIBS="$save_LIBS"
    		fi
    
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    			echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
    
    echo "configure:4928: 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
    else
    
      ac_save_LIBS="$LIBS"
    LIBS="-lpthread  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #line 4936 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    
    
    int main() {
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4947: \"$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
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    
      echo "$ac_t""yes" 1>&6
    
      
    				ol_link_threads=posix
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
    
    else
      echo "$ac_t""no" 1>&6
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    			echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
    
    echo "configure:4976: 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"
    
    #line 4984 "configure"
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    
    if { (eval echo configure:4995: \"$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
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*