]> git.sur5r.net Git - openldap/commitdiff
new pthreads detection
authorKurt Zeilenga <kurt@openldap.org>
Tue, 17 Sep 2002 04:44:36 +0000 (04:44 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 17 Sep 2002 04:44:36 +0000 (04:44 +0000)
other changes for z/OS port

14 files changed:
CHANGES
acconfig.h [new file with mode: 0644]
build/mkdep
build/openldap.m4
configure
configure.in
include/ldap_pvt_thread.h
include/portable.h.in
libraries/liblber/Makefile.in
libraries/liblber/bprint.c
libraries/liblber/debug.c
libraries/libldap/print.c [new file with mode: 0644]
libraries/libldap_r/thr_posix.c
libraries/liblutil/setproctitle.c [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index ff8632bbeb745b3267a73e945958806f6b38b94d..d71ec8ddfbe09e891ea2e5e82963bf8d72429e8b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -28,6 +28,7 @@ OpenLDAP 2.1.5 Engineering
                Added IPv6 sockaddr_storage check
                Added Berkeley DB 4.1 support
                Fixed module build issues (ITS#2047 ITS#2048 ITS#2065)
+               Updated pthreads detection
                Updated test suite (ITS#2054)
                Updated NT and zOS ports
        Documentation
diff --git a/acconfig.h b/acconfig.h
new file mode 100644 (file)
index 0000000..37ec724
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.  A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
+ */
+
+#ifndef _LDAP_PORTABLE_H
+#define _LDAP_PORTABLE_H
+
+/* end of preamble */
+
+@TOP@
+
+/* define this if needed to get reentrant functions */
+#ifndef REENTRANT
+#undef REENTRANT
+#endif
+#ifndef _REENTRANT
+#undef _REENTRANT
+#endif
+
+/* define this if needed to get threadsafe functions */
+#ifndef THREADSAFE
+#undef THREADSAFE
+#endif
+#ifndef _THREADSAFE
+#undef _THREADSAFE
+#endif
+#ifndef THREAD_SAFE
+#undef THREAD_SAFE
+#endif
+#ifndef _THREAD_SAFE
+#undef _THREAD_SAFE
+#endif
+
+#ifndef _SGI_MP_SOURCE
+#undef _SGI_MP_SOURCE
+#endif
+
+/* define this if TIOCGWINSZ is defined in sys/ioctl.h */
+#undef GWINSZ_IN_SYS_IOCTL
+
+/* These are defined in ldap_features.h */
+/*
+       LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
+       LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
+       LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
+       LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
+*/
+
+/* These are defined in lber_types.h */
+/*
+       LBER_INT_T
+       LBER_LEN_T
+       LBER_SOCKET_T
+       LBER_TAG_T
+*/
+
+/* define to character address type */
+#undef caddr_t
+
+/* define to signed size type */
+#undef ssize_t
+
+\f
+/* Leave that blank line there!!  Autoheader needs it. */
+
+@BOTTOM@
+
+/* begin of postamble */
+
+#ifdef _WIN32
+       /* don't suck in all of the win32 api */
+#      define WIN32_LEAN_AND_MEAN 1
+#endif
+
+#ifndef LDAP_NEEDS_PROTOTYPES
+/* force LDAP_P to always include prototypes */
+#define LDAP_NEEDS_PROTOTYPES 1
+#endif
+
+#ifdef HAVE_STDDEF_H
+#      include <stddef.h>
+#endif
+
+#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
+#define LDAP_TEST
+#endif
+#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
+#define LDAP_DEBUG
+#endif
+
+#ifdef HAVE_EBCDIC 
+/* ASCII/EBCDIC converting replacements for stdio funcs
+ * vsnprintf and snprintf are used too, but they are already
+ * checked by the configure script
+ */
+#define fputs ber_pvt_fputs
+#define fgets ber_pvt_fgets
+#define printf ber_pvt_printf
+#define fprintf ber_pvt_fprintf
+#define vfprintf ber_pvt_vfprintf
+#define vsprintf ber_pvt_vsprintf
+#endif
+
+#include "ldap_cdefs.h"
+#include "ldap_features.h"
+
+#include "ac/assert.h"
+
+#endif /* _LDAP_PORTABLE_H */
index 006f05abbc33abde62c9bbfd188b891163989835..4384b2853f57e1abf2dd3d052d98305c7e8a7fd7 100755 (executable)
@@ -1,5 +1,10 @@
-#!/bin/sh -
+#! /bin/sh -
+# $OpenLDAP$
+## Copyright 1998-2002 The OpenLDAP Foundation
+## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
+## of this package for details.
 #
+# Portions
 # Copyright (c) 1987 Regents of the University of California.
 # All rights reserved.
 #
@@ -25,29 +30,52 @@ set -e                              # exit immediately if any errors occur
 
 MAKE=Makefile                  # default makefile name is "Makefile"
 NOSLASH="no"                   # by default, / dependencies are included
-CC=cc                          # default compiler is cc
+SRCDIR=""
+SED=cat
+
+: ${CC=cc}                                     # use cc by default
+
+# We generally set these via the command line options
+: ${MKDEP_CC=$CC}                      # select default compiler to generate dependencies
+: ${MKDEP_CFLAGS="-M"} # cc -M usually produces dependencies
 
 while :
        do case "$1" in
+               # the -s flag removes dependencies to files that begin with /
+               -s)
+                       NOSLASH=yes;
+                       shift ;;
+
                # -f allows you to select a makefile name
                -f)
                        MAKE=$2
                        shift; shift ;;
 
-               # -c allows you to select a compiler to use (default is cc)
+               # -d allows you to select a VPATH directory
+               -d)
+                       SRCDIR=$2
+                       shift; shift ;;
+
+               # -c allows you to override the compiler used to generate dependencies
                -c)
-                       CC=$2
+                       MKDEP_CC=$2
+                       shift; shift ;;
+
+               # -m allows you to override the compiler flags used to generate
+               # dependencies.
+               -m)
+                       MKDEP_CFLAGS=$2
                        shift; shift ;;
 
                # the -p flag produces "program: program.c" style dependencies
                # so .o's don't get produced
                -p)
-                       SED='s;\.o;;'
+                       SED='sed -e s;\.o;;'
                        shift ;;
 
-               # the -s flag removes dependencies to files that begin with /
-               -s)
-                       NOSLASH=yes;
+               # the -l flag produces libtool compatible dependencies
+               -l)
+                       SED='sed -e s;\.o:;.lo:;'
                        shift ;;
 
 #              -*)     shift ;;
@@ -57,19 +85,19 @@ while :
        esac
 done
 
-if [ $# = 0 ] ; then
-       echo 'usage: mkdep [-p] [-f makefile] [flags] file ...'
+if test $# = 0 ; then
+       echo 'usage: mkdep [-p] [-s] [-c cc] [-m flags] [-f makefile] [-d srcdir] [cppflags] file ...'
        exit 1
 fi
 
-if [ ! -w $MAKE ]; then
+if test ! -w $MAKE ; then
        echo "mkdep: no writeable file \"$MAKE\""
        exit 1
 fi
 
 TMP=/tmp/mkdep$$
 
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+trap 'rm -f $TMP.sed $TMP ; exit 1' 1 2 3 13 15
 
 cp $MAKE ${MAKE}.bak
 
@@ -81,46 +109,100 @@ cat << _EOF_ >> $TMP
 
 _EOF_
 
-# If your compiler doesn't have -M, add it.  If you can't, the next two
-# lines will try and replace the "cc -M".  The real problem is that this
-# hack can't deal with anything that requires a search path, and doesn't
-# even try for anything using bracket (<>) syntax.
+# If your compiler doesn't have -M, you may be able to use -E instead.
+# The preprocessor must generate lines of the form
+#   #.* [0-9]* "dependent file" .*
+# This script will parse out the "dependent file"s to generate the
+# dependency list.
+
+if test "x$SRCDIR" = "x" ; then
+       files=$*
+else
+       files=
+       for i in $* ; do
+               if test -f $i ; then
+                       files="$files $i"
+               elif test -f $SRCDIR/$i ; then
+                       files="$files $SRCDIR/$i"
+               else
+                       files="$files $i"
+               fi
+       done
+
+       MKDEP_CFLAGS="$MKDEP_CFLAGS -I$SRCDIR"
+fi
+
+cat << _EOF_ >> $TMP
+
 #
-# egrep '^#include[    ]*".*"' /dev/null $* |
-# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
+# files: $*
+# command: $MKDEP_CC $MKDEP_CFLAGS $files
+#
+
+_EOF_
 
-$CC -M $* |
-sed "
-       s; \./; ;g
-       $SED" |
+case $MKDEP_CFLAGS in
+# Using regular preprocessor output
+       -E*)
+FLAGS=""
+FILES=""
+for i in $files; do
+       case $i in
+       -*)     FLAGS="$FLAGS $i" ;;
+       *)      FILES="$FILES $i" ;;
+       esac
+done
+for i in $FILES; do
+       $MKDEP_CC $MKDEP_CFLAGS $FLAGS $i | egrep '^#.*"' > $TMP.sed
+awk '
+BEGIN {
+       file = "'$i'"
+       n = split(file, parts, "/")
+       filenm = substr(parts[n], 0, length(parts[n])-1) "o"
+}
+{
+       dep = split($3, parts, "\"")
+       dep = parts[2]
+       if (dep ~ "^\./.*") dep = substr(dep, 3, length(dep)-2)
+       if (( noslash == "yes") && (dep ~ /^\// )) continue
+       if (deps[dep] == 0) printf "%s: %s\n", filenm, dep
+       deps[dep] = 1
+}' noslash="$NOSLASH" $TMP.sed >> $TMP
+done
+       ;;
+
+       *)
+# Using -M or some other specific dependency-generating option
+$MKDEP_CC $MKDEP_CFLAGS $files | \
+       sed -e 's; \./; ;g' -e 's/ :/:/' | \
+       $SED > $TMP.sed
+# do not pipe to awk.  SGI awk wants a filename as argument.
+# (or '-', but I do not know if all other awks support that.)
 awk '
-$1 ~ /:/ {
+$1 ~ /:$/ {
        filenm=$1
-       dep=$2
+       dep=substr($0, length(filenm)+1)
 }
-$1 !~ /:/ {
-       dep=$1
+$1 !~ /:$/ {
+       dep=$0
 }
 /.*/ {
-       if ( noslash = "yes" && dep ~ /^\// ) next
-       if (filenm != prev) {
-               if (rec != "")
-                       print rec;
-               rec = filenm " " dep;
-               prev = filenm;
+       if ( length(filenm) < 2 ) next
+       if ( filenm ~ /:.*:$/ ) next
+       split(dep, depends, " ")
+       for(d in depends) {
+               dfile = depends[d]
+               if ( length(dfile) < 2 ) continue
+               if ( dfile ~ /:/ ) continue
+               if (( noslash == "yes") && (dfile ~ /^\// )) continue
+               rec = filenm " " dfile
+               print rec
        }
-       else {
-               if (length(rec dep) > 78) {
-                       print rec;
-                       rec = filenm " " dep;
-               }
-               else
-                       rec = rec " " dep
-       }
-    }
-END {
-       print rec
-}' noslash="$NOSLASH" >> $TMP
+}
+' noslash="$NOSLASH" $TMP.sed >> $TMP
+       ;;
+esac
+
 
 cat << _EOF_ >> $TMP
 
@@ -129,5 +211,5 @@ _EOF_
 
 # copy to preserve permissions
 cp $TMP $MAKE
-rm -f ${MAKE}.bak $TMP
+rm -f ${MAKE}.bak $TMP.sed $TMP
 exit 0
index c50acd4a96a65e3b50aabac3c009be72dd876f77..8369493b66bb59f8ab4ef0e352fd1d52ab167e9b 100644 (file)
@@ -621,36 +621,47 @@ dnl
 dnl ====================================================================
 dnl Check POSIX Thread version 
 dnl
-dnl defines ol_cv_posix_version to 'final' or 'draft' or 'unknown'
-dnl    'unknown' implies that the version could not be detected
-dnl            or that pthreads.h does exist.  Existance of pthreads.h
-dnl            should be tested separately.
+dnl defines ol_cv_pthread_version to 4, 5, 6, 7, 10, depending on the
+dnl    version of the POSIX.4a Draft that is implemented.
+dnl    10 == POSIX.4a Final == POSIX.1c-1996 for our purposes.
+dnl    Existence of pthreads.h should be tested separately.
+dnl
+dnl tests:
+dnl    pthread_yield() was dropped in Draft 9, so
+dnl            only a Draft <= 8 library will define this
+dnl    pthread_detach() was dropped in Draft 8, it is present
+dnl            in every other version
+dnl    PTHREAD_CREATE_UNDETACHED is only in Draft 7, it was called
+dnl            PTHREAD_CREATE_JOINABLE after that
+dnl    pthread_attr_default was dropped in Draft 6, only 4 and 5 have it
+dnl    PTHREAD_MUTEX_INITIALIZER was introduced in Draft 5. It's not
+dnl            interesting to us because we don't try to statically
+dnl            initialize mutexes. 5-10 has it.
+dnl    pthread_attr_create was renamed to pthread_attr_init in Draft 6.
+dnl            Draft 6-10 has _init, Draft 4-5 has _create.
+dnl
+dnl Draft 9 and 10 are equivalent for our purposes.
 dnl
 AC_DEFUN([OL_POSIX_THREAD_VERSION],
 [AC_CACHE_CHECK([POSIX thread version],[ol_cv_pthread_version],[
-       AC_EGREP_CPP(pthread_version_final,[
+       AC_EGREP_HEADER(pthread_yield,pthread.h,[
+       AC_EGREP_HEADER(pthread_detach,pthread.h,[
+       AC_EGREP_CPP(draft7,[
 #              include <pthread.h>
-               /* this check could be improved */
-#              ifdef PTHREAD_ONCE_INIT
-                       pthread_version_final;
+#              ifdef PTHREAD_CREATE_UNDETACHED
+               draft7
 #              endif
-       ], ol_pthread_final=yes, ol_pthread_final=no)
-
-       AC_EGREP_CPP(pthread_version_draft4,[
+       ], ol_cv_pthread_version=7, [
+       AC_EGREP_HEADER(pthread_attr_default,pthread.h,[
+       AC_EGREP_CPP(draft5,[
 #              include <pthread.h>
-               /* this check could be improved */
-#              ifdef pthread_once_init
-                       pthread_version_draft4;
-#              endif
-       ], ol_pthread_draft4=yes, ol_pthread_draft4=no)
-
-       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
+#ifdef         PTHREAD_MUTEX_INITIALIZER
+               draft5
+#endif
+       ], ol_cv_pthread_version=5, ol_cv_pthread_version=4) ],
+       ol_cv_pthread_version=6) ]) ],
+       ol_cv_pthread_version=8) ],
+       ol_cv_pthread_version=10)
 ])
 ])dnl
 dnl
@@ -658,6 +669,9 @@ dnl --------------------------------------------------------------------
 AC_DEFUN([OL_PTHREAD_TEST_INCLUDES],
 [/* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -670,60 +684,43 @@ static void *task(p)
 ])
 AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
index c86a98f90ddec39fd355079c3e84ada606a283b5..29160a56c06226d2324ed39e4198696df3bd7ace 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # $OpenLDAP$
-# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.11 2002/08/29 02:10:40 kurt Exp  
+# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.12 2002/09/06 01:46:19 kurt Exp  
 
 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
 # 
@@ -8267,6 +8267,15 @@ else
 fi
 
 
+case "$target" in
+*-ibm-openedition)
+       ac_cv_func_getopt=no
+       cat >> confdefs.h <<\EOF
+#define BOTH_STRINGS_H 1
+EOF
+
+       ;;
+esac
 
 ol_link_modules=no
 if test $ol_enable_modules != no ; then
@@ -8274,17 +8283,17 @@ if test $ol_enable_modules != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8278: checking for $ac_hdr" >&5
+echo "configure:8287: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8283 "configure"
+#line 8292 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8297: \"$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*
@@ -8316,7 +8325,7 @@ done
        fi
 
        echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
-echo "configure:8320: checking for lt_dlinit in -lltdl" >&5
+echo "configure:8329: checking for lt_dlinit in -lltdl" >&5
 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8324,7 +8333,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lltdl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8328 "configure"
+#line 8337 "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
@@ -8335,7 +8344,7 @@ int main() {
 lt_dlinit()
 ; return 0; }
 EOF
-if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8348: \"$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
@@ -8382,13 +8391,13 @@ fi
 
 # test for EBCDIC
 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
-echo "configure:8386: checking for EBCDIC" >&5
+echo "configure:8395: checking for EBCDIC" >&5
 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 8392 "configure"
+#line 8401 "configure"
 #include "confdefs.h"
 
 #if !('M' == 0xd4)
@@ -8397,7 +8406,7 @@ else
 
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8410: \"$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*
@@ -8421,12 +8430,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:8425: checking for ANSI C header files" >&5
+echo "configure:8434: checking for ANSI C header files" >&5
 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8430 "configure"
+#line 8439 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -8434,7 +8443,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8447: \"$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*
@@ -8451,7 +8460,7 @@ rm -f conftest*
 if test $ol_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 8455 "configure"
+#line 8464 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -8469,7 +8478,7 @@ fi
 if test $ol_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 8473 "configure"
+#line 8482 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -8490,7 +8499,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 8494 "configure"
+#line 8503 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #ifndef HAVE_EBCDIC
@@ -8508,7 +8517,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -8542,12 +8551,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:8546: checking for $ac_hdr that defines DIR" >&5
+echo "configure:8555: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8551 "configure"
+#line 8560 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -8555,7 +8564,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:8559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -8580,7 +8589,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:8584: checking for opendir in -ldir" >&5
+echo "configure:8593: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8588,7 +8597,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8592 "configure"
+#line 8601 "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
@@ -8599,7 +8608,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8612: \"$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
@@ -8621,7 +8630,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:8625: checking for opendir in -lx" >&5
+echo "configure:8634: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8629,7 +8638,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8633 "configure"
+#line 8642 "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
@@ -8640,7 +8649,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8653: \"$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
@@ -8663,12 +8672,12 @@ fi
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:8667: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:8676: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8672 "configure"
+#line 8681 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -8684,7 +8693,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -8705,12 +8714,12 @@ EOF
 fi
 
 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
-echo "configure:8709: checking POSIX termios" >&5
+echo "configure:8718: checking POSIX termios" >&5
 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8714 "configure"
+#line 8723 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <unistd.h>
@@ -8720,7 +8729,7 @@ int main() {
    tcgetattr(0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_sys_posix_termios=yes
 else
@@ -8736,7 +8745,7 @@ echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
 
 
  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:8740: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
+echo "configure:8749: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8745,7 +8754,7 @@ else
   gwinsz_in_termios_h=no
   if test $am_cv_sys_posix_termios = yes; then
     cat > conftest.$ac_ext <<EOF
-#line 8749 "configure"
+#line 8758 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #     include <termios.h>
@@ -8765,7 +8774,7 @@ rm -f conftest*
 
   if test $gwinsz_in_termios_h = no; then
     cat > conftest.$ac_ext <<EOF
-#line 8769 "configure"
+#line 8778 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #     include <sys/ioctl.h>
@@ -8849,17 +8858,17 @@ for ac_hdr in \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8853: checking for $ac_hdr" >&5
+echo "configure:8862: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8858 "configure"
+#line 8867 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8872: \"$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*
@@ -8889,12 +8898,12 @@ done
 
 
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:8893: checking for dlopen" >&5
+echo "configure:8902: checking for dlopen" >&5
 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8898 "configure"
+#line 8907 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -8918,7 +8927,7 @@ f = dlopen;
 
 ; return 0; }
 EOF
-if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8931: \"$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
@@ -8936,7 +8945,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8940: checking for dlopen in -ldl" >&5
+echo "configure:8949: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8944,7 +8953,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8948 "configure"
+#line 8957 "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
@@ -8955,7 +8964,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8968: \"$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
@@ -8986,7 +8995,7 @@ fi
 
 
 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
-echo "configure:8990: checking for sigset in -lV3" >&5
+echo "configure:8999: checking for sigset in -lV3" >&5
 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8994,7 +9003,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lV3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8998 "configure"
+#line 9007 "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
@@ -9005,7 +9014,7 @@ int main() {
 sigset()
 ; return 0; }
 EOF
-if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9018: \"$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
@@ -9034,12 +9043,12 @@ fi
 
 
 echo $ac_n "checking for winsock""... $ac_c" 1>&6
-echo "configure:9038: checking for winsock" >&5
+echo "configure:9047: checking for winsock" >&5
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
        LIBS="$LIBS -l$curlib"
        cat > conftest.$ac_ext <<EOF
-#line 9043 "configure"
+#line 9052 "configure"
 #include "confdefs.h"
 
                        char socket@12();
@@ -9056,7 +9065,7 @@ int main() {
                        
 ; return 0; }
 EOF
-if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   have_winsock=yes
 else
@@ -9091,12 +9100,12 @@ echo "$ac_t""$have_winsock" 1>&6
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:9095: checking for socket" >&5
+echo "configure:9104: checking for socket" >&5
 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9100 "configure"
+#line 9109 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -9120,7 +9129,7 @@ f = socket;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -9139,7 +9148,7 @@ else
   echo "$ac_t""no" 1>&6
        
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:9143: checking for main in -lsocket" >&5
+echo "configure:9152: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9147,14 +9156,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9151 "configure"
+#line 9160 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9167: \"$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
@@ -9182,7 +9191,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
-echo "configure:9186: checking for main in -lnet" >&5
+echo "configure:9195: checking for main in -lnet" >&5
 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9190,14 +9199,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9194 "configure"
+#line 9203 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9210: \"$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
@@ -9225,7 +9234,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
-echo "configure:9229: checking for main in -lnsl_s" >&5
+echo "configure:9238: checking for main in -lnsl_s" >&5
 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9233,14 +9242,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9237 "configure"
+#line 9246 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9253: \"$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
@@ -9268,7 +9277,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:9272: checking for main in -lnsl" >&5
+echo "configure:9281: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9276,14 +9285,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9280 "configure"
+#line 9289 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9296: \"$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
@@ -9311,7 +9320,7 @@ else
 fi
 
        echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
-echo "configure:9315: checking for socket in -linet" >&5
+echo "configure:9324: checking for socket in -linet" >&5
 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9319,7 +9328,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9323 "configure"
+#line 9332 "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
@@ -9330,7 +9339,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9343: \"$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
@@ -9358,7 +9367,7 @@ else
 fi
 
        echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
-echo "configure:9362: checking for main in -lgen" >&5
+echo "configure:9371: checking for main in -lgen" >&5
 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9366,14 +9375,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9370 "configure"
+#line 9379 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9386: \"$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
@@ -9405,12 +9414,12 @@ fi
 
 
 echo $ac_n "checking for select""... $ac_c" 1>&6
-echo "configure:9409: checking for select" >&5
+echo "configure:9418: checking for select" >&5
 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9414 "configure"
+#line 9423 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char select(); below.  */
@@ -9434,7 +9443,7 @@ f = select;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_select=yes"
 else
@@ -9457,7 +9466,7 @@ fi
 
 if test "${ac_cv_header_winsock_h}" != yes; then
                                echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
-echo "configure:9461: checking types of arguments for select()" >&5
+echo "configure:9470: checking types of arguments for select()" >&5
  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9471,7 +9480,7 @@ else
      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
        cat > conftest.$ac_ext <<EOF
-#line 9475 "configure"
+#line 9484 "configure"
 #include "confdefs.h"
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -9490,7 +9499,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
           ac_not_found=no ; break 3
 else
@@ -9535,17 +9544,17 @@ for ac_hdr in regex.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9539: checking for $ac_hdr" >&5
+echo "configure:9548: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9544 "configure"
+#line 9553 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9558: \"$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*
@@ -9576,14 +9585,14 @@ if test "$ac_cv_header_regex_h" != yes ; then
 fi
 
 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
-echo "configure:9580: checking for library containing regfree" >&5
+echo "configure:9589: checking for library containing regfree" >&5
 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_regfree="no"
 cat > conftest.$ac_ext <<EOF
-#line 9587 "configure"
+#line 9596 "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
@@ -9594,7 +9603,7 @@ int main() {
 regfree()
 ; return 0; }
 EOF
-if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_regfree="none required"
 else
@@ -9605,7 +9614,7 @@ rm -f conftest*
 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9609 "configure"
+#line 9618 "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
@@ -9616,7 +9625,7 @@ int main() {
 regfree()
 ; return 0; }
 EOF
-if { (eval echo configure:9620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_regfree="-l$ac_lib"
 break
@@ -9639,7 +9648,7 @@ fi
 
 
 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
-echo "configure:9643: checking for compatible POSIX regex" >&5
+echo "configure:9652: checking for compatible POSIX regex" >&5
 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9648,7 +9657,7 @@ else
   ol_cv_c_posix_regex=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 9652 "configure"
+#line 9661 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -9674,7 +9683,7 @@ main()
        return rc;
 }
 EOF
-if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_c_posix_regex=yes
 else
@@ -9700,17 +9709,17 @@ for ac_hdr in sys/uuid.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9704: checking for $ac_hdr" >&5
+echo "configure:9713: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9709 "configure"
+#line 9718 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9723: \"$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*
@@ -9740,14 +9749,14 @@ if test $ac_cv_header_sys_uuid_h = yes ; then
        save_LIBS="$LIBS"
        
 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
-echo "configure:9744: checking for library containing uuid_to_str" >&5
+echo "configure:9753: checking for library containing uuid_to_str" >&5
 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_uuid_to_str="no"
 cat > conftest.$ac_ext <<EOF
-#line 9751 "configure"
+#line 9760 "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
@@ -9758,7 +9767,7 @@ int main() {
 uuid_to_str()
 ; return 0; }
 EOF
-if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_uuid_to_str="none required"
 else
@@ -9769,7 +9778,7 @@ rm -f conftest*
 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9773 "configure"
+#line 9782 "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
@@ -9780,7 +9789,7 @@ int main() {
 uuid_to_str()
 ; return 0; }
 EOF
-if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_uuid_to_str="-l$ac_lib"
 break
@@ -9815,11 +9824,11 @@ fi
 
 if test $have_uuid = no ; then
        echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
-echo "configure:9819: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
+echo "configure:9828: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
        save_LIBS="$LIBS"
        LIBS="$LIBS -lrpcrt4"
        cat > conftest.$ac_ext <<EOF
-#line 9823 "configure"
+#line 9832 "configure"
 #include "confdefs.h"
 
                char UuidCreate@4();
@@ -9832,7 +9841,7 @@ int main() {
                
 ; return 0; }
 EOF
-if { (eval echo configure:9836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   need_rpcrt=yes
 else
@@ -9851,12 +9860,12 @@ fi
 
 ol_link_dnssrv=no
 echo $ac_n "checking for res_query""... $ac_c" 1>&6
-echo "configure:9855: checking for res_query" >&5
+echo "configure:9864: checking for res_query" >&5
 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9860 "configure"
+#line 9869 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char res_query(); below.  */
@@ -9880,7 +9889,7 @@ f = res_query;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_res_query=yes"
 else
@@ -9901,12 +9910,12 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query""... $ac_c" 1>&6
-echo "configure:9905: checking for __res_query" >&5
+echo "configure:9914: checking for __res_query" >&5
 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9910 "configure"
+#line 9919 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __res_query(); below.  */
@@ -9930,7 +9939,7 @@ f = __res_query;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___res_query=yes"
 else
@@ -9954,7 +9963,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
-echo "configure:9958: checking for res_query in -lbind" >&5
+echo "configure:9967: checking for res_query in -lbind" >&5
 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -9962,7 +9971,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9966 "configure"
+#line 9975 "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
@@ -9973,7 +9982,7 @@ int main() {
 res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9986: \"$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
@@ -10005,7 +10014,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
-echo "configure:10009: checking for __res_query in -lbind" >&5
+echo "configure:10018: checking for __res_query in -lbind" >&5
 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10013,7 +10022,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10017 "configure"
+#line 10026 "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
@@ -10024,7 +10033,7 @@ int main() {
 __res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10037: \"$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
@@ -10056,7 +10065,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
-echo "configure:10060: checking for res_query in -lresolv" >&5
+echo "configure:10069: checking for res_query in -lresolv" >&5
 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10064,7 +10073,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10068 "configure"
+#line 10077 "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
@@ -10075,7 +10084,7 @@ int main() {
 res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10088: \"$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
@@ -10107,7 +10116,7 @@ fi
 
 if test $ac_cv_func_res_query = no ; then 
        echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
-echo "configure:10111: checking for __res_query in -lresolv" >&5
+echo "configure:10120: checking for __res_query in -lresolv" >&5
 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10115,7 +10124,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10119 "configure"
+#line 10128 "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
@@ -10126,7 +10135,7 @@ int main() {
 __res_query()
 ; return 0; }
 EOF
-if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10139: \"$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
 for ac_func in getaddrinfo gai_strerror inet_ntop 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10178: checking for $ac_func" >&5
+echo "configure:10187: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10183 "configure"
+#line 10192 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10203,7 +10212,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:10207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10216: \"$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
@@ -10235,13 +10244,13 @@ if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
        fi
 elif test $ol_enable_ipv6 != no ; then
        echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
-echo "configure:10239: checking INET6_ADDRSTRLEN" >&5
+echo "configure:10248: checking INET6_ADDRSTRLEN" >&5
 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 10245 "configure"
+#line 10254 "configure"
 #include "confdefs.h"
 
 #                      include <netinet/in.h>
@@ -10266,13 +10275,13 @@ echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
 
 
        echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
-echo "configure:10270: checking struct sockaddr_storage" >&5
+echo "configure:10279: checking struct sockaddr_storage" >&5
 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 10276 "configure"
+#line 10285 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10284,7 +10293,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:10288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_sockaddr_storage=yes
 else
@@ -10315,17 +10324,17 @@ if test $ol_enable_local != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10319: checking for $ac_hdr" >&5
+echo "configure:10328: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10324 "configure"
+#line 10333 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10338: \"$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*
@@ -10372,17 +10381,17 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10376: checking for $ac_hdr" >&5
+echo "configure:10385: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10381 "configure"
+#line 10390 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10395: \"$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*
@@ -10414,17 +10423,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10418: checking for $ac_hdr" >&5
+echo "configure:10427: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10423 "configure"
+#line 10432 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10437: \"$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*
@@ -10458,7 +10467,7 @@ done
 
                if test $krb5_impl = mit; then
                        echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
-echo "configure:10462: checking for main in -lk5crypto" >&5
+echo "configure:10471: checking for main in -lk5crypto" >&5
 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10466,14 +10475,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lk5crypto  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10470 "configure"
+#line 10479 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10486: \"$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
@@ -10496,7 +10505,7 @@ fi
 
 
                        echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:10500: checking for main in -lkrb5" >&5
+echo "configure:10509: checking for main in -lkrb5" >&5
 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10504,14 +10513,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10508 "configure"
+#line 10517 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10524: \"$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
@@ -10536,7 +10545,7 @@ fi
 
                elif test $krb5_impl = heimdal; then
                        echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
-echo "configure:10540: checking for main in -ldes" >&5
+echo "configure:10549: checking for main in -ldes" >&5
 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10544,14 +10553,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldes  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10548 "configure"
+#line 10557 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10564: \"$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
@@ -10574,7 +10583,7 @@ fi
 
 
                        echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:10578: checking for main in -lkrb5" >&5
+echo "configure:10587: checking for main in -lkrb5" >&5
 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10582,14 +10591,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10586 "configure"
+#line 10595 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10602: \"$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
@@ -10652,17 +10661,17 @@ if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10656: checking for $ac_hdr" >&5
+echo "configure:10665: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10661 "configure"
+#line 10670 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10675: \"$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*
@@ -10692,7 +10701,7 @@ done
        if test $ac_cv_header_kerberosIV_krb_h = yes ; then
                if test $krb5_impl = mit; then
                        echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:10696: checking for main in -lkrb4" >&5
+echo "configure:10705: checking for main in -lkrb4" >&5
 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10700,14 +10709,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10704 "configure"
+#line 10713 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10720: \"$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
@@ -10732,7 +10741,7 @@ fi
 
                elif test $krb5_impl = heimdal; then
                        echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:10736: checking for main in -lkrb4" >&5
+echo "configure:10745: checking for main in -lkrb4" >&5
 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10740,14 +10749,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10744 "configure"
+#line 10753 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10760: \"$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
@@ -10789,7 +10798,7 @@ EOF
 
 
                        echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
-echo "configure:10793: checking for des_debug in Kerberos libraries" >&5
+echo "configure:10802: checking for des_debug in Kerberos libraries" >&5
 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10797,7 +10806,7 @@ else
                                                                save_LIBS="$LIBS"
                                LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 10801 "configure"
+#line 10810 "configure"
 #include "confdefs.h"
 
 #include <kerberosIV/krb.h>
@@ -10810,7 +10819,7 @@ des_debug = 1;
 
 ; return 0; }
 EOF
-if { (eval echo configure:10814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_var_des_debug=yes
 else
@@ -10849,17 +10858,17 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10853: checking for $ac_hdr" >&5
+echo "configure:10862: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10858 "configure"
+#line 10867 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10872: \"$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*
@@ -10888,7 +10897,7 @@ done
 
        if test $ac_cv_header_krb_h = yes ; then
                echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
-echo "configure:10892: checking for main in -lkrb" >&5
+echo "configure:10901: checking for main in -lkrb" >&5
 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -10896,14 +10905,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb -ldes $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10900 "configure"
+#line 10909 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10916: \"$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
@@ -10973,17 +10982,17 @@ if test $ol_with_tls != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10977: checking for $ac_hdr" >&5
+echo "configure:10986: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10982 "configure"
+#line 10991 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10996: \"$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*
@@ -11012,7 +11021,7 @@ done
        
        if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
                echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
-echo "configure:11016: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
+echo "configure:11025: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11020,7 +11029,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11024 "configure"
+#line 11033 "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
@@ -11031,7 +11040,7 @@ int main() {
 SSLeay_add_ssl_algorithms()
 ; return 0; }
 EOF
-if { (eval echo configure:11035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11044: \"$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
@@ -11056,7 +11065,7 @@ fi
                        
                if test $have_ssleay = no ; then
                        echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
-echo "configure:11060: checking for SSL_library_init in -lssl" >&5
+echo "configure:11069: checking for SSL_library_init in -lssl" >&5
 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11064,7 +11073,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11068 "configure"
+#line 11077 "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
@@ -11075,7 +11084,7 @@ int main() {
 SSL_library_init()
 ; return 0; }
 EOF
-if { (eval echo configure:11079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11088: \"$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
@@ -11101,7 +11110,7 @@ fi
 
                if test $have_ssleay = no ; then
                        echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
-echo "configure:11105: checking for ssl3_accept in -lssl" >&5
+echo "configure:11114: checking for ssl3_accept in -lssl" >&5
 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -11109,7 +11118,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11113 "configure"
+#line 11122 "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
@@ -11120,7 +11129,7 @@ int main() {
 ssl3_accept()
 ; return 0; }
 EOF
-if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11133: \"$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
@@ -11201,12 +11210,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11205: checking for $ac_func" >&5
+echo "configure:11214: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11210 "configure"
+#line 11219 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -11230,7 +11239,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:11234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11243: \"$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
@@ -11259,19 +11268,19 @@ 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:11263: checking number of arguments of ctime_r" >&5
+echo "configure:11272: checking number of arguments of ctime_r" >&5
 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11268 "configure"
+#line 11277 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
 ; return 0; }
 EOF
-if { (eval echo configure:11275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_ctime_r_nargs3=yes
 else
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 11287 "configure"
+#line 11296 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer);
 ; return 0; }
 EOF
-if { (eval echo configure:11294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_ctime_r_nargs2=yes
 else
 
 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:11334: checking number of arguments of gethostbyname_r" >&5
+echo "configure:11343: checking number of arguments of gethostbyname_r" >&5
 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11339 "configure"
+#line 11348 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -11349,7 +11358,7 @@ struct hostent hent; char buffer[BUFSIZE];
                        buffer, bufsize, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs5=yes
 else
@@ -11361,7 +11370,7 @@ fi
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 11365 "configure"
+#line 11374 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -11376,7 +11385,7 @@ struct hostent hent;struct hostent *rhent;
                        &rhent, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:11380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs6=yes
 else
  
 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:11421: checking number of arguments of gethostbyaddr_r" >&5
+echo "configure:11430: checking number of arguments of gethostbyaddr_r" >&5
 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11426 "configure"
+#line 11435 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -11438,7 +11447,7 @@ struct hostent hent; char buffer[BUFSIZE];
                        alen, AF_INET, &hent, buffer, bufsize, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:11442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs7=yes
 else
@@ -11450,7 +11459,7 @@ fi
 rm -f conftest*
 
        cat > conftest.$ac_ext <<EOF
-#line 11454 "configure"
+#line 11463 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -11468,7 +11477,7 @@ struct hostent hent;
                        &rhent, &h_errno);
 ; return 0; }
 EOF
-if { (eval echo configure:11472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs8=yes
 else
@@ -11531,12 +11540,12 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 
        
        echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
-echo "configure:11535: checking for _beginthread" >&5
+echo "configure:11544: checking for _beginthread" >&5
 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11540 "configure"
+#line 11549 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _beginthread(); below.  */
@@ -11560,7 +11569,7 @@ f = _beginthread;
 
 ; return 0; }
 EOF
-if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__beginthread=yes"
 else
@@ -11616,17 +11625,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11620: checking for $ac_hdr" >&5
+echo "configure:11629: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11625 "configure"
+#line 11634 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11639: \"$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*
@@ -11655,76 +11664,105 @@ done
 
        if test $ac_cv_header_pthread_h = yes ; then
                echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
-echo "configure:11659: checking POSIX thread version" >&5
+echo "configure:11668: checking POSIX thread version" >&5
 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 11665 "configure"
+#line 11674 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_yield" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11683 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_detach" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11692 "configure"
 #include "confdefs.h"
 
 #              include <pthread.h>
-               /* this check could be improved */
-#              ifdef PTHREAD_ONCE_INIT
-                       pthread_version_final;
+#              ifdef PTHREAD_CREATE_UNDETACHED
+               draft7
 #              endif
        
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pthread_version_final" >/dev/null 2>&1; then
+  egrep "draft7" >/dev/null 2>&1; then
   rm -rf conftest*
-  ol_pthread_final=yes
+  ol_cv_pthread_version=7
 else
   rm -rf conftest*
-  ol_pthread_final=no
-fi
-rm -f conftest*
-
-
+  
        cat > conftest.$ac_ext <<EOF
-#line 11687 "configure"
+#line 11709 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_attr_default" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11718 "configure"
 #include "confdefs.h"
 
 #              include <pthread.h>
-               /* this check could be improved */
-#              ifdef pthread_once_init
-                       pthread_version_draft4;
-#              endif
+#ifdef         PTHREAD_MUTEX_INITIALIZER
+               draft5
+#endif
        
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pthread_version_draft4" >/dev/null 2>&1; then
+  egrep "draft5" >/dev/null 2>&1; then
   rm -rf conftest*
-  ol_pthread_draft4=yes
+  ol_cv_pthread_version=5
 else
   rm -rf conftest*
-  ol_pthread_draft4=no
+  ol_cv_pthread_version=4
+fi
+rm -f conftest*
+else
+  rm -rf conftest*
+  ol_cv_pthread_version=6
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+else
+  rm -rf conftest*
+  ol_cv_pthread_version=8
+fi
+rm -f conftest*
+else
+  rm -rf conftest*
+  ol_cv_pthread_version=10
 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
+               if test $ol_cv_pthread_version != 0 ; then
+                       cat >> confdefs.h <<EOF
+#define HAVE_PTHREADS $ol_cv_pthread_version
 EOF
 
                else
@@ -11736,12 +11774,12 @@ EOF
 
                
        echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:11740: checking for LinuxThreads pthread.h" >&5
+echo "configure:11778: checking for LinuxThreads pthread.h" >&5
 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11745 "configure"
+#line 11783 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -11768,12 +11806,12 @@ EOF
 
                
        echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
-echo "configure:11772: checking for GNU Pth pthread.h" >&5
+echo "configure:11810: checking for GNU Pth pthread.h" >&5
 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11777 "configure"
+#line 11815 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 #ifdef _POSIX_THREAD_IS_GNU_PTH
@@ -11802,17 +11840,17 @@ echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11806: checking for $ac_hdr" >&5
+echo "configure:11844: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 11811 "configure"
+#line 11849 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11854: \"$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*
@@ -11842,17 +11880,20 @@ done
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
-echo "configure:11846: checking for pthread_create in default libraries" >&5
+echo "configure:11884: checking for pthread_create in default libraries" >&5
 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 11853 "configure"
+#line 11891 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -11866,60 +11907,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -11930,7 +11954,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_create=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 11946 "configure"
+#line 11970 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -11963,60 +11990,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12028,7 +12038,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_create=yes
 else
@@ -12053,7 +12063,7 @@ echo "$ac_t""$ol_cv_pthread_create" 1>&6
 if test "$ol_link_threads" = no ; then
        # try -kthread
        echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
-echo "configure:12057: checking for pthread link with -kthread" >&5
+echo "configure:12067: checking for pthread link with -kthread" >&5
 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12064,10 +12074,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12068 "configure"
+#line 12078 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12081,60 +12094,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12145,7 +12141,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_kthread=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12161 "configure"
+#line 12157 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12178,60 +12177,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12243,7 +12225,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_kthread=yes
 else
@@ -12273,7 +12255,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -pthread
        echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
-echo "configure:12277: checking for pthread link with -pthread" >&5
+echo "configure:12259: checking for pthread link with -pthread" >&5
 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12284,10 +12266,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12288 "configure"
+#line 12270 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12301,60 +12286,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12365,7 +12333,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_pthread=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12381 "configure"
+#line 12349 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12398,60 +12369,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12463,7 +12417,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_pthread=yes
 else
@@ -12493,7 +12447,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -pthreads
        echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
-echo "configure:12497: checking for pthread link with -pthreads" >&5
+echo "configure:12451: checking for pthread link with -pthreads" >&5
 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12504,10 +12458,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12508 "configure"
+#line 12462 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12521,60 +12478,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12585,7 +12525,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_pthreads=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12601 "configure"
+#line 12541 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12618,60 +12561,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12683,7 +12609,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_pthreads=yes
 else
@@ -12713,7 +12639,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -mthreads
        echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
-echo "configure:12717: checking for pthread link with -mthreads" >&5
+echo "configure:12643: checking for pthread link with -mthreads" >&5
 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12724,10 +12650,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12728 "configure"
+#line 12654 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12741,60 +12670,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12805,7 +12717,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:12809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_mthreads=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 12821 "configure"
+#line 12733 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12838,60 +12753,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -12903,7 +12801,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_mthreads=yes
 else
@@ -12933,7 +12831,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -thread
        echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
-echo "configure:12937: checking for pthread link with -thread" >&5
+echo "configure:12835: checking for pthread link with -thread" >&5
 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -12944,10 +12842,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 12948 "configure"
+#line 12846 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -12961,60 +12862,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13025,7 +12909,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_thread=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13041 "configure"
+#line 12925 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13058,60 +12945,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13123,7 +12993,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_thread=yes
 else
@@ -13154,7 +13024,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc -lc_r
        echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:13158: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+echo "configure:13028: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13165,10 +13035,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13169 "configure"
+#line 13039 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13182,60 +13055,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13246,7 +13102,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13262 "configure"
+#line 13118 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13279,60 +13138,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13344,7 +13186,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
@@ -13374,7 +13216,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc
        echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
-echo "configure:13378: checking for pthread link with -lpthread -lmach -lexc" >&5
+echo "configure:13220: checking for pthread link with -lpthread -lmach -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13385,10 +13227,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13389 "configure"
+#line 13231 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13402,60 +13247,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13466,7 +13294,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13482 "configure"
+#line 13310 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13499,60 +13330,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13564,7 +13378,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
@@ -13595,7 +13409,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread -Wl,-woff,85
        echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
-echo "configure:13599: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+echo "configure:13413: checking for pthread link with -lpthread -Wl,-woff,85" >&5
 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13606,10 +13420,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13610 "configure"
+#line 13424 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13623,60 +13440,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13687,7 +13487,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lib_lpthread_woff=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13703 "configure"
+#line 13503 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13720,60 +13523,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13785,7 +13571,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lib_lpthread_woff=yes
 else
@@ -13816,7 +13602,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthread
        echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
-echo "configure:13820: checking for pthread link with -lpthread" >&5
+echo "configure:13606: checking for pthread link with -lpthread" >&5
 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -13827,10 +13613,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 13831 "configure"
+#line 13617 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13844,60 +13633,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -13908,7 +13680,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthread=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 13924 "configure"
+#line 13696 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -13941,60 +13716,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14006,7 +13764,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthread=yes
 else
@@ -14036,7 +13794,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lc_r
        echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
-echo "configure:14040: checking for pthread link with -lc_r" >&5
+echo "configure:13798: checking for pthread link with -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14047,10 +13805,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14051 "configure"
+#line 13809 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14064,60 +13825,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14128,7 +13872,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lc_r=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14144 "configure"
+#line 13888 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14161,60 +13908,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14226,7 +13956,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lc_r=yes
 else
@@ -14257,7 +13987,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -threads
        echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
-echo "configure:14261: checking for pthread link with -threads" >&5
+echo "configure:13991: checking for pthread link with -threads" >&5
 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14268,10 +13998,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14272 "configure"
+#line 14002 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14285,60 +14018,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14349,7 +14065,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_threads=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14365 "configure"
+#line 14081 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14382,60 +14101,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14447,7 +14149,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_threads=yes
 else
@@ -14478,7 +14180,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc -lc_r
        echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:14482: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+echo "configure:14184: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14489,10 +14191,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14493 "configure"
+#line 14195 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14506,60 +14211,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14570,7 +14258,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14586 "configure"
+#line 14274 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14603,60 +14294,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14668,7 +14342,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
@@ -14698,7 +14372,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc
        echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
-echo "configure:14702: checking for pthread link with -lpthreads -lmach -lexc" >&5
+echo "configure:14376: checking for pthread link with -lpthreads -lmach -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14709,10 +14383,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14713 "configure"
+#line 14387 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14726,60 +14403,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14790,7 +14450,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:14794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 14806 "configure"
+#line 14466 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14823,60 +14486,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -14888,7 +14534,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:14892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
@@ -14918,7 +14564,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lexc
        echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
-echo "configure:14922: checking for pthread link with -lpthreads -lexc" >&5
+echo "configure:14568: checking for pthread link with -lpthreads -lexc" >&5
 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -14929,10 +14575,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 14933 "configure"
+#line 14579 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -14946,60 +14595,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -15010,7 +14642,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:15014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lpthreads_lexc=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 15026 "configure"
+#line 14658 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -15043,60 +14678,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -15108,7 +14726,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:15112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lpthreads_lexc=yes
 else
@@ -15139,7 +14757,7 @@ fi
 if test "$ol_link_threads" = no ; then
        # try -lpthreads
        echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
-echo "configure:15143: checking for pthread link with -lpthreads" >&5
+echo "configure:14761: checking for pthread link with -lpthreads" >&5
 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15150,10 +14768,13 @@ else
 
                if test "$cross_compiling" = yes; then
   cat > conftest.$ac_ext <<EOF
-#line 15154 "configure"
+#line 14772 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -15167,60 +14788,43 @@ static void *task(p)
 int main() {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -15231,7 +14835,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:15235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_pthread_lib_lpthreads=yes
 else
 rm -f conftest*
 else
   cat > conftest.$ac_ext <<EOF
-#line 15247 "configure"
+#line 14851 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -15264,60 +14871,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -15329,7 +14919,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:15333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_lib_lpthreads=yes
 else
 
 
                if test $ol_link_threads != no ; then
-                       cat >> confdefs.h <<\EOF
-#define HAVE_PTHREADS 1
-EOF
-
-
                        LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
 
                                                save_CPPFLAGS="$CPPFLAGS"
@@ -15371,12 +14956,12 @@ EOF
                                                                                                for ac_func in sched_yield pthread_yield
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15375: checking for $ac_func" >&5
+echo "configure:14960: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15380 "configure"
+#line 14965 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15400,7 +14985,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14989: \"$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
@@ -15428,7 +15013,7 @@ done
                        if test $ac_cv_func_sched_yield = no -a \
                                $ac_cv_func_pthread_yield = no ; then
                                                                echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
-echo "configure:15432: checking for sched_yield in -lrt" >&5
+echo "configure:15017: checking for sched_yield in -lrt" >&5
 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -15436,7 +15021,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15440 "configure"
+#line 15025 "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
@@ -15447,7 +15032,7 @@ int main() {
 sched_yield()
 ; return 0; }
 EOF
-if { (eval echo configure:15451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15036: \"$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
                                                                                                for ac_func in thr_yield
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15483: checking for $ac_func" >&5
+echo "configure:15068: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15488 "configure"
+#line 15073 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15508,7 +15093,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15097: \"$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
@@ -15542,12 +15127,12 @@ done
                                                for ac_func in pthread_kill pthread_rwlock_destroy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15546: checking for $ac_func" >&5
+echo "configure:15131: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15551 "configure"
+#line 15136 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15571,7 +15156,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15160: \"$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
@@ -15597,13 +15182,13 @@ done
 
 
                                                                        echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
-echo "configure:15601: checking for pthread_detach with <pthread.h>" >&5
+echo "configure:15186: checking for pthread_detach with <pthread.h>" >&5
 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                                                                cat > conftest.$ac_ext <<EOF
-#line 15607 "configure"
+#line 15192 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -15615,7 +15200,7 @@ int main() {
 pthread_detach(NULL);
 ; return 0; }
 EOF
-if { (eval echo configure:15619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_func_pthread_detach=yes
 else
@@ -15647,12 +15232,12 @@ EOF
                        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15651: checking for $ac_func" >&5
+echo "configure:15236: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15656 "configure"
+#line 15241 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15676,7 +15261,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15265: \"$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
@@ -15705,12 +15290,12 @@ done
        for ac_func in pthread_kill_other_threads_np
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15709: checking for $ac_func" >&5
+echo "configure:15294: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 15714 "configure"
+#line 15299 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -15734,7 +15319,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15323: \"$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
@@ -15759,7 +15344,7 @@ fi
 done
 
        echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
-echo "configure:15763: checking for LinuxThreads implementation" >&5
+echo "configure:15348: checking for LinuxThreads implementation" >&5
 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15772,7 +15357,7 @@ echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
        
        
        echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
-echo "configure:15776: checking for LinuxThreads consistency" >&5
+echo "configure:15361: checking for LinuxThreads consistency" >&5
 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15797,7 +15382,7 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6
                        fi
 
                        echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
-echo "configure:15801: checking if pthread_create() works" >&5
+echo "configure:15386: checking if pthread_create() works" >&5
 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15806,10 +15391,13 @@ else
                                ol_cv_pthread_create_works=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 15810 "configure"
+#line 15395 "configure"
 #include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
 #ifndef NULL
 #define NULL (void*)0
 #endif
@@ -15827,60 +15415,43 @@ int main(argc, argv)
 {
 
        /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
        pthread_t t;
        int status;
-       int detach = 1;
+       int detach = PTHREAD_CREATE_DETACHED;
 
-#ifdef HAVE_PTHREADS_FINAL
+#if HAVE_PTHREADS > 4
        /* Final pthreads */
        pthread_attr_t attr;
 
        status = pthread_attr_init(&attr);
        if( status ) return status;
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if( !detach ) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+#if HAVE_PTHREADS < 7
+       status = pthread_attr_setdetachstate(&attr, &detach);
+       if( status < 0 ) status = errno;
 #else
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+       status = pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
        if( status ) return status;
-#endif
-
        status = pthread_create( &t, &attr, task, NULL );
-       if( status ) return status;
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
-
-               status = pthread_detach( t );
-               if( status ) return status;
-       }
+#if HAVE_PTHREADS < 7
+       if( status < 0 ) status = errno;
 #endif
-
+       if( status ) return status;
 #else
        /* Draft 4 pthreads */
        status = pthread_create( &t, pthread_attr_default, task, NULL );
-       if( status ) return status;
+       if( status ) return errno;
 
-       if( detach ) {
-               /* give thread a chance to complete */
-               /* it should remain joinable and hence detachable */
-               sleep( 1 );
+       /* give thread a chance to complete */
+       /* it should remain joinable and hence detachable */
+       sleep( 1 );
 
-               status = pthread_detach( &t );
-               if( status ) return status;
-       }
+       status = pthread_detach( &t );
+       if( status ) return errno;
 #endif
 
 #ifdef HAVE_LINUX_THREADS
@@ -15892,7 +15463,7 @@ int main(argc, argv)
 }
 
 EOF
-if { (eval echo configure:15896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_create_works=yes
 else
@@ -15914,7 +15485,7 @@ echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
 
                                                if test $ol_with_yielding_select = auto ; then
                                echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
-echo "configure:15918: checking if select yields when using pthreads" >&5
+echo "configure:15489: checking if select yields when using pthreads" >&5
 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -15923,7 +15494,7 @@ else
   ol_cv_pthread_select_yields=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 15927 "configure"
+#line 15498 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15982,7 +15553,7 @@ int main(argc, argv)
 #endif
 #endif
 
-#if HAVE_PTHREADS_D4
+#if HAVE_PTHREADS < 6
        pthread_create(&t, pthread_attr_default, task, NULL);
 #else
        pthread_create(&t, NULL, task, NULL);
@@ -15999,7 +15570,7 @@ int main(argc, argv)
        exit(2);
 }
 EOF
-if { (eval echo configure:16003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_pthread_select_yields=no
 else
@@ -16043,17 +15614,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16047: checking for $ac_hdr" >&5
+echo "configure:15618: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16052 "configure"
+#line 15623 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15628: \"$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*
@@ -16083,12 +15654,12 @@ done
                ol_with_threads=found
 
                                echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:16087: checking for cthread_fork" >&5
+echo "configure:15658: checking for cthread_fork" >&5
 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16092 "configure"
+#line 15663 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cthread_fork(); below.  */
@@ -16112,7 +15683,7 @@ f = cthread_fork;
 
 ; return 0; }
 EOF
-if { (eval echo configure:16116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cthread_fork=yes"
 else
@@ -16134,7 +15705,7 @@ fi
 
                if test $ol_link_threads = no ; then
                                                                        echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
-echo "configure:16138: checking for cthread_fork with -all_load" >&5
+echo "configure:15709: checking for cthread_fork with -all_load" >&5
 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -16142,7 +15713,7 @@ else
                                                                save_LIBS="$LIBS"
                                LIBS="-all_load $LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 16146 "configure"
+#line 15717 "configure"
 #include "confdefs.h"
 #include <mach/cthreads.h>
 int main() {
@@ -16151,7 +15722,7 @@ int main() {
                                        
 ; return 0; }
 EOF
-if { (eval echo configure:16155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_cthread_all_load=yes
 else
@@ -16181,12 +15752,12 @@ echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
                                save_LIBS="$LIBS"
                LIBS="$LIBS -lthreads"
                echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:16185: checking for cthread_fork" >&5
+echo "configure:15756: checking for cthread_fork" >&5
 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16190 "configure"
+#line 15761 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cthread_fork(); below.  */
@@ -16210,7 +15781,7 @@ f = cthread_fork;
 
 ; return 0; }
 EOF
-if { (eval echo configure:16214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cthread_fork=yes"
 else
@@ -16260,17 +15831,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16264: checking for $ac_hdr" >&5
+echo "configure:15835: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16269 "configure"
+#line 15840 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15845: \"$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*
@@ -16299,7 +15870,7 @@ done
 
        if test $ac_cv_header_pth_h = yes ; then
                echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
-echo "configure:16303: checking for pth_version in -lpth" >&5
+echo "configure:15874: checking for pth_version in -lpth" >&5
 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16307,7 +15878,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16311 "configure"
+#line 15882 "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
@@ -16318,7 +15889,7 @@ int main() {
 pth_version()
 ; return 0; }
 EOF
-if { (eval echo configure:16322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15893: \"$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
@@ -16363,17 +15934,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16367: checking for $ac_hdr" >&5
+echo "configure:15938: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16372 "configure"
+#line 15943 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15948: \"$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*
@@ -16401,7 +15972,7 @@ done
 
        if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
                echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
-echo "configure:16405: checking for thr_create in -lthread" >&5
+echo "configure:15976: checking for thr_create in -lthread" >&5
 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16409,7 +15980,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16413 "configure"
+#line 15984 "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
@@ -16420,7 +15991,7 @@ int main() {
 thr_create()
 ; return 0; }
 EOF
-if { (eval echo configure:16424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15995: \"$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
@@ -16460,12 +16031,12 @@ EOF
                        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16464: checking for $ac_func" >&5
+echo "configure:16035: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16469 "configure"
+#line 16040 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -16489,7 +16060,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:16493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16064: \"$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
@@ -16520,17 +16091,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16524: checking for $ac_hdr" >&5
+echo "configure:16095: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16529 "configure"
+#line 16100 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16105: \"$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*
@@ -16558,7 +16129,7 @@ done
 
        if test $ac_cv_header_lwp_lwp_h = yes ; then
                echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
-echo "configure:16562: checking for lwp_create in -llwp" >&5
+echo "configure:16133: checking for lwp_create in -llwp" >&5
 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -16566,7 +16137,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llwp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 16570 "configure"
+#line 16141 "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
@@ -16577,7 +16148,7 @@ int main() {
 lwp_create()
 ; return 0; }
 EOF
-if { (eval echo configure:16581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16152: \"$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
@@ -16630,17 +16201,17 @@ if test $ol_with_threads = manual ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16634: checking for $ac_hdr" >&5
+echo "configure:16205: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16639 "configure"
+#line 16210 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16215: \"$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*
@@ -16669,12 +16240,12 @@ done
        for ac_func in sched_yield pthread_yield
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16673: checking for $ac_func" >&5
+echo "configure:16244: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16678 "configure"
+#line 16249 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -16698,7 +16269,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:16702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16273: \"$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
@@ -16724,12 +16295,12 @@ done
 
        
        echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:16728: checking for LinuxThreads pthread.h" >&5
+echo "configure:16299: checking for LinuxThreads pthread.h" >&5
 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16733 "configure"
+#line 16304 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -16759,17 +16330,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16763: checking for $ac_hdr" >&5
+echo "configure:16334: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16768 "configure"
+#line 16339 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16344: \"$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*
@@ -16799,17 +16370,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16803: checking for $ac_hdr" >&5
+echo "configure:16374: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16808 "configure"
+#line 16379 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16384: \"$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*
@@ -16839,17 +16410,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16843: checking for $ac_hdr" >&5
+echo "configure:16414: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16848 "configure"
+#line 16419 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16424: \"$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*
@@ -16908,20 +16479,20 @@ EOF
 
 
                        echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
-echo "configure:16912: checking for thread specific errno" >&5
+echo "configure:16483: checking for thread specific errno" >&5
 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 16918 "configure"
+#line 16489 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 errno = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:16925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_errno_thread_specific=yes
 else
 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
 
                        echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
-echo "configure:16941: checking for thread specific h_errno" >&5
+echo "configure:16512: checking for thread specific h_errno" >&5
 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 16947 "configure"
+#line 16518 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 h_errno = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:16954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_h_errno_thread_specific=yes
 else
@@ -17008,17 +16579,17 @@ if test $ol_with_ldbm_api = auto \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:17012: checking for $ac_hdr" >&5
+echo "configure:16583: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17017 "configure"
+#line 16588 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16593: \"$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*
@@ -17046,13 +16617,13 @@ done
 
 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
        echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
-echo "configure:17050: checking if Berkeley DB header compatibility" >&5
+echo "configure:16621: checking if Berkeley DB header compatibility" >&5
 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 17056 "configure"
+#line 16627 "configure"
 #include "confdefs.h"
 
 #if HAVE_DB_185_H
@@ -17089,7 +16660,7 @@ echo "$ac_t""$ol_cv_header_db1" 1>&6
                ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:17093: checking for Berkeley DB link (default)" >&5
+echo "configure:16664: checking for Berkeley DB link (default)" >&5
 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17099,7 +16670,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17103 "configure"
+#line 16674 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17146,7 +16717,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_none=yes
 else
@@ -17170,7 +16741,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:17174: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:16745: checking for Berkeley DB link (-ldb4)" >&5
 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17180,7 +16751,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17184 "configure"
+#line 16755 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17227,7 +16798,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db4=yes
 else
@@ -17251,7 +16822,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:17255: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:16826: checking for Berkeley DB link (-ldb-4)" >&5
 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17261,7 +16832,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17265 "configure"
+#line 16836 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17308,7 +16879,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4=yes
 else
@@ -17332,7 +16903,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:17336: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:16907: checking for Berkeley DB link (-ldb)" >&5
 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17342,7 +16913,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17346 "configure"
+#line 16917 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17389,7 +16960,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db=yes
 else
@@ -17413,7 +16984,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:17417: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:16988: checking for Berkeley DB link (-ldb3)" >&5
 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17423,7 +16994,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17427 "configure"
+#line 16998 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17470,7 +17041,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db3=yes
 else
@@ -17494,7 +17065,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
-echo "configure:17498: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:17069: checking for Berkeley DB link (-ldb-3)" >&5
 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17504,7 +17075,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17508 "configure"
+#line 17079 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17551,7 +17122,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_3=yes
 else
@@ -17575,7 +17146,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:17579: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:17150: checking for Berkeley DB link (-ldb2)" >&5
 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17585,7 +17156,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17589 "configure"
+#line 17160 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17632,7 +17203,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db2=yes
 else
@@ -17656,7 +17227,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
-echo "configure:17660: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:17231: checking for Berkeley DB link (-ldb-2)" >&5
 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17666,7 +17237,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17670 "configure"
+#line 17241 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17713,7 +17284,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_2=yes
 else
@@ -17737,7 +17308,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:17741: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:17312: checking for Berkeley DB link (-ldb1)" >&5
 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17747,7 +17318,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17751 "configure"
+#line 17322 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17794,7 +17365,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db1=yes
 else
@@ -17818,7 +17389,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:17822: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:17393: checking for Berkeley DB link (-ldb-1)" >&5
 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17828,7 +17399,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17832 "configure"
+#line 17403 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -17875,7 +17446,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:17879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_1=yes
 else
@@ -17910,17 +17481,17 @@ for ac_hdr in db.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:17914: checking for $ac_hdr" >&5
+echo "configure:17485: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 17919 "configure"
+#line 17490 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17495: \"$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*
@@ -17950,7 +17521,7 @@ if test $ac_cv_header_db_h = yes; then
        ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:17954: checking for Berkeley DB link (default)" >&5
+echo "configure:17525: checking for Berkeley DB link (default)" >&5
 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -17960,7 +17531,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 17964 "configure"
+#line 17535 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18007,7 +17578,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_none=yes
 else
@@ -18031,7 +17602,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:18035: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:17606: checking for Berkeley DB link (-ldb4)" >&5
 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18041,7 +17612,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18045 "configure"
+#line 17616 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18088,7 +17659,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db4=yes
 else
@@ -18112,7 +17683,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:18116: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:17687: checking for Berkeley DB link (-ldb-4)" >&5
 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18122,7 +17693,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18126 "configure"
+#line 17697 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18169,7 +17740,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_4=yes
 else
@@ -18193,7 +17764,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:18197: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:17768: checking for Berkeley DB link (-ldb)" >&5
 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18203,7 +17774,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18207 "configure"
+#line 17778 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18250,7 +17821,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db=yes
 else
@@ -18274,7 +17845,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:18278: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:17849: checking for Berkeley DB link (-ldb3)" >&5
 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18284,7 +17855,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18288 "configure"
+#line 17859 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18331,7 +17902,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db3=yes
 else
@@ -18355,7 +17926,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
-echo "configure:18359: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:17930: checking for Berkeley DB link (-ldb-3)" >&5
 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18365,7 +17936,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18369 "configure"
+#line 17940 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18412,7 +17983,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_3=yes
 else
@@ -18436,7 +18007,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:18440: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:18011: checking for Berkeley DB link (-ldb2)" >&5
 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18446,7 +18017,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18450 "configure"
+#line 18021 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18493,7 +18064,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db2=yes
 else
@@ -18517,7 +18088,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
-echo "configure:18521: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:18092: checking for Berkeley DB link (-ldb-2)" >&5
 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18527,7 +18098,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18531 "configure"
+#line 18102 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18574,7 +18145,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_2=yes
 else
@@ -18598,7 +18169,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:18602: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:18173: checking for Berkeley DB link (-ldb1)" >&5
 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18608,7 +18179,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18612 "configure"
+#line 18183 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18655,7 +18226,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db1=yes
 else
@@ -18679,7 +18250,7 @@ fi
 
 if test $ol_cv_lib_db = no ; then
        echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:18683: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:18254: checking for Berkeley DB link (-ldb-1)" >&5
 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18689,7 +18260,7 @@ else
        LIBS="$ol_DB_LIB $LIBS"
 
        cat > conftest.$ac_ext <<EOF
-#line 18693 "configure"
+#line 18264 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18736,7 +18307,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:18740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_db_db_1=yes
 else
@@ -18762,7 +18333,7 @@ fi
        if test "$ol_cv_lib_db" != no ; then
                ol_cv_berkeley_db=yes
                echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
-echo "configure:18766: checking for Berkeley DB thread support" >&5
+echo "configure:18337: checking for Berkeley DB thread support" >&5
 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -18776,7 +18347,7 @@ else
   ol_cv_berkeley_db_thread=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 18780 "configure"
+#line 18351 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
@@ -18843,7 +18414,7 @@ main()
        return rc;
 }
 EOF
-if { (eval echo configure:18847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_berkeley_db_thread=yes
 else
@@ -18904,13 +18475,13 @@ if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
        { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
        echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
-echo "configure:18908: checking Berkeley DB version for BDB backend" >&5
+echo "configure:18479: checking Berkeley DB version for BDB backend" >&5
 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 18914 "configure"
+#line 18485 "configure"
 #include "confdefs.h"
 
 #include <db.h>
 
 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
        echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
-echo "configure:18961: checking for MDBM library" >&5
+echo "configure:18532: checking for MDBM library" >&5
 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
-echo "configure:18967: checking for mdbm_set_chain" >&5
+echo "configure:18538: checking for mdbm_set_chain" >&5
 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18972 "configure"
+#line 18543 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mdbm_set_chain(); below.  */
@@ -18992,7 +18563,7 @@ f = mdbm_set_chain;
 
 ; return 0; }
 EOF
-if { (eval echo configure:18996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_mdbm_set_chain=yes"
 else
@@ -19011,7 +18582,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
-echo "configure:19015: checking for mdbm_set_chain in -lmdbm" >&5
+echo "configure:18586: checking for mdbm_set_chain in -lmdbm" >&5
 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19019,7 +18590,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmdbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19023 "configure"
+#line 18594 "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
@@ -19030,7 +18601,7 @@ int main() {
 mdbm_set_chain()
 ; return 0; }
 EOF
-if { (eval echo configure:19034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18605: \"$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
@@ -19065,17 +18636,17 @@ echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19069: checking for $ac_hdr" >&5
+echo "configure:18640: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19074 "configure"
+#line 18645 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18650: \"$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*
@@ -19102,7 +18673,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19106: checking for db" >&5
+echo "configure:18677: checking for db" >&5
 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 
 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
        echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
-echo "configure:19139: checking for GDBM library" >&5
+echo "configure:18710: checking for GDBM library" >&5
 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
-echo "configure:19145: checking for gdbm_open" >&5
+echo "configure:18716: checking for gdbm_open" >&5
 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19150 "configure"
+#line 18721 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gdbm_open(); below.  */
@@ -19170,7 +18741,7 @@ f = gdbm_open;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gdbm_open=yes"
 else
@@ -19189,7 +18760,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:19193: checking for gdbm_open in -lgdbm" >&5
+echo "configure:18764: checking for gdbm_open in -lgdbm" >&5
 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19197,7 +18768,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgdbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19201 "configure"
+#line 18772 "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
@@ -19208,7 +18779,7 @@ int main() {
 gdbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18783: \"$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
@@ -19243,17 +18814,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19247: checking for $ac_hdr" >&5
+echo "configure:18818: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19252 "configure"
+#line 18823 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18828: \"$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*
@@ -19280,7 +18851,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19284: checking for db" >&5
+echo "configure:18855: checking for db" >&5
 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 
 if test $ol_with_ldbm_api = ndbm ; then
        echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
-echo "configure:19318: checking for NDBM library" >&5
+echo "configure:18889: checking for NDBM library" >&5
 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
        ol_LIBS="$LIBS"
        echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:19324: checking for dbm_open" >&5
+echo "configure:18895: checking for dbm_open" >&5
 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19329 "configure"
+#line 18900 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -19349,7 +18920,7 @@ f = dbm_open;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -19368,7 +18939,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
-echo "configure:19372: checking for dbm_open in -lndbm" >&5
+echo "configure:18943: checking for dbm_open in -lndbm" >&5
 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19376,7 +18947,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lndbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19380 "configure"
+#line 18951 "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
@@ -19387,7 +18958,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18962: \"$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
@@ -19407,7 +18978,7 @@ else
   echo "$ac_t""no" 1>&6
 
                        echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:19411: checking for dbm_open in -ldbm" >&5
+echo "configure:18982: checking for dbm_open in -ldbm" >&5
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19415,7 +18986,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldbm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19419 "configure"
+#line 18990 "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
@@ -19426,7 +18997,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:19430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19001: \"$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
@@ -19463,17 +19034,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19467: checking for $ac_hdr" >&5
+echo "configure:19038: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19472 "configure"
+#line 19043 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19048: \"$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*
@@ -19500,7 +19071,7 @@ fi
 done
 
  echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:19504: checking for db" >&5
+echo "configure:19075: checking for db" >&5
 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -19557,17 +19128,17 @@ if test $ol_enable_wrappers != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19561: checking for $ac_hdr" >&5
+echo "configure:19132: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19566 "configure"
+#line 19137 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19142: \"$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*
@@ -19589,11 +19160,11 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
                echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
-echo "configure:19593: checking for TCP wrappers library" >&5
+echo "configure:19164: checking for TCP wrappers library" >&5
                save_LIBS="$LIBS"
                LIBS="$LIBS -lwrap"
                cat > conftest.$ac_ext <<EOF
-#line 19597 "configure"
+#line 19168 "configure"
 #include "confdefs.h"
 
 #include <tcpd.h>
@@ -19608,7 +19179,7 @@ hosts_access(req)
                
 ; return 0; }
 EOF
-if { (eval echo configure:19612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""-lwrap" 1>&6
                have_wrappers=yes
@@ -19620,7 +19191,7 @@ else
   
                                LIBS="$LIBS -lnsl"
                cat > conftest.$ac_ext <<EOF
-#line 19624 "configure"
+#line 19195 "configure"
 #include "confdefs.h"
 
 #include <tcpd.h>
@@ -19635,7 +19206,7 @@ hosts_access(req)
                
 ; return 0; }
 EOF
-if { (eval echo configure:19639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""-lwrap -lnsl" 1>&6
                have_wrappers=yes
 
 if test $ol_enable_syslog != no ; then
        echo $ac_n "checking for openlog""... $ac_c" 1>&6
-echo "configure:19679: checking for openlog" >&5
+echo "configure:19250: checking for openlog" >&5
 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19684 "configure"
+#line 19255 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char openlog(); below.  */
@@ -19704,7 +19275,7 @@ f = openlog;
 
 ; return 0; }
 EOF
-if { (eval echo configure:19708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_openlog=yes"
 else
@@ -19733,7 +19304,7 @@ fi
 ol_link_sql=no
 if test $ol_enable_sql != no ; then
        echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
-echo "configure:19737: checking for SQLDriverConnect in -liodbc" >&5
+echo "configure:19308: checking for SQLDriverConnect in -liodbc" >&5
 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19741,7 +19312,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-liodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19745 "configure"
+#line 19316 "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
@@ -19752,7 +19323,7 @@ int main() {
 SQLDriverConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:19756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19327: \"$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
@@ -19777,7 +19348,7 @@ fi
                ol_link_sql="-liodbc"
        else
                echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
-echo "configure:19781: checking for SQLDriverConnect in -lodbc" >&5
+echo "configure:19352: checking for SQLDriverConnect in -lodbc" >&5
 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19785,7 +19356,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19789 "configure"
+#line 19360 "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
@@ -19796,7 +19367,7 @@ int main() {
 SQLDriverConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:19800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19371: \"$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
@@ -19835,17 +19406,17 @@ for ac_hdr in termcap.h ncurses.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19839: checking for $ac_hdr" >&5
+echo "configure:19410: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 19844 "configure"
+#line 19415 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19420: \"$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*
@@ -19874,7 +19445,7 @@ done
 
 if test $ol_link_termcap = no ; then
        echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
-echo "configure:19878: checking for tputs in -ltermcap" >&5
+echo "configure:19449: checking for tputs in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19882,7 +19453,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19886 "configure"
+#line 19457 "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
@@ -19893,7 +19464,7 @@ int main() {
 tputs()
 ; return 0; }
 EOF
-if { (eval echo configure:19897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19468: \"$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
@@ -19926,7 +19497,7 @@ fi
 
 if test $ol_link_termcap = no ; then
        echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:19930: checking for initscr in -lncurses" >&5
+echo "configure:19501: checking for initscr in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -19934,7 +19505,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 19938 "configure"
+#line 19509 "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
@@ -19945,7 +19516,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:19949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19520: \"$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
@@ -19991,17 +19562,17 @@ if test $ol_with_cyrus_sasl != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19995: checking for $ac_hdr" >&5
+echo "configure:19566: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20000 "configure"
+#line 19571 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19576: \"$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*
@@ -20030,7 +19601,7 @@ done
 
        if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
                echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
-echo "configure:20034: checking for sasl_client_init in -lsasl2" >&5
+echo "configure:19605: checking for sasl_client_init in -lsasl2" >&5
 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20038,7 +19609,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsasl2  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20042 "configure"
+#line 19613 "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
@@ -20049,7 +19620,7 @@ int main() {
 sasl_client_init()
 ; return 0; }
 EOF
-if { (eval echo configure:20053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19624: \"$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
@@ -20068,7 +19639,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
-echo "configure:20072: checking for sasl_client_init in -lsasl" >&5
+echo "configure:19643: checking for sasl_client_init in -lsasl" >&5
 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20076,7 +19647,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsasl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20080 "configure"
+#line 19651 "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
@@ -20087,7 +19658,7 @@ int main() {
 sasl_client_init()
 ; return 0; }
 EOF
-if { (eval echo configure:20091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19662: \"$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
                fi
        else
                echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
-echo "configure:20127: checking Cyrus SASL library version" >&5
+echo "configure:19698: checking Cyrus SASL library version" >&5
 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 20133 "configure"
+#line 19704 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SASL_SASL_H
@@ -20180,12 +19751,12 @@ EOF
                ac_save_LIBS="$LIBS"
                LIBS="$LIBS $ol_link_sasl"
                echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
-echo "configure:20184: checking for sasl_version" >&5
+echo "configure:19755: checking for sasl_version" >&5
 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20189 "configure"
+#line 19760 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sasl_version(); below.  */
@@ -20209,7 +19780,7 @@ f = sasl_version;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_sasl_version=yes"
 else
@@ -20268,13 +19839,13 @@ if test $ol_with_fetch != no ; then
        ol_LIBS=$LIBS
 LIBS="-lfetch -lcom_err $LIBS"
 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
-echo "configure:20272: checking fetch(3) library" >&5
+echo "configure:19843: checking fetch(3) library" >&5
 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 20278 "configure"
+#line 19849 "configure"
 #include "confdefs.h"
 
 #include <sys/param.h>
@@ -20284,7 +19855,7 @@ int main() {
 struct url *u = fetchParseURL("file:///"); 
 ; return 0; }
 EOF
-if { (eval echo configure:20288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_lib_fetch=yes
 else
@@ -20322,17 +19893,17 @@ if test $ol_with_readline != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20326: checking for $ac_hdr" >&5
+echo "configure:19897: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20331 "configure"
+#line 19902 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19907: \"$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*
@@ -20363,7 +19934,7 @@ done
                save_LIBS="$LIBS"
                LIBS="$TERMCAP_LIBS $LIBS"
                echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:20367: checking for readline in -lreadline" >&5
+echo "configure:19938: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20371,7 +19942,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20375 "configure"
+#line 19946 "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
@@ -20382,7 +19953,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:20386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19957: \"$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
 
 if test $ol_enable_crypt != no ; then
        echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:20428: checking for crypt" >&5
+echo "configure:19999: checking for crypt" >&5
 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20433 "configure"
+#line 20004 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char crypt(); below.  */
@@ -20453,7 +20024,7 @@ f = crypt;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_crypt=yes"
 else
@@ -20472,7 +20043,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:20476: checking for crypt in -lcrypt" >&5
+echo "configure:20047: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20480,7 +20051,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20484 "configure"
+#line 20055 "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
@@ -20491,7 +20062,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:20495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20066: \"$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
 
 if test $ol_enable_proctitle != no ; then
        echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
-echo "configure:20538: checking for setproctitle" >&5
+echo "configure:20109: checking for setproctitle" >&5
 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20543 "configure"
+#line 20114 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setproctitle(); below.  */
@@ -20563,7 +20134,7 @@ f = setproctitle;
 
 ; return 0; }
 EOF
-if { (eval echo configure:20567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_setproctitle=yes"
 else
@@ -20582,7 +20153,7 @@ else
   echo "$ac_t""no" 1>&6
 
                echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
-echo "configure:20586: checking for setproctitle in -lutil" >&5
+echo "configure:20157: checking for setproctitle in -lutil" >&5
 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20590,7 +20161,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20594 "configure"
+#line 20165 "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
@@ -20601,7 +20172,7 @@ int main() {
 setproctitle()
 ; return 0; }
 EOF
-if { (eval echo configure:20605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20176: \"$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
@@ -20641,17 +20212,17 @@ if test $ol_enable_slp != no ; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:20645: checking for $ac_hdr" >&5
+echo "configure:20216: checking for $ac_hdr" >&5
 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20650 "configure"
+#line 20221 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20226: \"$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*
@@ -20680,7 +20251,7 @@ done
 
        if test $ac_cv_header_slp_h = yes ; then
                echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
-echo "configure:20684: checking for SLPOpen in -lslp" >&5
+echo "configure:20255: checking for SLPOpen in -lslp" >&5
 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -20688,7 +20259,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lslp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 20692 "configure"
+#line 20263 "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
@@ -20699,7 +20270,7 @@ int main() {
 SLPOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:20703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20274: \"$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
@@ -20734,12 +20305,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:20738: checking for ANSI C header files" >&5
+echo "configure:20309: checking for ANSI C header files" >&5
 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20743 "configure"
+#line 20314 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -20747,7 +20318,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20322: \"$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*
@@ -20764,7 +20335,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 20768 "configure"
+#line 20339 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -20782,7 +20353,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 20786 "configure"
+#line 20357 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -20803,7 +20374,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 20807 "configure"
+#line 20378 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
@@ -20821,7 +20392,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:20825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -20845,12 +20416,12 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:20849: checking for mode_t" >&5
+echo "configure:20420: checking for mode_t" >&5
 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20854 "configure"
+#line 20425 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -20881,12 +20452,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:20885: checking for off_t" >&5
+echo "configure:20456: checking for off_t" >&5
 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20890 "configure"
+#line 20461 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -20917,12 +20488,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:20921: checking for pid_t" >&5
+echo "configure:20492: checking for pid_t" >&5
 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20926 "configure"
+#line 20497 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -20953,19 +20524,19 @@ EOF
 fi
 
 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
-echo "configure:20957: checking for ptrdiff_t" >&5
+echo "configure:20528: checking for ptrdiff_t" >&5
 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20962 "configure"
+#line 20533 "configure"
 #include "confdefs.h"
 #include <stddef.h>
 int main() {
 ptrdiff_t p
 ; return 0; }
 EOF
-if { (eval echo configure:20969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_type_ptrdiff_t=yes
 else
@@ -20986,12 +20557,12 @@ EOF
    fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:20990: checking return type of signal handlers" >&5
+echo "configure:20561: checking return type of signal handlers" >&5
 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 20995 "configure"
+#line 20566 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -21008,7 +20579,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:21012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -21027,12 +20598,12 @@ EOF
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:21031: checking for size_t" >&5
+echo "configure:20602: checking for size_t" >&5
 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21036 "configure"
+#line 20607 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:21068: checking for ssize_t" >&5
+echo "configure:20639: checking for ssize_t" >&5
 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21073 "configure"
+#line 20644 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -21100,12 +20671,12 @@ EOF
 fi
 
 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
-echo "configure:21104: checking for caddr_t" >&5
+echo "configure:20675: checking for caddr_t" >&5
 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21109 "configure"
+#line 20680 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 
 
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:21141: checking for socklen_t" >&5
+echo "configure:20712: checking for socklen_t" >&5
 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21146 "configure"
+#line 20717 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_TYPES_H
@@ -21156,7 +20727,7 @@ int main() {
 socklen_t len;
 ; return 0; }
 EOF
-if { (eval echo configure:21160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_type_socklen_t=yes
 else
@@ -21177,12 +20748,12 @@ EOF
   fi
  
 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
-echo "configure:21181: checking for member st_blksize in aggregate type struct stat" >&5
+echo "configure:20752: checking for member st_blksize in aggregate type struct stat" >&5
 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21186 "configure"
+#line 20757 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -21190,7 +20761,7 @@ int main() {
 struct stat foo; foo.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:21194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_struct_member_st_blksize=yes
 else
@@ -21212,12 +20783,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:21216: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:20787: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21221 "configure"
+#line 20792 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -21226,7 +20797,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:21230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -21247,12 +20818,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:21251: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:20822: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21256 "configure"
+#line 20827 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -21260,7 +20831,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:21264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -21281,12 +20852,12 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:21285: checking for uid_t in sys/types.h" >&5
+echo "configure:20856: checking for uid_t in sys/types.h" >&5
 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21290 "configure"
+#line 20861 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -21315,19 +20886,19 @@ EOF
 fi
 
 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
-echo "configure:21319: checking for sig_atomic_t" >&5
+echo "configure:20890: checking for sig_atomic_t" >&5
 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21324 "configure"
+#line 20895 "configure"
 #include "confdefs.h"
 #include <signal.h>
 int main() {
 sig_atomic_t atomic;
 ; return 0; }
 EOF
-if { (eval echo configure:21331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_type_sig_atomic_t=yes
 else
@@ -21351,13 +20922,13 @@ EOF
 
 # test for pw_gecos in struct passwd
 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
-echo "configure:21355: checking struct passwd for pw_gecos" >&5
+echo "configure:20926: checking struct passwd for pw_gecos" >&5
 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 21361 "configure"
+#line 20932 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
@@ -21367,7 +20938,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:21371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_passwd_pw_gecos=yes
 else
 
 # test for pw_passwd in struct passwd
 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
-echo "configure:21393: checking struct passwd for pw_passwd" >&5
+echo "configure:20964: checking struct passwd for pw_passwd" >&5
 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 21399 "configure"
+#line 20970 "configure"
 #include "confdefs.h"
 #include <pwd.h>
 int main() {
@@ -21405,7 +20976,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:21409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_struct_passwd_pw_passwd=yes
 else
@@ -21427,7 +20998,7 @@ fi
 
 
 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:21431: checking if toupper() requires islower()" >&5
+echo "configure:21002: checking if toupper() requires islower()" >&5
 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21436,7 +21007,7 @@ else
   ol_cv_c_upper_lower=safe
 else
   cat > conftest.$ac_ext <<EOF
-#line 21440 "configure"
+#line 21011 "configure"
 #include "confdefs.h"
 
 #include <ctype.h>
@@ -21448,7 +21019,7 @@ main()
                exit(1);
 }
 EOF
-if { (eval echo configure:21452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ol_cv_c_upper_lower=no
 else
@@ -21471,12 +21042,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:21475: checking for working const" >&5
+echo "configure:21046: checking for working const" >&5
 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21480 "configure"
+#line 21051 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -21525,7 +21096,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:21529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -21546,12 +21117,12 @@ EOF
 fi
 
 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
-echo "configure:21550: checking if compiler understands volatile" >&5
+echo "configure:21121: checking if compiler understands volatile" >&5
 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21555 "configure"
+#line 21126 "configure"
 #include "confdefs.h"
 int x, y, z;
 int main() {
@@ -21560,7 +21131,7 @@ volatile int a; int * volatile b = x ? &y : &z;
       *b = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:21564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_c_volatile=yes
 else
@@ -21590,14 +21161,14 @@ EOF
 
 else
        echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:21594: checking whether byte ordering is bigendian" >&5
+echo "configure:21165: checking whether byte ordering is bigendian" >&5
 if eval "test \"\${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 <<EOF
-#line 21601 "configure"
+#line 21172 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -21608,11 +21179,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:21612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21183: \"$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 <<EOF
-#line 21616 "configure"
+#line 21187 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -21623,7 +21194,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:21627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -21643,7 +21214,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 <<EOF
-#line 21647 "configure"
+#line 21218 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -21656,7 +21227,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:21660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21231: \"$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
 fi
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:21686: checking size of short" >&5 
+echo "configure:21257: checking size of short" >&5 
 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21692 "configure"
+#line 21263 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21698,7 +21269,7 @@ int main() {
 switch (0) case 0: case (sizeof (short) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_short=$ac_size
 else
@@ -21721,13 +21292,13 @@ EOF
  
  
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:21725: checking size of int" >&5 
+echo "configure:21296: checking size of int" >&5 
 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21731 "configure"
+#line 21302 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21737,7 +21308,7 @@ int main() {
 switch (0) case 0: case (sizeof (int) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_int=$ac_size
 else
@@ -21760,13 +21331,13 @@ EOF
  
  
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:21764: checking size of long" >&5 
+echo "configure:21335: checking size of long" >&5 
 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
   cat > conftest.$ac_ext <<EOF
-#line 21770 "configure"
+#line 21341 "configure"
 #include "confdefs.h"
 #include "confdefs.h" 
 #include <sys/types.h> 
@@ -21776,7 +21347,7 @@ int main() {
 switch (0) case 0: case (sizeof (long) == $ac_size):;
 ; return 0; }
 EOF
-if { (eval echo configure:21780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sizeof_long=$ac_size
 else
@@ -21827,7 +21398,7 @@ EOF
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:21831: checking for 8-bit clean memcmp" >&5
+echo "configure:21402: checking for 8-bit clean memcmp" >&5
 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -21835,7 +21406,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 21839 "configure"
+#line 21410 "configure"
 #include "confdefs.h"
 
 main()
@@ -21845,7 +21416,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:21849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -21863,12 +21434,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:21867: checking for strftime" >&5
+echo "configure:21438: checking for strftime" >&5
 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21872 "configure"
+#line 21443 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -21892,7 +21463,7 @@ f = strftime;
 
 ; return 0; }
 EOF
-if { (eval echo configure:21896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_strftime=yes"
 else
@@ -21914,7 +21485,7 @@ else
   echo "$ac_t""no" 1>&6
 # strftime is in -lintl on SCO UNIX.
 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:21918: checking for strftime in -lintl" >&5
+echo "configure:21489: checking for strftime in -lintl" >&5
 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -21922,7 +21493,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 21926 "configure"
+#line 21497 "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
@@ -21933,7 +21504,7 @@ int main() {
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:21937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21508: \"$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 $ac_n "checking for inet_aton()""... $ac_c" 1>&6
-echo "configure:21965: checking for inet_aton()" >&5
+echo "configure:21536: checking for inet_aton()" >&5
 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 21970 "configure"
+#line 21541 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_SYS_TYPES_H
@@ -21988,7 +21559,7 @@ struct in_addr in;
 int rc = inet_aton( "255.255.255.255", &in );
 ; return 0; }
 EOF
-if { (eval echo configure:21992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_func_inet_aton=yes
 else
@@ -22010,12 +21581,12 @@ EOF
  
 
 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
-echo "configure:22014: checking for _spawnlp" >&5
+echo "configure:21585: checking for _spawnlp" >&5
 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22019 "configure"
+#line 21590 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _spawnlp(); below.  */
@@ -22039,7 +21610,7 @@ f = _spawnlp;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__spawnlp=yes"
 else
 
 
 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
-echo "configure:22067: checking for _snprintf" >&5
+echo "configure:21638: checking for _snprintf" >&5
 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22072 "configure"
+#line 21643 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _snprintf(); below.  */
@@ -22092,7 +21663,7 @@ f = _snprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__snprintf=yes"
 else
 
 
 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
-echo "configure:22122: checking for _vsnprintf" >&5
+echo "configure:21693: checking for _vsnprintf" >&5
 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22127 "configure"
+#line 21698 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _vsnprintf(); below.  */
@@ -22147,7 +21718,7 @@ f = _vsnprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__vsnprintf=yes"
 else
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:22177: checking for vprintf" >&5
+echo "configure:21748: checking for vprintf" >&5
 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22182 "configure"
+#line 21753 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -22202,7 +21773,7 @@ f = vprintf;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:22230: checking for _doprnt" >&5
+echo "configure:21801: checking for _doprnt" >&5
 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22235 "configure"
+#line 21806 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -22255,7 +21826,7 @@ f = _doprnt;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
 
 
 if test $ac_cv_func_vprintf = yes ; then
-               for ac_func in vsnprintf vsprintf
+               for ac_func in snprintf vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22288: checking for $ac_func" >&5
+echo "configure:21859: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22293 "configure"
+#line 21864 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22313,7 +21884,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21888: \"$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
@@ -22396,12 +21967,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22400: checking for $ac_func" >&5
+echo "configure:21971: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22405 "configure"
+#line 21976 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22425,7 +21996,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22000: \"$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
@@ -22453,12 +22024,12 @@ done
 for ac_func in getopt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:22457: checking for $ac_func" >&5
+echo "configure:22028: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 22462 "configure"
+#line 22033 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -22482,7 +22053,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:22486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22057: \"$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
@@ -22512,16 +22083,30 @@ done
 if test "$ac_cv_func_getopt" != yes; then
        LIBSRCS="$LIBSRCS getopt.c"
 fi
+if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
+       if test "$ac_cv_func_snprintf" != yes; then
+               cat >> confdefs.h <<\EOF
+#define snprintf ber_pvt_snprintf
+EOF
+
+       fi
+       if test "$ac_cv_func_vsnprintf" != yes; then
+               cat >> confdefs.h <<\EOF
+#define vsnprintf ber_pvt_vsnprintf
+EOF
+
+       fi
+fi
 
 # Check Configuration
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:22519: checking declaration of sys_errlist" >&5
+echo "configure:22104: checking declaration of sys_errlist" >&5
 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 22525 "configure"
+#line 22110 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -22534,7 +22119,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:22538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:22123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_dcl_sys_errlist=yes
        ol_cv_have_sys_errlist=yes
@@ -22557,20 +22142,20 @@ EOF
 
 
        echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:22561: checking existence of sys_errlist" >&5
+echo "configure:22146: checking existence of sys_errlist" >&5
 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 22567 "configure"
+#line 22152 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:22574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_have_sys_errlist=yes
 else
index 8865e363a1f7faa688cce4cd9dad00d09dcee2a7..735dd66e96e1040874385ef0da615d406b5406b6 100644 (file)
@@ -713,6 +713,14 @@ AC_CHECK_LIB(s, afopen, [
        AC_DEFINE(HAVE_AIX_SECURITY,1,[define if you have AIX security lib])
 ])
 
+dnl ----------------------------------------------------------------
+dnl Check for IBM OS/390
+case "$target" in
+*-ibm-openedition)
+       ac_cv_func_getopt=no
+       AC_DEFINE(BOTH_STRINGS_H,1,[define to use both <string.h> and <strings.h>])
+       ;;
+esac
 
 dnl ----------------------------------------------------------------
 dnl Check for module support
@@ -1353,12 +1361,9 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
        if test $ac_cv_header_pthread_h = yes ; then
                OL_POSIX_THREAD_VERSION
 
-               if test $ol_cv_pthread_version = final ; then
-                       AC_DEFINE(HAVE_PTHREADS_FINAL,1,
-                               [define if pthreads API compatible with final spec])
-               elif test $ol_cv_pthread_version = draft4 ; then
-                       AC_DEFINE(HAVE_PTHREADS_D4,1,
-                               [define if pthreads API compatible with draft4 spec])
+               if test $ol_cv_pthread_version != 0 ; then
+                       AC_DEFINE_UNQUOTED(HAVE_PTHREADS,$ol_cv_pthread_version,
+                               [define to pthreads API spec revision])
                else
                        AC_MSG_ERROR([unknown pthread version])
                fi
@@ -1453,9 +1458,6 @@ dnl                       [ol_cv_pthread_lpthread_lexc])
                OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
 
                if test $ol_link_threads != no ; then
-                       AC_DEFINE(HAVE_PTHREADS,1,
-                               [define if you have POSIX Threads])
-
                        LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
 
                        dnl save flags
@@ -1604,7 +1606,7 @@ int main(argc, argv)
 #endif
 #endif
 
-#if HAVE_PTHREADS_D4
+#if HAVE_PTHREADS < 6
        pthread_create(&t, pthread_attr_default, task, NULL);
 #else
        pthread_create(&t, NULL, task, NULL);
@@ -2374,7 +2376,7 @@ AC_FUNC_VPRINTF
 
 if test $ac_cv_func_vprintf = yes ; then
        dnl check for vsnprintf
-       AC_CHECK_FUNCS(vsnprintf vsprintf)
+       AC_CHECK_FUNCS(snprintf vsnprintf)
 fi
 
 AC_CHECK_FUNCS(                \
@@ -2439,6 +2441,14 @@ AC_REPLACE_FUNCS(getopt)
 if test "$ac_cv_func_getopt" != yes; then
        LIBSRCS="$LIBSRCS getopt.c"
 fi
+if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
+       if test "$ac_cv_func_snprintf" != yes; then
+               AC_DEFINE(snprintf, ber_pvt_snprintf, [define to snprintf routine])
+       fi
+       if test "$ac_cv_func_vsnprintf" != yes; then
+               AC_DEFINE(vsnprintf, ber_pvt_vsnprintf, [define to snprintf routine])
+       fi
+fi
 
 dnl ----------------------------------------------------------------
 # Check Configuration
index 4989cb4b734ef3baef350b67eb3260da09d6f51b..025360d3faef33936b741efeb46078c8e2c987b6 100644 (file)
@@ -43,7 +43,7 @@ ldap_pvt_thread_set_concurrency LDAP_P(( int ));
 
 #ifndef LDAP_PVT_THREAD_STACK_SIZE
        /* LARGE stack */
-#define LDAP_PVT_THREAD_STACK_SIZE     (16*1024*1024)
+#define LDAP_PVT_THREAD_STACK_SIZE     (2*1024*1024)
 #endif
 
 LDAP_F( int )
index d60da2b6b512e0354f260be8fb25cfb0fc9aa3b2..f0ccb4da61d1c5903c7be51921a8b9a895fde4bb 100644 (file)
 /* Define if you have the sigset function.  */
 #undef HAVE_SIGSET
 
+/* Define if you have the snprintf function.  */
+#undef HAVE_SNPRINTF
+
 /* Define if you have the strdup function.  */
 #undef HAVE_STRDUP
 
 /* Define if you have the vsnprintf function.  */
 #undef HAVE_VSNPRINTF
 
-/* Define if you have the vsprintf function.  */
-#undef HAVE_VSPRINTF
-
 /* Define if you have the wait4 function.  */
 #undef HAVE_WAIT4
 
 /* define if you have AIX security lib */
 #undef HAVE_AIX_SECURITY
 
+/* define to use both <string.h> and <strings.h> */
+#undef BOTH_STRINGS_H
+
 /* define if you have libtool -ltdl */
 #undef HAVE_LIBLTDL
 
 /* if you have NT Event Log */
 #undef HAVE_NT_EVENT_LOG
 
-/* define if pthreads API compatible with final spec */
-#undef HAVE_PTHREADS_FINAL
-
-/* define if pthreads API compatible with draft4 spec */
-#undef HAVE_PTHREADS_D4
+/* define to pthreads API spec revision */
+#undef HAVE_PTHREADS
 
 /* if you have LinuxThreads */
 #undef HAVE_LINUX_THREADS
 
-/* define if you have POSIX Threads */
-#undef HAVE_PTHREADS
-
 /* Define if you have the sched_yield function. */
 #undef HAVE_SCHED_YIELD
 
 /* define to vsnprintf routine */
 #undef vsnprintf
 
+/* define to snprintf routine */
+#undef snprintf
+
+/* define to snprintf routine */
+#undef vsnprintf
+
 /* define if sys_errlist is not declared in stdio.h or errno.h */
 #undef DECL_SYS_ERRLIST
 
 #define LDAP_DEBUG
 #endif
 
+#ifdef HAVE_EBCDIC 
+/* ASCII/EBCDIC converting replacements for stdio funcs
+ * vsnprintf and snprintf are used too, but they are already
+ * checked by the configure script
+ */
+#define fputs ber_pvt_fputs
+#define fgets ber_pvt_fgets
+#define printf ber_pvt_printf
+#define fprintf ber_pvt_fprintf
+#define vfprintf ber_pvt_vfprintf
+#define vsprintf ber_pvt_vsprintf
+#endif
+
 #include "ldap_cdefs.h"
 #include "ldap_features.h"
 
index 87da85611af1df06b5fab412db614d79de313cb6..cae30fbc5496645bf8837f513578edd61cab5462 100644 (file)
@@ -10,6 +10,9 @@ LIBRARY = liblber.la
 NT_SRCS = nt_err.c
 NT_OBJS = nt_err.lo
 
+UNIX_SRCS = stdio.c
+UNIX_OBJS = stdio.lo
+
 LIB_DEFS = -DLBER_LIBRARY
 
 SRCS= assert.c decode.c encode.c io.c bprint.c debug.c \
index 23ebf88853e05261216084530eb2f2a0e4ebdffd..0535603b0c39df3cb37cb59e2a7c38b526e5c7ae 100644 (file)
@@ -87,15 +87,8 @@ int ber_pvt_log_output(
        {
             int level;
             ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
-#ifdef HAVE_VSNPRINTF
             buf[sizeof(buf) - 1] = '\0';
             vsnprintf( buf, sizeof(buf)-1, fmt, vl );
-#elif HAVE_VSPRINTF
-            vsprintf( buf, fmt, vl ); /* hope it's not too long */
-#else
-                /* use doprnt() */
-#error "vsprintf() required.";
-#endif
             if ( ber_log_check( LDAP_DEBUG_BER, level ) )
                 (*ber_pvt_log_print)( buf );
         }
@@ -117,15 +110,8 @@ int ber_pvt_log_printf( int errlvl, int loglvl, const char *fmt, ... )
 
        va_start( ap, fmt );
 
-#ifdef HAVE_VSNPRINTF
        buf[sizeof(buf) - 1] = '\0';
        vsnprintf( buf, sizeof(buf)-1, fmt, ap );
-#elif HAVE_VSPRINTF
-       vsprintf( buf, fmt, ap ); /* hope it's not too long */
-#else
-       /* use doprnt() */
-#error "vsprintf() required."
-#endif
 
        va_end(ap);
 
index 8d182d83f26ded57b6ec693c80fbf901cf9b5991..13ab67c30b01c9a93302281e4b95481826024736 100644 (file)
@@ -311,11 +311,7 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
 #endif
        va_start( vl, fmt );
 
-#ifdef HAVE_VSNPRINTF
        vsnprintf( buffer, sizeof(buffer), fmt, vl );
-#else
-       vsprintf( buffer, fmt, vl );
-#endif
        buffer[sizeof(buffer)-1] = '\0';
 
        if( log_file != NULL ) {
diff --git a/libraries/libldap/print.c b/libraries/libldap/print.c
new file mode 100644 (file)
index 0000000..7ea14d6
--- /dev/null
@@ -0,0 +1,53 @@
+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/ctype.h>
+#include <ac/stdarg.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "ldap-int.h"
+
+/*
+ * ldap log 
+ */
+
+static int ldap_log_check( LDAP *ld, int loglvl )
+{
+       int errlvl;
+
+       if(ld == NULL) {
+               errlvl = ldap_debug;
+       } else {
+               errlvl = ld->ld_debug;
+       }
+
+       return errlvl & loglvl ? 1 : 0;
+}
+
+int ldap_log_printf( LDAP *ld, int loglvl, const char *fmt, ... )
+{
+       char buf[ 1024 ];
+       va_list ap;
+
+       if ( !ldap_log_check( ld, loglvl )) {
+               return 0;
+       }
+
+       va_start( ap, fmt );
+
+       buf[sizeof(buf) - 1] = '\0';
+       vsnprintf( buf, sizeof(buf)-1, fmt, ap );
+
+       va_end(ap);
+
+       (*ber_pvt_log_print)( buf );
+       return 1;
+}
index fef18fe9cafc76bcf7c370a6df77d4b657568f7f..a328c1f33e3b618347290da20c57ce1e93908827 100644 (file)
@@ -21,7 +21,7 @@
 #include "ldap_pvt_thread.h"
 
 
-#if HAVE_PTHREADS_D4
+#if HAVE_PTHREADS < 6
 #  define LDAP_INT_THREAD_ATTR_DEFAULT         pthread_attr_default
 #  define LDAP_INT_THREAD_CONDATTR_DEFAULT     pthread_condattr_default
 #  define LDAP_INT_THREAD_MUTEXATTR_DEFAULT    pthread_mutexattr_default
@@ -76,6 +76,22 @@ ldap_pvt_thread_get_concurrency(void)
 }
 #endif
 
+/* detachstate appeared in Draft 6, but without manifest constants.
+ * in Draft 7 they were called PTHREAD_CREATE_UNDETACHED and ...DETACHED.
+ * in Draft 8 on, ...UNDETACHED became ...JOINABLE.
+ */
+#ifndef PTHREAD_CREATE_JOINABLE
+#ifdef PTHREAD_CREATE_UNDETACHED
+#define        PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED
+#else
+#define        PTHREAD_CREATE_JOINABLE 0
+#endif
+#endif
+
+#ifndef PTHREAD_CREATE_DETACHED
+#define        PTHREAD_CREATE_DETACHED 1
+#endif
+
 int 
 ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
        int detach,
@@ -83,26 +99,13 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
        void *arg)
 {
        int rtn;
-#if defined( HAVE_PTHREADS_FINAL )
        pthread_attr_t attr;
-       pthread_attr_init(&attr);
 
-#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
-       if (!detach) {
-#if defined( PTHREAD_CREATE_JOINABLE )
-               pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+/* Always create the thread attrs, so we can set stacksize if we need to */
+#if HAVE_PTHREADS > 5
+       pthread_attr_init(&attr);
 #else
-               pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
-#endif
-#ifdef PTHREAD_CREATE_DETACHED
-       } else {
-               pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#elif HAVE_PTHREADS_OS390
-       } else {
-               int st = __DETACHED;
-               pthread_attr_setdetachstate(&attr, &st);
-#endif
-       }
+       pthread_attr_create(&attr);
 #endif
 
 #if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
@@ -110,31 +113,27 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
        pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
 #endif
 
-       rtn = pthread_create( thread, &attr, start_routine, arg );
-#ifdef HAVE_PTHREADS_OS390
-       if ( rtn == -1 ) rtn = errno;
-#endif
-
-#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
-       if( detach ) {
-#ifdef HAVE_PTHREADS_OS390
-               (void) pthread_detach( thread );
+#if HAVE_PTHREADS > 5
+       detach = detach ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE;
+#if HAVE_PTHREADS == 6
+       pthread_attr_setdetachstate(&attr, &detach);
 #else
-               (void) pthread_detach( *thread );
+       pthread_attr_setdetachstate(&attr, detach);
 #endif
-       }
 #endif
+       rtn = pthread_create( thread, &attr, start_routine, arg );
+#if HAVE_PTHREADS > 5
        pthread_attr_destroy(&attr);
-
 #else
-       rtn = pthread_create( thread, LDAP_INT_THREAD_ATTR_DEFAULT,
-               start_routine, arg );
-
+       pthread_attr_delete(&attr);
        if( detach ) {
                pthread_detach( thread );
        }
 #endif
 
+#if HAVE_PTHREADS < 7
+       if ( rtn < 0 ) rtn = errno;
+#endif
        return rtn;
 }
 
@@ -147,15 +146,14 @@ ldap_pvt_thread_exit( void *retval )
 int 
 ldap_pvt_thread_join( ldap_pvt_thread_t thread, void **thread_return )
 {
-#if !defined( HAVE_PTHREADS_FINAL )
+#if HAVE_PTHREADS < 7
        void *dummy;
+
        if (thread_return==NULL)
          thread_return=&dummy;
-#endif 
-#ifdef HAVE_PTHREADS_OS390
-       int st = pthread_join( thread, thread_return ); 
-       if ( st == -1 ) st = errno;
-       return st;
+
+       if ( pthread_join( thread, thread_return ) < 0 ) return errno;
+       return 0;
 #else
        return pthread_join( thread, thread_return );
 #endif
@@ -164,14 +162,11 @@ ldap_pvt_thread_join( ldap_pvt_thread_t thread, void **thread_return )
 int 
 ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
 {
-#ifdef HAVE_PTHREAD_KILL
-#ifdef HAVE_PTHREADS_OS390
-       int st = pthread_kill( thread, signo );
-       if ( st == -1 ) st = errno;
-       return st;
-#else
+#if HAVE_PTHREADS > 6
        return pthread_kill( thread, signo );
-#endif
+#elif HAVE_PTHREADS > 4
+       if ( pthread_kill( thread, signo ) < 0 ) return errno;
+       return 0;
 #else
        /* pthread package with DCE */
        if (kill( getpid(), signo )<0)
@@ -183,88 +178,136 @@ ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
 int 
 ldap_pvt_thread_yield( void )
 {
-#ifdef _POSIX_THREAD_IS_GNU_PTH
-       sched_yield();
-       return 0;
-
-#elif HAVE_SCHED_YIELD
+#if HAVE_PTHREADS == 10
        return sched_yield();
 
-#elif HAVE_PTHREAD_YIELD
-#if HAVE_PTHREADS_OS390
-       pthread_yield(NULL);
-#else
-       pthread_yield();
-#endif
+#elif defined(_POSIX_THREAD_IS_GNU_PTH)
+       sched_yield();
        return 0;
 
 #elif HAVE_THR_YIELD
        return thr_yield();
 
+#elif HAVE_PTHREADS == 6
+       pthread_yield(NULL);
+       return 0;
 #else
+       pthread_yield();
        return 0;
-#endif   
+#endif
 }
 
 int 
 ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_cond_init( cond, LDAP_INT_THREAD_CONDATTR_DEFAULT ) < 0 )
+               return errno;
+       return 0;
+#else
        return pthread_cond_init( cond, LDAP_INT_THREAD_CONDATTR_DEFAULT );
+#endif
 }
 
 int 
 ldap_pvt_thread_cond_destroy( ldap_pvt_thread_cond_t *cond )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_cond_destroy( cond ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_cond_destroy( cond );
+#endif
 }
        
 int 
 ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_cond_signal( cond ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_cond_signal( cond );
+#endif
 }
 
 int
 ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_cond_broadcast( cond ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_cond_broadcast( cond );
+#endif
 }
 
 int 
 ldap_pvt_thread_cond_wait( ldap_pvt_thread_cond_t *cond, 
                      ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_cond_wait( cond, mutex ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_cond_wait( cond, mutex );
+#endif
 }
 
 int 
 ldap_pvt_thread_mutex_init( ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_mutex_init( mutex, LDAP_INT_THREAD_MUTEXATTR_DEFAULT )<0)
+               return errno;
+       return 0;
+#else
        return pthread_mutex_init( mutex, LDAP_INT_THREAD_MUTEXATTR_DEFAULT );
+#endif
 }
 
 int 
 ldap_pvt_thread_mutex_destroy( ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_mutex_destroy( mutex ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_mutex_destroy( mutex );
+#endif
 }
 
 int 
 ldap_pvt_thread_mutex_lock( ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_mutex_lock( mutex ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_mutex_lock( mutex );
+#endif
 }
 
 int 
 ldap_pvt_thread_mutex_trylock( ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_mutex_trylock( mutex ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_mutex_trylock( mutex );
+#endif
 }
 
 int 
 ldap_pvt_thread_mutex_unlock( ldap_pvt_thread_mutex_t *mutex )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_mutex_unlock( mutex ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_mutex_unlock( mutex );
+#endif
 }
 
 #ifdef LDAP_THREAD_HAVE_RDWR
@@ -272,43 +315,83 @@ ldap_pvt_thread_mutex_unlock( ldap_pvt_thread_mutex_t *mutex )
 int 
 ldap_pvt_thread_rdwr_init( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_init( rw, NULL ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_init( rw, NULL );
+#endif
 }
 
 int 
 ldap_pvt_thread_rdwr_destroy( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_destroy( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_destroy( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_rlock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_rdlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_rdlock( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_rtrylock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_tryrdlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_tryrdlock( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_runlock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_unlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_unlock( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_wlock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_wrlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_wrlock( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_wtrylock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_trywrlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_trywrlock( rw );
+#endif
 }
 
 int ldap_pvt_thread_rdwr_wunlock( ldap_pvt_thread_rdwr_t *rw )
 {
+#if HAVE_PTHREADS < 7
+       if ( pthread_rwlock_unlock( rw ) < 0 ) return errno;
+       return 0;
+#else
        return pthread_rwlock_unlock( rw );
+#endif
 }
 
 #endif /* HAVE_PTHREAD_RDLOCK_DESTROY */
diff --git a/libraries/liblutil/setproctitle.c b/libraries/liblutil/setproctitle.c
new file mode 100644 (file)
index 0000000..8a095e2
--- /dev/null
@@ -0,0 +1,66 @@
+/* $OpenLDAP$ */
+#include "portable.h"
+
+#ifndef HAVE_SETPROCTITLE
+
+#include <stdio.h>
+
+#include <ac/stdlib.h>
+
+#include <ac/setproctitle.h>
+#include <ac/string.h>
+#include <ac/stdarg.h>
+
+/*
+ * Copyright (c) 1990,1991 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+
+char   **Argv;         /* pointer to original (main's) argv */
+int    Argc;           /* original argc */
+
+/*
+ * takes a printf-style format string (fmt) and up to three parameters (a,b,c)
+ * this clobbers the original argv...
+ */
+
+/* VARARGS */
+void setproctitle( const char *fmt, ... )
+{
+       static char *endargv = (char *)0;
+       char    *s;
+       int             i;
+       char    buf[ 1024 ];
+       va_list ap;
+
+       va_start(ap, fmt);
+
+       buf[sizeof(buf) - 1] = '\0';
+       vsnprintf( buf, sizeof(buf)-1, fmt, ap );
+
+       va_end(ap);
+
+       if ( endargv == (char *)0 ) {
+               /* set pointer to end of original argv */
+               endargv = Argv[ Argc-1 ] + strlen( Argv[ Argc-1 ] );
+       }
+       /* make ps print "([prog name])" */
+       s = Argv[0];
+       *s++ = '-';
+       i = strlen( buf );
+       if ( i > endargv - s - 2 ) {
+               i = endargv - s - 2;
+               buf[ i ] = '\0';
+       }
+       strcpy( s, buf );
+       s += i;
+       while ( s < endargv ) *s++ = ' ';
+}
+#endif /* NOSETPROCTITLE */