X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=247ebbdb3437743ce4c1ae4edc9c1c2aa622e2f6;hb=2ea6cfc07687584726ff5de6a863641be8b81a38;hp=ad3217c943c0b10226009762094b8e45ceb8a9bf;hpb=7660018ef42ea4e22c4a792ded35a1fcb3554add;p=openldap diff --git a/configure b/configure index ad3217c943..247ebbdb34 100755 --- a/configure +++ b/configure @@ -1,9 +1,9 @@ #! /bin/sh -# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.628 2006/02/13 01:24:33 lukeh Exp . +# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.631.2.6 2007/08/31 23:13:50 quanah Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # -# Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved. +# Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved. # Restrictions apply, see COPYRIGHT and LICENSE files. # # Copyright (C) 2003 Free Software Foundation, Inc. @@ -465,7 +465,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SEQMOD BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT BUILD_SLURPD LDAP_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_CONSTRAINT BUILD_DDS BUILD_DENYOP BUILD_DYNGROUP BUILD_DYNLIST BUILD_LASTMOD BUILD_PPOLICY BUILD_PROXYCACHE BUILD_REFINT BUILD_RETCODE BUILD_RWM BUILD_SEQMOD BUILD_SYNCPROV BUILD_TRANSLUCENT BUILD_UNIQUE BUILD_VALSORT LDAP_LIBS SLAPD_LIBS BDB_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS SLAPD_STATIC_OVERLAYS SLAPD_DYNAMIC_OVERLAYS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS SASL_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS ICU_LIBS SLAPD_SLP_LIBS SLAPD_GMP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1034,9 +1034,6 @@ SLAPD Backend Options: --enable-dnssrv enable dnssrv backend no|yes|mod [no] --enable-hdb enable Hierarchical DB backend no|yes|mod [yes] --enable-ldap enable ldap backend no|yes|mod [no] - --enable-ldbm enable ldbm backend no|yes|mod [no] - --enable-ldbm-api use LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto] - --enable-ldbm-type use LDBM type auto|btree|hash [auto] --enable-meta enable metadirectory backend no|yes|mod [no] --enable-monitor enable monitor backend no|yes|mod [yes] --enable-null enable null backend no|yes|mod [no] @@ -1049,11 +1046,12 @@ SLAPD Backend Options: SLAPD Overlay Options: --enable-overlays enable all available overlays no|yes|mod --enable-accesslog In-Directory Access Logging overlay no|yes|mod [no] + --enable-auditlog Audit Logging overlay no|yes|mod [no] + --enable-constraint Attribute Constraint overlay no|yes|mod [no] --enable-dds Dynamic Directory Services overlay no|yes|mod [no] - --enable-denyop Deny Operation overlay no|yes|mod [no] --enable-dyngroup Dynamic Group overlay no|yes|mod [no] --enable-dynlist Dynamic List overlay no|yes|mod [no] - --enable-lastmod Last Modification overlay no|yes|mod [no] + --enable-memberof Reverse Group Membership overlay no|yes|mod [no] --enable-ppolicy Password Policy overlay no|yes|mod [no] --enable-proxycache Proxy Cache overlay no|yes|mod [no] --enable-refint Referential Integrity overlay no|yes|mod [no] @@ -1065,9 +1063,6 @@ SLAPD Overlay Options: --enable-unique Attribute Uniqueness overlay no|yes|mod [no] --enable-valsort Value Sorting overlay no|yes|mod [no] -SLURPD (Replication Daemon) Options: - --enable-slurpd enable building slurpd [auto] - Library Generation & Linking Options --enable-static[=PKGS] build static libraries [default=yes] @@ -1086,10 +1081,10 @@ Optional Packages: --with-cyrus-sasl with Cyrus SASL support [auto] --with-fetch with fetch(3) URL support [auto] --with-threads with threads [auto] - --with-tls with TLS/SSL support [auto] + --with-tls with TLS/SSL support auto|openssl|gnutls [auto] --with-yielding-select with implicitly yielding select [auto] --with-mp with multiple precision statistics auto|longlong|long|bignum|gmp [auto] - + --with-odbc with specific ODBC support iodbc|unixodbc|auto [auto] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] @@ -1210,7 +1205,7 @@ Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved. +Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved. Restrictions apply, see COPYRIGHT and LICENSE files. _ACEOF exit 0 @@ -1598,8 +1593,11 @@ fi SHTOOL="$ac_cv_shtool" -TB="`$SHTOOL echo -e '%B' 2>/dev/null`" -TN="`$SHTOOL echo -e '%b' 2>/dev/null`" +TB="" TN="" +if test -t 1; then + TB="`$SHTOOL echo -e '%B' 2>/dev/null`" + TN="`$SHTOOL echo -e '%b' 2>/dev/null`" +fi OPENLDAP_CVS="" if test -d $ac_aux_dir/CVS; then @@ -2264,7 +2262,6 @@ else fi; # end --enable-proctitle ol_enable_referrals=${ol_enable_referrals-no} -ol_enable_kbind=${ol_enable_kbind-no} # OpenLDAP --enable-ipv6 # Check whether --enable-ipv6 or --disable-ipv6 was given. @@ -2358,7 +2355,6 @@ else ol_with_fetch="auto" fi; # end --with-fetch -ol_with_kerberos=${ol_with_kerberos-auto} # OpenLDAP --with-threads # Check whether --with-threads or --without-threads was given. @@ -2389,7 +2385,7 @@ if test "${with_tls+set}" = set; then withval="$with_tls" ol_arg=invalid - for ol_val in auto openssl yes no ; do + for ol_val in auto openssl gnutls yes no ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2451,6 +2447,29 @@ else ol_with_mp="auto" fi; # end --with-mp +# OpenLDAP --with-odbc + +# Check whether --with-odbc or --without-odbc was given. +if test "${with_odbc+set}" = set; then + withval="$with_odbc" + + ol_arg=invalid + for ol_val in auto iodbc unixodbc ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { { echo "$as_me:$LINENO: error: bad value $withval for --with-odbc" >&5 +echo "$as_me: error: bad value $withval for --with-odbc" >&2;} + { (exit 1); exit 1; }; } + fi + ol_with_odbc="$ol_arg" + +else + ol_with_odbc="auto" +fi; # end --with-odbc + # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given. @@ -2762,7 +2781,6 @@ Backends="bdb \ dnssrv \ hdb \ ldap \ - ldbm \ meta \ monitor \ null \ @@ -2891,95 +2909,6 @@ else ol_enable_ldap=${ol_enable_backends:-no} fi; # end --enable-ldap -# OpenLDAP --enable-ldbm - - # Check whether --enable-ldbm or --disable-ldbm was given. -if test "${enable_ldbm+set}" = set; then - enableval="$enable_ldbm" - - ol_arg=invalid - for ol_val in no yes mod ; do - if test "$enableval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5 -echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;} - { (exit 1); exit 1; }; } - fi - ol_enable_ldbm="$ol_arg" - -else - ol_enable_ldbm=${ol_enable_backends:-no} -fi; -# end --enable-ldbm - -# Check whether --with-ldbm_api or --without-ldbm_api was given. -if test "${with_ldbm_api+set}" = set; then - withval="$with_ldbm_api" - - { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&5 -echo "$as_me: WARNING: Please use --enable-ldbm-api instead of --with-ldbm-api" >&2;} - enable_ldbm_api="$with_ldbm_api" -fi; -# OpenLDAP --enable-ldbm_api - - # Check whether --enable-ldbm_api or --disable-ldbm_api was given. -if test "${enable_ldbm_api+set}" = set; then - enableval="$enable_ldbm_api" - - ol_arg=invalid - for ol_val in auto berkeley bcompat mdbm gdbm ; do - if test "$enableval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_api" >&5 -echo "$as_me: error: bad value $enableval for --enable-ldbm_api" >&2;} - { (exit 1); exit 1; }; } - fi - ol_enable_ldbm_api="$ol_arg" - -else - ol_enable_ldbm_api=auto -fi; -# end --enable-ldbm_api - - -# Check whether --with-ldbm_type or --without-ldbm_type was given. -if test "${with_ldbm_type+set}" = set; then - withval="$with_ldbm_type" - - { echo "$as_me:$LINENO: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&5 -echo "$as_me: WARNING: Please use --enable-ldbm-type instead of --with-ldbm-type" >&2;} - enable_ldbm_type="$with_ldbm_type" -fi; -# OpenLDAP --enable-ldbm_type - - # Check whether --enable-ldbm_type or --disable-ldbm_type was given. -if test "${enable_ldbm_type+set}" = set; then - enableval="$enable_ldbm_type" - - ol_arg=invalid - for ol_val in auto btree hash ; do - if test "$enableval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm_type" >&5 -echo "$as_me: error: bad value $enableval for --enable-ldbm_type" >&2;} - { (exit 1); exit 1; }; } - fi - ol_enable_ldbm_type="$ol_arg" - -else - ol_enable_ldbm_type=auto -fi; -# end --enable-ldbm_type - # OpenLDAP --enable-meta # Check whether --enable-meta or --disable-meta was given. @@ -3166,11 +3095,12 @@ fi; # end --enable-sql Overlays="accesslog \ + auditlog \ + constraint \ dds \ - denyop \ dyngroup \ dynlist \ - lastmod \ + memberof \ ppolicy \ proxycache \ refint \ @@ -3233,11 +3163,11 @@ else fi; # end --enable-accesslog -# OpenLDAP --enable-dds +# OpenLDAP --enable-auditlog - # Check whether --enable-dds or --disable-dds was given. -if test "${enable_dds+set}" = set; then - enableval="$enable_dds" + # Check whether --enable-auditlog or --disable-auditlog was given. +if test "${enable_auditlog+set}" = set; then + enableval="$enable_auditlog" ol_arg=invalid for ol_val in no yes mod ; do @@ -3246,22 +3176,22 @@ if test "${enable_dds+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5 -echo "$as_me: error: bad value $enableval for --enable-dds" >&2;} + { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5 +echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;} { (exit 1); exit 1; }; } fi - ol_enable_dds="$ol_arg" + ol_enable_auditlog="$ol_arg" else - ol_enable_dds=${ol_enable_overlays:-no} + ol_enable_auditlog=${ol_enable_overlays:-no} fi; -# end --enable-dds +# end --enable-auditlog -# OpenLDAP --enable-denyop +# OpenLDAP --enable-constraint - # Check whether --enable-denyop or --disable-denyop was given. -if test "${enable_denyop+set}" = set; then - enableval="$enable_denyop" + # Check whether --enable-constraint or --disable-constraint was given. +if test "${enable_constraint+set}" = set; then + enableval="$enable_constraint" ol_arg=invalid for ol_val in no yes mod ; do @@ -3270,16 +3200,40 @@ if test "${enable_denyop+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-denyop" >&5 -echo "$as_me: error: bad value $enableval for --enable-denyop" >&2;} + { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-constraint" >&5 +echo "$as_me: error: bad value $enableval for --enable-constraint" >&2;} { (exit 1); exit 1; }; } fi - ol_enable_denyop="$ol_arg" + ol_enable_constraint="$ol_arg" else - ol_enable_denyop=${ol_enable_overlays:-no} + ol_enable_constraint=${ol_enable_overlays:-no} fi; -# end --enable-denyop +# end --enable-constraint + +# OpenLDAP --enable-dds + + # Check whether --enable-dds or --disable-dds was given. +if test "${enable_dds+set}" = set; then + enableval="$enable_dds" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5 +echo "$as_me: error: bad value $enableval for --enable-dds" >&2;} + { (exit 1); exit 1; }; } + fi + ol_enable_dds="$ol_arg" + +else + ol_enable_dds=${ol_enable_overlays:-no} +fi; +# end --enable-dds # OpenLDAP --enable-dyngroup @@ -3329,11 +3283,11 @@ else fi; # end --enable-dynlist -# OpenLDAP --enable-lastmod +# OpenLDAP --enable-memberof - # Check whether --enable-lastmod or --disable-lastmod was given. -if test "${enable_lastmod+set}" = set; then - enableval="$enable_lastmod" + # Check whether --enable-memberof or --disable-memberof was given. +if test "${enable_memberof+set}" = set; then + enableval="$enable_memberof" ol_arg=invalid for ol_val in no yes mod ; do @@ -3342,16 +3296,16 @@ if test "${enable_lastmod+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lastmod" >&5 -echo "$as_me: error: bad value $enableval for --enable-lastmod" >&2;} + { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-memberof" >&5 +echo "$as_me: error: bad value $enableval for --enable-memberof" >&2;} { (exit 1); exit 1; }; } fi - ol_enable_lastmod="$ol_arg" + ol_enable_memberof="$ol_arg" else - ol_enable_lastmod=${ol_enable_overlays:-no} + ol_enable_memberof=${ol_enable_overlays:-no} fi; -# end --enable-lastmod +# end --enable-memberof # OpenLDAP --enable-ppolicy @@ -3594,35 +3548,6 @@ fi; # end --enable-valsort -# Check whether --enable-xxslurpdoptions or --disable-xxslurpdoptions was given. -if test "${enable_xxslurpdoptions+set}" = set; then - enableval="$enable_xxslurpdoptions" - -fi; -# OpenLDAP --enable-slurpd - - # Check whether --enable-slurpd or --disable-slurpd was given. -if test "${enable_slurpd+set}" = set; then - enableval="$enable_slurpd" - - ol_arg=invalid - for ol_val in auto yes no ; do - if test "$enableval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5 -echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;} - { (exit 1); exit 1; }; } - fi - ol_enable_slurpd="$ol_arg" - -else - ol_enable_slurpd=auto -fi; -# end --enable-slurpd - # Check whether --enable-xxliboptions or --disable-xxliboptions was given. if test "${enable_xxliboptions+set}" = set; then enableval="$enable_xxliboptions" @@ -3715,19 +3640,6 @@ echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;} if test $ol_enable_aci != no ; then { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;} - fi - if test $ol_enable_ldbm_api != auto ; then - { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&5 -echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-api argument" >&2;} - fi - if test $ol_enable_ldbm_type != auto ; then - { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&5 -echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm-type argument" >&2;} - fi - if test $ol_enable_slurpd = yes ; then - { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5 -echo "$as_me: error: slurpd requires slapd" >&2;} - { (exit 1); exit 1; }; } fi if test $ol_enable_rewrite = yes ; then { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5 @@ -3757,85 +3669,30 @@ echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;} ol_enable_aci=no ol_enable_wrappers=no - ol_enable_ldbm_api=no - ol_enable_ldbm_type=no - - ol_enable_slurpd=no - ol_enable_rewrite=no -elif test $ol_enable_ldbm = no ; then - - if test $ol_enable_ldbm_api != auto ; then - { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&5 -echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-api argument" >&2;} - fi - - if test $ol_enable_ldbm_type != auto ; then - { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&5 -echo "$as_me: WARNING: LDBM disabled, ignoring --enable-ldbm-type argument" >&2;} - fi - - if test $ol_enable_modules != yes && - test $ol_enable_bdb = no && - test $ol_enable_dnssrv = no && - test $ol_enable_hdb = no && - test $ol_enable_ldap = no && - test $ol_enable_meta = no && - test $ol_enable_monitor = no && - test $ol_enable_null = no && - test $ol_enable_passwd = no && - test $ol_enable_perl = no && - test $ol_enable_relay = no && - test $ol_enable_shell = no && - test $ol_enable_sql = no ; then - - if test $ol_enable_slapd = yes ; then - { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5 +elif test $ol_enable_modules != yes && + test $ol_enable_bdb = no && + test $ol_enable_dnssrv = no && + test $ol_enable_hdb = no && + test $ol_enable_ldap = no && + test $ol_enable_meta = no && + test $ol_enable_monitor = no && + test $ol_enable_null = no && + test $ol_enable_passwd = no && + test $ol_enable_perl = no && + test $ol_enable_relay = no && + test $ol_enable_shell = no && + test $ol_enable_sql = no ; then + + if test $ol_enable_slapd = yes ; then + { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5 echo "$as_me: error: slapd requires a backend" >&2;} { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5 + else + { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;} - ol_enable_slapd=no - fi - fi - - ol_enable_ldbm_api=no - ol_enable_ldbm_type=no - - if test $ol_enable_bdb/$ol_enable_hdb != no/no; then - ol_enable_ldbm_api=berkeley - fi - -else - if test $ol_enable_ldbm_api = gdbm && - test $ol_enable_ldbm_type = btree ; then - { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5 -echo "$as_me: error: GDBM only supports LDBM type hash" >&2;} - { (exit 1); exit 1; }; } - fi - if test $ol_enable_ldbm_api = mdbm && - test $ol_enable_ldbm_type = btree ; then - { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5 -echo "$as_me: error: MDBM only supports LDBM type hash" >&2;} - { (exit 1); exit 1; }; } - fi - if test $ol_enable_ldbm_api = ndbm && - test $ol_enable_ldbm_type = btree ; then - { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5 -echo "$as_me: error: NDBM only supports LDBM type hash" >&2;} - { (exit 1); exit 1; }; } - fi - - if test $ol_enable_bdb/$ol_enable_hdb != no/no ; then - if test $ol_enable_ldbm_api = auto ; then - ol_enable_ldbm_api=berkeley - elif test $ol_enable_ldbm_api != berkeley ; then - { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB/HDB" >&5 -echo "$as_me: error: LDBM API not compatible with BDB/HDB" >&2;} - { (exit 1); exit 1; }; } - fi + ol_enable_slapd=no fi fi @@ -3845,14 +3702,6 @@ echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;} { (exit 1); exit 1; }; } fi -if test $ol_enable_slurpd = yes ; then - if test $ol_with_threads = no ; then - { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5 -echo "$as_me: error: slurpd requires threads" >&2;} - { (exit 1); exit 1; }; } - fi -fi - if test $ol_enable_lmpasswd = yes ; then if test $ol_with_tls = no ; then { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5 @@ -3861,25 +3710,6 @@ echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;} fi fi -if test $ol_enable_kbind = yes ; then - if test $ol_with_kerberos = no ; then - { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5 -echo "$as_me: error: options require --with-kerberos" >&2;} - { (exit 1); exit 1; }; } - elif test $ol_with_kerberos = auto ; then - ol_with_kerberos=yes - fi - -elif test $ol_enable_kbind = no ; then - if test $ol_with_kerberos = auto ; then - ol_with_kerberos=no - elif test $ol_with_kerberos != no ; then - { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5 -echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;}; - ol_with_kerberos=no - fi -fi - if test $ol_enable_spasswd = yes ; then if test $ol_with_cyrus_sasl = no ; then { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5 @@ -3893,15 +3723,13 @@ echo "$as_me:$LINENO: result: done" >&5 echo "${ECHO_T}done" >&6 LDAP_LIBS= -LDBM_LIBS= +BDB_LIBS= LTHREAD_LIBS= LUTIL_LIBS= SLAPD_LIBS= -SLURPD_LIBS= BUILD_SLAPD=no -BUILD_SLURPD=no BUILD_THREAD=no @@ -3912,7 +3740,6 @@ BUILD_BDB=no BUILD_DNSSRV=no BUILD_HDB=no BUILD_LDAP=no -BUILD_LDBM=no BUILD_META=no BUILD_MONITOR=no BUILD_NULL=no @@ -3923,6 +3750,8 @@ BUILD_SHELL=no BUILD_SQL=no BUILD_ACCESSLOG=no +BUILD_AUDITLOG=no +BUILD_CONSTRAINT=no BUILD_DDS=no BUILD_DENYOP=no BUILD_DYNGROUP=no @@ -5764,7 +5593,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5767 "configure"' > conftest.$ac_ext + echo '#line 5596 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7744,11 +7573,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7747: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7576: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7751: \$? = $ac_status" >&5 + echo "$as_me:7580: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8006,11 +7835,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8009: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7838: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8013: \$? = $ac_status" >&5 + echo "$as_me:7842: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8068,11 +7897,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8071: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7900: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8075: \$? = $ac_status" >&5 + echo "$as_me:7904: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10316,7 +10145,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo "${ECHO_T}$ol_cv_mkdep" >&6 + test "$ol_cv_mkdep" = no && OL_MKDEP=":" else cc_cv_mkdep=yes OL_MKDEP_FLAGS="${MKDEP_FLAGS}" @@ -13992,6 +13822,7 @@ fi + for ac_header in \ @@ -14024,9 +13855,11 @@ for ac_header in \ sysexits.h \ sys/file.h \ sys/filio.h \ + sys/fstyp.h \ sys/errno.h \ sys/ioctl.h \ sys/param.h \ + sys/privgrp.h \ sys/resource.h \ sys/select.h \ sys/socket.h \ @@ -14035,12 +13868,11 @@ for ac_header in \ sys/time.h \ sys/types.h \ sys/uio.h \ + sys/vmount.h \ syslog.h \ termios.h \ unistd.h \ utime.h \ - winsock.h \ - winsock2.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -14191,25 +14023,31 @@ fi done +if test "$ac_cv_mingw32" = yes ; then -for ac_header in resolv.h + +for ac_header in winsock.h winsock2.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include - - #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -14234,17 +14072,100 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" +ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -14254,9 +14175,74 @@ fi done +fi -for ac_header in netinet/tcp.h +for ac_header in resolv.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include + + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in netinet/tcp.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -14567,7 +14553,7 @@ fi fi -if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then +if test "$ac_cv_header_winsock_h" = yes; then echo "$as_me:$LINENO: checking for winsock" >&5 echo $ECHO_N "checking for winsock... $ECHO_C" >&6 if test "${ol_cv_winsock+set}" = set; then @@ -15616,8 +15602,10 @@ _ACEOF fi done +if test $ac_cv_func_poll = yes; then -for ac_header in poll.h + +for ac_header in poll.h sys/poll.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -15766,6 +15754,7 @@ fi done +fi for ac_header in sys/epoll.h @@ -15918,9 +15907,9 @@ fi done if test "${ac_cv_header_sys_epoll_h}" = yes; then -echo "$as_me:$LINENO: checking for epoll system call" >&5 + echo "$as_me:$LINENO: checking for epoll system call" >&5 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6 -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else @@ -15930,7 +15919,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -int main(int argc, char *argv) +int main(int argc, char **argv) { int epfd = epoll_create(256); exit (epfd == -1 ? 1 : 0); @@ -15967,6 +15956,208 @@ rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftes fi fi + +for ac_header in sys/devpoll.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +if test "${ac_cv_header_sys_devpoll_h}" = yes \ + -a "${ac_cv_header_poll_h}" = yes ; \ +then + echo "$as_me:$LINENO: checking for /dev/poll" >&5 +echo $ECHO_N "checking for /dev/poll... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int main(int argc, char **argv) +{ + int devpollfd = open("/dev/poll", /* O_RDWR */ 2); + exit (devpollfd == -1 ? 1 : 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVPOLL 1 +_ACEOF + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + # strerror checks echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6 @@ -15984,7 +16175,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include #include -#ifdef WINNT +#ifdef _WIN32 #include #endif int @@ -16349,7 +16540,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include #include -#ifdef WINNT +#ifdef _WIN32 #include #endif int @@ -16474,25 +16665,23 @@ fi for ac_header in regex.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -16517,100 +16706,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -16620,6 +16726,7 @@ fi done + if test "$ac_cv_header_regex_h" != yes ; then { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5 echo "$as_me: error: POSIX regex.h required." >&2;} @@ -17125,27 +17232,323 @@ _ACEOF fi if test $have_uuid = no ; then - echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5 -echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6 - save_LIBS="$LIBS" - LIBS="$LIBS -lrpcrt4" - cat >conftest.$ac_ext <<_ACEOF + +for ac_header in uuid/uuid.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - int __stdcall UuidCreate(void *); - int __stdcall UuidToStringA(void *,void **); + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test $ac_cv_header_uuid_uuid_h = yes ; then + save_LIBS="$LIBS" + echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5 +echo $ECHO_N "checking for library containing uuid_generate... $ECHO_C" >&6 +if test "${ac_cv_search_uuid_generate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_uuid_generate=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char uuid_generate (); int main () { - - UuidCreate(0); - UuidToStringA(0,0); - +uuid_generate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_uuid_generate="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_uuid_generate" = no; then + for ac_lib in uuid; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char uuid_generate (); +int +main () +{ +uuid_generate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_uuid_generate="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5 +echo "${ECHO_T}$ac_cv_search_uuid_generate" >&6 +if test "$ac_cv_search_uuid_generate" != no; then + test "$ac_cv_search_uuid_generate" = "none required" || LIBS="$ac_cv_search_uuid_generate $LIBS" + have_uuid=yes +else + : +fi + + LIBS="$save_LIBS" + + if test have_uuid = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UUID_GENERATE 1 +_ACEOF + + + test "$ac_cv_search_uuid_generate" = "none required" || \ + SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate" + fi + fi +fi + +if test $have_uuid = no ; then + echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5 +echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6 + save_LIBS="$LIBS" + LIBS="$LIBS -lrpcrt4" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + int __stdcall UuidCreate(void *); + int __stdcall UuidToStringA(void *,void **); + +int +main () +{ + + UuidCreate(0); + UuidToStringA(0,0); + ; return 0; } @@ -18032,166 +18435,15 @@ echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;} fi fi -ol_link_kbind=no -ol_link_krb5=no -ol_link_krb4=no - -case $ol_with_kerberos in yes | auto | k5 | k5only | k425) - - -for ac_header in krb5.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test $ol_with_tls = yes ; then + ol_with_tls=auto fi -done - - - if test $ac_cv_header_krb5_h = yes ; then +ol_link_tls=no +if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then -for ac_header in heim_err.h +for ac_header in openssl/ssl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -18340,20 +18592,15 @@ fi done - if test $ac_cv_header_heim_err_h = yes ; then - krb5_impl=heimdal - else - krb5_impl=mit - fi - if test $krb5_impl = mit; then - echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5 -echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6 -if test "${ac_cv_lib_k5crypto_main+set}" = set; then + if test $ac_cv_header_openssl_ssl_h = yes ; then + echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 +echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lk5crypto $LIBS" +LIBS="-lssl -lcrypto $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18361,11 +18608,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SSL_library_init (); int main () { -main (); +SSL_library_init (); ; return 0; } @@ -18392,33 +18645,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_k5crypto_main=yes + ac_cv_lib_ssl_SSL_library_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_k5crypto_main=no +ac_cv_lib_ssl_SSL_library_init=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5 -echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6 -if test $ac_cv_lib_k5crypto_main = yes; then - krb5crypto=k5crypto +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6 +if test $ac_cv_lib_ssl_SSL_library_init = yes; then + have_openssl=yes + need_rsaref=no else - krb5crypto=crypto + have_openssl=no fi - echo "$as_me:$LINENO: checking for main in -lkrb5" >&5 -echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6 -if test "${ac_cv_lib_krb5_main+set}" = set; then + if test $have_openssl = no ; then + echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5 +echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS" +LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18426,11 +18681,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char ssl3_accept (); int main () { -main (); +ssl3_accept (); ; return 0; } @@ -18457,202 +18718,100 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_krb5_main=yes + ac_cv_lib_ssl_ssl3_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_krb5_main=no +ac_cv_lib_ssl_ssl3_accept=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5 -echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6 -if test $ac_cv_lib_krb5_main = yes; then - have_krb5=yes - KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err" +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6 +if test $ac_cv_lib_ssl_ssl3_accept = yes; then + have_openssl=yes + need_rsaref=yes else - have_krb5=no + have_openssl=no fi + fi - elif test $krb5_impl = heimdal; then - echo "$as_me:$LINENO: checking for main in -ldes" >&5 -echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6 -if test "${ac_cv_lib_des_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + if test $have_openssl = yes ; then + ol_with_tls=openssl + ol_link_tls=yes + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENSSL 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ -main (); - ; - return 0; -} + if test $need_rsaref = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RSAREF 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_des_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_des_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5 -echo "${ECHO_T}$ac_cv_lib_des_main" >&6 -if test $ac_cv_lib_des_main = yes; then - krb5crypto=des -else - krb5crypto=crypto -fi + TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" + else + TLS_LIBS="-lssl -lcrypto" + fi - echo "$as_me:$LINENO: checking for main in -lkrb5" >&5 -echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6 -if test "${ac_cv_lib_krb5_main+set}" = set; then + echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5 +echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6 +if test "${ol_cv_ssl_crl_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_OPENSSL_SSL_H +#include +#endif -int -main () -{ -main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_krb5_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/* Require 0.9.7d+ */ +#if OPENSSL_VERSION_NUMBER >= 0x0090704fL + char *__ssl_compat = "0.9.7d"; +#endif -ac_cv_lib_krb5_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5 -echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6 -if test $ac_cv_lib_krb5_main = yes; then - have_krb5=yes - KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err" +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "__ssl_compat" >/dev/null 2>&1; then + ol_cv_ssl_crl_compat=yes else - have_krb5=no + ol_cv_ssl_crl_compat=no fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5 +echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6 + if test $ol_cv_ssl_crl_compat = yes ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_HEIMDAL_KERBEROS 1 -_ACEOF - - - else - have_krb5=no - { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5 -echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;} - fi - - if test $have_krb5 = yes ; then - ol_link_krb5=yes - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KRB5 1 +#define HAVE_OPENSSL_CRL 1 _ACEOF - - if test $ol_with_kerberos = k5only ; then - ol_with_kerberos=found fi - - elif test $ol_with_kerberos != auto ; then - { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5 -echo "$as_me: error: Required Kerberos 5 support not available" >&2;} - { (exit 1); exit 1; }; } fi - fi - ;; -esac - -if test $ol_link_krb5 = yes && - { test $ol_with_kerberos = yes || - test $ol_with_kerberos = auto || - test $ol_with_kerberos = k425; }; then - +fi +if test $ol_link_tls = no ; then + if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then -for ac_header in kerberosIV/krb.h kerberosIV/des.h +for ac_header in gnutls/gnutls.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -18802,15 +18961,14 @@ fi done - if test $ac_cv_header_kerberosIV_krb_h = yes ; then - if test $krb5_impl = mit; then - echo "$as_me:$LINENO: checking for main in -lkrb4" >&5 -echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6 -if test "${ac_cv_lib_krb4_main+set}" = set; then + if test $ac_cv_header_gnutls_gnutls_h = yes ; then + echo "$as_me:$LINENO: checking for gnutls_init in -lgnutls" >&5 +echo $ECHO_N "checking for gnutls_init in -lgnutls... $ECHO_C" >&6 +if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS" +LIBS="-lgnutls $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18818,11 +18976,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gnutls_init (); int main () { -main (); +gnutls_init (); ; return 0; } @@ -18849,140 +19013,135 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_krb4_main=yes + ac_cv_lib_gnutls_gnutls_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_krb4_main=no +ac_cv_lib_gnutls_gnutls_init=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5 -echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6 -if test $ac_cv_lib_krb4_main = yes; then - have_k425=yes - KRB4_LIBS="-lkrb4 -ldes425" +echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_init" >&5 +echo "${ECHO_T}$ac_cv_lib_gnutls_gnutls_init" >&6 +if test $ac_cv_lib_gnutls_gnutls_init = yes; then + have_gnutls=yes else - have_k425=no + have_gnutls=no fi - elif test $krb5_impl = heimdal; then - echo "$as_me:$LINENO: checking for main in -lkrb4" >&5 -echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6 -if test "${ac_cv_lib_krb4_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test $have_gnutls = yes ; then + ol_with_tls=gnutls + ol_link_tls=yes + TLS_LIBS="-lgnutls" -int -main () -{ -main (); - ; - return 0; -} + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GNUTLS 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_krb4_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_krb4_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5 -echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6 -if test $ac_cv_lib_krb4_main = yes; then - have_k425=yes - KRB4_LIBS="-lkrb4" -else - have_k425=no + fi + fi + fi fi +WITH_TLS=no +if test $ol_link_tls = yes ; then - else - have_425=no - { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5 -echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;} - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_TLS 1 +_ACEOF + + WITH_TLS=yes +elif test $ol_with_tls = auto ; then + { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5 +echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;} + { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5 +echo "$as_me: WARNING: TLS data protection not supported!" >&2;} +elif test $ol_with_tls != no ; then + { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5 +echo "$as_me: error: Could not locate TLS/SSL package" >&2;} + { (exit 1); exit 1; }; } +else + { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5 +echo "$as_me: WARNING: TLS data protection not supported!" >&2;} +fi - if test $have_k425 = yes ; then - ol_with_kerberos=found - ol_link_krb4=yes +if test $ol_enable_lmpasswd != no; then + if test $ol_link_tls != yes ; then + { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5 +echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;} + { (exit 1); exit 1; }; } + fi cat >>confdefs.h <<\_ACEOF -#define HAVE_KRB425 1 +#define SLAPD_LMHASH 1 _ACEOF +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_KRB4 1 -_ACEOF +ol_link_threads=no + +case $ol_with_threads in auto | yes | nt) - echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5 -echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6 -if test "${ol_cv_var_des_debug+set}" = set; then + echo "$as_me:$LINENO: checking for _beginthread" >&5 +echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6 +if test "${ac_cv_func__beginthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - save_LIBS="$LIBS" - LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define _beginthread to an innocuous variant, in case declares _beginthread. + For example, HP-UX 11i declares gettimeofday. */ +#define _beginthread innocuous__beginthread + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _beginthread (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include -#include -extern int des_debug; +#undef _beginthread + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _beginthread (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__beginthread) || defined (__stub____beginthread) +choke me +#else +char (*f) () = _beginthread; +#endif +#ifdef __cplusplus +} +#endif int main () { - -des_debug = 1; - +return f != _beginthread; ; return 0; } @@ -19009,44 +19168,59 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_var_des_debug=yes + ac_cv_func__beginthread=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_var_des_debug=no +ac_cv_func__beginthread=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - fi -echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5 -echo "${ECHO_T}$ol_cv_var_des_debug" >&6 +echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5 +echo "${ECHO_T}$ac_cv_func__beginthread" >&6 - if test $ol_cv_var_des_debug = yes ; then + + if test $ac_cv_func__beginthread = yes ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_DES_DEBUG 1 +#define HAVE_NT_THREADS 1 _ACEOF - fi - - LIBS="$save_LIBS" - fi + ol_cv_nt_threads=yes fi -fi -if test $ol_link_krb5 = yes ; then - ol_with_kerberos=found -fi -case $ol_with_kerberos in yes | auto | k4 | kth) + if test "$ol_cv_nt_threads" = yes ; then + ol_link_threads=nt + ol_with_threads=found + ol_with_yielding_select=yes + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NT_SERVICE_MANAGER 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NT_EVENT_LOG 1 +_ACEOF + + fi + if test $ol_with_threads = nt ; then + { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5 +echo "$as_me: error: could not locate NT Threads" >&2;} + { (exit 1); exit 1; }; } + fi + ;; +esac +case $ol_with_threads in auto | yes | posix) -for ac_header in krb.h des.h krb-archaeology.h +for ac_header in pthread.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -19196,33 +19370,35 @@ fi done - if test $ac_cv_header_krb_h = yes ; then - echo "$as_me:$LINENO: checking for main in -lkrb" >&5 -echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6 -if test "${ac_cv_lib_krb_main+set}" = set; then + if test $ac_cv_header_pthread_h = yes ; then + echo "$as_me:$LINENO: checking POSIX thread version" >&5 +echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6 +if test "${ol_cv_pthread_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb -ldes $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +# include int main () { -main (); + + int i = PTHREAD_CREATE_JOINABLE; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -19236,99 +19412,198 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_krb_main=yes + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pthread_detach" >/dev/null 2>&1; then + ol_cv_pthread_version=10 +else + ol_cv_pthread_version=8 +fi +rm -f conftest* + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_krb_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5 -echo "${ECHO_T}$ac_cv_lib_krb_main" >&6 -if test $ac_cv_lib_krb_main = yes; then - have_k4=yes -else - have_k4=no -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test $have_k4 = yes ; then - ol_with_kerberos=found - ol_link_krb4=yes +# include +# ifdef PTHREAD_CREATE_UNDETACHED + draft7 +# endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "draft7" >/dev/null 2>&1; then + ol_cv_pthread_version=7 +else -cat >>confdefs.h <<\_ACEOF -#define HAVE_KRB4 1 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pthread_attr_init" >/dev/null 2>&1; then + ol_cv_pthread_version=6 +else - KRB4_LIBS="-lkrb -ldes" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test $ac_cv_header_krb_archaeology_h = yes ; then +# include +#ifdef PTHREAD_MUTEX_INITIALIZER + draft5 +#endif -cat >>confdefs.h <<\_ACEOF -#define HAVE_KTH_KERBEROS 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "draft5" >/dev/null 2>&1; then + ol_cv_pthread_version=5 +else + ol_cv_pthread_version=4 +fi +rm -f conftest* - fi - fi - fi - ;; -esac +fi +rm -f conftest* -if test $ol_link_krb4 = yes && test $ol_enable_kbind != no ; then - ol_link_kbind=yes +fi +rm -f conftest* -elif test $ol_enable_kbind = yes ; then - { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5 -echo "$as_me: error: Kerberos IV detection failed" >&2;} - { (exit 1); exit 1; }; } fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ol_link_krb4 = yes || test $ol_link_krb5 = yes ; then +fi +echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5 +echo "${ECHO_T}$ol_cv_pthread_version" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_KERBEROS 1 -_ACEOF + if test $ol_cv_pthread_version != 0 ; then -elif test $ol_with_kerberos != auto && test $ol_with_kerberos != no ; then - { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5 -echo "$as_me: error: Kerberos detection failed" >&2;} - { (exit 1); exit 1; }; } -fi +cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREADS $ol_cv_pthread_version +_ACEOF + else + { { echo "$as_me:$LINENO: error: unknown pthread version" >&5 +echo "$as_me: error: unknown pthread version" >&2;} + { (exit 1); exit 1; }; } + fi -if test $ol_with_tls = yes ; then - ol_with_tls=auto -fi + # consider threads found + ol_with_threads=found -ol_link_tls=no -if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then -for ac_header in openssl/ssl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5 +echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6 +if test "${ol_cv_header_linux_threads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then + ol_cv_header_linux_threads=yes +else + ol_cv_header_linux_threads=no +fi +rm -f conftest* + + +fi +echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5 +echo "${ECHO_T}$ol_cv_header_linux_threads" >&6 + if test $ol_cv_header_linux_threads = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX_THREADS 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5 +echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6 +if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef _POSIX_THREAD_IS_GNU_PTH + __gnu_pth__; +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "__gnu_pth__" >/dev/null 2>&1; then + ol_cv_header_gnu_pth_pthread_h=yes +else + ol_cv_header_gnu_pth_pthread_h=no +fi +rm -f conftest* + + +fi +echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5 +echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6 + + + if test $ol_cv_header_gnu_pth_pthread_h = no ; then + +for ac_header in sched.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF @@ -19465,33 +19740,88 @@ fi done + fi - if test $ac_cv_header_openssl_ssl_h = yes ; then - echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 -echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6 -if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then + + echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5 +echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6 +if test "${ol_cv_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + if test "$cross_compiling" = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +/* pthread test headers */ +#include +#if HAVE_PTHREADS < 7 +#include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char SSL_library_init (); +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + int main () { -SSL_library_init (); + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + ; return 0; } @@ -19518,262 +19848,210 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ssl_SSL_library_init=yes + ol_cv_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ssl_SSL_library_init=no +ol_cv_pthread_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5 -echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6 -if test $ac_cv_lib_ssl_SSL_library_init = yes; then - have_openssl=yes - need_rsaref=no -else - have_openssl=no -fi - - - if test $have_openssl = no ; then - echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5 -echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6 -if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +/* pthread test headers */ +#include +#if HAVE_PTHREADS < 7 +#include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ssl3_accept (); -int -main () +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; { -ssl3_accept (); - ; - return 0; + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ssl_ssl3_accept=yes + ol_cv_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ssl_ssl3_accept=no +( exit $ac_status ) +ol_cv_pthread_create=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5 -echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6 -if test $ac_cv_lib_ssl_ssl3_accept = yes; then - have_openssl=yes - need_rsaref=yes -else - have_openssl=no fi +echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5 +echo "${ECHO_T}$ol_cv_pthread_create" >&6 + if test $ol_cv_pthread_create != no ; then + ol_link_threads=posix + ol_link_pthreads="" fi - if test $have_openssl = yes ; then - ol_with_tls=openssl - ol_link_tls=yes - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENSSL 1 -_ACEOF - - - if test $need_rsaref = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_RSAREF 1 -_ACEOF - - - TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" - else - TLS_LIBS="-lssl -lcrypto" - fi - - echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5 -echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6 -if test "${ol_cv_ssl_crl_compat+set}" = set; then + # Pthread try link: -kthread (ol_cv_pthread_kthread) +if test "$ol_link_threads" = no ; then + # try -kthread + echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5 +echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6 +if test "${ol_cv_pthread_kthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # save the flags + ol_LIBS="$LIBS" + LIBS="-kthread $LIBS" + + if test "$cross_compiling" = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_OPENSSL_SSL_H -#include +/* pthread test headers */ +#include +#if HAVE_PTHREADS < 7 +#include #endif - -/* Require 0.9.7d+ */ -#if OPENSSL_VERSION_NUMBER >= 0x0090704fL - char *__ssl_compat = "0.9.7d"; +#ifndef NULL +#define NULL (void*)0 #endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__ssl_compat" >/dev/null 2>&1; then - ol_cv_ssl_crl_compat=yes -else - ol_cv_ssl_crl_compat=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5 -echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6 - - if test $ol_cv_ssl_crl_compat = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENSSL_CRL 1 -_ACEOF - - fi - fi - fi -fi - -WITH_TLS=no -if test $ol_link_tls = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TLS 1 -_ACEOF - - WITH_TLS=yes -elif test $ol_with_tls = auto ; then - { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5 -echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;} - { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5 -echo "$as_me: WARNING: TLS data protection not supported!" >&2;} -elif test $ol_with_tls != no ; then - { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5 -echo "$as_me: error: Could not locate TLS/SSL package" >&2;} - { (exit 1); exit 1; }; } -else - { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5 -echo "$as_me: WARNING: TLS data protection not supported!" >&2;} -fi - -if test $ol_enable_lmpasswd != no; then - if test $ol_link_tls != yes ; then - { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5 -echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;} - { (exit 1); exit 1; }; } - fi - - -cat >>confdefs.h <<\_ACEOF -#define SLAPD_LMHASH 1 -_ACEOF - -fi - -ol_link_threads=no +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} -case $ol_with_threads in auto | yes | nt) +int +main () +{ + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; - echo "$as_me:$LINENO: checking for _beginthread" >&5 -echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6 -if test "${ac_cv_func__beginthread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define _beginthread to an innocuous variant, in case declares _beginthread. - For example, HP-UX 11i declares gettimeofday. */ -#define _beginthread innocuous__beginthread +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _beginthread (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + status = pthread_attr_init(&attr); + if( status ) return status; -#ifdef __STDC__ -# include +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; #else -# include + status = pthread_attr_setdetachstate(&attr, detach); #endif - -#undef _beginthread - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char _beginthread (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub__beginthread) || defined (__stub____beginthread) -choke me + if( status ) return status; #else -char (*f) () = _beginthread; + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; #endif -#ifdef __cplusplus -} + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); #endif -int -main () -{ -return f != _beginthread; + return 0; + ; return 0; } @@ -19800,237 +20078,222 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func__beginthread=yes + ol_cv_pthread_kthread=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func__beginthread=no +ol_cv_pthread_kthread=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5 -echo "${ECHO_T}$ac_cv_func__beginthread" >&6 - - - if test $ac_cv_func__beginthread = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NT_THREADS 1 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ol_cv_nt_threads=yes - fi +/* pthread test headers */ +#include +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} - if test "$ol_cv_nt_threads" = yes ; then - ol_link_threads=nt - ol_with_threads=found - ol_with_yielding_select=yes +int main(argc, argv) + int argc; + char **argv; +{ -cat >>confdefs.h <<\_ACEOF -#define HAVE_NT_SERVICE_MANAGER 1 -_ACEOF + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; -cat >>confdefs.h <<\_ACEOF -#define HAVE_NT_EVENT_LOG 1 -_ACEOF + status = pthread_attr_init(&attr); + if( status ) return status; - fi +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; - if test $ol_with_threads = nt ; then - { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5 -echo "$as_me: error: could not locate NT Threads" >&2;} - { (exit 1); exit 1; }; } - fi - ;; -esac + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); -case $ol_with_threads in auto | yes | posix) + status = pthread_detach( &t ); + if( status ) return errno; +#endif +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +} -for ac_header in pthread.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ol_cv_pthread_kthread=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes +( exit $ac_status ) +ol_cv_pthread_kthread=no fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + # restore the LIBS + LIBS="$ol_LIBS" fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5 +echo "${ECHO_T}$ol_cv_pthread_kthread" >&6 + if test $ol_cv_pthread_kthread = yes ; then + ol_link_pthreads="-kthread" + ol_link_threads=posix + fi fi -done - - - if test $ac_cv_header_pthread_h = yes ; then - echo "$as_me:$LINENO: checking POSIX thread version" >&5 -echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6 -if test "${ol_cv_pthread_version+set}" = set; then + # Pthread try link: -pthread (ol_cv_pthread_pthread) +if test "$ol_link_threads" = no ; then + # try -pthread + echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5 +echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6 +if test "${ol_cv_pthread_pthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # save the flags + ol_LIBS="$LIBS" + LIBS="-pthread $LIBS" + + if test "$cross_compiling" = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -# include +/* pthread test headers */ +#include +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} int main () { - int i = PTHREAD_CREATE_JOINABLE; + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -20044,352 +20307,157 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + ol_cv_pthread_pthread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +ol_cv_pthread_pthread=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +/* pthread test headers */ #include +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_detach" >/dev/null 2>&1; then - ol_cv_pthread_version=10 -else - ol_cv_pthread_version=8 -fi -rm -f conftest* +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +int main(argc, argv) + int argc; + char **argv; +{ - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; -# include -# ifdef PTHREAD_CREATE_UNDETACHED - draft7 -# endif +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "draft7" >/dev/null 2>&1; then - ol_cv_pthread_version=7 -else + status = pthread_attr_init(&attr); + if( status ) return status; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_attr_init" >/dev/null 2>&1; then - ol_cv_pthread_version=6 -else + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + status = pthread_detach( &t ); + if( status ) return errno; +#endif -# include -#ifdef PTHREAD_MUTEX_INITIALIZER - draft5 +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); #endif + return 0; + +} + _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "draft5" >/dev/null 2>&1; then - ol_cv_pthread_version=5 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ol_cv_pthread_pthread=yes else - ol_cv_pthread_version=4 -fi -rm -f conftest* + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ol_cv_pthread_pthread=no fi -rm -f conftest* - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest* -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # restore the LIBS + LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5 -echo "${ECHO_T}$ol_cv_pthread_version" >&6 - - - if test $ol_cv_pthread_version != 0 ; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREADS $ol_cv_pthread_version -_ACEOF - - else - { { echo "$as_me:$LINENO: error: unknown pthread version" >&5 -echo "$as_me: error: unknown pthread version" >&2;} - { (exit 1); exit 1; }; } - fi - - # consider threads found - ol_with_threads=found +echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5 +echo "${ECHO_T}$ol_cv_pthread_pthread" >&6 + if test $ol_cv_pthread_pthread = yes ; then + ol_link_pthreads="-pthread" + ol_link_threads=posix + fi +fi - echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5 -echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6 -if test "${ol_cv_header_linux_threads+set}" = set; then + # Pthread try link: -pthreads (ol_cv_pthread_pthreads) +if test "$ol_link_threads" = no ; then + # try -pthreads + echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5 +echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6 +if test "${ol_cv_pthread_pthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + + # save the flags + ol_LIBS="$LIBS" + LIBS="-pthreads $LIBS" + + if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then - ol_cv_header_linux_threads=yes -else - ol_cv_header_linux_threads=no -fi -rm -f conftest* - - -fi -echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5 -echo "${ECHO_T}$ol_cv_header_linux_threads" >&6 - if test $ol_cv_header_linux_threads = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LINUX_THREADS 1 -_ACEOF - - fi - - - echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5 -echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6 -if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef _POSIX_THREAD_IS_GNU_PTH - __gnu_pth__; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__gnu_pth__" >/dev/null 2>&1; then - ol_cv_header_gnu_pth_pthread_h=yes -else - ol_cv_header_gnu_pth_pthread_h=no -fi -rm -f conftest* - - -fi -echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5 -echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6 - - - if test $ol_cv_header_gnu_pth_pthread_h = no ; then - -for ac_header in sched.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - fi - - - echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5 -echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6 -if test "${ol_cv_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* pthread test headers */ + +/* pthread test headers */ #include #if HAVE_PTHREADS < 7 #include @@ -20480,12 +20548,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_create=yes + ol_cv_pthread_pthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_create=no +ol_cv_pthread_pthreads=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -20578,38 +20646,43 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_create=yes + ol_cv_pthread_pthreads=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_create=no +ol_cv_pthread_pthreads=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + # restore the LIBS + LIBS="$ol_LIBS" + fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5 -echo "${ECHO_T}$ol_cv_pthread_create" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5 +echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6 - if test $ol_cv_pthread_create != no ; then - ol_link_threads=posix - ol_link_pthreads="" - fi + if test $ol_cv_pthread_pthreads = yes ; then + ol_link_pthreads="-pthreads" + ol_link_threads=posix + fi +fi - # Pthread try link: -kthread (ol_cv_pthread_kthread) + # Pthread try link: -mthreads (ol_cv_pthread_mthreads) if test "$ol_link_threads" = no ; then - # try -kthread - echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5 -echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6 -if test "${ol_cv_pthread_kthread+set}" = set; then + # try -mthreads + echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5 +echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6 +if test "${ol_cv_pthread_mthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-kthread $LIBS" + LIBS="-mthreads $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -20710,12 +20783,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_kthread=yes + ol_cv_pthread_mthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_kthread=no +ol_cv_pthread_mthreads=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -20808,14 +20881,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_kthread=yes + ol_cv_pthread_mthreads=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_kthread=no +ol_cv_pthread_mthreads=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -20824,27 +20897,27 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5 -echo "${ECHO_T}$ol_cv_pthread_kthread" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5 +echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6 - if test $ol_cv_pthread_kthread = yes ; then - ol_link_pthreads="-kthread" + if test $ol_cv_pthread_mthreads = yes ; then + ol_link_pthreads="-mthreads" ol_link_threads=posix fi fi - # Pthread try link: -pthread (ol_cv_pthread_pthread) + # Pthread try link: -thread (ol_cv_pthread_thread) if test "$ol_link_threads" = no ; then - # try -pthread - echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5 -echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6 -if test "${ol_cv_pthread_pthread+set}" = set; then + # try -thread + echo "$as_me:$LINENO: checking for pthread link with -thread" >&5 +echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6 +if test "${ol_cv_pthread_thread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-pthread $LIBS" + LIBS="-thread $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -20945,12 +21018,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_pthread=yes + ol_cv_pthread_thread=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_pthread=no +ol_cv_pthread_thread=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21043,14 +21116,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_pthread=yes + ol_cv_pthread_thread=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_pthread=no +ol_cv_pthread_thread=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -21059,27 +21132,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5 -echo "${ECHO_T}$ol_cv_pthread_pthread" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5 +echo "${ECHO_T}$ol_cv_pthread_thread" >&6 - if test $ol_cv_pthread_pthread = yes ; then - ol_link_pthreads="-pthread" + if test $ol_cv_pthread_thread = yes ; then + ol_link_pthreads="-thread" ol_link_threads=posix fi fi - # Pthread try link: -pthreads (ol_cv_pthread_pthreads) + + # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) if test "$ol_link_threads" = no ; then - # try -pthreads - echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5 -echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6 -if test "${ol_cv_pthread_pthreads+set}" = set; then + # try -lpthread -lmach -lexc -lc_r + echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 +echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-pthreads $LIBS" + LIBS="-lpthread -lmach -lexc -lc_r $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -21180,12 +21254,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_pthreads=yes + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_pthreads=no +ol_cv_pthread_lpthread_lmach_lexc_lc_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21278,14 +21352,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_pthreads=yes + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_pthreads=no +ol_cv_pthread_lpthread_lmach_lexc_lc_r=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -21294,27 +21368,27 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5 -echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6 - if test $ol_cv_pthread_pthreads = yes ; then - ol_link_pthreads="-pthreads" + if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then + ol_link_pthreads="-lpthread -lmach -lexc -lc_r" ol_link_threads=posix fi fi - # Pthread try link: -mthreads (ol_cv_pthread_mthreads) + # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) if test "$ol_link_threads" = no ; then - # try -mthreads - echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5 -echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6 -if test "${ol_cv_pthread_mthreads+set}" = set; then + # try -lpthread -lmach -lexc + echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5 +echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-mthreads $LIBS" + LIBS="-lpthread -lmach -lexc $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -21415,12 +21489,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_mthreads=yes + ol_cv_pthread_lpthread_lmach_lexc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_mthreads=no +ol_cv_pthread_lpthread_lmach_lexc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21513,14 +21587,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_mthreads=yes + ol_cv_pthread_lpthread_lmach_lexc=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_mthreads=no +ol_cv_pthread_lpthread_lmach_lexc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -21529,27 +21603,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5 -echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6 - if test $ol_cv_pthread_mthreads = yes ; then - ol_link_pthreads="-mthreads" + if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then + ol_link_pthreads="-lpthread -lmach -lexc" ol_link_threads=posix fi fi - # Pthread try link: -thread (ol_cv_pthread_thread) + + # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) if test "$ol_link_threads" = no ; then - # try -thread - echo "$as_me:$LINENO: checking for pthread link with -thread" >&5 -echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6 -if test "${ol_cv_pthread_thread+set}" = set; then + # try -lpthread -Wl,-woff,85 + echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5 +echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6 +if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-thread $LIBS" + LIBS="-lpthread -Wl,-woff,85 $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -21650,12 +21725,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_thread=yes + ol_cv_pthread_lib_lpthread_woff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_thread=no +ol_cv_pthread_lib_lpthread_woff=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21748,14 +21823,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_thread=yes + ol_cv_pthread_lib_lpthread_woff=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_thread=no +ol_cv_pthread_lib_lpthread_woff=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -21764,28 +21839,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5 -echo "${ECHO_T}$ol_cv_pthread_thread" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5 +echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6 - if test $ol_cv_pthread_thread = yes ; then - ol_link_pthreads="-thread" + if test $ol_cv_pthread_lib_lpthread_woff = yes ; then + ol_link_pthreads="-lpthread -Wl,-woff,85" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) + # Pthread try link: -lpthread (ol_cv_pthread_lpthread) if test "$ol_link_threads" = no ; then - # try -lpthread -lmach -lexc -lc_r - echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 -echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then + # try -lpthread + echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5 +echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -lmach -lexc -lc_r $LIBS" + LIBS="-lpthread $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -21886,12 +21961,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes + ol_cv_pthread_lpthread=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthread_lmach_lexc_lc_r=no +ol_cv_pthread_lpthread=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -21984,14 +22059,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes + ol_cv_pthread_lpthread=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lpthread_lmach_lexc_lc_r=no +ol_cv_pthread_lpthread=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -22000,27 +22075,27 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6 - if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then - ol_link_pthreads="-lpthread -lmach -lexc -lc_r" + if test $ol_cv_pthread_lpthread = yes ; then + ol_link_pthreads="-lpthread" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) + # Pthread try link: -lc_r (ol_cv_pthread_lc_r) if test "$ol_link_threads" = no ; then - # try -lpthread -lmach -lexc - echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5 -echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then + # try -lc_r + echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5 +echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6 +if test "${ol_cv_pthread_lc_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -lmach -lexc $LIBS" + LIBS="-lc_r $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -22121,12 +22196,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread_lmach_lexc=yes + ol_cv_pthread_lc_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthread_lmach_lexc=no +ol_cv_pthread_lc_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -22219,14 +22294,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread_lmach_lexc=yes + ol_cv_pthread_lc_r=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lpthread_lmach_lexc=no +ol_cv_pthread_lc_r=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -22235,28 +22310,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5 +echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6 - if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then - ol_link_pthreads="-lpthread -lmach -lexc" + if test $ol_cv_pthread_lc_r = yes ; then + ol_link_pthreads="-lc_r" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) + # Pthread try link: -threads (ol_cv_pthread_threads) if test "$ol_link_threads" = no ; then - # try -lpthread -Wl,-woff,85 - echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5 -echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6 -if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then + # try -threads + echo "$as_me:$LINENO: checking for pthread link with -threads" >&5 +echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6 +if test "${ol_cv_pthread_threads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -Wl,-woff,85 $LIBS" + LIBS="-threads $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -22357,12 +22432,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lib_lpthread_woff=yes + ol_cv_pthread_threads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lib_lpthread_woff=no +ol_cv_pthread_threads=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -22455,14 +22530,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lib_lpthread_woff=yes + ol_cv_pthread_threads=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lib_lpthread_woff=no +ol_cv_pthread_threads=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -22471,28 +22546,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5 -echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5 +echo "${ECHO_T}$ol_cv_pthread_threads" >&6 - if test $ol_cv_pthread_lib_lpthread_woff = yes ; then - ol_link_pthreads="-lpthread -Wl,-woff,85" + if test $ol_cv_pthread_threads = yes ; then + ol_link_pthreads="-threads" ol_link_threads=posix fi fi - # Pthread try link: -lpthread (ol_cv_pthread_lpthread) + # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) if test "$ol_link_threads" = no ; then - # try -lpthread - echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5 -echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthread+set}" = set; then + # try -lpthreads -lmach -lexc -lc_r + echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 +echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread $LIBS" + LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -22593,12 +22668,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread=yes + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthread=no +ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -22691,14 +22766,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthread=yes + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lpthread=no +ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -22707,27 +22782,27 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6 - if test $ol_cv_pthread_lpthread = yes ; then - ol_link_pthreads="-lpthread" + if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then + ol_link_pthreads="-lpthreads -lmach -lexc -lc_r" ol_link_threads=posix fi fi - # Pthread try link: -lc_r (ol_cv_pthread_lc_r) + # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc) if test "$ol_link_threads" = no ; then - # try -lc_r - echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5 -echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6 -if test "${ol_cv_pthread_lc_r+set}" = set; then + # try -lpthreads -lmach -lexc + echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5 +echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lc_r $LIBS" + LIBS="-lpthreads -lmach -lexc $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -22828,12 +22903,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lc_r=yes + ol_cv_pthread_lpthreads_lmach_lexc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lc_r=no +ol_cv_pthread_lpthreads_lmach_lexc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -22926,14 +23001,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lc_r=yes + ol_cv_pthread_lpthreads_lmach_lexc=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lc_r=no +ol_cv_pthread_lpthreads_lmach_lexc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -22942,28 +23017,27 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5 -echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6 - if test $ol_cv_pthread_lc_r = yes ; then - ol_link_pthreads="-lc_r" + if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then + ol_link_pthreads="-lpthreads -lmach -lexc" ol_link_threads=posix fi fi - - # Pthread try link: -threads (ol_cv_pthread_threads) + # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc) if test "$ol_link_threads" = no ; then - # try -threads - echo "$as_me:$LINENO: checking for pthread link with -threads" >&5 -echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6 -if test "${ol_cv_pthread_threads+set}" = set; then + # try -lpthreads -lexc + echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5 +echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6 +if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-threads $LIBS" + LIBS="-lpthreads -lexc $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -23064,12 +23138,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_threads=yes + ol_cv_pthread_lpthreads_lexc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_threads=no +ol_cv_pthread_lpthreads_lexc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -23162,14 +23236,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_threads=yes + ol_cv_pthread_lpthreads_lexc=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_threads=no +ol_cv_pthread_lpthreads_lexc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -23178,28 +23252,28 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5 -echo "${ECHO_T}$ol_cv_pthread_threads" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5 +echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6 - if test $ol_cv_pthread_threads = yes ; then - ol_link_pthreads="-threads" + if test $ol_cv_pthread_lpthreads_lexc = yes ; then + ol_link_pthreads="-lpthreads -lexc" ol_link_threads=posix fi fi - # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) + # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads) if test "$ol_link_threads" = no ; then - # try -lpthreads -lmach -lexc -lc_r - echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 -echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then + # try -lpthreads + echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5 +echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6 +if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # save the flags ol_LIBS="$LIBS" - LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" + LIBS="-lpthreads $LIBS" if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF @@ -23300,12 +23374,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes + ol_cv_pthread_lib_lpthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no +ol_cv_pthread_lib_lpthreads=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -23398,14 +23472,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes + ol_cv_pthread_lib_lpthreads=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no +ol_cv_pthread_lib_lpthreads=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -23414,101 +23488,81 @@ fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6 +echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5 +echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6 - if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then - ol_link_pthreads="-lpthreads -lmach -lexc -lc_r" + if test $ol_cv_pthread_lib_lpthreads = yes ; then + ol_link_pthreads="-lpthreads" ol_link_threads=posix fi fi - # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc) -if test "$ol_link_threads" = no ; then - # try -lpthreads -lmach -lexc - echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5 -echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads -lmach -lexc $LIBS" + if test $ol_link_threads != no ; then + LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" - if test "$cross_compiling" = yes; then + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + + + + +for ac_func in sched_yield pthread_yield thr_yield +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -/* pthread test headers */ -#include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - -int -main () -{ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 +#ifdef __STDC__ +# include +#else +# include #endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; +#undef $ac_func -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ #endif - if( status ) return status; +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; +char (*f) () = $ac_func; #endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); +#ifdef __cplusplus +} #endif - return 0; - +int +main () +{ +return f != $ac_func; ; return 0; } @@ -23535,215 +23589,170 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lmach_lexc=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthreads_lmach_lexc=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + if test $ac_cv_func_sched_yield = no && + test $ac_cv_func_pthread_yield = no && + test $ac_cv_func_thr_yield = no ; then + echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5 +echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6 +if test "${ac_cv_lib_rt_sched_yield+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* pthread test headers */ -#include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" #endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - - -int main(argc, argv) - int argc; - char **argv; +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sched_yield (); +int +main () { - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#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 errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - +sched_yield (); + ; + return 0; } - _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lmach_lexc=yes + ac_cv_lib_rt_sched_yield=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ol_cv_pthread_lpthreads_lmach_lexc=no +ac_cv_lib_rt_sched_yield=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5 +echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6 +if test $ac_cv_lib_rt_sched_yield = yes; then + LTHREAD_LIBS="$LTHREAD_LIBS -lrt" - # restore the LIBS - LIBS="$ol_LIBS" +cat >>confdefs.h <<\_ACEOF +#define HAVE_SCHED_YIELD 1 +_ACEOF + ac_cv_func_sched_yield=yes +else + ac_cv_func_sched_yield=no fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6 - if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then - ol_link_pthreads="-lpthreads -lmach -lexc" - ol_link_threads=posix - fi -fi + fi + if test $ac_cv_func_sched_yield = no && + test $ac_cv_func_pthread_yield = no && + test "$ac_cv_func_thr_yield" = no ; then + { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5 +echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;} + fi - # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc) -if test "$ol_link_threads" = no ; then - # try -lpthreads -lexc - echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5 -echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6 -if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then + +for ac_func in pthread_kill +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads -lexc $LIBS" - - if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -/* pthread test headers */ -#include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - -int -main () -{ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 +#ifdef __STDC__ +# include +#else +# include #endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; +#undef $ac_func -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ #endif - if( status ) return status; +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; +char (*f) () = $ac_func; #endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); +#ifdef __cplusplus +} #endif - return 0; - +int +main () +{ +return f != $ac_func; ; return 0; } @@ -23770,216 +23779,116 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lexc=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lpthreads_lexc=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + echo "$as_me:$LINENO: checking for pthread_rwlock_destroy with " >&5 +echo $ECHO_N "checking for pthread_rwlock_destroy with ... $ECHO_C" >&6 +if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* pthread test headers */ #include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - +pthread_rwlock_t rwlock; -int main(argc, argv) - int argc; - char **argv; +int +main () { - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#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 errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - +pthread_rwlock_destroy(&rwlock); + ; + return 0; } - _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lpthreads_lexc=yes + ol_cv_func_pthread_rwlock_destroy=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ol_cv_pthread_lpthreads_lexc=no +ol_cv_func_pthread_rwlock_destroy=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +echo "$as_me:$LINENO: result: $ol_cv_func_pthread_rwlock_destroy" >&5 +echo "${ECHO_T}$ol_cv_func_pthread_rwlock_destroy" >&6 + if test $ol_cv_func_pthread_rwlock_destroy = yes ; then - # restore the LIBS - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5 -echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6 - - if test $ol_cv_pthread_lpthreads_lexc = yes ; then - ol_link_pthreads="-lpthreads -lexc" - ol_link_threads=posix - fi -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_RWLOCK_DESTROY 1 +_ACEOF + fi - # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads) -if test "$ol_link_threads" = no ; then - # try -lpthreads - echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5 -echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6 -if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then + echo "$as_me:$LINENO: checking for pthread_detach with " >&5 +echo $ECHO_N "checking for pthread_detach with ... $ECHO_C" >&6 +if test "${ol_cv_func_pthread_detach+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads $LIBS" - - if test "$cross_compiling" = yes; then - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* pthread test headers */ #include -#if HAVE_PTHREADS < 7 -#include -#endif #ifndef NULL #define NULL (void*)0 #endif -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - int main () { - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#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 errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - +pthread_detach(NULL); ; return 0; } @@ -24006,141 +23915,42 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_pthread_lib_lpthreads=yes + ol_cv_func_pthread_detach=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_pthread_lib_lpthreads=no +ol_cv_func_pthread_detach=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* pthread test headers */ -#include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - - -int main(argc, argv) - int argc; - char **argv; -{ - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#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 errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_pthread_lib_lpthreads=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ol_cv_pthread_lib_lpthreads=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5 +echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6 - # restore the LIBS - LIBS="$ol_LIBS" + if test $ol_cv_func_pthread_detach = no ; then + { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5 +echo "$as_me: error: could not locate pthread_detach()" >&2;} + { (exit 1); exit 1; }; } + fi -fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5 -echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6 - if test $ol_cv_pthread_lib_lpthreads = yes ; then - ol_link_pthreads="-lpthreads" - ol_link_threads=posix - fi -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_DETACH 1 +_ACEOF - if test $ol_link_threads != no ; then - LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" +for ac_func in \ + pthread_setconcurrency \ + pthread_getconcurrency \ + thr_setconcurrency \ + thr_getconcurrency \ -for ac_func in sched_yield pthread_yield thr_yield do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -24242,96 +24052,9 @@ fi done - if test $ac_cv_func_sched_yield = no && - test $ac_cv_func_pthread_yield = no && - test $ac_cv_func_thr_yield = no ; then - echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5 -echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6 -if test "${ac_cv_lib_rt_sched_yield+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sched_yield (); -int -main () -{ -sched_yield (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_rt_sched_yield=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_rt_sched_yield=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5 -echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6 -if test $ac_cv_lib_rt_sched_yield = yes; then - LTHREAD_LIBS="$LTHREAD_LIBS -lrt" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SCHED_YIELD 1 -_ACEOF - - ac_cv_func_sched_yield=yes -else - ac_cv_func_sched_yield=no -fi - - fi - if test $ac_cv_func_sched_yield = no && - test $ac_cv_func_pthread_yield = no && - test "$ac_cv_func_thr_yield" = no ; then - { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5 -echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;} - fi - -for ac_func in pthread_kill pthread_rwlock_destroy +for ac_func in pthread_kill_other_threads_np do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -24432,487 +24155,198 @@ _ACEOF fi done + echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5 +echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6 +if test "${ol_cv_sys_linux_threads+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np +fi +echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5 +echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6 - echo "$as_me:$LINENO: checking for pthread_detach with " >&5 -echo $ECHO_N "checking for pthread_detach with ... $ECHO_C" >&6 -if test "${ol_cv_func_pthread_detach+set}" = set; then + + + + echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5 +echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6 +if test "${ol_cv_linux_threads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test $ol_cv_header_linux_threads = yes && + test $ol_cv_sys_linux_threads = yes; then + ol_cv_linux_threads=yes + elif test $ol_cv_header_linux_threads = no && + test $ol_cv_sys_linux_threads = no; then + ol_cv_linux_threads=no + else + ol_cv_linux_threads=error + fi + +fi +echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5 +echo "${ECHO_T}$ol_cv_linux_threads" >&6 + + + if test $ol_cv_linux_threads = error; then + { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5 +echo "$as_me: error: LinuxThreads header/library mismatch" >&2;} + { (exit 1); exit 1; }; }; + fi + + echo "$as_me:$LINENO: checking if pthread_create() works" >&5 +echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6 +if test "${ol_cv_pthread_create_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + ol_cv_pthread_create_works=yes +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* pthread test headers */ #include +#if HAVE_PTHREADS < 7 +#include +#endif #ifndef NULL #define NULL (void*)0 #endif -int -main () +static void *task(p) + void *p; { -pthread_detach(NULL); - ; - return 0; + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#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 errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_func_pthread_detach=yes + ol_cv_pthread_create_works=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_func_pthread_detach=no +( exit $ac_status ) +ol_cv_pthread_create_works=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5 -echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6 +fi +echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5 +echo "${ECHO_T}$ol_cv_pthread_create_works" >&6 - if test $ol_cv_func_pthread_detach = no ; then - { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5 -echo "$as_me: error: could not locate pthread_detach()" >&2;} + if test $ol_cv_pthread_create_works = no ; then + { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5 +echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;} { (exit 1); exit 1; }; } fi + ol_replace_broken_yield=no + + if test $ol_replace_broken_yield = yes ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_DETACH 1 +#define REPLACE_BROKEN_YIELD 1 _ACEOF + fi - - - - -for ac_func in \ - pthread_setconcurrency \ - pthread_getconcurrency \ - thr_setconcurrency \ - thr_getconcurrency \ - -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + if test $ol_with_yielding_select = auto ; then + echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5 +echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6 +if test "${ol_cv_pthread_select_yields+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + + if test "$cross_compiling" = yes; then + ol_cv_pthread_select_yields=cross +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - -for ac_func in pthread_kill_other_threads_np -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5 -echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6 -if test "${ol_cv_sys_linux_threads+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np -fi -echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5 -echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6 - - - - - echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5 -echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6 -if test "${ol_cv_linux_threads+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test $ol_cv_header_linux_threads = yes && - test $ol_cv_sys_linux_threads = yes; then - ol_cv_linux_threads=yes - elif test $ol_cv_header_linux_threads = no && - test $ol_cv_sys_linux_threads = no; then - ol_cv_linux_threads=no - else - ol_cv_linux_threads=error - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5 -echo "${ECHO_T}$ol_cv_linux_threads" >&6 - - - if test $ol_cv_linux_threads = error; then - { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5 -echo "$as_me: error: LinuxThreads header/library mismatch" >&2;} - { (exit 1); exit 1; }; }; - fi - - echo "$as_me:$LINENO: checking if pthread_create() works" >&5 -echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6 -if test "${ol_cv_pthread_create_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - ol_cv_pthread_create_works=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* pthread test headers */ -#include -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - - -int main(argc, argv) - int argc; - char **argv; -{ - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#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 errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_pthread_create_works=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ol_cv_pthread_create_works=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5 -echo "${ECHO_T}$ol_cv_pthread_create_works" >&6 - - if test $ol_cv_pthread_create_works = no ; then - { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5 -echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;} - { (exit 1); exit 1; }; } - fi - - ol_replace_broken_yield=no - - if test $ol_replace_broken_yield = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define REPLACE_BROKEN_YIELD 1 -_ACEOF - - fi - - if test $ol_with_yielding_select = auto ; then - echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5 -echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6 -if test "${ol_cv_pthread_select_yields+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - ol_cv_pthread_select_yields=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include -#ifndef NULL -#define NULL (void*) 0 -#endif +#include +#include +#include +#include +#ifndef NULL +#define NULL (void*) 0 +#endif static int fildes[2]; @@ -24969,7 +24403,7 @@ int main(argc, argv) #endif /* make sure task runs first */ -#if HAVE_THR_YIELD +#ifdef HAVE_THR_YIELD thr_yield(); #elif defined( HAVE_SCHED_YIELD ) sched_yield(); @@ -25192,3447 +24626,56 @@ done echo "$as_me:$LINENO: checking for cthread_fork" >&5 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6 -if test "${ac_cv_func_cthread_fork+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define cthread_fork to an innocuous variant, in case declares cthread_fork. - For example, HP-UX 11i declares gettimeofday. */ -#define cthread_fork innocuous_cthread_fork - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char cthread_fork (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef cthread_fork - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char cthread_fork (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) -choke me -#else -char (*f) () = cthread_fork; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != cthread_fork; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_cthread_fork=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_cthread_fork=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5 -echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6 -if test $ac_cv_func_cthread_fork = yes; then - ol_link_threads=yes -fi - - - if test $ol_link_threads = no ; then - echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5 -echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6 -if test "${ol_cv_cthread_all_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - save_LIBS="$LIBS" - LIBS="-all_load $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - - cthread_fork((void *)0, (void *)0); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_cthread_all_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_cthread_all_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5 -echo "${ECHO_T}$ol_cv_cthread_all_load" >&6 - - if test $ol_cv_cthread_all_load = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -all_load" - ol_link_threads=mach - ol_with_threads=found - fi - fi - - elif test $ac_cv_header_cthreads_h = yes ; then - - ol_with_threads=found - - save_LIBS="$LIBS" - LIBS="$LIBS -lthreads" - echo "$as_me:$LINENO: checking for cthread_fork" >&5 -echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6 -if test "${ac_cv_func_cthread_fork+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define cthread_fork to an innocuous variant, in case declares cthread_fork. - For example, HP-UX 11i declares gettimeofday. */ -#define cthread_fork innocuous_cthread_fork - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char cthread_fork (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef cthread_fork - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char cthread_fork (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) -choke me -#else -char (*f) () = cthread_fork; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != cthread_fork; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_cthread_fork=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_cthread_fork=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5 -echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6 -if test $ac_cv_func_cthread_fork = yes; then - ol_link_threads=yes -fi - - LIBS="$save_LIBS" - - if test $ol_link_threads = yes ; then - LTHREAD_LIBS="-lthreads" - ol_link_threads=mach - ol_with_threads=found - else - { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5 -echo "$as_me: error: could not link with Mach CThreads" >&2;} - { (exit 1); exit 1; }; } - fi - - elif test $ol_with_threads = mach ; then - { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5 -echo "$as_me: error: could not locate Mach CThreads" >&2;} - { (exit 1); exit 1; }; } - fi - - if test $ol_link_threads = mach ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MACH_CTHREADS 1 -_ACEOF - - elif test $ol_with_threads = found ; then - { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5 -echo "$as_me: error: could not link with Mach CThreads" >&2;} - { (exit 1); exit 1; }; } - fi - ;; -esac - -case $ol_with_threads in auto | yes | pth) - - -for ac_header in pth.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - if test $ac_cv_header_pth_h = yes ; then - echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5 -echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6 -if test "${ac_cv_lib_pth_pth_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpth $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pth_version (); -int -main () -{ -pth_version (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_pth_pth_version=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_pth_pth_version=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5 -echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6 -if test $ac_cv_lib_pth_pth_version = yes; then - have_pth=yes -else - have_pth=no -fi - - - if test $have_pth = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GNU_PTH 1 -_ACEOF - - LTHREAD_LIBS="$LTHREAD_LIBS -lpth" - ol_link_threads=pth - ol_with_threads=found - - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - fi - fi - ;; -esac - -case $ol_with_threads in auto | yes | lwp) - - - -for ac_header in thread.h synch.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_thread_h = yes && - test $ac_cv_header_synch_h = yes ; then - echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 -echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 -if test "${ac_cv_lib_thread_thr_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char thr_create (); -int -main () -{ -thr_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_thread_thr_create=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_thread_thr_create=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 -echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6 -if test $ac_cv_lib_thread_thr_create = yes; then - have_thr=yes -else - have_thr=no -fi - - - if test $have_thr = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_THR 1 -_ACEOF - - LTHREAD_LIBS="$LTHREAD_LIBS -lthread" - ol_link_threads=thr - - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - - - -for ac_func in \ - thr_setconcurrency \ - thr_getconcurrency \ - -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - fi - fi - - -for ac_header in lwp/lwp.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_lwp_lwp_h = yes ; then - echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5 -echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6 -if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llwp $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char lwp_create (); -int -main () -{ -lwp_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_lwp_lwp_create=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_lwp_lwp_create=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5 -echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6 -if test $ac_cv_lib_lwp_lwp_create = yes; then - have_lwp=yes -else - have_lwp=no -fi - - - if test $have_lwp = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LWP 1 -_ACEOF - - LTHREAD_LIBS="$LTHREAD_LIBS -llwp" - ol_link_threads=lwp - - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=no - fi - fi - fi - ;; -esac - -if test $ol_with_yielding_select = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_YIELDING_SELECT 1 -_ACEOF - -fi - -if test $ol_with_threads = manual ; then - ol_link_threads=yes - - { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5 -echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;} - - - -for ac_header in pthread.h sched.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_func in sched_yield pthread_yield -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5 -echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6 -if test "${ol_cv_header_linux_threads+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then - ol_cv_header_linux_threads=yes -else - ol_cv_header_linux_threads=no -fi -rm -f conftest* - - -fi -echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5 -echo "${ECHO_T}$ol_cv_header_linux_threads" >&6 - if test $ol_cv_header_linux_threads = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LINUX_THREADS 1 -_ACEOF - - fi - - - -for ac_header in mach/cthreads.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in lwp/lwp.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in thread.h synch.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -fi - -if test $ol_link_threads != no && test $ol_link_threads != nt ; then - cat >>confdefs.h <<\_ACEOF -#define REENTRANT 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define THREAD_SAFE 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define _THREAD_SAFE 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define THREADSAFE 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define _THREADSAFE 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define _SGI_MP_SOURCE 1 -_ACEOF - - - echo "$as_me:$LINENO: checking for thread specific errno" >&5 -echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6 -if test "${ol_cv_errno_thread_specific+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -errno = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_errno_thread_specific=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_errno_thread_specific=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5 -echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6 - - echo "$as_me:$LINENO: checking for thread specific h_errno" >&5 -echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6 -if test "${ol_cv_h_errno_thread_specific+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -h_errno = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_h_errno_thread_specific=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_h_errno_thread_specific=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5 -echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6 - - if test $ol_cv_errno_thread_specific != yes || - test $ol_cv_h_errno_thread_specific != yes ; then - LIBS="$LTHREAD_LIBS $LIBS" - LTHREAD_LIBS="" - fi - -fi - -if test $ol_link_threads = no ; then - if test $ol_with_threads = yes ; then - { { echo "$as_me:$LINENO: error: no suitable thread support" >&5 -echo "$as_me: error: no suitable thread support" >&2;} - { (exit 1); exit 1; }; } - fi - - if test $ol_with_threads = auto ; then - { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5 -echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;} - ol_with_threads=no - fi - - -cat >>confdefs.h <<\_ACEOF -#define NO_THREADS 1 -_ACEOF - - LTHREAD_LIBS="" - BUILD_THREAD=no -else - BUILD_THREAD=yes -fi - -if test $ol_link_threads != no ; then - -cat >>confdefs.h <<\_ACEOF -#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 -_ACEOF - -fi - - - - -for ac_func in \ - ctime_r \ - gethostbyname_r gethostbyaddr_r \ - -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$ac_cv_func_ctime_r" = no ; then - ol_cv_func_ctime_r_nargs=0 -else - echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5 -echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6 -if test "${ol_cv_func_ctime_r_nargs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -time_t ti; char *buffer; ctime_r(&ti,buffer,32); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_ctime_r_nargs3=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_ctime_r_nargs3=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -time_t ti; char *buffer; ctime_r(&ti,buffer); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_ctime_r_nargs2=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_ctime_r_nargs2=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ol_cv_func_ctime_r_nargs3 = yes && - test $ol_cv_func_ctime_r_nargs2 = no ; then - - ol_cv_func_ctime_r_nargs=3 - - elif test $ol_cv_func_ctime_r_nargs3 = no && - test $ol_cv_func_ctime_r_nargs2 = yes ; then - - ol_cv_func_ctime_r_nargs=2 - - else - ol_cv_func_ctime_r_nargs=0 - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5 -echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6 - - if test $ol_cv_func_ctime_r_nargs -gt 1 ; then - -cat >>confdefs.h <<_ACEOF -#define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs -_ACEOF - - fi - -fi - -if test "$ac_cv_func_gethostbyname_r" = yes ; then - echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5 -echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6 -if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) -int -main () -{ -struct hostent hent; char buffer[BUFSIZE]; - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyname_r("segovia.cs.purdue.edu", &hent, - buffer, bufsize, &h_errno); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_gethostbyname_r_nargs5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_gethostbyname_r_nargs5=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) -int -main () -{ -struct hostent hent;struct hostent *rhent; - char buffer[BUFSIZE]; - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyname_r("localhost", &hent, buffer, bufsize, - &rhent, &h_errno); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_gethostbyname_r_nargs6=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_gethostbyname_r_nargs6=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ol_cv_func_gethostbyname_r_nargs5 = yes && - test $ol_cv_func_gethostbyname_r_nargs6 = no ; then - - ol_cv_func_gethostbyname_r_nargs=5 - - elif test $ol_cv_func_gethostbyname_r_nargs5 = no && - test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then - - ol_cv_func_gethostbyname_r_nargs=6 - - else - ol_cv_func_gethostbyname_r_nargs=0 - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5 -echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6 - if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then - -cat >>confdefs.h <<_ACEOF -#define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs -_ACEOF - - fi - -else - ol_cv_func_gethostbyname_r_nargs=0 -fi - -if test "$ac_cv_func_gethostbyaddr_r" = yes ; then - echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5 -echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6 -if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) -int -main () -{ -struct hostent hent; char buffer[BUFSIZE]; - struct in_addr add; - size_t alen=sizeof(struct in_addr); - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyaddr_r( (void *)&(add.s_addr), - alen, AF_INET, &hent, buffer, bufsize, &h_errno); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_gethostbyaddr_r_nargs7=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_gethostbyaddr_r_nargs7=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) -int -main () -{ -struct hostent hent; - struct hostent *rhent; char buffer[BUFSIZE]; - struct in_addr add; - size_t alen=sizeof(struct in_addr); - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyaddr_r( (void *)&(add.s_addr), - alen, AF_INET, &hent, buffer, bufsize, - &rhent, &h_errno); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_func_gethostbyaddr_r_nargs8=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_func_gethostbyaddr_r_nargs8=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes && - test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then - - ol_cv_func_gethostbyaddr_r_nargs=7 - - elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no && - test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then - - ol_cv_func_gethostbyaddr_r_nargs=8 - - else - ol_cv_func_gethostbyaddr_r_nargs=0 - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5 -echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6 - if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then - -cat >>confdefs.h <<_ACEOF -#define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs -_ACEOF - - fi - -else - ol_cv_func_gethostbyaddr_r_nargs=0 -fi - -ol_link_ldbm=no - -case $ol_enable_ldbm_api in auto | berkeley | bcompat) - - if test $ol_enable_ldbm_api = bcompat; then \ - - -for ac_header in db_185.h db.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then - echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5 -echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6 -if test "${ol_cv_header_db1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if HAVE_DB_185_H -# include -#else -# include -#endif - - /* this check could be improved */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#if DB_VERSION_MAJOR == 1 - __db_version_1 -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version_1" >/dev/null 2>&1; then - ol_cv_header_db1=yes -else - ol_cv_header_db1=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5 -echo "${ECHO_T}$ol_cv_header_db1" >&6 - - if test $ol_cv_header_db1 = yes ; then - ol_cv_lib_db=no - -echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5 -echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6 -if test "${ol_cv_bdb_major+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_cv_bdb_major=0 - if test $ol_cv_bdb_major = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#if DB_VERSION_MAJOR == 4 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_major=4 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_major = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#if DB_VERSION_MAJOR == 3 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_major=3 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_major = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#if DB_VERSION_MAJOR == 2 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_major=2 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_major = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#if DB_VERSION_MAJOR == 1 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_major=1 -else - : -fi -rm -f conftest* - - fi - - if test $ol_cv_bdb_major = 0 ; then - { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5 -echo "$as_me: error: Unknown Berkeley DB major version" >&2;} - { (exit 1); exit 1; }; } - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5 -echo "${ECHO_T}$ol_cv_bdb_major" >&6 - -echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5 -echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6 -if test "${ol_cv_bdb_minor+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_cv_bdb_minor=0 - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 9 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=9 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 8 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=8 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 7 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=7 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 6 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=6 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 5 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=5 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 4 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=4 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 3 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=3 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 2 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=2 -else - : -fi -rm -f conftest* - - fi - if test $ol_cv_bdb_minor = 0 ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif -#if DB_VERSION_MINOR == 1 -__db_version -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version" >/dev/null 2>&1; then - ol_cv_bdb_minor=1 -else - : -fi -rm -f conftest* - - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5 -echo "${ECHO_T}$ol_cv_bdb_minor" >&6 - -if test $ol_cv_bdb_major = 4 ; then - if test $ol_cv_bdb_minor = 4 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6 -if test "${ol_cv_db_db44+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb44 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db44=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db44=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5 -echo "${ECHO_T}$ol_cv_db_db44" >&6 - - if test $ol_cv_db_db44 = yes ; then - ol_cv_lib_db=-ldb44 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6 -if test "${ol_cv_db_db_44+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-44 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_44=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_44=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5 -echo "${ECHO_T}$ol_cv_db_db_44" >&6 - - if test $ol_cv_db_db_44 = yes ; then - ol_cv_lib_db=-ldb-44 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4.4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF +if test "${ac_cv_func_cthread_fork+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define cthread_fork to an innocuous variant, in case declares cthread_fork. + For example, HP-UX 11i declares gettimeofday. */ +#define cthread_fork innocuous_cthread_fork -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char cthread_fork (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef NULL -#define NULL ((void*)0) -#endif +#undef cthread_fork -int -main () +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } #endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char cthread_fork (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) +choke me #else - (void) dbopen( NULL, 0, 0, 0, NULL); +char (*f) () = cthread_fork; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != cthread_fork; ; return 0; } @@ -28659,88 +24702,44 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_4=yes + ac_cv_func_cthread_fork=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_4=no +ac_cv_func_cthread_fork=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6 - - if test $ol_cv_db_db_4_dot_4 = yes ; then - ol_cv_lib_db=-ldb-4.4 - fi +echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5 +echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6 +if test $ac_cv_func_cthread_fork = yes; then + ol_link_threads=yes fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_4+set}" = set; then + + if test $ol_link_threads = no ; then + echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5 +echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6 +if test "${ol_cv_cthread_all_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4-4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + save_LIBS="$LIBS" + LIBS="-all_load $LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include int main () { -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif + cthread_fork((void *)0, (void *)0); ; return 0; @@ -28768,90 +24767,86 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_4=yes + ol_cv_cthread_all_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_4=no +ol_cv_cthread_all_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" + LIBS="$save_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_4" >&6 +echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5 +echo "${ECHO_T}$ol_cv_cthread_all_load" >&6 - if test $ol_cv_db_db_4_4 = yes ; then - ol_cv_lib_db=-ldb-4-4 - fi -fi + if test $ol_cv_cthread_all_load = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -all_load" + ol_link_threads=mach + ol_with_threads=found + fi + fi - elif test $ol_cv_bdb_minor = 3 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6 -if test "${ol_cv_db_db43+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + elif test $ac_cv_header_cthreads_h = yes ; then - ol_DB_LIB=-ldb43 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + ol_with_threads=found - cat >conftest.$ac_ext <<_ACEOF + save_LIBS="$LIBS" + LIBS="$LIBS -lthreads" + echo "$as_me:$LINENO: checking for cthread_fork" >&5 +echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6 +if test "${ac_cv_func_cthread_fork+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define cthread_fork to an innocuous variant, in case declares cthread_fork. + For example, HP-UX 11i declares gettimeofday. */ +#define cthread_fork innocuous_cthread_fork -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char cthread_fork (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef NULL -#define NULL ((void*)0) -#endif +#undef cthread_fork -int -main () +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } #endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char cthread_fork (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) +choke me #else - (void) dbopen( NULL, 0, 0, 0, NULL); +char (*f) () = cthread_fork; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != cthread_fork; ; return 0; } @@ -28878,96 +24873,84 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db43=yes + ac_cv_func_cthread_fork=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db43=no +ac_cv_func_cthread_fork=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5 +echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6 +if test $ac_cv_func_cthread_fork = yes; then + ol_link_threads=yes +fi - LIBS="$ol_LIBS" + LIBS="$save_LIBS" -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5 -echo "${ECHO_T}$ol_cv_db_db43" >&6 + if test $ol_link_threads = yes ; then + LTHREAD_LIBS="-lthreads" + ol_link_threads=mach + ol_with_threads=found + else + { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5 +echo "$as_me: error: could not link with Mach CThreads" >&2;} + { (exit 1); exit 1; }; } + fi - if test $ol_cv_db_db43 = yes ; then - ol_cv_lib_db=-ldb43 + elif test $ol_with_threads = mach ; then + { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5 +echo "$as_me: error: could not locate Mach CThreads" >&2;} + { (exit 1); exit 1; }; } fi -fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6 -if test "${ol_cv_db_db_43+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test $ol_link_threads = mach ; then - ol_DB_LIB=-ldb-43 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +cat >>confdefs.h <<\_ACEOF +#define HAVE_MACH_CTHREADS 1 +_ACEOF - cat >conftest.$ac_ext <<_ACEOF + elif test $ol_with_threads = found ; then + { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5 +echo "$as_me: error: could not link with Mach CThreads" >&2;} + { (exit 1); exit 1; }; } + fi + ;; +esac + +case $ol_with_threads in auto | yes | pth) + + +for ac_header in pth.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -28981,95 +24964,142 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_43=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_43=no +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5 -echo "${ECHO_T}$ol_cv_db_db_43" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test $ol_cv_db_db_43 = yes ; then - ol_cv_lib_db=-ldb-43 - fi + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_3+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - ol_DB_LIB=-ldb-4.3 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +fi -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif +done + + + if test $ac_cv_header_pth_h = yes ; then + echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5 +echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6 +if test "${ac_cv_lib_pth_pth_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpth $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifndef NULL -#define NULL ((void*)0) +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" #endif - +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pth_version (); int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +pth_version (); ; return 0; } @@ -29096,96 +25126,75 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_3=yes + ac_cv_lib_pth_pth_version=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_3=no +ac_cv_lib_pth_pth_version=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6 - - if test $ol_cv_db_db_4_dot_3 = yes ; then - ol_cv_lib_db=-ldb-4.3 - fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5 +echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6 +if test $ac_cv_lib_pth_pth_version = yes; then + have_pth=yes +else + have_pth=no fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_3+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_DB_LIB=-ldb-4-3 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + if test $have_pth = yes ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define HAVE_GNU_PTH 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ + LTHREAD_LIBS="$LTHREAD_LIBS -lpth" + ol_link_threads=pth + ol_with_threads=found -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes + fi + fi + fi + ;; +esac - version = db_version( &major, &minor, &patch ); +case $ol_with_threads in auto | yes | lwp) - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - ; - return 0; -} +for ac_header in thread.h synch.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -29199,96 +25208,142 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_3=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_3=no +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_3" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test $ol_cv_db_db_4_3 = yes ; then - ol_cv_lib_db=-ldb-4-3 - fi + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - elif test $ol_cv_bdb_minor = 2 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6 -if test "${ol_cv_db_db42+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - ol_DB_LIB=-ldb42 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + if test $ac_cv_header_thread_h = yes && + test $ac_cv_header_synch_h = yes ; then + echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 +echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 +if test "${ac_cv_lib_thread_thr_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" #endif - +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char thr_create (); int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +thr_create (); ; return 0; } @@ -29315,89 +25370,99 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db42=yes + ac_cv_lib_thread_thr_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db42=no +ac_cv_lib_thread_thr_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 +echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6 +if test $ac_cv_lib_thread_thr_create = yes; then + have_thr=yes +else + have_thr=no +fi - LIBS="$ol_LIBS" -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5 -echo "${ECHO_T}$ol_cv_db_db42" >&6 + if test $have_thr = yes ; then - if test $ol_cv_db_db42 = yes ; then - ol_cv_lib_db=-ldb42 - fi -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_THR 1 +_ACEOF - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6 -if test "${ol_cv_db_db_42+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + LTHREAD_LIBS="$LTHREAD_LIBS -lthread" + ol_link_threads=thr - ol_DB_LIB=-ldb-42 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes + fi - cat >conftest.$ac_ext <<_ACEOF + + +for ac_func in \ + thr_setconcurrency \ + thr_getconcurrency \ + +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef NULL -#define NULL ((void*)0) -#endif +#undef $ac_func -int -main () +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } #endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - (void) dbopen( NULL, 0, 0, 0, NULL); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } @@ -29424,96 +25489,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_42=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_42=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5 -echo "${ECHO_T}$ol_cv_db_db_42" >&6 - - if test $ol_cv_db_db_42 = yes ; then - ol_cv_lib_db=-ldb-42 - fi fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4.2 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); +fi +done - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif + fi + fi -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - ; - return 0; -} +for ac_header in lwp/lwp.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -29527,95 +25553,141 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_2=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_2=no +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test $ol_cv_db_db_4_dot_2 = yes ; then - ol_cv_lib_db=-ldb-4.2 - fi + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_2+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - ol_DB_LIB=-ldb-4-2 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + if test $ac_cv_header_lwp_lwp_h = yes ; then + echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5 +echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6 +if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-llwp $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" #endif - +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char lwp_create (); int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +lwp_create (); ; return 0; } @@ -29642,97 +25714,86 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_2=yes + ac_cv_lib_lwp_lwp_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_2=no +ac_cv_lib_lwp_lwp_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_2" >&6 - - if test $ol_cv_db_db_4_2 = yes ; then - ol_cv_lib_db=-ldb-4-2 - fi +echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5 +echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6 +if test $ac_cv_lib_lwp_lwp_create = yes; then + have_lwp=yes +else + have_lwp=no fi - elif test $ol_cv_bdb_minor = 1 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6 -if test "${ol_cv_db_db41+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_DB_LIB=-ldb41 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + if test $have_lwp = yes ; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define HAVE_LWP 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + ol_link_threads=lwp -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=no + fi + fi + fi + ;; +esac -#ifndef NULL -#define NULL ((void*)0) -#endif +if test $ol_with_yielding_select = yes ; then -int -main () -{ +cat >>confdefs.h <<\_ACEOF +#define HAVE_YIELDING_SELECT 1 +_ACEOF -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; +fi - version = db_version( &major, &minor, &patch ); +if test $ol_with_threads = manual ; then + ol_link_threads=yes - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif + { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5 +echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;} -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - ; - return 0; -} + +for ac_header in pthread.h sched.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -29746,95 +25807,172 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db41=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db41=no +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5 -echo "${ECHO_T}$ol_cv_db_db41" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test $ol_cv_db_db41 = yes ; then - ol_cv_lib_db=-ldb41 - fi + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6 -if test "${ol_cv_db_db_41+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - ol_DB_LIB=-ldb-41 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + + +for ac_func in sched_yield pthread_yield +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef NULL -#define NULL ((void*)0) -#endif +#undef $ac_func -int -main () +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } #endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - (void) dbopen( NULL, 0, 0, 0, NULL); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } @@ -29861,96 +25999,89 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_41=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_41=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5 -echo "${ECHO_T}$ol_cv_db_db_41" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - if test $ol_cv_db_db_41 = yes ; then - ol_cv_lib_db=-ldb-41 - fi fi +done - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_1+set}" = set; then + + echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5 +echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6 +if test "${ol_cv_header_linux_threads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - ol_DB_LIB=-ldb-4.1 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then + ol_cv_header_linux_threads=yes +else + ol_cv_header_linux_threads=no +fi +rm -f conftest* -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif -int -main () -{ +fi +echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5 +echo "${ECHO_T}$ol_cv_header_linux_threads" >&6 + if test $ol_cv_header_linux_threads = yes; then -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX_THREADS 1 +_ACEOF - version = db_version( &major, &minor, &patch ); + fi - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - ; - return 0; -} +for ac_header in mach/cthreads.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -29964,102 +26095,294 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_1=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_1=no +ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test $ol_cv_db_db_4_dot_1 = yes ; then - ol_cv_lib_db=-ldb-4.1 - fi + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_1+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - ol_DB_LIB=-ldb-4-1 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + +for ac_header in lwp/lwp.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#ifndef NULL -#define NULL ((void*)0) -#endif + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -int -main () -{ +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - version = db_version( &major, &minor, &patch ); +fi - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif +done -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - ; - return 0; -} + +for ac_header in thread.h synch.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30073,96 +26396,164 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_1=yes + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_1=no + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## --------------------------------------------- ## +## Report this to ## +## --------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ol_LIBS" +done fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_1" >&6 - if test $ol_cv_db_db_4_1 = yes ; then - ol_cv_lib_db=-ldb-4-1 - fi -fi +if test $ol_link_threads != no && test $ol_link_threads != nt ; then + cat >>confdefs.h <<\_ACEOF +#define REENTRANT 1 +_ACEOF - fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4+set}" = set; then + cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define THREAD_SAFE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _THREAD_SAFE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define THREADSAFE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _THREADSAFE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _SGI_MP_SOURCE 1 +_ACEOF + + + echo "$as_me:$LINENO: checking for thread specific errno" >&5 +echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6 +if test "${ol_cv_errno_thread_specific+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +errno = 0; ; return 0; } @@ -30189,89 +26580,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4=yes + ol_cv_errno_thread_specific=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4=no +ol_cv_errno_thread_specific=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4" >&6 - - if test $ol_cv_db_db_4 = yes ; then - ol_cv_lib_db=-ldb-4 - fi fi +echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5 +echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6 -if test "${ol_cv_db_db4+set}" = set; then + echo "$as_me:$LINENO: checking for thread specific h_errno" >&5 +echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6 +if test "${ol_cv_h_errno_thread_specific+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +h_errno = 0; ; return 0; } @@ -30298,200 +26637,121 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db4=yes + ol_cv_h_errno_thread_specific=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db4=no +ol_cv_h_errno_thread_specific=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$ol_LIBS" - fi -echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5 -echo "${ECHO_T}$ol_cv_db_db4" >&6 +echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5 +echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6 - if test $ol_cv_db_db4 = yes ; then - ol_cv_lib_db=-ldb4 + if test $ol_cv_errno_thread_specific != yes || + test $ol_cv_h_errno_thread_specific != yes ; then + LIBS="$LTHREAD_LIBS $LIBS" + LTHREAD_LIBS="" fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6 -if test "${ol_cv_db_db+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif +fi -#ifndef NULL -#define NULL ((void*)0) -#endif +if test $ol_link_threads = no ; then + if test $ol_with_threads = yes ; then + { { echo "$as_me:$LINENO: error: no suitable thread support" >&5 +echo "$as_me: error: no suitable thread support" >&2;} + { (exit 1); exit 1; }; } + fi -int -main () -{ + if test $ol_with_threads = auto ; then + { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5 +echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;} + ol_with_threads=no + fi -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - version = db_version( &major, &minor, &patch ); +cat >>confdefs.h <<\_ACEOF +#define NO_THREADS 1 +_ACEOF - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif + LTHREAD_LIBS="" + BUILD_THREAD=no +else + BUILD_THREAD=yes +fi -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif +if test $ol_link_threads != no ; then - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ol_LIBS" -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5 -echo "${ECHO_T}$ol_cv_db_db" >&6 - if test $ol_cv_db_db = yes ; then - ol_cv_lib_db=-ldb - fi -fi +for ac_func in \ + ctime_r \ + gethostbyname_r gethostbyaddr_r \ -elif test $ol_cv_bdb_major = 3 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6 -if test "${ol_cv_db_db3+set}" = set; then +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - ol_DB_LIB=-ldb3 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef NULL -#define NULL ((void*)0) -#endif +#undef $ac_func -int -main () +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } #endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - (void) dbopen( NULL, 0, 0, 0, NULL); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } @@ -30518,96 +26778,53 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db3=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db3=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - fi -echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5 -echo "${ECHO_T}$ol_cv_db_db3" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - if test $ol_cv_db_db3 = yes ; then - ol_cv_lib_db=-ldb3 - fi fi +done - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_3+set}" = set; then + +if test "$ac_cv_func_ctime_r" = no ; then + ol_cv_func_ctime_r_nargs=0 +else + echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5 +echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6 +if test "${ol_cv_func_ctime_r_nargs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - ol_DB_LIB=-ldb-3 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30621,45 +26838,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_3=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_3=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_3" >&6 - - if test $ol_cv_db_db_3 = yes ; then - ol_cv_lib_db=-ldb-3 - fi -fi - - -elif test $ol_cv_bdb_major = 2 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6 -if test "${ol_cv_db_db2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ol_cv_func_ctime_r_nargs3=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ol_DB_LIB=-ldb2 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +ol_cv_func_ctime_r_nargs3=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -30667,58 +26859,18 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30732,102 +26884,80 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db2=yes + ol_cv_func_ctime_r_nargs2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db2=no +ol_cv_func_ctime_r_nargs2=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS="$ol_LIBS" + if test $ol_cv_func_ctime_r_nargs3 = yes && + test $ol_cv_func_ctime_r_nargs2 = no ; then -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5 -echo "${ECHO_T}$ol_cv_db_db2" >&6 + ol_cv_func_ctime_r_nargs=3 - if test $ol_cv_db_db2 = yes ; then - ol_cv_lib_db=-ldb2 + elif test $ol_cv_func_ctime_r_nargs3 = no && + test $ol_cv_func_ctime_r_nargs2 = yes ; then + + ol_cv_func_ctime_r_nargs=2 + + else + ol_cv_func_ctime_r_nargs=0 fi + fi +echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5 +echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6 - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test $ol_cv_func_ctime_r_nargs -gt 1 ; then - ol_DB_LIB=-ldb-2 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +cat >>confdefs.h <<_ACEOF +#define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs +_ACEOF - cat >conftest.$ac_ext <<_ACEOF + fi + +fi + +if test "$ac_cv_func_gethostbyname_r" = yes ; then + echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5 +echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6 +if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +struct hostent hent; char buffer[BUFSIZE]; + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyname_r("segovia.cs.purdue.edu", &hent, + buffer, bufsize, &h_errno); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30841,45 +26971,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_2=yes + ol_cv_func_gethostbyname_r_nargs5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_2=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_2" >&6 - - if test $ol_cv_db_db_2 = yes ; then - ol_cv_lib_db=-ldb-2 - fi +ol_cv_func_gethostbyname_r_nargs5=no fi - - -elif test $ol_cv_bdb_major = 1 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6 -if test "${ol_cv_db_db1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb1 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -30887,58 +26992,26 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +struct hostent hent;struct hostent *rhent; + char buffer[BUFSIZE]; + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyname_r("localhost", &hent, buffer, bufsize, + &rhent, &h_errno); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30952,102 +27025,83 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db1=yes + ol_cv_func_gethostbyname_r_nargs6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db1=no +ol_cv_func_gethostbyname_r_nargs6=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS="$ol_LIBS" + if test $ol_cv_func_gethostbyname_r_nargs5 = yes && + test $ol_cv_func_gethostbyname_r_nargs6 = no ; then -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5 -echo "${ECHO_T}$ol_cv_db_db1" >&6 + ol_cv_func_gethostbyname_r_nargs=5 - if test $ol_cv_db_db1 = yes ; then - ol_cv_lib_db=-ldb1 + elif test $ol_cv_func_gethostbyname_r_nargs5 = no && + test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then + + ol_cv_func_gethostbyname_r_nargs=6 + + else + ol_cv_func_gethostbyname_r_nargs=0 fi + fi +echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5 +echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6 + if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +cat >>confdefs.h <<_ACEOF +#define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs +_ACEOF - ol_DB_LIB=-ldb-1 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + fi - cat >conftest.$ac_ext <<_ACEOF +else + ol_cv_func_gethostbyname_r_nargs=0 +fi + +if test "$ac_cv_func_gethostbyaddr_r" = yes ; then + echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5 +echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6 +if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +struct hostent hent; char buffer[BUFSIZE]; + struct in_addr add; + size_t alen=sizeof(struct in_addr); + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyaddr_r( (void *)&(add.s_addr), + alen, AF_INET, &hent, buffer, bufsize, &h_errno); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -31061,44 +27115,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_1=yes + ol_cv_func_gethostbyaddr_r_nargs7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_1=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_1" >&6 - - if test $ol_cv_db_db_1 = yes ; then - ol_cv_lib_db=-ldb-1 - fi -fi - +ol_cv_func_gethostbyaddr_r_nargs7=no fi -if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5 -echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6 -if test "${ol_cv_db_none+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB= - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -31106,58 +27136,29 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main () { - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - +struct hostent hent; + struct hostent *rhent; char buffer[BUFSIZE]; + struct in_addr add; + size_t alen=sizeof(struct in_addr); + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyaddr_r( (void *)&(add.s_addr), + alen, AF_INET, &hent, buffer, bufsize, + &rhent, &h_errno); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -31171,42 +27172,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_none=yes + ol_cv_func_gethostbyaddr_r_nargs8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_none=no +ol_cv_func_gethostbyaddr_r_nargs8=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS="$ol_LIBS" + if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes && + test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then -fi -echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5 -echo "${ECHO_T}$ol_cv_db_none" >&6 + ol_cv_func_gethostbyaddr_r_nargs=7 - if test $ol_cv_db_none = yes ; then - ol_cv_lib_db=yes + elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no && + test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then + + ol_cv_func_gethostbyaddr_r_nargs=8 + + else + ol_cv_func_gethostbyaddr_r_nargs=0 fi + fi +echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5 +echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6 + if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then +cat >>confdefs.h <<_ACEOF +#define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs +_ACEOF - if test "$ol_cv_lib_db" != no ; then - ol_cv_berkeley_db=yes - fi - fi + fi + +else + ol_cv_func_gethostbyaddr_r_nargs=0 fi - else - ol_cv_berkeley_db=no +ol_link_bdb=no + +if test $ol_enable_bdb/$ol_enable_hdb != no/no; then + ol_cv_berkeley_db=no for ac_header in db.h do @@ -31729,342 +27742,15 @@ echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5 echo "${ECHO_T}$ol_cv_bdb_minor" >&6 if test $ol_cv_bdb_major = 4 ; then - if test $ol_cv_bdb_minor = 4 ; then + if test $ol_cv_bdb_minor = 6 ; then if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6 -if test "${ol_cv_db_db44+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb44 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db44=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db44=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5 -echo "${ECHO_T}$ol_cv_db_db44" >&6 - - if test $ol_cv_db_db44 = yes ; then - ol_cv_lib_db=-ldb44 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6 -if test "${ol_cv_db_db_44+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-44 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_44=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_44=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5 -echo "${ECHO_T}$ol_cv_db_db_44" >&6 - - if test $ol_cv_db_db_44 = yes ; then - ol_cv_lib_db=-ldb-44 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4.4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_4_dot_4=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6 - - if test $ol_cv_db_db_4_dot_4 = yes ; then - ol_cv_lib_db=-ldb-4.4 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_4+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.6)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4.6)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_dot_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4-4 + ol_DB_LIB=-ldb-4.6 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32145,12 +27831,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_4=yes + ol_cv_db_db_4_dot_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_4=no +ol_cv_db_db_4_dot_6=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32158,23 +27844,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_4" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_6" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_dot_6" >&6 - if test $ol_cv_db_db_4_4 = yes ; then - ol_cv_lib_db=-ldb-4-4 + if test $ol_cv_db_db_4_dot_6 = yes ; then + ol_cv_lib_db=-ldb-4.6 fi fi - elif test $ol_cv_bdb_minor = 3 ; then if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6 -if test "${ol_cv_db_db43+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb46)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb46)... $ECHO_C" >&6 +if test "${ol_cv_db_db46+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb43 + ol_DB_LIB=-ldb46 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32255,12 +27940,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db43=yes + ol_cv_db_db46=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db43=no +ol_cv_db_db46=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32268,22 +27953,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5 -echo "${ECHO_T}$ol_cv_db_db43" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db46" >&5 +echo "${ECHO_T}$ol_cv_db_db46" >&6 - if test $ol_cv_db_db43 = yes ; then - ol_cv_lib_db=-ldb43 + if test $ol_cv_db_db46 = yes ; then + ol_cv_lib_db=-ldb46 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6 -if test "${ol_cv_db_db_43+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-46)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-46)... $ECHO_C" >&6 +if test "${ol_cv_db_db_46+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-43 + ol_DB_LIB=-ldb-46 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32364,12 +28049,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_43=yes + ol_cv_db_db_46=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_43=no +ol_cv_db_db_46=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32377,22 +28062,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5 -echo "${ECHO_T}$ol_cv_db_db_43" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_46" >&5 +echo "${ECHO_T}$ol_cv_db_db_46" >&6 - if test $ol_cv_db_db_43 = yes ; then - ol_cv_lib_db=-ldb-43 + if test $ol_cv_db_db_46 = yes ; then + ol_cv_lib_db=-ldb-46 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_3+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-6)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4-6)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4.3 + ol_DB_LIB=-ldb-4-6 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32473,12 +28158,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_3=yes + ol_cv_db_db_4_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_3=no +ol_cv_db_db_4_6=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32486,22 +28171,23 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_6" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_6" >&6 - if test $ol_cv_db_db_4_dot_3 = yes ; then - ol_cv_lib_db=-ldb-4.3 + if test $ol_cv_db_db_4_6 = yes ; then + ol_cv_lib_db=-ldb-4-6 fi fi + elif test $ol_cv_bdb_minor = 5 ; then if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_3+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.5)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4.5)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_dot_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4-3 + ol_DB_LIB=-ldb-4.5 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32582,12 +28268,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_3=yes + ol_cv_db_db_4_dot_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_3=no +ol_cv_db_db_4_dot_5=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32595,23 +28281,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_3" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_5" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_dot_5" >&6 - if test $ol_cv_db_db_4_3 = yes ; then - ol_cv_lib_db=-ldb-4-3 + if test $ol_cv_db_db_4_dot_5 = yes ; then + ol_cv_lib_db=-ldb-4.5 fi fi - elif test $ol_cv_bdb_minor = 2 ; then if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6 -if test "${ol_cv_db_db42+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb45)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb45)... $ECHO_C" >&6 +if test "${ol_cv_db_db45+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb42 + ol_DB_LIB=-ldb45 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32692,12 +28377,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db42=yes + ol_cv_db_db45=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db42=no +ol_cv_db_db45=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32705,131 +28390,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5 -echo "${ECHO_T}$ol_cv_db_db42" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db45" >&5 +echo "${ECHO_T}$ol_cv_db_db45" >&6 - if test $ol_cv_db_db42 = yes ; then - ol_cv_lib_db=-ldb42 + if test $ol_cv_db_db45 = yes ; then + ol_cv_lib_db=-ldb45 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6 -if test "${ol_cv_db_db_42+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-45)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-45)... $ECHO_C" >&6 +if test "${ol_cv_db_db_45+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-42 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_42=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_42=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5 -echo "${ECHO_T}$ol_cv_db_db_42" >&6 - - if test $ol_cv_db_db_42 = yes ; then - ol_cv_lib_db=-ldb-42 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4.2 + ol_DB_LIB=-ldb-45 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -32910,12 +28486,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_2=yes + ol_cv_db_db_45=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_2=no +ol_cv_db_db_45=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -32923,22 +28499,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_45" >&5 +echo "${ECHO_T}$ol_cv_db_db_45" >&6 - if test $ol_cv_db_db_4_dot_2 = yes ; then - ol_cv_lib_db=-ldb-4.2 + if test $ol_cv_db_db_45 = yes ; then + ol_cv_lib_db=-ldb-45 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_2+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-5)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4-5)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4-2 + ol_DB_LIB=-ldb-4-5 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33019,12 +28595,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_2=yes + ol_cv_db_db_4_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_2=no +ol_cv_db_db_4_5=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33032,23 +28608,23 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_2" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_5" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_5" >&6 - if test $ol_cv_db_db_4_2 = yes ; then - ol_cv_lib_db=-ldb-4-2 + if test $ol_cv_db_db_4_5 = yes ; then + ol_cv_lib_db=-ldb-4-5 fi fi - elif test $ol_cv_bdb_minor = 1 ; then + elif test $ol_cv_bdb_minor = 4 ; then if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6 -if test "${ol_cv_db_db41+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_dot_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb41 + ol_DB_LIB=-ldb-4.4 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33129,12 +28705,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db41=yes + ol_cv_db_db_4_dot_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db41=no +ol_cv_db_db_4_dot_4=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33142,22 +28718,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5 -echo "${ECHO_T}$ol_cv_db_db41" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_4" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6 - if test $ol_cv_db_db41 = yes ; then - ol_cv_lib_db=-ldb41 + if test $ol_cv_db_db_4_dot_4 = yes ; then + ol_cv_lib_db=-ldb-4.4 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6 -if test "${ol_cv_db_db_41+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6 +if test "${ol_cv_db_db44+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-41 + ol_DB_LIB=-ldb44 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33238,12 +28814,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_41=yes + ol_cv_db_db44=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_41=no +ol_cv_db_db44=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33251,22 +28827,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5 -echo "${ECHO_T}$ol_cv_db_db_41" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db44" >&5 +echo "${ECHO_T}$ol_cv_db_db44" >&6 - if test $ol_cv_db_db_41 = yes ; then - ol_cv_lib_db=-ldb-41 + if test $ol_cv_db_db44 = yes ; then + ol_cv_lib_db=-ldb44 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_dot_1+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-44)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6 +if test "${ol_cv_db_db_44+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-4.1 + ol_DB_LIB=-ldb-44 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33347,12 +28923,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_4_dot_1=yes + ol_cv_db_db_44=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_4_dot_1=no +ol_cv_db_db_44=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33360,241 +28936,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_44" >&5 +echo "${ECHO_T}$ol_cv_db_db_44" >&6 - if test $ol_cv_db_db_4_dot_1 = yes ; then - ol_cv_lib_db=-ldb-4.1 + if test $ol_cv_db_db_44 = yes ; then + ol_cv_lib_db=-ldb-44 fi fi if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4_1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4-1 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_4_1=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_4_1=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_4_1" >&6 - - if test $ol_cv_db_db_4_1 = yes ; then - ol_cv_lib_db=-ldb-4-1 - fi -fi - - fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6 -if test "${ol_cv_db_db_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_DB_LIB=-ldb-4 - ol_LIBS=$LIBS - LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H -# include -#else -# include -#endif - -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif - -#ifndef NULL -#define NULL ((void*)0) -#endif - -int -main () -{ - -#if DB_VERSION_MAJOR > 1 - { - char *version; - int major, minor, patch; - - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor < DB_VERSION_MINOR ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } - } -#endif - -#if DB_VERSION_MAJOR > 2 - db_env_create( NULL, 0 ); -#elif DB_VERSION_MAJOR > 1 - db_appexit( NULL ); -#else - (void) dbopen( NULL, 0, 0, 0, NULL); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_db_db_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ol_cv_db_db_4=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5 -echo "${ECHO_T}$ol_cv_db_db_4" >&6 - - if test $ol_cv_db_db_4 = yes ; then - ol_cv_lib_db=-ldb-4 - fi -fi - - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6 -if test "${ol_cv_db_db4+set}" = set; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-4)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb4 + ol_DB_LIB=-ldb-4-4 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33675,12 +29032,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db4=yes + ol_cv_db_db_4_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db4=no +ol_cv_db_db_4_4=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33688,22 +29045,23 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5 -echo "${ECHO_T}$ol_cv_db_db4" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_4" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_4" >&6 - if test $ol_cv_db_db4 = yes ; then - ol_cv_lib_db=-ldb4 + if test $ol_cv_db_db_4_4 = yes ; then + ol_cv_lib_db=-ldb-4-4 fi fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6 -if test "${ol_cv_db_db+set}" = set; then + elif test $ol_cv_bdb_minor = 3 ; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_dot_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb + ol_DB_LIB=-ldb-4.3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33784,12 +29142,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db=yes + ol_cv_db_db_4_dot_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db=no +ol_cv_db_db_4_dot_3=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33797,24 +29155,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5 -echo "${ECHO_T}$ol_cv_db_db" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_3" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6 - if test $ol_cv_db_db = yes ; then - ol_cv_lib_db=-ldb + if test $ol_cv_db_db_4_dot_3 = yes ; then + ol_cv_lib_db=-ldb-4.3 fi fi - -elif test $ol_cv_bdb_major = 3 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6 -if test "${ol_cv_db_db3+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6 +if test "${ol_cv_db_db43+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb3 + ol_DB_LIB=-ldb43 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -33895,12 +29251,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db3=yes + ol_cv_db_db43=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db3=no +ol_cv_db_db43=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -33908,22 +29264,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5 -echo "${ECHO_T}$ol_cv_db_db3" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db43" >&5 +echo "${ECHO_T}$ol_cv_db_db43" >&6 - if test $ol_cv_db_db3 = yes ; then - ol_cv_lib_db=-ldb3 + if test $ol_cv_db_db43 = yes ; then + ol_cv_lib_db=-ldb43 fi fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6 -if test "${ol_cv_db_db_3+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-43)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6 +if test "${ol_cv_db_db_43+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-3 + ol_DB_LIB=-ldb-43 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34004,12 +29360,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_3=yes + ol_cv_db_db_43=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_3=no +ol_cv_db_db_43=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34017,24 +29373,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5 -echo "${ECHO_T}$ol_cv_db_db_3" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_43" >&5 +echo "${ECHO_T}$ol_cv_db_db_43" >&6 - if test $ol_cv_db_db_3 = yes ; then - ol_cv_lib_db=-ldb-3 + if test $ol_cv_db_db_43 = yes ; then + ol_cv_lib_db=-ldb-43 fi fi - -elif test $ol_cv_bdb_major = 2 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6 -if test "${ol_cv_db_db2+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-3)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb2 + ol_DB_LIB=-ldb-4-3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34115,12 +29469,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db2=yes + ol_cv_db_db_4_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db2=no +ol_cv_db_db_4_3=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34128,22 +29482,23 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5 -echo "${ECHO_T}$ol_cv_db_db2" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_3" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_3" >&6 - if test $ol_cv_db_db2 = yes ; then - ol_cv_lib_db=-ldb2 + if test $ol_cv_db_db_4_3 = yes ; then + ol_cv_lib_db=-ldb-4-3 fi fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6 -if test "${ol_cv_db_db_2+set}" = set; then + elif test $ol_cv_bdb_minor = 2 ; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_dot_2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-2 + ol_DB_LIB=-ldb-4.2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34224,12 +29579,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_2=yes + ol_cv_db_db_4_dot_2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_2=no +ol_cv_db_db_4_dot_2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34237,24 +29592,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5 -echo "${ECHO_T}$ol_cv_db_db_2" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_2" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6 - if test $ol_cv_db_db_2 = yes ; then - ol_cv_lib_db=-ldb-2 + if test $ol_cv_db_db_4_dot_2 = yes ; then + ol_cv_lib_db=-ldb-4.2 fi fi - -elif test $ol_cv_bdb_major = 1 ; then - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6 -if test "${ol_cv_db_db1+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6 +if test "${ol_cv_db_db42+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb1 + ol_DB_LIB=-ldb42 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34335,12 +29688,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db1=yes + ol_cv_db_db42=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db1=no +ol_cv_db_db42=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34348,22 +29701,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5 -echo "${ECHO_T}$ol_cv_db_db1" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db42" >&5 +echo "${ECHO_T}$ol_cv_db_db42" >&6 - if test $ol_cv_db_db1 = yes ; then - ol_cv_lib_db=-ldb1 + if test $ol_cv_db_db42 = yes ; then + ol_cv_lib_db=-ldb42 fi fi - if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5 -echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6 -if test "${ol_cv_db_db_1+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-42)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6 +if test "${ol_cv_db_db_42+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB=-ldb-1 + ol_DB_LIB=-ldb-42 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34444,12 +29797,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_db_1=yes + ol_cv_db_db_42=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_db_1=no +ol_cv_db_db_42=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34457,23 +29810,22 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5 -echo "${ECHO_T}$ol_cv_db_db_1" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_42" >&5 +echo "${ECHO_T}$ol_cv_db_db_42" >&6 - if test $ol_cv_db_db_1 = yes ; then - ol_cv_lib_db=-ldb-1 + if test $ol_cv_db_db_42 = yes ; then + ol_cv_lib_db=-ldb-42 fi fi -fi -if test $ol_cv_lib_db = no ; then - echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5 -echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6 -if test "${ol_cv_db_none+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-2)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4_2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_DB_LIB= + ol_DB_LIB=-ldb-4-2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" @@ -34554,12 +29906,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_db_none=yes + ol_cv_db_db_4_2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ol_cv_db_none=no +ol_cv_db_db_4_2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -34567,33 +29919,27 @@ rm -f conftest.err conftest.$ac_objext \ LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5 -echo "${ECHO_T}$ol_cv_db_none" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_4_2" >&5 +echo "${ECHO_T}$ol_cv_db_db_4_2" >&6 - if test $ol_cv_db_none = yes ; then - ol_cv_lib_db=yes + if test $ol_cv_db_db_4_2 = yes ; then + ol_cv_lib_db=-ldb-4-2 fi fi - - if test "$ol_cv_lib_db" != no ; then - ol_cv_berkeley_db=yes - echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5 -echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6 -if test "${ol_cv_berkeley_db_version+set}" = set; then + fi + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6 +if test "${ol_cv_db_db_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ol_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" - if test $ol_cv_lib_db != yes ; then - LIBS="$ol_cv_lib_db $LIBS" - fi + ol_DB_LIB=-ldb-4 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - if test "$cross_compiling" = yes; then - ol_cv_berkeley_db_version=cross -else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -34601,353 +29947,158 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_DB_185_H - choke me; +# include #else -#include +# include #endif + #ifndef DB_VERSION_MAJOR # define DB_VERSION_MAJOR 1 #endif -#ifndef NULL -#define NULL ((void *)0) -#endif -main() -{ -#if DB_VERSION_MAJOR > 1 - char *version; - int major, minor, patch; - version = db_version( &major, &minor, &patch ); - - if( major != DB_VERSION_MAJOR || - minor != DB_VERSION_MINOR || - patch != DB_VERSION_PATCH ) - { - printf("Berkeley DB version mismatch\n" - "\theader: %s\n\tlibrary: %s\n", - DB_VERSION_STRING, version); - return 1; - } -#endif - - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ol_cv_berkeley_db_version=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ol_cv_berkeley_db_version=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5 -echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6 - - if test $ol_cv_berkeley_db_version = no ; then - { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5 -echo "$as_me: error: Berkeley DB version mismatch" >&2;} - { (exit 1); exit 1; }; } - fi - - echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5 -echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6 -if test "${ol_cv_berkeley_db_thread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ol_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" - if test $ol_cv_lib_db != yes ; then - LIBS="$ol_cv_lib_db $LIBS" - fi - - if test "$cross_compiling" = yes; then - ol_cv_berkeley_db_thread=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_DB_185_H - choke me; -#else -#include -#endif #ifndef NULL -#define NULL ((void *)0) -#endif -main() -{ - int rc; - u_int32_t flags = DB_CREATE | -#ifdef DB_PRIVATE - DB_PRIVATE | +#define NULL ((void*)0) #endif - DB_THREAD; -#if DB_VERSION_MAJOR > 2 - DB_ENV *env = NULL; +int +main () +{ - rc = db_env_create( &env, 0 ); +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; - flags |= DB_INIT_MPOOL; -#ifdef DB_MPOOL_PRIVATE - flags |= DB_MPOOL_PRIVATE; -#endif + version = db_version( &major, &minor, &patch ); - if( rc ) { - printf("BerkeleyDB: %s\n", db_strerror(rc) ); - return rc; + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } } - -#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); -#else - rc = env->open( env, NULL, NULL, flags, 0 ); #endif - if ( rc == 0 ) { - rc = env->close( env, 0 ); - } - - if( rc ) { - printf("BerkeleyDB: %s\n", db_strerror(rc) ); - return rc; - } - +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else - DB_ENV env; - memset( &env, '\0', sizeof(env) ); - - rc = db_appinit( NULL, NULL, &env, flags ); - - if( rc == 0 ) { - db_appexit( &env ); - } - - unlink("__db_mpool.share"); - unlink("__db_lock.share"); + (void) dbopen( NULL, 0, 0, 0, NULL); #endif - return rc; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ol_cv_berkeley_db_thread=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ol_cv_berkeley_db_thread=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - LIBS="$ol_LIBS" - -fi -echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5 -echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6 - - if test $ol_cv_berkeley_db_thread != no ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BERKELEY_DB_THREAD 1 -_ACEOF - - fi - - fi -fi - - fi - - if test $ol_cv_berkeley_db != no ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BERKELEY_DB 1 -_ACEOF - - - ol_link_ldbm=berkeley - ol_enable_ldbm_api=berkeley - - if test $ol_enable_ldbm_type = hash ; then - -cat >>confdefs.h <<\_ACEOF -#define LDBM_USE_DBHASH 1 -_ACEOF - - else - -cat >>confdefs.h <<\_ACEOF -#define LDBM_USE_DBBTREE 1 -_ACEOF - - fi - - if test $ol_cv_lib_db != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" - fi - fi - ;; -esac - -if test $ol_enable_bdb/$ol_enable_hdb != no/no; then - if test $ol_link_ldbm != berkeley ; then - { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5 -echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;} - { (exit 1); exit 1; }; } - else - echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5 -echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6 -if test "${ol_cv_bdb_compat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - - /* this check could be improved */ -#ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 -#endif -#ifndef DB_VERSION_MINOR -# define DB_VERSION_MINOR 0 -#endif - -/* require 4.2 or later */ -#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2) - __db_version_compat -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "__db_version_compat" >/dev/null 2>&1; then - ol_cv_bdb_compat=yes + ol_cv_db_db_4=yes else - ol_cv_bdb_compat=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ol_cv_db_db_4=no fi -echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5 -echo "${ECHO_T}$ol_cv_bdb_compat" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ol_LIBS" - if test $ol_cv_bdb_compat != yes ; then - { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5 -echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;} - { (exit 1); exit 1; }; } - fi - fi fi +echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5 +echo "${ECHO_T}$ol_cv_db_db_4" >&6 -if test $ol_link_ldbm = no && test $ol_enable_ldbm_type = btree ; then - { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5 -echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;} - ol_enable_ldbm_api=none + if test $ol_cv_db_db_4 = yes ; then + ol_cv_lib_db=-ldb-4 + fi fi -if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = mdbm ; then - echo "$as_me:$LINENO: checking for MDBM library" >&5 -echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6 -if test "${ol_cv_lib_mdbm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_LIBS="$LIBS" - echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5 -echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6 -if test "${ac_cv_func_mdbm_set_chain+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6 +if test "${ol_cv_db_db4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB=-ldb4 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define mdbm_set_chain to an innocuous variant, in case declares mdbm_set_chain. - For example, HP-UX 11i declares gettimeofday. */ -#define mdbm_set_chain innocuous_mdbm_set_chain - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mdbm_set_chain (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include +#ifdef HAVE_DB_185_H +# include #else -# include +# include #endif -#undef mdbm_set_chain - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char mdbm_set_chain (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain) -choke me -#else -char (*f) () = mdbm_set_chain; +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 #endif -#ifdef __cplusplus -} + +#ifndef NULL +#define NULL ((void*)0) #endif int main () { -return f != mdbm_set_chain; + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } @@ -34974,47 +30125,89 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_mdbm_set_chain=yes + ol_cv_db_db4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_mdbm_set_chain=no +ol_cv_db_db4=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + + LIBS="$ol_LIBS" + fi -echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5 -echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6 -if test $ac_cv_func_mdbm_set_chain = yes; then - ol_cv_lib_mdbm=yes -else +echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5 +echo "${ECHO_T}$ol_cv_db_db4" >&6 - echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5 -echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6 -if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then + if test $ol_cv_db_db4 = yes ; then + ol_cv_lib_db=-ldb4 + fi +fi + + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6 +if test "${ol_cv_db_db+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmdbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB=-ldb + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +#ifdef HAVE_DB_185_H +# include +#else +# include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char mdbm_set_chain (); + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + int main () { -mdbm_set_chain (); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } @@ -35041,63 +30234,98 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_mdbm_mdbm_set_chain=yes + ol_cv_db_db=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mdbm_mdbm_set_chain=no +ol_cv_db_db=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5 -echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6 -if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then - ol_cv_lib_mdbm=-lmdbm -else - ol_cv_lib_mdbm=no -fi - - -fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5 -echo "${ECHO_T}$ol_cv_lib_mdbm" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5 +echo "${ECHO_T}$ol_cv_db_db" >&6 + if test $ol_cv_db_db = yes ; then + ol_cv_lib_db=-ldb + fi +fi -for ac_header in mdbm.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +elif test $ol_cv_bdb_major = 3 ; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6 +if test "${ol_cv_db_db3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB=-ldb3 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +int +main () +{ + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -35111,207 +30339,206 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ol_cv_db_db3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ol_cv_db_db3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + LIBS="$ol_LIBS" + +fi +echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5 +echo "${ECHO_T}$ol_cv_db_db3" >&6 + + if test $ol_cv_db_db3 = yes ; then + ol_cv_lib_db=-ldb3 + fi +fi + + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6 +if test "${ol_cv_db_db_3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ol_DB_LIB=-ldb-3 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +int +main () +{ + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ol_cv_db_db_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ol_cv_db_db_3=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + LIBS="$ol_LIBS" fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5 +echo "${ECHO_T}$ol_cv_db_db_3" >&6 + if test $ol_cv_db_db_3 = yes ; then + ol_cv_lib_db=-ldb-3 + fi fi -done - echo "$as_me:$LINENO: checking for db" >&5 -echo $ECHO_N "checking for db... $ECHO_C" >&6 -if test "${ol_cv_mdbm+set}" = set; then +elif test $ol_cv_bdb_major = 2 ; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6 +if test "${ol_cv_db_db2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test $ol_cv_lib_mdbm = no || test $ac_cv_header_mdbm_h = no ; then - ol_cv_mdbm=no - else - ol_cv_mdbm=yes - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5 -echo "${ECHO_T}$ol_cv_mdbm" >&6 - if test $ol_cv_mdbm = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MDBM 1 -_ACEOF - - fi - - - if test $ol_cv_mdbm = yes ; then - ol_link_ldbm=mdbm - ol_enable_ldbm_api=mdbm - if test $ol_cv_lib_mdbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm" - fi - fi -fi + ol_DB_LIB=-ldb2 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" -if test $ol_enable_ldbm_api = auto || test $ol_enable_ldbm_api = gdbm ; then - echo "$as_me:$LINENO: checking for GDBM library" >&5 -echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6 -if test "${ol_cv_lib_gdbm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_LIBS="$LIBS" - echo "$as_me:$LINENO: checking for gdbm_open" >&5 -echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6 -if test "${ac_cv_func_gdbm_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define gdbm_open to an innocuous variant, in case declares gdbm_open. - For example, HP-UX 11i declares gettimeofday. */ -#define gdbm_open innocuous_gdbm_open - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gdbm_open (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include +#ifdef HAVE_DB_185_H +# include #else -# include +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 #endif -#undef gdbm_open +#ifndef NULL +#define NULL ((void*)0) +#endif -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +int +main () { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gdbm_open (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gdbm_open) || defined (__stub___gdbm_open) -choke me + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else -char (*f) () = gdbm_open; -#endif -#ifdef __cplusplus -} + (void) dbopen( NULL, 0, 0, 0, NULL); #endif -int -main () -{ -return f != gdbm_open; ; return 0; } @@ -35338,47 +30565,89 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_gdbm_open=yes + ol_cv_db_db2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gdbm_open=no +ol_cv_db_db2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + + LIBS="$ol_LIBS" + +fi +echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5 +echo "${ECHO_T}$ol_cv_db_db2" >&6 + + if test $ol_cv_db_db2 = yes ; then + ol_cv_lib_db=-ldb2 + fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5 -echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6 -if test $ac_cv_func_gdbm_open = yes; then - ol_cv_lib_gdbm=yes -else - echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5 -echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6 -if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6 +if test "${ol_cv_db_db_2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgdbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB=-ldb-2 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +#ifdef HAVE_DB_185_H +# include +#else +# include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gdbm_open (); + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + int main () { -gdbm_open (); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } @@ -35405,63 +30674,98 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_gdbm_gdbm_open=yes + ol_cv_db_db_2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_gdbm_gdbm_open=no +ol_cv_db_db_2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5 -echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6 -if test $ac_cv_lib_gdbm_gdbm_open = yes; then - ol_cv_lib_gdbm=-lgdbm -else - ol_cv_lib_gdbm=no -fi - - -fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5 -echo "${ECHO_T}$ol_cv_lib_gdbm" >&6 +echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5 +echo "${ECHO_T}$ol_cv_db_db_2" >&6 + if test $ol_cv_db_db_2 = yes ; then + ol_cv_lib_db=-ldb-2 + fi +fi -for ac_header in gdbm.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +elif test $ol_cv_bdb_major = 1 ; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6 +if test "${ol_cv_db_db1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB=-ldb1 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +int +main () +{ + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -35475,208 +30779,95 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + ol_cv_db_db1=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ol_cv_db_db1=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + LIBS="$ol_LIBS" fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5 +echo "${ECHO_T}$ol_cv_db_db1" >&6 + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 + fi fi -done - - echo "$as_me:$LINENO: checking for db" >&5 -echo $ECHO_N "checking for db... $ECHO_C" >&6 -if test "${ol_cv_gdbm+set}" = set; then + if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5 +echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6 +if test "${ol_cv_db_db_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test $ol_cv_lib_gdbm = no || test $ac_cv_header_gdbm_h = no ; then - ol_cv_gdbm=no - else - ol_cv_gdbm=yes - fi - -fi -echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5 -echo "${ECHO_T}$ol_cv_gdbm" >&6 - if test $ol_cv_gdbm = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GDBM 1 -_ACEOF - - fi - - - if test $ol_cv_gdbm = yes ; then - ol_link_ldbm=gdbm - ol_enable_ldbm_api=gdbm - - if test $ol_cv_lib_gdbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" - fi - fi -fi + ol_DB_LIB=-ldb-1 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" -if test $ol_enable_ldbm_api = ndbm ; then - echo "$as_me:$LINENO: checking for NDBM library" >&5 -echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6 -if test "${ol_cv_lib_ndbm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ol_LIBS="$LIBS" - echo "$as_me:$LINENO: checking for dbm_open" >&5 -echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6 -if test "${ac_cv_func_dbm_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dbm_open to an innocuous variant, in case declares dbm_open. - For example, HP-UX 11i declares gettimeofday. */ -#define dbm_open innocuous_dbm_open - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dbm_open (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include +#ifdef HAVE_DB_185_H +# include #else -# include +# include #endif -#undef dbm_open - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbm_open (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dbm_open) || defined (__stub___dbm_open) -choke me -#else -char (*f) () = dbm_open; +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 #endif -#ifdef __cplusplus -} + +#ifndef NULL +#define NULL ((void*)0) #endif int main () { -return f != dbm_open; + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } @@ -35703,47 +30894,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_dbm_open=yes + ol_cv_db_db_1=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_dbm_open=no +ol_cv_db_db_1=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + + LIBS="$ol_LIBS" + +fi +echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5 +echo "${ECHO_T}$ol_cv_db_db_1" >&6 + + if test $ol_cv_db_db_1 = yes ; then + ol_cv_lib_db=-ldb-1 + fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5 -echo "${ECHO_T}$ac_cv_func_dbm_open" >&6 -if test $ac_cv_func_dbm_open = yes; then - ol_cv_lib_ndbm=yes -else - echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5 -echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6 -if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then +fi +if test $ol_cv_lib_db = no ; then + echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5 +echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6 +if test "${ol_cv_db_none+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lndbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + ol_DB_LIB= + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +#ifdef HAVE_DB_185_H +# include +#else +# include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbm_open (); + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + int main () { -dbm_open (); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } @@ -35770,299 +31004,314 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ndbm_dbm_open=yes + ol_cv_db_none=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ndbm_dbm_open=no +ol_cv_db_none=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + + LIBS="$ol_LIBS" + fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5 -echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6 -if test $ac_cv_lib_ndbm_dbm_open = yes; then - ol_cv_lib_ndbm=-lndbm -else +echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5 +echo "${ECHO_T}$ol_cv_db_none" >&6 + + if test $ol_cv_db_none = yes ; then + ol_cv_lib_db=yes + fi +fi + - echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5 -echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6 -if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + echo "$as_me:$LINENO: checking for Berkeley DB version match" >&5 +echo $ECHO_N "checking for Berkeley DB version match... $ECHO_C" >&6 +if test "${ol_cv_berkeley_db_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldbm $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + ol_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + if test $ol_cv_lib_db != yes ; then + LIBS="$ol_cv_lib_db $LIBS" + fi + + if test "$cross_compiling" = yes; then + ol_cv_berkeley_db_version=cross +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" +#ifdef HAVE_DB_185_H + choke me; +#else +#include #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbm_open (); -int -main () +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif +#ifndef NULL +#define NULL ((void *)0) +#endif +main() { -dbm_open (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +#if DB_VERSION_MAJOR > 1 + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor != DB_VERSION_MINOR || + patch != DB_VERSION_PATCH ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } +#endif + + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dbm_dbm_open=yes + ol_cv_berkeley_db_version=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dbm_dbm_open=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5 -echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6 -if test $ac_cv_lib_dbm_dbm_open = yes; then - ol_cv_lib_ndbm=-ldbm -else - ol_cv_lib_ndbm=no -fi - +( exit $ac_status ) +ol_cv_berkeley_db_version=no fi - - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$ol_LIBS" fi -echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5 -echo "${ECHO_T}$ol_cv_lib_ndbm" >&6 - +echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5 +echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6 + if test $ol_cv_berkeley_db_version = no ; then + { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5 +echo "$as_me: error: Berkeley DB version mismatch" >&2;} + { (exit 1); exit 1; }; } + fi -for ac_header in ndbm.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5 +echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6 +if test "${ol_cv_berkeley_db_thread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + + ol_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + if test $ol_cv_lib_db != yes ; then + LIBS="$ol_cv_lib_db $LIBS" + fi + + if test "$cross_compiling" = yes; then + ol_cv_berkeley_db_thread=cross +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +#ifdef HAVE_DB_185_H + choke me; +#else +#include +#endif +#ifndef NULL +#define NULL ((void *)0) +#endif +main() +{ + int rc; + u_int32_t flags = DB_CREATE | +#ifdef DB_PRIVATE + DB_PRIVATE | +#endif + DB_THREAD; + +#if DB_VERSION_MAJOR > 2 + DB_ENV *env = NULL; + + rc = db_env_create( &env, 0 ); + + flags |= DB_INIT_MPOOL; +#ifdef DB_MPOOL_PRIVATE + flags |= DB_MPOOL_PRIVATE; +#endif + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } + +#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) + rc = (env->open)( env, NULL, flags, 0 ); +#else + rc = (env->open)( env, NULL, NULL, flags, 0 ); +#endif + + if ( rc == 0 ) { + rc = env->close( env, 0 ); + } + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } + +#else + DB_ENV env; + memset( &env, '\0', sizeof(env) ); + + rc = db_appinit( NULL, NULL, &env, flags ); + + if( rc == 0 ) { + db_appexit( &env ); + } + + unlink("__db_mpool.share"); + unlink("__db_lock.share"); +#endif + + return rc; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ol_cv_berkeley_db_thread=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +( exit $ac_status ) +ol_cv_berkeley_db_thread=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 + LIBS="$ol_LIBS" -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to ## -## --------------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5 +echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6 -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + if test $ol_cv_berkeley_db_thread != no ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BERKELEY_DB_THREAD 1 _ACEOF -fi + fi -done + fi +fi - echo "$as_me:$LINENO: checking for db" >&5 -echo $ECHO_N "checking for db... $ECHO_C" >&6 -if test "${ol_cv_ndbm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test $ol_cv_lib_ndbm = no || test $ac_cv_header_ndbm_h = no ; then - ol_cv_ndbm=no - else - ol_cv_ndbm=yes + if test $ol_cv_berkeley_db = no ; then + { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5 +echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;} + { (exit 1); exit 1; }; } fi -fi -echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5 -echo "${ECHO_T}$ol_cv_ndbm" >&6 - if test $ol_cv_ndbm = yes ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_NDBM 1 +#define HAVE_BERKELEY_DB 1 _ACEOF - fi + if test $ol_cv_lib_db != yes ; then + BDB_LIBS="$BDB_LIBS $ol_cv_lib_db" + fi - if test $ol_cv_ndbm = yes ; then - ol_link_ldbm=ndbm - ol_enable_ldbm_api=ndbm + echo "$as_me:$LINENO: checking Berkeley DB version for BDB/HDB backends" >&5 +echo $ECHO_N "checking Berkeley DB version for BDB/HDB backends... $ECHO_C" >&6 +if test "${ol_cv_bdb_compat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - if test $ol_cv_lib_ndbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" - fi - fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + + /* this check could be improved */ +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif +#ifndef DB_VERSION_MINOR +# define DB_VERSION_MINOR 0 +#endif + +/* require 4.2 or later, but exclude 4.3 */ +#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2) && (DB_VERSION_MINOR !=3) + __db_version_compat +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "__db_version_compat" >/dev/null 2>&1; then + ol_cv_bdb_compat=yes +else + ol_cv_bdb_compat=no fi +rm -f conftest* -if test $ol_link_ldbm = no && test $ol_enable_ldbm != no ; then - { { echo "$as_me:$LINENO: error: could not find suitable LDBM backend" >&5 -echo "$as_me: error: could not find suitable LDBM backend" >&2;} - { (exit 1); exit 1; }; } fi +echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5 +echo "${ECHO_T}$ol_cv_bdb_compat" >&6 + + + if test $ol_cv_bdb_compat != yes ; then + { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB version incompatible" >&5 +echo "$as_me: error: BDB/HDB: BerkeleyDB version incompatible" >&2;} + { (exit 1); exit 1; }; } + fi -if test $ol_enable_bdb = yes || - test $ol_enable_hdb = yes || - test $ol_enable_ldbm = yes ; then - SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)" + SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)" + + ol_link_bdb=yes fi @@ -36637,7 +31886,15 @@ done sql_LIBS="$LIBS" LIBS="$LTHREAD_LIBS" - echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5 + if test $ol_with_odbc = auto ; then + ol_with_odbc="iodbc unixodbc" + fi + + for odbc in $ol_with_odbc ; do + if test $ol_link_sql = no ; then + case $odbc in + iodbc) + echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -36707,10 +31964,13 @@ else have_iodbc=no fi - if test $have_iodbc = yes ; then - ol_link_sql="-liodbc" - else - echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5 + if test $have_iodbc = yes ; then + ol_link_sql="-liodbc" + fi + ;; + + unixodbc) + echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -36780,10 +32040,19 @@ else have_odbc=no fi - if test $have_odbc = yes ; then - ol_link_sql="-lodbc" + if test $have_odbc = yes ; then + ol_link_sql="-lodbc" + fi + ;; + + *) + { { echo "$as_me:$LINENO: error: unknown ODBC library" >&5 +echo "$as_me: error: unknown ODBC library" >&2;} + { (exit 1); exit 1; }; } + ;; + esac fi - fi + done LIBS="$sql_LIBS" @@ -38488,96 +33757,228 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_ssize_t=yes + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_ssize_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t signed int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for caddr_t" >&5 +echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6 +if test "${ac_cv_type_caddr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((caddr_t *) 0) + return 0; +if (sizeof (caddr_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_caddr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_caddr_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5 +echo "${ECHO_T}$ac_cv_type_caddr_t" >&6 +if test $ac_cv_type_caddr_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define caddr_t char * +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_ssize_t=no +ac_cv_type_long_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 -if test $ac_cv_type_ssize_t = yes; then - : -else +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 +if test $ac_cv_type_long_long = yes; then cat >>confdefs.h <<_ACEOF -#define ssize_t signed int +#define HAVE_LONG_LONG 1 _ACEOF -fi - -echo "$as_me:$LINENO: checking for caddr_t" >&5 -echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6 -if test "${ac_cv_type_caddr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((caddr_t *) 0) - return 0; -if (sizeof (caddr_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_caddr_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_caddr_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5 -echo "${ECHO_T}$ac_cv_type_caddr_t" >&6 -if test $ac_cv_type_caddr_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define caddr_t char * -_ACEOF -fi - -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then +echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 +echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 +if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -38590,9 +33991,9 @@ $ac_includes_default int main () { -if ((size_t *) 0) +if ((ptrdiff_t *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ptrdiff_t)) return 0; ; return 0; @@ -38620,96 +34021,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_size_t=yes + ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no +ac_cv_type_ptrdiff_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : -else +echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 +echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 +if test $ac_cv_type_ptrdiff_t = yes; then cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define HAVE_PTRDIFF_T 1 _ACEOF -fi - - -echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 -if test "${ac_cv_type_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long long *) 0) - return 0; -if (sizeof (long long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 -if test $ac_cv_type_long_long = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF -fi -echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 -echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 -if test "${ac_cv_type_ptrdiff_t+set}" = set; then +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -38719,12 +34055,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + int main () { -if ((ptrdiff_t *) 0) +if ((socklen_t *) 0) return 0; -if (sizeof (ptrdiff_t)) +if (sizeof (socklen_t)) return 0; ; return 0; @@ -38752,33 +34092,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_ptrdiff_t=yes + ac_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_ptrdiff_t=no +ac_cv_type_socklen_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 -echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 -if test $ac_cv_type_ptrdiff_t = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_PTRDIFF_T 1 -_ACEOF - - -fi +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 -if test "${ac_cv_type_socklen_t+set}" = set; then +echo "$as_me:$LINENO: checking the type of arg 3 to accept()" >&5 +echo $ECHO_N "checking the type of arg 3 to accept()... $ECHO_C" >&6 +if test "${ol_cv_type_ber_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + set socklen_t int unsigned "unsigned long" long size_t + test "$ac_cv_type_socklen_t" = yes || shift + ol_cv_type_ber_socklen_t=$1 guessing="guessing " + for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -38788,15 +34125,14 @@ $ac_includes_default #ifdef HAVE_SYS_SOCKET_H #include #endif - +extern int accept(int s, $addrtype *ap, $lentype *lp); int main () { -if ((socklen_t *) 0) - return 0; -if (sizeof (socklen_t)) - return 0; + +accept(0, (struct sockaddr *) 0, ($lentype *) 0); + ; return 0; } @@ -38823,23 +34159,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_socklen_t=yes + ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_socklen_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done ; done fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 -if test $ac_cv_type_socklen_t = yes; then - : -else + +echo "$as_me:$LINENO: result: $guessing$ol_cv_type_ber_socklen_t *" >&5 +echo "${ECHO_T}$guessing$ol_cv_type_ber_socklen_t *" >&6 + +cat >>confdefs.h <<_ACEOF +#define ber_socklen_t $ol_cv_type_ber_socklen_t +_ACEOF + + +if test "$ac_cv_type_socklen_t" != yes; then cat >>confdefs.h <<_ACEOF -#define socklen_t int +#define socklen_t $ol_cv_type_ber_socklen_t _ACEOF fi @@ -42068,7 +37409,7 @@ _ACEOF if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then - if test $ac_cv_sizeof_long_long > 4 ; then + if test $ac_cv_sizeof_long_long -gt 4 ; then ol_with_mp=longlong cat >>confdefs.h <<\_ACEOF @@ -42082,7 +37423,7 @@ echo "$as_me: error: long long unusable for multiple precision" >&2;} fi fi if test $ol_with_mp = long || test $ol_with_mp = auto ; then - if test $ac_cv_sizeof_long > 4 ; then + if test $ac_cv_sizeof_long -gt 4 ; then ol_with_mp=long cat >>confdefs.h <<\_ACEOF @@ -42636,7 +37977,7 @@ _ACEOF fi - if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp = yes ; then + if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then cat >>confdefs.h <<\_ACEOF #define USE_MP_GMP 1 @@ -43659,6 +39000,7 @@ fi + for ac_func in \ @@ -43670,17 +39012,18 @@ for ac_func in \ fcntl \ flock \ fstat \ - getdtablesize \ + getdtablesize \ getgrgid \ gethostname \ getpass \ - getpassphrase \ + getpassphrase \ getpwuid \ getpwnam \ getspnam \ - gettimeofday \ + gettimeofday \ initgroups \ inet_ntoa_b \ + ioctl \ lockf \ memcpy \ memmove \ @@ -44219,15 +39562,191 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +int +main () +{ +static struct msghdr ac_aggr; +if (sizeof ac_aggr.msg_control) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_msghdr_msg_control=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_msghdr_msg_control=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5 +echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6 +if test $ac_cv_member_struct_msghdr_msg_control = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 +_ACEOF + + +fi + + fi + echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5 +echo $ECHO_N "checking for struct stat.st_fstype... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_fstype+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_fstype) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_fstype=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_fstype) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_fstype=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_member_struct_stat_st_fstype=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_fstype" >&6 +if test $ac_cv_member_struct_stat_st_fstype = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_FSTYPE 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for struct stat.st_vfstype" >&5 +echo $ECHO_N "checking for struct stat.st_vfstype... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_vfstype+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -static struct msghdr ac_aggr; -if (sizeof ac_aggr.msg_control) +static struct stat ac_aggr; +if (ac_aggr.st_vfstype) return 0; ; return 0; @@ -44255,28 +39774,114 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_member_struct_msghdr_msg_control=yes + ac_cv_member_struct_stat_st_vfstype=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_msghdr_msg_control=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_vfstype) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_vfstype=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_stat_st_vfstype=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5 -echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6 -if test $ac_cv_member_struct_msghdr_msg_control = yes; then +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_vfstype" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_vfstype" >&6 +if test $ac_cv_member_struct_stat_st_vfstype = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 +#define HAVE_STRUCT_STAT_ST_VFSTYPE 1 _ACEOF fi + if test "$ac_cv_member_struct_stat_st_fstype" = yes; then + cat >conftest.$ac_ext <<_ACEOF +struct stat st; char *ptr=st.st_fstype; +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi fi LIBSRCS="$LIBSRCS getpeereid.c" @@ -44567,13 +40172,6 @@ cat >>confdefs.h <<\_ACEOF #define LDAP_SYSLOG 1 _ACEOF -fi -if test "$ol_link_kbind" != no ; then - -cat >>confdefs.h <<\_ACEOF -#define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION -_ACEOF - fi if test "$ol_enable_proctitle" != no ; then @@ -44683,6 +40281,23 @@ cat >>confdefs.h <<\_ACEOF _ACEOF +if test "$ol_enable_monitor" != no ; then + BUILD_SLAPD=yes + BUILD_MONITOR=$ol_enable_monitor + if test "$ol_enable_monitor" = mod ; then + SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor" + MFLAG=SLAPD_MOD_DYNAMIC + else + SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor" + MFLAG=SLAPD_MOD_STATIC + fi + +cat >>confdefs.h <<_ACEOF +#define SLAPD_MONITOR $MFLAG +_ACEOF + +fi + if test "$ol_enable_bdb" != no ; then BUILD_SLAPD=yes BUILD_BDB=$ol_enable_bdb @@ -44751,23 +40366,6 @@ _ACEOF fi -if test "$ol_link_ldbm" != no && test $ol_enable_ldbm != no; then - BUILD_SLAPD=yes - BUILD_LDBM=$ol_enable_ldbm - if test "$ol_enable_ldbm" = mod ; then - SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm" - MFLAG=SLAPD_MOD_DYNAMIC - else - SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm" - MFLAG=SLAPD_MOD_STATIC - fi - -cat >>confdefs.h <<_ACEOF -#define SLAPD_LDBM $MFLAG -_ACEOF - -fi - if test "$ol_enable_meta" != no ; then BUILD_SLAPD=yes BUILD_META=$ol_enable_meta @@ -44786,23 +40384,6 @@ _ACEOF fi -if test "$ol_enable_monitor" != no ; then - BUILD_SLAPD=yes - BUILD_MONITOR=$ol_enable_monitor - if test "$ol_enable_monitor" = mod ; then - SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor" - MFLAG=SLAPD_MOD_DYNAMIC - else - SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor" - MFLAG=SLAPD_MOD_STATIC - fi - -cat >>confdefs.h <<_ACEOF -#define SLAPD_MONITOR $MFLAG -_ACEOF - -fi - if test "$ol_enable_null" != no ; then BUILD_SLAPD=yes BUILD_NULL=$ol_enable_null @@ -44925,34 +40506,50 @@ _ACEOF fi -if test "$ol_enable_dds" != no ; then - BUILD_DDS=$ol_enable_dds - if test "$ol_enable_dds" = mod ; then +if test "$ol_enable_auditlog" != no ; then + BUILD_AUDITLOG=$ol_enable_auditlog + if test "$ol_enable_auditlog" = mod ; then MFLAG=SLAPD_MOD_DYNAMIC - SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la" + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la" else MFLAG=SLAPD_MOD_STATIC - SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o" + SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o" fi cat >>confdefs.h <<_ACEOF -#define SLAPD_OVER_DDS $MFLAG +#define SLAPD_OVER_AUDITLOG $MFLAG _ACEOF fi -if test "$ol_enable_denyop" != no ; then - BUILD_DENYOP=$ol_enable_denyop - if test "$ol_enable_denyop" = mod ; then +if test "$ol_enable_constraint" != no ; then + BUILD_CONSTRAINT=$ol_enable_constraint + if test "$ol_enable_constraint" = mod ; then MFLAG=SLAPD_MOD_DYNAMIC - SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la" + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la" else MFLAG=SLAPD_MOD_STATIC - SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o" + SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o" fi cat >>confdefs.h <<_ACEOF -#define SLAPD_OVER_DENYOP $MFLAG +#define SLAPD_OVER_CONSTRAINT $MFLAG +_ACEOF + +fi + +if test "$ol_enable_dds" != no ; then + BUILD_DDS=$ol_enable_dds + if test "$ol_enable_dds" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la" + else + MFLAG=SLAPD_MOD_STATIC + SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o" + fi + +cat >>confdefs.h <<_ACEOF +#define SLAPD_OVER_DDS $MFLAG _ACEOF fi @@ -44989,18 +40586,18 @@ _ACEOF fi -if test "$ol_enable_lastmod" != no ; then - BUILD_LASTMOD=$ol_enable_lastmod - if test "$ol_enable_lastmod" = mod ; then +if test "$ol_enable_memberof" != no ; then + BUILD_MEMBEROF=$ol_enable_memberof + if test "$ol_enable_memberof" = mod ; then MFLAG=SLAPD_MOD_DYNAMIC - SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la" + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la" else MFLAG=SLAPD_MOD_STATIC - SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o" + SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o" fi cat >>confdefs.h <<_ACEOF -#define SLAPD_OVER_LASTMOD $MFLAG +#define SLAPD_OVER_MEMBEROF $MFLAG _ACEOF fi @@ -45166,12 +40763,6 @@ _ACEOF fi -if test "$ol_enable_slurpd" != no && - test "$ol_link_threads" != no && - test $BUILD_SLAPD = yes ; then - BUILD_SLURPD=yes -fi - if test "$ol_enable_rewrite" != no ; then cat >>confdefs.h <<\_ACEOF @@ -45280,7 +40871,6 @@ fi - # Check whether --with-xxinstall or --without-xxinstall was given. @@ -45290,7 +40880,7 @@ if test "${with_xxinstall+set}" = set; then fi; - ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" + ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ac_config_commands="$ac_config_commands default" @@ -45825,7 +41415,6 @@ do "servers/slapd/back-dnssrv/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk" ;; "servers/slapd/back-hdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk" ;; "servers/slapd/back-ldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk" ;; - "servers/slapd/back-ldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk" ;; "servers/slapd/back-ldif/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk" ;; "servers/slapd/back-meta/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk" ;; "servers/slapd/back-monitor/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk" ;; @@ -45838,7 +41427,6 @@ do "servers/slapd/shell-backends/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk" ;; "servers/slapd/slapi/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk" ;; "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;; - "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;; "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;; "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;; @@ -46022,7 +41610,6 @@ s,@BUILD_BDB@,$BUILD_BDB,;t t s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t s,@BUILD_HDB@,$BUILD_HDB,;t t s,@BUILD_LDAP@,$BUILD_LDAP,;t t -s,@BUILD_LDBM@,$BUILD_LDBM,;t t s,@BUILD_META@,$BUILD_META,;t t s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t s,@BUILD_NULL@,$BUILD_NULL,;t t @@ -46032,6 +41619,8 @@ s,@BUILD_PERL@,$BUILD_PERL,;t t s,@BUILD_SHELL@,$BUILD_SHELL,;t t s,@BUILD_SQL@,$BUILD_SQL,;t t s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t +s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t +s,@BUILD_CONSTRAINT@,$BUILD_CONSTRAINT,;t t s,@BUILD_DDS@,$BUILD_DDS,;t t s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t @@ -46047,11 +41636,9 @@ s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t -s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t s,@LDAP_LIBS@,$LDAP_LIBS,;t t s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t -s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t -s,@LDBM_LIBS@,$LDBM_LIBS,;t t +s,@BDB_LIBS@,$BDB_LIBS,;t t s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t s,@WRAP_LIBS@,$WRAP_LIBS,;t t @@ -46772,7 +42359,7 @@ rm -f $BACKENDSC cat > $BACKENDSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2007 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46823,7 +42410,7 @@ rm -f $OVERLAYSC cat > $OVERLAYSC << ENDX /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2007 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46871,7 +42458,11 @@ fi /* end of generated file */ ENDX -echo Please run \"make depend\" to build dependencies +if test "${ol_cv_mkdep}" = no; then + echo '(Do not "make depend"; we do not know how to build dependencies)' +else + echo 'Please run "make depend" to build dependencies' +fi ;; esac done