Skip to content
Snippets Groups Projects
configure 237 KiB
Newer Older
  • Learn to ignore specific revisions
  • fi
    PEPSY="$ac_cv_path_PEPSY"
    if test -n "$PEPSY"; then
      echo "$ac_t""$PEPSY" 1>&6
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ol_link_kerberos=no
    
    
    if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
    	for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    
    echo "configure:3019: checking for $ac_hdr" >&5
    
    if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    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_kerberosIV_krb_h = yes ; then
    		echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
    
    echo "configure:3058: checking for main in -lkrb4" >&5
    
    ac_lib_var=`echo krb4'_'main | 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="-lkrb4 -lkrb5 -ldes425 $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    int main() {
    main()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      have_k5=yes
    else
      echo "$ac_t""no" 1>&6
    have_k5=no
    fi
    
    
    		if test $have_k5 = yes ; then
    			ol_with_kerberos=found
    			ol_link_kerberos=yes
    
    			cat >> confdefs.h <<\EOF
    #define HAVE_KERBEROS 1
    EOF
    
    			KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
    		fi
    	fi
    fi
    
    if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
    	for ac_hdr in krb.h des.h
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    
    echo "configure:3113: checking for $ac_hdr" >&5
    
    if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:3123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    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_krb_h = yes ; then
    		echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
    
    echo "configure:3152: checking for main in -lkrb" >&5
    
    ac_lib_var=`echo krb'_'main | 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="-lkrb -ldes $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    int main() {
    main()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      have_k4=yes
    else
      echo "$ac_t""no" 1>&6
    have_k4=no
    fi
    
    
    		if test $have_k4 = yes ; then
    			ol_with_kerberos=found
    			ol_link_kerberos=yes
    
    			cat >> confdefs.h <<\EOF
    #define HAVE_KERBEROS 1
    EOF
    
    			KRB_LIBS="-lkrb -ldes"
    
    
    ol_link_threads=no
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    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:3211: checking for $ac_hdr" >&5
    
    if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    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:3250: checking POSIX thread version" >&5
    
    if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    	cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    #		include <pthread.h>
    		/* this check could be improved */
    #		ifdef PTHREAD_ONCE_INIT
    
    #		endif
    	
    EOF
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    
      egrep "pthread_version_final" >/dev/null 2>&1; then
    
      rm -rf conftest*
      ol_pthread_final=yes
    else
      rm -rf conftest*
      ol_pthread_final=no
    fi
    rm -f conftest*
    
    
    	cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    #		include <pthread.h>
    		/* this check could be improved */
    #		ifdef pthread_once_init
    
    #		endif
    	
    EOF
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    
      egrep "pthread_version_draft4" >/dev/null 2>&1; then
    
      rm -rf conftest*
      ol_pthread_draft4=yes
    else
      rm -rf conftest*
      ol_pthread_draft4=no
    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:3331: checking for LinuxThreads" >&5
    
    if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    	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
    
    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
    
    		fi
    
    		
    				echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
    
    echo "configure:3357: checking for pthread_create" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* 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.  */
    char pthread_create();
    
    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_pthread_create) || defined (__stub___pthread_create)
    choke me
    #else
    pthread_create();
    #endif
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      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"
    fi
    rm -f conftest*
    fi
    
    if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      ol_link_threads=yes
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    		if test $ol_link_threads = no ; then
    						echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
    
    echo "configure:3407: 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
    
    #include "confdefs.h"
    
    int main() {
    
    
    					
    ; return 0; }
    EOF
    
    if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      ol_cv_pthread_flag=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_pthread_flag=no
    fi
    rm -f conftest*
    								LIBS="$save_LIBS"
    			
    fi
    
    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
    
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    		if test $ol_link_threads = no ; then
    						echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
    
    echo "configure:3448: checking for pthread_create with -pthreads" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    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
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    char pthread();
    int main() {
    
    					pthread_create();
    					
    ; return 0; }
    EOF
    
    if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      ol_cv_pthreads_flag=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_pthreads_flag=no
    fi
    rm -f conftest*
    								LIBS="$save_LIBS"
    			
    fi
    
    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
    		fi
    
    
    		if test $ol_link_threads = no ; then
    						echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
    
    echo "configure:3489: checking for pthread_create with -thread" >&5
    
    if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    								save_LIBS="$LIBS"
    				LIBS="-thread $LIBS"
    				cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    char pthread();
    int main() {
    
    					pthread_create();
    					
    ; return 0; }
    EOF
    
    if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      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 -thread"
    				ol_link_threads=posix
    			fi
    		fi
    
    
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    
    			echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
    
    echo "configure:3531: checking for pthread_join in -lpthread" >&5
    
    ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
    
    if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    
    LIBS="-lpthread -lexc $LIBS"
    
    cat > conftest.$ac_ext <<EOF
    
    #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:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    
    				ol_link_threads=posix
    				LTHREAD_LIBS="$LTHREAD_LIBS -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_join in -lpthreads""... $ac_c" 1>&6
    
    echo "configure:3582: checking for pthread_join in -lpthreads" >&5
    
    ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
    
    if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #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:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
    
    				if test $ol_with_yielding_select = auto ; then
    					ol_with_yielding_select=yes
    
    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:3633: 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"
    
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char pthread_create();
    
    int main() {
    pthread_create()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
    
    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 -lc_r""... $ac_c" 1>&6
    
    echo "configure:3680: 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"
    
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char pthread_create();
    
    int main() {
    pthread_create()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    
    				LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    			LIBS="$save_LIBS"
    		fi
    
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    		if test $ol_link_threads = no ; then
    						save_LIBS="$LIBS"
    			echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
    
    echo "configure:3727: checking for pthread_create in -lpthreads" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
    if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lpthreads  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char pthread_create();
    
    int main() {
    pthread_create()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    				ol_link_threads=posix
    				LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
    else
      echo "$ac_t""no" 1>&6
    fi
    
    			LIBS="$save_LIBS"
    		fi
    
    
    		if test $ol_link_threads != no ; then
    			cat >> confdefs.h <<\EOF
    #define HAVE_PTHREADS 1
    EOF
    
    
    						save_CPPFLAGS="$CPPFLAGS"
    			save_LIBS="$LIBS"
    			LIBS="$LTHREAD_LIBS $LIBS"
    
    												for ac_func in sched_yield pthread_yield
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:3784: 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
    
    #include "confdefs.h"
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    int main() {
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=no"
    fi
    rm -f conftest*
    fi
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    			if test $ac_cv_func_sched_yield = no -a \
    				$ac_cv_func_pthread_yield = no ; then
    
    								echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
    
    echo "configure:3840: checking for sched_yield in -lrt" >&5
    
    ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
    if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lrt  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #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 sched_yield();
    
    if { (eval echo configure:3859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
    					cat >> confdefs.h <<\EOF
    #define HAVE_SCHED_YIELD 1
    EOF
    
    					ac_cv_func_sched_yield=yes
    else
      echo "$ac_t""no" 1>&6
    ac_cv_func_sched_yield=no
    fi
    
    			fi
    			if test $ac_cv_func_sched_yield = no -a \
    				$ac_cv_func_pthread_yield = no ; then
    								echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
    
    echo "configure:3889: checking for sched_yield in -lposix4" >&5
    
    ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
    if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lposix4  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #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 sched_yield();
    
    int main() {
    sched_yield()
    ; return 0; }
    EOF
    
    if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      LTHREAD_LIBS="$LTHREAD_LIBS -lposix4"
    					cat >> confdefs.h <<\EOF
    #define HAVE_SCHED_YIELD 1
    EOF
    
    					ac_cv_func_sched_yield=yes
    else
      echo "$ac_t""no" 1>&6
    ac_cv_func_sched_yield=no
    fi
    
    			fi
    			if test $ac_cv_func_sched_yield = no -a \
    				$ac_cv_func_pthread_yield = no ; then
    
    				echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
    				{ echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; }
    			fi
    
    						for ac_func in pthread_kill
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:3944: 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
    
    #include "confdefs.h"
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    int main() {
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=no"
    fi
    rm -f conftest*
    fi
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    EOF
     
    
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    			for ac_func in \
    				pthread_attr_create pthread_attr_init \
    				pthread_attr_destroy pthread_attr_delete \
    				pthread_attr_setdetachstate pthread_attr_setdetach_np \
    			
    do