X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=75e728c4049cabf0923f8b9f554f052f36089b65;hb=68e8a1b43f128ff656b06741fb25e45de0fa158b;hp=798f288b8900a8063c7822135c1961130e76b606;hpb=b8a3a153bb13bb54aaced796335b11d767d31280;p=openldap diff --git a/configure b/configure index 798f288b89..75e728c404 100755 --- a/configure +++ b/configure @@ -1,4 +1,16 @@ #! /bin/sh +# $OpenLDAP$ +# from OpenLDAP: pkg/ldap/configure.in,v 1.321 2000/08/25 15:50:10 kurt Exp + +# Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved. +# +# Redistribution and use in source and binary forms are permitted only +# as authorized by the OpenLDAP Public License. A copy of this +# license is available at http://www.OpenLDAP.org/license.html or +# in file LICENSE in the top-level directory of the distribution. + +echo "Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved." +echo "Restrictions apply, see COPYRIGHT and LICENSE files." # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13.1 @@ -15,101 +27,103 @@ ac_default_prefix=/usr/local ac_help="$ac_help --with-subdir=DIR change default subdirectory used for installs" ac_help="$ac_help - --enable-debug enable debugging (yes)" + --enable-debug enable debugging (yes)" ac_help="$ac_help - --enable-syslog enable syslog support (auto)" + --enable-syslog enable syslog support (auto)" ac_help="$ac_help - --enable-proctitle enable proctitle support (yes)" + --enable-proctitle enable proctitle support (yes)" ac_help="$ac_help - --enable-cache enable caching (yes)" + --enable-cache enable caching (yes)" ac_help="$ac_help - --enable-dns enable V2 DNS extension (no)" + --enable-referrals enable V2 Referrals extension (yes)" ac_help="$ac_help - --enable-referrals enable V2 Referrals extension (yes)" + --enable-kbind enable V2 Kerberos IV bind (auto)" ac_help="$ac_help - --enable-cldap enable connectionless ldap (no)" + --enable-ipv6 enable IPv6 support (auto)" ac_help="$ac_help - --enable-x-compile enable cross compiling (no)" + --enable-local enable AF_LOCAL (AF_UNIX) socket support (auto)" ac_help="$ac_help - --enable-dmalloc enable debug malloc support (no)" + --enable-x-compile enable cross compiling (no)" ac_help="$ac_help - --with-cyrus-sasl with Cyrus SASL support (auto)" + --with-cyrus-sasl with Cyrus SASL support (auto)" ac_help="$ac_help - --with-fetch with fetch URL support (auto)" + --with-fetch with fetch URL support (auto)" ac_help="$ac_help - --with-kerberos with Kerberos support (auto)" + --with-kerberos with support (auto)" ac_help="$ac_help - --with-readline with readline support (auto)" + --with-readline with readline support (auto)" ac_help="$ac_help - --with-threads use threads (auto)" + --with-threads with threads (auto)" ac_help="$ac_help - --with-tls with TLS/SSL support (auto)" + --with-tls with TLS/SSL support (auto)" ac_help="$ac_help - --with-yielding-select with implicitly yielding select (auto)" + --with-yielding-select with implicitly yielding select (auto)" ac_help="$ac_help -LDAPD Options:" +SLAPD (Standalone LDAP Daemon) Options:" ac_help="$ac_help - --enable-ldapd enable building ldapd (no)" + --enable-slapd enable building slapd (yes)" ac_help="$ac_help -SLAPD Options:" + --enable-cleartext enable cleartext passwords (yes)" ac_help="$ac_help - --enable-slapd enable building slapd (yes)" + --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help - --enable-cleartext enable cleartext passwords (yes)" + --enable-kpasswd enable kerberos password verification (no)" ac_help="$ac_help - --enable-crypt enable crypt(3) passwords (auto)" + --enable-spasswd enable (Cyrus) SASL password verification (no)" ac_help="$ac_help - --enable-modules enable dynamic module support (no)" + --enable-modules enable dynamic module support (no)" ac_help="$ac_help - --enable-multimaster enable multimaster replication (no)" + --enable-multimaster enable multimaster replication (no)" ac_help="$ac_help - --enable-phonetic enable phonetic/soundex (no)" + --enable-phonetic enable phonetic/soundex (no)" ac_help="$ac_help - --enable-quipu build quipu migration tools (no)" + --enable-rlookups enable reverse lookups (auto)" ac_help="$ac_help - --enable-rlookups enable reverse lookups (auto)" + --enable-aci enable per-object ACIs (no)" ac_help="$ac_help - --enable-aci enable per-object ACIs (no)" + --enable-wrappers enable tcp wrapper support (no)" ac_help="$ac_help - --enable-discreteaci enable discrete rights in ACIs (no)" + --enable-dynamic enable linking built binaries with dynamic libs (no)" ac_help="$ac_help - --enable-wrappers enable tcp wrapper support (no)" + --enable-dnssrv enable dnssrv backend (no)" ac_help="$ac_help - --enable-bdb2 enable bdb2 backend (no)" + --with-dnssrv-module module type (static)" ac_help="$ac_help - --with-bdb2-module module type (static)" + --enable-ldap enable ldap backend (no)" ac_help="$ac_help - --enable-ldap enable ldap backend (no)" + --with-ldap-module module type (static)" ac_help="$ac_help - --with-ldap-module module type (static)" + --enable-ldbm enable ldbm backend (yes)" ac_help="$ac_help - --enable-ldbm enable ldbm backend (yes)" + --with-ldbm-api with LDBM API (auto)" ac_help="$ac_help - --with-ldbm-api use LDBM API (auto)" + --with-ldbm-module module type (static)" ac_help="$ac_help - --with-ldbm-module module type (static)" + --with-ldbm-type use LDBM type (auto)" ac_help="$ac_help - --with-ldbm-type use LDBM type (auto)" + --enable-passwd enable passwd backend (no)" ac_help="$ac_help - --enable-passwd enable passwd backend (no)" + --with-passwd-module module type (static)" ac_help="$ac_help - --with-passwd-module module type (static)" + --enable-perl enable perl backend (no)" ac_help="$ac_help - --enable-perl enable perl backend (no)" + --with-perl-module module type (static)" ac_help="$ac_help - --with-perl-module module type (static)" + --enable-shell enable shell backend (no)" ac_help="$ac_help - --enable-shell enable shell backend (no)" + --with-shell-module module type (static)" ac_help="$ac_help - --with-shell-module module type (static)" + --enable-sql enable sql backend (no)" ac_help="$ac_help - --enable-tcl enable tcl backend (no)" + --with-sql-module module type (static)" ac_help="$ac_help - --with-tcl-module module type (static)" + --enable-tcl enable tcl backend (no)" ac_help="$ac_help -SLURPD Options:" + --with-tcl-module module type (static)" ac_help="$ac_help - --enable-slurpd enable building slurpd (auto)" +SLURPD (Replication Daemon) Options:" +ac_help="$ac_help + --enable-slurpd enable building slurpd (auto)" ac_help="$ac_help Library Generation & Linking Options" ac_help="$ac_help @@ -624,6 +638,16 @@ else ac_n= ac_c='\c' ac_t= fi + +# set unset (borrowed from autoconf 2.14a) +if (unset FOO) >/dev/null 2>&1; then + ol_unset=unset +else + ol_unset=false +fi +# unset CDPATH +$ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH + ac_aux_dir= for ac_dir in build $srcdir/build; do if test -f $ac_dir/install-sh; then @@ -634,6 +658,10 @@ for ac_dir in build $srcdir/build; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then @@ -648,9 +676,11 @@ if test -z "$OL_VERSION"; then { echo "configure: error: could not determine version" 1>&2; exit 1; } fi +echo "Configuring OpenLDAP $OL_VERSION ..." + echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:654: checking host system type" >&5 +echo "configure:684: checking host system type" >&5 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then # Make sure we can run config.sub. @@ -691,7 +721,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:695: checking target system type" >&5 +echo "configure:725: checking target system type" >&5 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then # Make sure we can run config.sub. @@ -731,7 +761,7 @@ target_os=$ac_cv_target_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:735: checking build system type" >&5 +echo "configure:765: checking build system type" >&5 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then # Make sure we can run config.sub. @@ -808,7 +838,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:812: checking for a BSD compatible install" >&5 +echo "configure:842: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -865,7 +895,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:869: checking whether build environment is sane" >&5 +echo "configure:899: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -926,7 +956,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:930: checking for $ac_word" >&5 +echo "configure:960: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -956,7 +986,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:960: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:990: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -996,7 +1026,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1000: checking for working aclocal" >&5 +echo "configure:1030: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1009,7 +1039,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1013: checking for working autoconf" >&5 +echo "configure:1043: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1022,7 +1052,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1026: checking for working automake" >&5 +echo "configure:1056: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1035,7 +1065,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1039: checking for working autoheader" >&5 +echo "configure:1069: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1048,7 +1078,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1052: checking for working makeinfo" >&5 +echo "configure:1082: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1068,7 +1098,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1072: checking for $ac_word" >&5 +echo "configure:1102: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1119,7 +1149,7 @@ EOF echo $ac_n "checking configure arguments""... $ac_c" 1>&6 -echo "configure:1123: checking configure arguments" >&5 +echo "configure:1153: checking configure arguments" >&5 top_builddir=`pwd` @@ -1225,10 +1255,10 @@ else ol_enable_cache="yes" fi # end --enable-cache -# OpenLDAP --enable-dns - # Check whether --enable-dns or --disable-dns was given. -if test "${enable_dns+set}" = set; then - enableval="$enable_dns" +# OpenLDAP --enable-referrals + # Check whether --enable-referrals or --disable-referrals was given. +if test "${enable_referrals+set}" = set; then + enableval="$enable_referrals" ol_arg=invalid for ol_val in auto yes no ; do @@ -1237,18 +1267,18 @@ if test "${enable_dns+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; } fi - ol_enable_dns="$ol_arg" + ol_enable_referrals="$ol_arg" else - ol_enable_dns="no" + ol_enable_referrals="yes" fi -# end --enable-dns -# OpenLDAP --enable-referrals - # Check whether --enable-referrals or --disable-referrals was given. -if test "${enable_referrals+set}" = set; then - enableval="$enable_referrals" +# end --enable-referrals +# OpenLDAP --enable-kbind + # Check whether --enable-kbind or --disable-kbind was given. +if test "${enable_kbind+set}" = set; then + enableval="$enable_kbind" ol_arg=invalid for ol_val in auto yes no ; do @@ -1257,18 +1287,18 @@ if test "${enable_referrals+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; } fi - ol_enable_referrals="$ol_arg" + ol_enable_kbind="$ol_arg" else - ol_enable_referrals="yes" + ol_enable_kbind="auto" fi -# end --enable-referrals -# OpenLDAP --enable-cldap - # Check whether --enable-cldap or --disable-cldap was given. -if test "${enable_cldap+set}" = set; then - enableval="$enable_cldap" +# end --enable-kbind +# OpenLDAP --enable-ipv6 + # Check whether --enable-ipv6 or --disable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval="$enable_ipv6" ol_arg=invalid for ol_val in auto yes no ; do @@ -1277,55 +1307,55 @@ if test "${enable_cldap+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; } fi - ol_enable_cldap="$ol_arg" + ol_enable_ipv6="$ol_arg" else - ol_enable_cldap="no" + ol_enable_ipv6="auto" fi -# end --enable-cldap -# OpenLDAP --enable-x_compile - # Check whether --enable-x_compile or --disable-x_compile was given. -if test "${enable_x_compile+set}" = set; then - enableval="$enable_x_compile" +# end --enable-ipv6 +# OpenLDAP --enable-local + # Check whether --enable-local or --disable-local was given. +if test "${enable_local+set}" = set; then + enableval="$enable_local" ol_arg=invalid - for ol_val in yes no ; do + 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 "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; } fi - ol_enable_x_compile="$ol_arg" + ol_enable_local="$ol_arg" else - ol_enable_x_compile="no" + ol_enable_local="auto" fi -# end --enable-x_compile - -# OpenLDAP --enable-dmalloc - # Check whether --enable-dmalloc or --disable-dmalloc was given. -if test "${enable_dmalloc+set}" = set; then - enableval="$enable_dmalloc" +# end --enable-local +# OpenLDAP --enable-x_compile + # Check whether --enable-x_compile or --disable-x_compile was given. +if test "${enable_x_compile+set}" = set; then + enableval="$enable_x_compile" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in yes no ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; } fi - ol_enable_dmalloc="$ol_arg" + ol_enable_x_compile="$ol_arg" else - ol_enable_dmalloc="no" + ol_enable_x_compile="no" fi -# end --enable-dmalloc +# end --enable-x_compile + # OpenLDAP --with-cyrus_sasl # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given. @@ -1375,7 +1405,7 @@ if test "${with_kerberos+set}" = set; then withval="$with_kerberos" ol_arg=invalid - for ol_val in auto k5 k4 afs yes no ; do + for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1417,7 +1447,7 @@ if test "${with_threads+set}" = set; then withval="$with_threads" ol_arg=invalid - for ol_val in auto posix mach pth lwp yes no manual ; do + for ol_val in auto nt posix mach pth lwp yes no manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1476,33 +1506,6 @@ fi -# Check whether --with-xxldapdoptions or --without-xxldapdoptions was given. -if test "${with_xxldapdoptions+set}" = set; then - withval="$with_xxldapdoptions" - : -fi - -# OpenLDAP --enable-ldapd - # Check whether --enable-ldapd or --disable-ldapd was given. -if test "${enable_ldapd+set}" = set; then - enableval="$enable_ldapd" - - 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 "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; } - fi - ol_enable_ldapd="$ol_arg" - -else - ol_enable_ldapd="no" -fi -# end --enable-ldapd - # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given. if test "${with_xxslapdoptions+set}" = set; then withval="$with_xxslapdoptions" @@ -1569,6 +1572,46 @@ else ol_enable_crypt="auto" fi # end --enable-crypt +# OpenLDAP --enable-kpasswd + # Check whether --enable-kpasswd or --disable-kpasswd was given. +if test "${enable_kpasswd+set}" = set; then + enableval="$enable_kpasswd" + + 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 "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; } + fi + ol_enable_kpasswd="$ol_arg" + +else + ol_enable_kpasswd="no" +fi +# end --enable-kpasswd +# OpenLDAP --enable-spasswd + # Check whether --enable-spasswd or --disable-spasswd was given. +if test "${enable_spasswd+set}" = set; then + enableval="$enable_spasswd" + + 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 "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; } + fi + ol_enable_spasswd="$ol_arg" + +else + ol_enable_spasswd="no" +fi +# end --enable-spasswd # OpenLDAP --enable-modules # Check whether --enable-modules or --disable-modules was given. if test "${enable_modules+set}" = set; then @@ -1629,26 +1672,6 @@ else ol_enable_phonetic="no" fi # end --enable-phonetic -# OpenLDAP --enable-quipu - # Check whether --enable-quipu or --disable-quipu was given. -if test "${enable_quipu+set}" = set; then - enableval="$enable_quipu" - - 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 "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; } - fi - ol_enable_quipu="$ol_arg" - -else - ol_enable_quipu="no" -fi -# end --enable-quipu # OpenLDAP --enable-rlookups # Check whether --enable-rlookups or --disable-rlookups was given. if test "${enable_rlookups+set}" = set; then @@ -1689,10 +1712,10 @@ else ol_enable_aci="no" fi # end --enable-aci -# OpenLDAP --enable-discreteaci - # Check whether --enable-discreteaci or --disable-discreteaci was given. -if test "${enable_discreteaci+set}" = set; then - enableval="$enable_discreteaci" +# OpenLDAP --enable-wrappers + # Check whether --enable-wrappers or --disable-wrappers was given. +if test "${enable_wrappers+set}" = set; then + enableval="$enable_wrappers" ol_arg=invalid for ol_val in auto yes no ; do @@ -1701,18 +1724,18 @@ if test "${enable_discreteaci+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; } fi - ol_enable_discreteaci="$ol_arg" + ol_enable_wrappers="$ol_arg" else - ol_enable_discreteaci="no" + ol_enable_wrappers="no" fi -# end --enable-discreteaci -# OpenLDAP --enable-wrappers - # Check whether --enable-wrappers or --disable-wrappers was given. -if test "${enable_wrappers+set}" = set; then - enableval="$enable_wrappers" +# end --enable-wrappers +# OpenLDAP --enable-dynamic + # Check whether --enable-dynamic or --disable-dynamic was given. +if test "${enable_dynamic+set}" = set; then + enableval="$enable_dynamic" ol_arg=invalid for ol_val in auto yes no ; do @@ -1721,19 +1744,19 @@ if test "${enable_wrappers+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; } fi - ol_enable_wrappers="$ol_arg" + ol_enable_dynamic="$ol_arg" else - ol_enable_wrappers="no" + ol_enable_dynamic="no" fi -# end --enable-wrappers +# end --enable-dynamic -# OpenLDAP --enable-bdb2 - # Check whether --enable-bdb2 or --disable-bdb2 was given. -if test "${enable_bdb2+set}" = set; then - enableval="$enable_bdb2" +# OpenLDAP --enable-dnssrv + # Check whether --enable-dnssrv or --disable-dnssrv was given. +if test "${enable_dnssrv+set}" = set; then + enableval="$enable_dnssrv" ol_arg=invalid for ol_val in auto yes no ; do @@ -1742,18 +1765,18 @@ if test "${enable_bdb2+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; } fi - ol_enable_bdb2="$ol_arg" + ol_enable_dnssrv="$ol_arg" else - ol_enable_bdb2="no" + ol_enable_dnssrv="no" fi -# end --enable-bdb2 -# OpenLDAP --with-bdb2_module - # Check whether --with-bdb2_module or --without-bdb2_module was given. -if test "${with_bdb2_module+set}" = set; then - withval="$with_bdb2_module" +# end --enable-dnssrv +# OpenLDAP --with-dnssrv_module + # Check whether --with-dnssrv_module or --without-dnssrv_module was given. +if test "${with_dnssrv_module+set}" = set; then + withval="$with_dnssrv_module" ol_arg=invalid for ol_val in static dynamic ; do @@ -1762,14 +1785,14 @@ if test "${with_bdb2_module+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; } + { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; } fi - ol_with_bdb2_module="$ol_arg" + ol_with_dnssrv_module="$ol_arg" else - ol_with_bdb2_module="static" + ol_with_dnssrv_module="static" fi -# end --with-bdb2_module +# end --with-dnssrv_module # OpenLDAP --enable-ldap # Check whether --enable-ldap or --disable-ldap was given. @@ -1838,7 +1861,7 @@ if test "${with_ldbm_api+set}" = set; then withval="$with_ldbm_api" ol_arg=invalid - for ol_val in auto db2 db mdbm gdbm ndbm manual ; do + for ol_val in auto berkeley bcompat mdbm gdbm ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1895,7 +1918,6 @@ else fi # end --with-ldbm_type - # OpenLDAP --enable-passwd # Check whether --enable-passwd or --disable-passwd was given. if test "${enable_passwd+set}" = set; then @@ -2019,6 +2041,47 @@ else fi # end --with-shell_module +# OpenLDAP --enable-sql + # Check whether --enable-sql or --disable-sql was given. +if test "${enable_sql+set}" = set; then + enableval="$enable_sql" + + 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 "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; } + fi + ol_enable_sql="$ol_arg" + +else + ol_enable_sql="no" +fi +# end --enable-sql +# OpenLDAP --with-sql_module + # Check whether --with-sql_module or --without-sql_module was given. +if test "${with_sql_module+set}" = set; then + withval="$with_sql_module" + + ol_arg=invalid + for ol_val in static dynamic ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; } + fi + ol_with_sql_module="$ol_arg" + +else + ol_with_sql_module="static" +fi +# end --with-sql_module + # OpenLDAP --enable-tcl # Check whether --enable-tcl or --disable-tcl was given. if test "${enable_tcl+set}" = set; then @@ -2141,20 +2204,11 @@ else fi -# validate options -if test $ol_enable_dns = yes ; then - if test $ol_enable_referrals = no ; then - { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; } - fi - if test $ol_enable_referrals = auto ; then - echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2 - ol_enable_referrals=yes - fi -fi +# validate options if test $ol_enable_slapd = no ; then - if test $ol_enable_bdb2 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2 + if test $ol_enable_dnssrv = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2 fi if test $ol_enable_ldap = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2 @@ -2174,6 +2228,9 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_tcl = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2 fi + if test $ol_enable_sql = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2 + fi if test $ol_enable_modules = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2 fi @@ -2186,26 +2243,20 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_phonetic = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2 fi - if test $ol_enable_quipu = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2 - fi if test $ol_enable_rlookups = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2 fi if test $ol_enable_aci = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2 fi - if test $ol_enable_discreteaci = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2 - fi if test $ol_with_ldbm_api != auto ; then echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2 fi if test $ol_with_ldbm_type != auto ; then echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2 fi - if test $ol_with_bdb2_module != static ; then - echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2 + if test $ol_with_dnssrv_module != static ; then + echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2 fi if test $ol_with_ldap_module != static ; then echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2 @@ -2225,38 +2276,42 @@ if test $ol_enable_slapd = no ; then if test $ol_with_tcl_module != static ; then echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2 fi + if test $ol_with_sql_module != static ; then + echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2 + fi if test $ol_enable_slurpd = yes ; then { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; } fi # force settings to no - ol_enable_bdb2=no + ol_enable_dnssrv=no ol_enable_ldap=no ol_enable_ldbm=no ol_enable_passwd=no ol_enable_perl=no ol_enable_shell=no ol_enable_tcl=no + ol_enable_sql=no ol_enable_modules=no ol_enable_multimaster=no ol_enable_phonetic=no - ol_enable_quipu=no ol_enable_rlookups=no ol_enable_aci=no - ol_enable_discreteaci=no ol_enable_wrappers=no + ol_enable_dynamic=no ol_with_ldbm_api=no ol_with_ldbm_type=no - ol_with_bdb2_module=static + ol_with_dnssrv_module=static ol_with_ldap_module=static ol_with_ldbm_module=static ol_with_passwd_module=static ol_with_perl_module=static ol_with_shell_module=static ol_with_tcl_module=static + ol_with_sql_module=static ol_enable_slurpd=no @@ -2274,15 +2329,13 @@ elif test $ol_enable_ldbm = no ; then echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2 fi - if test $ol_enable_bdb2 = yes ; then - { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; } - fi - if test $ol_enable_modules != yes -a \ + $ol_enable_dnssrv = no -a \ $ol_enable_ldap = no -a \ $ol_enable_passwd = no -a \ $ol_enable_perl = no -a \ $ol_enable_shell = no -a \ + $ol_enable_sql = no -a \ $ol_enable_tcl = no ; then { echo "configure: error: slapd requires a backend" 1>&2; exit 1; } fi @@ -2291,26 +2344,8 @@ elif test $ol_enable_ldbm = no ; then ol_with_ldbm_type=no ol_with_ldbm_module=static -elif test $ol_enable_bdb2 = yes ; then - - if test $ol_with_ldbm_api != auto -a \ - $ol_with_ldbm_api != db2 ; then - { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; } - fi - - ol_with_ldbm_api=db2 - else - - if test $ol_enable_bdb2 != no ; then - if test $ol_with_ldbm_api != auto -a \ - $ol_with_ldbm_api != db2 ; then - echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2 - ol_enable_bdb2=no - fi - fi - - if test $ol_with_ldbm_api = gdbm -a \ + if test $ol_with_ldbm_api = gdbm -a \ $ol_with_ldbm_type = btree ; then { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; } fi @@ -2330,54 +2365,80 @@ if test $ol_enable_slurpd = yes ; then fi fi +if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then + if test $ol_with_kerberos = no ; then + { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; } + fi +elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then + if test $ol_with_kerberos != auto ; then + echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2; + else + ol_with_kerberos=no + fi +fi + +if test $ol_enable_spasswd = yes ; then + if test $ol_with_cyrus_sasl = no ; then + { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; } + fi + ol_link_spasswd=yes +fi + echo "$ac_t""done" 1>&6 -## Initialize vars LDAP_LIBS= LDIF_LIBS= LDBM_LIBS= LTHREAD_LIBS= LUTIL_LIBS= -LDAPD_LIBS= SLAPD_LIBS= SLURPD_LIBS= -BUILD_LDAPD=no BUILD_SLAPD=no BUILD_SLURPD=no -BUILD_BDB2=no +BUILD_THREAD=no + +BUILD_DNSSRV=no BUILD_LDAP=no BUILD_LDBM=no BUILD_PASSWD=no BUILD_PERL=no -BUILD_QUIPU=no BUILD_SHELL=no +BUILD_SQL=no BUILD_TCL=no -BUILD_THREAD=no -BUILD_BDB2_DYNAMIC=static +BUILD_DNSSRV_DYNAMIC=static BUILD_LDAP_DYNAMIC=static BUILD_LDBM_DYNAMIC=static BUILD_PASSWD_DYNAMIC=static BUILD_PERL_DYNAMIC=static BUILD_SHELL_DYNAMIC=static BUILD_TCL_DYNAMIC=static +BUILD_SQL_DYNAMIC=static SLAPD_MODULES_LDFLAGS= SLAPD_MODULES_CPPFLAGS= SLAPD_MODULES_LIST= SLAPD_PERL_LDFLAGS= -SLAPD_PERL_CPPFLAGS= +MOD_PERL_LDFLAGS= +PERL_CPPFLAGS= -KRB_LIBS= +SLAPD_SQL_LDFLAGS= +SLAPD_SQL_LIBS= +SLAPD_SQL_INCLUDES= + +MOD_TCL_LIB= +KRB4_LIBS= +KRB5_LIBS= READLINE_LIBS= SASL_LIBS= TERMCAP_LIBS= TLS_LIBS= MODULES_LIBS= +AUTH_LIBS= @@ -2388,7 +2449,6 @@ EOF - ol_aix_threads=no case "$target" in *-*-aix*) if test -z "$CC" ; then @@ -2406,7 +2466,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2410: checking for $ac_word" >&5 +echo "configure:2470: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2458,7 +2518,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2462: checking for $ac_word" >&5 +echo "configure:2522: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2491,6 +2551,7 @@ fi + # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" @@ -2517,7 +2578,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2521: checking for $ac_word" >&5 +echo "configure:2582: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2547,7 +2608,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2551: checking for $ac_word" >&5 +echo "configure:2612: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2577,7 +2638,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2581: checking for $ac_word" >&5 +echo "configure:2642: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2628,7 +2689,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2632: checking for $ac_word" >&5 +echo "configure:2693: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2660,7 +2721,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2664: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:2725: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2671,12 +2732,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2675 "configure" +#line 2736 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2702,12 +2763,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2706: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2767: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2711: checking whether we are using GNU C" >&5 +echo "configure:2772: checking whether we are using GNU C" >&5 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2716,7 +2777,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2735,7 +2796,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2739: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2800: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2778,7 +2839,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:2782: checking for ld used by GCC" >&5 +echo "configure:2843: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -2802,10 +2863,10 @@ echo "configure:2782: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:2806: checking for GNU ld" >&5 +echo "configure:2867: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2809: checking for non-GNU ld" >&5 +echo "configure:2870: checking for non-GNU ld" >&5 fi if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2839,9 +2900,8 @@ else echo "$ac_t""no" 1>&6 fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:2845: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:2905: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2857,7 +2917,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2861: checking for BSD-compatible nm" >&5 +echo "configure:2921: checking for BSD-compatible nm" >&5 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2892,9 +2952,8 @@ fi NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2898: checking whether ln -s works" >&5 +echo "configure:2957: checking whether ln -s works" >&5 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2914,6 +2973,17 @@ else echo "$ac_t""no" 1>&6 fi +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + + +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" @@ -2923,7 +2993,7 @@ test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" libtool_flags="$libtool_flags --enable-dlopen" - +libtool_flags="$libtool_flags --enable-win32-dll" # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" @@ -2935,11 +3005,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2942 "configure"' > conftest.$ac_ext - if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 3012 "configure"' > conftest.$ac_ext + if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2960,19 +3030,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2964: checking whether the C compiler needs -belf" >&5 +echo "configure:3034: checking whether the C compiler needs -belf" >&5 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2991,100 +3061,303 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 fi ;; - -esac - - -# Save cache, so that ltconfig can load it - - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ -|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } - -# Reload cache, that may have been modified by ltconfig - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log - - -for ac_prog in mawk gawk nawk awk -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 +*-*-cygwin* | *-*-mingw*) + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3030: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then +echo "configure:3069: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$ac_prog" + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" break fi done IFS="$ac_save_ifs" fi fi -AWK="$ac_cv_prog_AWK" -if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 else echo "$ac_t""no" 1>&6 fi -test -n "$AWK" && break -done -# test for ln hardlink support -echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:3061: checking whether ln works" >&5 -if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then +if test -z "$ac_cv_prog_DLLTOOL"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3101: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - rm -f conftest.src conftest.dst -echo "conftest" > conftest.src -if ln conftest.src conftest.dst 2>/dev/null -then - ol_cv_prog_LN_H="ln" + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else - ol_cv_prog_LN_H="cp" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="dlltool" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" fi -rm -f conftest.src conftest.dst - fi -LN_H="$ol_cv_prog_LN_H" -if test "$ol_cv_prog_LN_H" = "ln"; then - echo "$ac_t""yes" 1>&6 +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 else - echo "$ac_t""no" 1>&6 + echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3084: checking whether ln -s works" >&5 -if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 else - rm -f conftestdata + DLLTOOL="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3136: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="${ac_tool_prefix}as" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_AS"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3168: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="as" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + AS="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3203: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_OBJDUMP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3235: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="objdump" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + OBJDUMP="false" +fi +fi + + ;; + +esac + + +# Save cache, so that ltconfig can load it + + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + +# Reload cache, that may have been modified by ltconfig + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log + + +for ac_prog in mawk gawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3303: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + +# test for ln hardlink support +echo $ac_n "checking whether ln works""... $ac_c" 1>&6 +echo "configure:3334: checking whether ln works" >&5 +if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest.src conftest.dst +echo "conftest" > conftest.src +if ln conftest.src conftest.dst 2>/dev/null +then + ol_cv_prog_LN_H="ln" +else + ol_cv_prog_LN_H="cp" +fi +rm -f conftest.src conftest.dst + +fi +LN_H="$ol_cv_prog_LN_H" +if test "$ol_cv_prog_LN_H" = "ln"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:3357: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata @@ -3108,7 +3381,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3112: checking for $ac_word" >&5 +echo "configure:3385: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3116,7 +3389,7 @@ else /*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path. ;; *) @@ -3144,7 +3417,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3148: checking for $ac_word" >&5 +echo "configure:3421: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3152,7 +3425,7 @@ else /*) ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path. ;; *) @@ -3180,7 +3453,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3184: checking for $ac_word" >&5 +echo "configure:3457: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3188,7 +3461,7 @@ else /*) ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path. ;; *) @@ -3219,7 +3492,7 @@ if test $ol_enable_perl != no ; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3223: checking for $ac_word" >&5 +echo "configure:3496: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3227,7 +3500,7 @@ else /*) ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path. ;; *) @@ -3259,15 +3532,18 @@ fi fi else - SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" - SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" - + PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" + if test x"$ol_with_perl_module" = "xstatic" ; then + SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + else + MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + fi ol_link_perl=yes fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3271: checking how to run the C preprocessor" >&5 +echo "configure:3547: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3282,13 +3558,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3299,13 +3575,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3316,13 +3592,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3360,9 +3636,9 @@ elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:3364: checking for AIX" >&5 +echo "configure:3640: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3388: checking for POSIXized ISC" >&5 +echo "configure:3664: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -3406,17 +3682,17 @@ fi ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:3410: checking for minix/config.h" >&5 +echo "configure:3686: checking for minix/config.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3455,12 +3731,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3459: checking for Cygwin environment" >&5 +echo "configure:3735: checking for Cygwin environment" >&5 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -3487,19 +3763,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:3491: checking for mingw32 environment" >&5 +echo "configure:3767: checking for mingw32 environment" >&5 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3515,19 +3791,19 @@ echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 -echo "configure:3519: checking for EMX OS/2 environment" >&5 +echo "configure:3795: checking for EMX OS/2 environment" >&5 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -3546,7 +3822,7 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3550: checking for executable suffix" >&5 +echo "configure:3826: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3556,7 +3832,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -3577,13 +3853,13 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6 ac_exeext=$EXEEXT echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:3581: checking for object suffix" >&5 +echo "configure:3857: checking for object suffix" >&5 if eval "test \"\${ac_cv_objext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -3607,7 +3883,7 @@ EOF echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 -echo "configure:3611: checking for be_app in -lbe" >&5 +echo "configure:3887: checking for be_app in -lbe" >&5 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3615,7 +3891,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbe -lroot -lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3652,7 +3928,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:3656: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:3932: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3669,7 +3945,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -3706,7 +3982,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -3740,7 +4016,7 @@ if test -z "${MKDEP}"; then OL_MKDEP="${CC-cc}" if test -z "${MKDEP_FLAGS}"; then echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6 -echo "configure:3744: checking for ${OL_MKDEP} depend flag" >&5 +echo "configure:4020: checking for ${OL_MKDEP} depend flag" >&5 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3750,7 +4026,7 @@ else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } \ + if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \ | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1 then if test ! -f conftest."${ac_object}" ; then @@ -3782,75 +4058,27 @@ if test "${ol_cv_mkdep}" = no ; then echo "configure: warning: do not know how to generate dependencies" 1>&2 fi -ol_link_modules=no -if test $ol_enable_modules != no ; then - for ac_hdr in ltdl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3792: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - - if test $ac_cv_header_ltdl_h = no ; then - { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; } - - fi - - echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 -echo "configure:3835: checking for lt_dlinit in -lltdl" >&5 -ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'` +echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6 +echo "configure:4063: checking for afopen in -ls" >&5 +ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lltdl $LIBS" +LIBS="-ls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3865,41 +4093,250 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_AIX_SECURITY 1 EOF - LIBS="-lltdl $LIBS" else echo "$ac_t""no" 1>&6 fi - if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then - { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; } - fi - ol_link_modules=yes -else - ol_with_bdb2_module=static - ol_with_ldap_module=static - ol_with_ldbm_module=static - ol_with_passwd_module=static - ol_with_perl_module=static - ol_with_shell_module=static - ol_with_tcl_module=static -fi -# test for EBCDIC -echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 -echo "configure:3897: checking for EBCDIC" >&5 -if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - + +for ac_func in getaddrinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4113: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + +; return 0; } +EOF +if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +if test $ac_cv_func_getaddrinfo = no ; then + if test $ol_enable_ipv6 = yes ; then + { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; } + fi + ol_enable_ipv6=no +fi + +if test $ol_enable_local != no ; then + for ac_hdr in sys/un.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4179: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ol_enable_local = auto ; then + ol_enable_local=$ac_cv_header_sys_un_h + elif test $ac_cv_header_sys_un_h = no ; then + { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; } + fi +fi + +ol_link_modules=no +if test $ol_enable_modules != no ; then + for ac_hdr in ltdl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4229: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_ltdl_h = no ; then + { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; } + fi + + echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 +echo "configure:4271: checking for lt_dlinit in -lltdl" >&5 +ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lltdl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + MODULES_LIBS=-lltdl + cat >> confdefs.h <<\EOF +#define HAVE_LIBLTDL 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then + { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; } + fi + ol_link_modules=yes +else + ol_with_dnssrv_module=static + ol_with_ldap_module=static + ol_with_ldbm_module=static + ol_with_passwd_module=static + ol_with_perl_module=static + ol_with_shell_module=static + ol_with_tcl_module=static + ol_with_sql_module=static +fi + +# test for EBCDIC +echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 +echo "configure:4334: checking for EBCDIC" >&5 +if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3932,12 +4369,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3936: checking for ANSI C header files" >&5 +echo "configure:4373: checking for ANSI C header files" >&5 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3945,7 +4382,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3962,7 +4399,7 @@ rm -f conftest* if test $ol_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3980,7 +4417,7 @@ fi if test $ol_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4001,7 +4438,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #ifndef HAVE_EBCDIC @@ -4019,7 +4456,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4053,12 +4490,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4057: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4494: checking for $ac_hdr that defines DIR" >&5 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4066,7 +4503,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4091,7 +4528,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4095: checking for opendir in -ldir" >&5 +echo "configure:4532: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4099,7 +4536,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4132,7 +4569,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4136: checking for opendir in -lx" >&5 +echo "configure:4573: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4140,7 +4577,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4174,12 +4611,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4178: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4615: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4195,7 +4632,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4216,12 +4653,12 @@ EOF fi echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:4220: checking POSIX termios" >&5 +echo "configure:4657: checking POSIX termios" >&5 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4231,7 +4668,7 @@ int main() { tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_sys_posix_termios=yes else @@ -4247,7 +4684,7 @@ echo "$ac_t""$am_cv_sys_posix_termios" 1>&6 echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:4251: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +echo "configure:4688: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4256,7 +4693,7 @@ else gwinsz_in_termios_h=no if test $am_cv_sys_posix_termios = yes; then cat > conftest.$ac_ext < # include @@ -4276,7 +4713,7 @@ rm -f conftest* if test $gwinsz_in_termios_h = no; then cat > conftest.$ac_ext < # include @@ -4315,12 +4752,15 @@ for ac_hdr in \ arpa/inet.h \ arpa/nameser.h \ assert.h \ + conio.h \ crypt.h \ + direct.h \ errno.h \ fcntl.h \ filio.h \ getopt.h \ grp.h \ + io.h \ libutil.h \ limits.h \ locale.h \ @@ -4329,6 +4769,7 @@ for ac_hdr in \ memory.h \ psap.h \ pwd.h \ + process.h \ resolv.h \ sgtty.h \ shadow.h \ @@ -4350,21 +4791,22 @@ for ac_hdr in \ syslog.h \ termios.h \ unistd.h \ + winsock.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4358: checking for $ac_hdr" >&5 +echo "configure:4800: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4393,114 +4835,165 @@ done -echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:4398: checking for socket" >&5 -if eval "test \"\${ac_cv_func_socket+set}\" = set"; then +echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:4840: checking for sigset in -lV3" >&5 +ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char socket(); -char (*f)(); +char sigset(); int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_socket) || defined (__stub___socket) -choke me -#else -f = socket; -#endif - +sigset() ; return 0; } EOF -if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_socket=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_socket=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 - - echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4446: checking for main in -lsocket" >&5 -ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then +fi + + +if test $ac_cv_header_winsock_h = yes; then + echo $ac_n "checking for winsock""... $ac_c" 1>&6 +echo "configure:4889: checking for winsock" >&5 +if eval "test \"\${ol_cv_winsock+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -main() + + socket(0,0,0); + select(0,NULL,NULL,NULL,NULL); + closesocket(0); + gethostname(NULL,0); + ; return 0; } EOF -if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_winsock=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ol_cv_winsock=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest*] fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 + + if test $ol_cv_winsock = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_WINSOCK 1 EOF - LIBS="-lsocket $LIBS" + ac_cv_func_socket=yes + ac_cv_func_select=yes + ac_cv_func_closesocket=yes + ac_cv_func_gethostname=yes + fi +fi + +echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:4934: checking for socket" >&5 +if eval "test \"\${ac_cv_func_socket+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_socket) || defined (__stub___socket) +choke me +#else +f = socket; +#endif + +; return 0; } +EOF +if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socket=no" +fi +rm -f conftest* fi - echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:4489: checking for main in -lnet" >&5 -ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +echo "configure:4982: checking for main in -lsocket" >&5 +ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lnet $LIBS" +LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4515,39 +5008,35 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi - echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 -echo "configure:4532: checking for socket in -lnet" >&5 -ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'` + echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 +echo "configure:5025: checking for main in -lnet" >&5 +ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4575,7 +5064,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:4579: checking for main in -lnsl_s" >&5 +echo "configure:5068: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4583,14 +5072,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4618,7 +5107,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4622: checking for main in -lnsl" >&5 +echo "configure:5111: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4626,14 +5115,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4661,7 +5150,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:4665: checking for socket in -linet" >&5 +echo "configure:5154: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4669,7 +5158,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4708,7 +5197,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:4712: checking for main in -lgen" >&5 +echo "configure:5201: checking for main in -lgen" >&5 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4716,14 +5205,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4755,12 +5244,12 @@ fi echo $ac_n "checking for select""... $ac_c" 1>&6 -echo "configure:4759: checking for select" >&5 +echo "configure:5248: checking for select" >&5 if eval "test \"\${ac_cv_func_select+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_select=yes" else @@ -4805,8 +5294,9 @@ else fi -echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 -echo "configure:4810: checking types of arguments for select()" >&5 +if test "${ac_cv_header_winsock_h}" != yes; then + echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 +echo "configure:5300: checking types of arguments for select()" >&5 if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4820,7 +5310,7 @@ else for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do cat > conftest.$ac_ext < @@ -4839,7 +5329,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_not_found=no ; break 3 else @@ -4877,23 +5367,24 @@ EOF EOF +fi for ac_hdr in regex.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4887: checking for $ac_hdr" >&5 +echo "configure:5378: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4923,12 +5414,12 @@ if test "$ac_cv_header_regex_h" != yes ; then { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; } fi echo $ac_n "checking for regfree""... $ac_c" 1>&6 -echo "configure:4927: checking for regfree" >&5 +echo "configure:5418: checking for regfree" >&5 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_regfree=yes" else @@ -4975,7 +5466,7 @@ fi echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 -echo "configure:4979: checking for compatible POSIX regex" >&5 +echo "configure:5470: checking for compatible POSIX regex" >&5 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4984,7 +5475,7 @@ else ol_cv_c_posix_regex=cross else cat > conftest.$ac_ext < @@ -5010,7 +5501,7 @@ main() return rc; } EOF -if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_c_posix_regex=yes else @@ -5030,70 +5521,22 @@ if test "$ol_cv_c_posix_regex" = no ; then { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; } fi - -echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:5036: checking for sigset in -lV3" >&5 -ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lV3 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - -echo $ac_n "checking for res_search""... $ac_c" 1>&6 -echo "configure:5084: checking for res_search" >&5 -if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then +ol_link_dnssrv=no +echo $ac_n "checking for res_query""... $ac_c" 1>&6 +echo "configure:5527: checking for res_query" >&5 +if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char res_search(); +char res_query(); char (*f)(); int main() { @@ -5101,55 +5544,55 @@ int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_res_search) || defined (__stub___res_search) +#if defined (__stub_res_query) || defined (__stub___res_query) choke me #else -f = res_search; +f = res_query; #endif ; return 0; } EOF -if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_res_search=yes" + eval "ac_cv_func_res_query=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_res_search=no" + eval "ac_cv_func_res_query=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi -if test $ac_cv_func_res_search = no ; then - echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 -echo "configure:5134: checking for res_search in -lbind" >&5 -ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'` +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6 +echo "configure:5577: checking for res_query in -lbind" >&5 +ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5176,31 +5619,31 @@ else echo "$ac_t""no" 1>&6 fi - ac_cv_func_res_search=$ac_cv_lib_bind_res_search + ac_cv_func_res_query=$ac_cv_lib_bind_res_query fi -if test $ac_cv_func_res_search = no ; then - echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6 -echo "configure:5185: checking for __res_search in -lbind" >&5 -ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'` +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6 +echo "configure:5628: checking for __res_query in -lbind" >&5 +ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5227,31 +5670,31 @@ else echo "$ac_t""no" 1>&6 fi - ac_cv_func_res_search=$ac_cv_lib_bind___res_search + ac_cv_func_res_query=$ac_cv_lib_bind___res_query fi -if test $ac_cv_func_res_search = no ; then - echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 -echo "configure:5236: checking for res_search in -lresolv" >&5 -ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'` +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6 +echo "configure:5679: checking for res_query in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5278,131 +5721,138 @@ else echo "$ac_t""no" 1>&6 fi - ac_cv_func_res_search=$ac_cv_lib_resolv_res_search + ac_cv_func_res_query=$ac_cv_lib_resolv_res_query fi -if test "$ac_cv_func_res_search" = yes ; then +if test "$ac_cv_func_res_query" = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_RES_SEARCH 1 +#define HAVE_RES_QUERY 1 EOF -elif test $ol_enable_dns = yes ; then - { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; } -elif test $ol_enable_dns != no ; then - echo "configure: warning: no res_search, disabling DNS support" 1>&2 + + if test $ol_enable_dnssrv != no ; then + ol_link_dnssrv=yes + fi +fi + +if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then + { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; } fi +ol_link_kbind=no +ol_link_kpasswd=no +ol_link_krb5=no +ol_link_krb4=no -# ISODE tests -ol_link_isode=no -if test $ol_enable_ldapd != no ; then - echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2 +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \ + -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then - echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 -echo "configure:5303: checking for main in -lxtpp" >&5 -ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + for ac_hdr in krb5.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5755: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_XTPP 1 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -: fi +done - echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 -echo "configure:5347: checking for main in -ldsap" >&5 -ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + + if test $ac_cv_header_krb5_h = yes ; then + for ac_hdr in heim_err.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5797: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldsap -lisode $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_DSAP 1 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -: fi +done + + if test $ac_cv_header_heim_err_h = yes ; then + krb5_impl=heimdal + else + krb5_impl=mit + fi - echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 -echo "configure:5391: checking for main in -lisode" >&5 -ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'` + if test $krb5_impl = mit; then + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:5841: checking for main in -lkrb5" >&5 +ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lisode $LIBS" +LIBS="-lkrb5 -lcrypto -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5417,39 +5867,32 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_ISODE 1 -EOF - - LDAPD_LIBS="$LDAPD_LIBS -lisode" - + have_krb5=yes + KRB5_LIBS="-lkrb5 -lcrypto -lcom_err" else echo "$ac_t""no" 1>&6 -: +have_krb5=no fi -fi -if test $ol_link_isode != no; then - echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 -echo "configure:5438: checking for main in -lpp" >&5 -ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'` + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:5881: checking for main in -lkrb5" >&5 +ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpp $LIBS" +LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5464,72 +5907,64 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define HAVE_PP 1 -EOF - - LDAPD_LIBS="-lpp $LDAPD_LIBS" - + have_krb5=yes + KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err" else echo "$ac_t""no" 1>&6 -: +have_krb5=no fi - # Extract the first word of "pepsy", so it can be a program name with args. -set dummy pepsy; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5484: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PEPSY" in - /*) - ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PEPSY="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -PEPSY="$ac_cv_path_PEPSY" -if test -n "$PEPSY"; then - echo "$ac_t""$PEPSY" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi + cat >> confdefs.h <<\EOF +#define HAVE_HEIMDAL_KERBEROS 1 +EOF -fi + else + have_krb5=no + echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2 + fi -if test $ol_enable_quipu != no ; then - for ac_hdr in quipu/commonarg.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5523: checking for $ac_hdr" >&5 + if test $have_krb5 = yes ; then + ol_link_krb5=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KRB5 1 +EOF + + + if test $ol_enable_kpasswd != no ; then + ol_link_kpasswd=yes; + fi + + if test $ol_with_kerberos = k5only ; then + ol_with_kerberos=found + fi + + elif test $ol_with_kerberos != auto ; then + { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; } + fi + + fi +fi + +if test $ol_link_krb5 = yes -a \ + \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then + + for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5958: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5556,77 +5991,65 @@ fi done - if test $ac_cv_header_quipu_commonarg_h = yes ; then - BUILD_QUIPU=yes - elif test $ol_enable_quipu = auto ; then - echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2 - else - { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; } - fi -fi - -ol_link_kerberos=no - -if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then - for ac_hdr in kerberosIV/krb.h kerberosIV/des.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5576: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + if test $krb5_impl = mit; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:5998: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < + +int main() { +main() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then +if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +have_k425=no fi -done - if test $ac_cv_header_kerberosIV_krb_h = yes ; then - echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:5615: checking for main in -lkrb4" >&5 + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:6038: checking for main in -lkrb4" >&5 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5641,31 +6064,42 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_k5=yes + have_k425=yes + KRB4_LIBS="-lkrb4" else echo "$ac_t""no" 1>&6 -have_k5=no +have_k425=no fi - if test $have_k5 = yes ; then + else + have_425=no + echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2 + fi + + if test $have_k425 = yes ; then ol_with_kerberos=found - ol_link_kerberos=yes + ol_link_krb4=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KRB425 1 +EOF - KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF - LIBS="$KRB_LIBS $LIBS" echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 -echo "configure:5661: checking for des_debug in Kerberos libraries" >&5 +echo "configure:6095: checking for des_debug in Kerberos libraries" >&5 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_LIBS="$LIBS" - LIBS="$KRB_LIBS $LIBS" + LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS" cat > conftest.$ac_ext < @@ -5678,7 +6112,7 @@ des_debug = 1; ; return 0; } EOF -if { (eval echo configure:5682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_var_des_debug=yes else @@ -5706,22 +6140,28 @@ EOF fi fi -if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then - for ac_hdr in krb.h des.h +if test $ol_link_krb5 = yes ; then + ol_with_kerberos=found +fi + +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \ + -o $ol_with_kerberos = kth ; then + + for ac_hdr in krb.h des.h krb-archaeology.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5715: checking for $ac_hdr" >&5 +echo "configure:6155: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5750,7 +6190,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:5754: checking for main in -lkrb" >&5 +echo "configure:6194: checking for main in -lkrb" >&5 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5758,14 +6198,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5789,38 +6229,56 @@ fi if test $have_k4 = yes ; then ol_with_kerberos=found - ol_link_kerberos=yes + ol_link_krb4=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF + + + KRB4_LIBS="-lkrb -ldes" + + if test $ac_cv_header_krb_archaeology_h = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_KTH_KERBEROS 1 +EOF - KRB_LIBS="-lkrb -ldes" + fi fi fi fi -if test $ol_link_kerberos = yes ; then +if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then + ol_link_kpasswd=yes; +fi + +if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then cat >> confdefs.h <<\EOF #define HAVE_KERBEROS 1 EOF + +elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then + { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; } fi ol_link_tls=no if test $ol_with_tls != no ; then - for ac_hdr in openssl/ssl.h ssl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5814: checking for $ac_hdr" >&5 +echo "configure:6272: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5849,7 +6307,7 @@ done if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6 -echo "configure:5853: checking for SSLeay_add_ssl_algorithms in -lssl" >&5 +echo "configure:6311: checking for SSLeay_add_ssl_algorithms in -lssl" >&5 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5857,7 +6315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lssl -lcrypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5893,7 +6351,7 @@ fi if test $have_ssleay = no ; then echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 -echo "configure:5897: checking for SSL_library_init in -lssl" >&5 +echo "configure:6355: checking for SSL_library_init in -lssl" >&5 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5901,7 +6359,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lssl -lcrypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5938,7 +6396,7 @@ fi if test $have_ssleay = no ; then echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 -echo "configure:5942: checking for ssl3_accept in -lssl" >&5 +echo "configure:6400: checking for ssl3_accept in -lssl" >&5 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5946,7 +6404,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6002,6 +6460,9 @@ EOF fi fi fi + +else + echo "configure: warning: TLS privacy protection not supported!" 1>&2 fi if test $ol_link_tls = yes ; then @@ -6009,7 +6470,14 @@ if test $ol_link_tls = yes ; then #define HAVE_TLS 1 EOF -fi + +elif test $ol_with_tls = auto ; then + echo "configure: warning: Could not locate TLS/SSL package" 1>&2 + echo "configure: warning: TLS privacy protection not supported!" 1>&2 + +elif test $ol_with_tls != no ; then + { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; } +fi for ac_func in \ ctime_r \ @@ -6017,12 +6485,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6021: checking for $ac_func" >&5 +echo "configure:6489: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6075,50 +6543,68 @@ if test "$ac_cv_func_ctime_r" = no ; then ol_cv_func_ctime_r_nargs=0 else echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6 -echo "configure:6079: checking number of arguments of ctime_r" >&5 +echo "configure:6547: checking number of arguments of ctime_r" >&5 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } EOF -if { (eval echo configure:6091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_ctime_r_nargs=3 + ol_cv_func_ctime_r_nargs3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } EOF -if { (eval echo configure:6106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_ctime_r_nargs=2 + ol_cv_func_ctime_r_nargs2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_ctime_r_nargs=0 -fi -rm -f conftest* + ol_cv_func_ctime_r_nargs2=no fi rm -f conftest* + + if test $ol_cv_func_ctime_r_nargs3 = yes -a \ + $ol_cv_func_ctime_r_nargs2 = no ; then + + ol_cv_func_ctime_r_nargs=3 + + elif test $ol_cv_func_ctime_r_nargs3 = no -a \ + $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 "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6 + if test $ol_cv_func_ctime_r_nargs -gt 1 ; then - cat >> confdefs.h <> confdefs.h <&6 -echo "configure:6132: checking number of arguments of gethostbyname_r" >&5 +echo "configure:6618: checking number of arguments of gethostbyname_r" >&5 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6147,15 +6633,19 @@ struct hostent hent; char buffer[BUFSIZE]; buffer, bufsize, &h_errno); ; return 0; } EOF -if { (eval echo configure:6151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs=5 + ol_cv_func_gethostbyname_r_nargs5=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < #include @@ -6164,24 +6654,37 @@ else #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); + char buffer[BUFSIZE]; + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyname_r("localhost", &hent, buffer, bufsize, + &rhent, &h_errno); ; return 0; } EOF -if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs=6 + ol_cv_func_gethostbyname_r_nargs6=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs=0 -fi -rm -f conftest* + ol_cv_func_gethostbyname_r_nargs6=no fi rm -f conftest* + + if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \ + $ol_cv_func_gethostbyname_r_nargs6 = no ; then + + ol_cv_func_gethostbyname_r_nargs=5 + + elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \ + $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 "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6 @@ -6198,12 +6701,12 @@ fi if test "$ac_cv_func_gethostbyaddr_r" = yes ; then echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6 -echo "configure:6202: checking number of arguments of gethostbyaddr_r" >&5 +echo "configure:6705: checking number of arguments of gethostbyaddr_r" >&5 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6219,15 +6722,19 @@ struct hostent hent; char buffer[BUFSIZE]; alen, AF_INET, &hent, buffer, bufsize, &h_errno); ; return 0; } EOF -if { (eval echo configure:6223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs=7 + ol_cv_func_gethostbyaddr_r_nargs7=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < #include @@ -6236,27 +6743,40 @@ else #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); + 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; } EOF -if { (eval echo configure:6249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs=8 + ol_cv_func_gethostbyaddr_r_nargs8=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs=0 -fi -rm -f conftest* + ol_cv_func_gethostbyaddr_r_nargs8=no fi rm -f conftest* + + if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \ + $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then + + ol_cv_func_gethostbyaddr_r_nargs=7 + + elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \ + $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 "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6 @@ -6289,6 +6809,100 @@ EOF fi ol_link_threads=no + +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = nt ; then + + + echo $ac_n "checking for NT Threads""... $ac_c" 1>&6 +echo "configure:6819: checking for NT Threads" >&5 +if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo $ac_n "checking for _beginthread""... $ac_c" 1>&6 +echo "configure:6825: checking for _beginthread" >&5 +if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _beginthread(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__beginthread) || defined (__stub____beginthread) +choke me +#else +f = _beginthread; +#endif + +; return 0; } +EOF +if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__beginthread=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__beginthread=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_nt_threads=yes +else + echo "$ac_t""no" 1>&6 +ol_cv_nt_threads=no +fi + + +fi + +echo "$ac_t""$ol_cv_nt_threads" 1>&6 + + if test $ol_cv_nt_threads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NT_THREADS 1 +EOF + + fi + + + if test "$ol_cv_nt_threads" = yes ; then + ol_link_threads=nt + ol_with_threads=found + ol_with_yielding_select=yes + + cat >> confdefs.h <<\EOF +#define HAVE_NT_SERVICE_MANAGER 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_NT_EVENT_LOG 1 +EOF + + fi + + if test $ol_with_threads = nt ; then + { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; } + fi +fi + if test $ol_with_threads = auto -o $ol_with_threads = yes \ -o $ol_with_threads = posix ; then @@ -6296,17 +6910,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6300: checking for $ac_hdr" >&5 +echo "configure:6914: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6335,19 +6949,19 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:6339: checking POSIX thread version" >&5 +echo "configure:6953: checking POSIX thread version" >&5 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* this check could be improved */ # ifdef PTHREAD_ONCE_INIT - pthread_version_final + pthread_version_final; # endif EOF @@ -6363,13 +6977,13 @@ rm -f conftest* cat > conftest.$ac_ext < /* this check could be improved */ # ifdef pthread_once_init - pthread_version_draft4 + pthread_version_draft4; # endif EOF @@ -6416,12 +7030,12 @@ EOF echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:6420: checking for LinuxThreads pthread.h" >&5 +echo "configure:7034: checking for LinuxThreads pthread.h" >&5 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -6448,16 +7062,16 @@ EOF echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6 -echo "configure:6452: checking for GNU Pth pthread.h" >&5 +echo "configure:7066: checking for GNU Pth pthread.h" >&5 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef _POSIX_THREAD_IS_GNU_PTH - __gnu_pth__ + __gnu_pth__; #endif EOF @@ -6482,17 +7096,17 @@ echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6486: checking for $ac_hdr" >&5 +echo "configure:7100: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6522,14 +7136,14 @@ done echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 -echo "configure:6526: checking for pthread_create in default libraries" >&5 +echo "configure:7140: checking for pthread_create in default libraries" >&5 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6548,14 +7162,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -6573,7 +7199,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_create=yes else @@ -6585,7 +7211,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6608,14 +7234,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -6634,7 +7272,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_create=yes else @@ -6659,7 +7297,7 @@ echo "$ac_t""$ol_cv_pthread_create" 1>&6 if test "$ol_link_threads" = no ; then # try -kthread echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6 -echo "configure:6663: checking for pthread link with -kthread" >&5 +echo "configure:7301: checking for pthread link with -kthread" >&5 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6670,7 +7308,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6689,14 +7327,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -6714,7 +7364,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_kthread=yes else @@ -6726,7 +7376,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6749,14 +7399,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -6775,7 +7437,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_kthread=yes else @@ -6805,7 +7467,7 @@ fi if test "$ol_link_threads" = no ; then # try -pthread echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6 -echo "configure:6809: checking for pthread link with -pthread" >&5 +echo "configure:7471: checking for pthread link with -pthread" >&5 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6816,7 +7478,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6835,14 +7497,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -6860,7 +7534,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_pthread=yes else @@ -6872,7 +7546,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6895,19 +7569,31 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); -#else - status = pthread_create(&t, NULL, task, NULL); -#endif + status = pthread_attr_init(&attr); + if( status ) exit( status ); + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); if( status ) exit( status ); - /* make sure pthread_detach() isn't just a stub */ +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); +#define ATTR pthread_attr_default +#else +#define ATTR NULL +#endif +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); #else status = pthread_detach( t ); #endif @@ -6921,7 +7607,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_pthread=yes else @@ -6951,7 +7637,7 @@ fi if test "$ol_link_threads" = no ; then # try -pthreads echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6 -echo "configure:6955: checking for pthread link with -pthreads" >&5 +echo "configure:7641: checking for pthread link with -pthreads" >&5 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6962,7 +7648,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6981,14 +7667,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7006,7 +7704,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_pthreads=yes else @@ -7018,7 +7716,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7041,14 +7739,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7067,7 +7777,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_pthreads=yes else @@ -7097,7 +7807,7 @@ fi if test "$ol_link_threads" = no ; then # try -mthreads echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6 -echo "configure:7101: checking for pthread link with -mthreads" >&5 +echo "configure:7811: checking for pthread link with -mthreads" >&5 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7108,7 +7818,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7127,14 +7837,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7152,7 +7874,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_mthreads=yes else @@ -7164,7 +7886,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7187,14 +7909,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7213,7 +7947,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_mthreads=yes else @@ -7243,7 +7977,7 @@ fi if test "$ol_link_threads" = no ; then # try -thread echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6 -echo "configure:7247: checking for pthread link with -thread" >&5 +echo "configure:7981: checking for pthread link with -thread" >&5 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7254,7 +7988,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7273,14 +8007,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7298,7 +8044,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_thread=yes else @@ -7310,7 +8056,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7333,14 +8079,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7359,7 +8117,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_thread=yes else @@ -7390,7 +8148,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthread -lmach -lexc -lc_r echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6 -echo "configure:7394: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 +echo "configure:8152: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7401,7 +8159,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7420,14 +8178,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7445,7 +8215,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else @@ -7457,7 +8227,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7480,14 +8250,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7506,7 +8288,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else @@ -7536,7 +8318,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthread -lmach -lexc echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6 -echo "configure:7540: checking for pthread link with -lpthread -lmach -lexc" >&5 +echo "configure:8322: checking for pthread link with -lpthread -lmach -lexc" >&5 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7547,7 +8329,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7566,14 +8348,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7591,7 +8385,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthread_lmach_lexc=yes else @@ -7603,7 +8397,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7626,14 +8420,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7652,7 +8458,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthread_lmach_lexc=yes else @@ -7683,7 +8489,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthread -Wl,-woff,85 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6 -echo "configure:7687: checking for pthread link with -lpthread -Wl,-woff,85" >&5 +echo "configure:8493: checking for pthread link with -lpthread -Wl,-woff,85" >&5 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7694,7 +8500,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7713,14 +8519,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7738,7 +8556,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lib_lpthread_woff=yes else @@ -7750,7 +8568,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7773,14 +8591,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7799,7 +8629,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lib_lpthread_woff=yes else @@ -7830,7 +8660,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthread echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6 -echo "configure:7834: checking for pthread link with -lpthread" >&5 +echo "configure:8664: checking for pthread link with -lpthread" >&5 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7841,7 +8671,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7860,14 +8690,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7885,7 +8727,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthread=yes else @@ -7897,7 +8739,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7920,14 +8762,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -7946,7 +8800,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:7950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthread=yes else @@ -7976,7 +8830,7 @@ fi if test "$ol_link_threads" = no ; then # try -lc_r echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6 -echo "configure:7980: checking for pthread link with -lc_r" >&5 +echo "configure:8834: checking for pthread link with -lc_r" >&5 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7987,7 +8841,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8006,14 +8860,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8031,7 +8897,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lc_r=yes else @@ -8043,7 +8909,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8066,14 +8932,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8092,7 +8970,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lc_r=yes else @@ -8123,7 +9001,7 @@ fi if test "$ol_link_threads" = no ; then # try -threads echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6 -echo "configure:8127: checking for pthread link with -threads" >&5 +echo "configure:9005: checking for pthread link with -threads" >&5 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8134,7 +9012,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8153,14 +9031,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8178,7 +9068,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_threads=yes else @@ -8190,7 +9080,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8213,14 +9103,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8239,7 +9141,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_threads=yes else @@ -8270,7 +9172,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthreads -lmach -lexc -lc_r echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6 -echo "configure:8274: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 +echo "configure:9176: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8281,7 +9183,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8300,14 +9202,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8325,7 +9239,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else @@ -8337,7 +9251,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8360,14 +9274,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8386,7 +9312,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else @@ -8416,7 +9342,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthreads -lmach -lexc echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6 -echo "configure:8420: checking for pthread link with -lpthreads -lmach -lexc" >&5 +echo "configure:9346: checking for pthread link with -lpthreads -lmach -lexc" >&5 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8427,7 +9353,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8446,14 +9372,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8471,7 +9409,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthreads_lmach_lexc=yes else @@ -8483,7 +9421,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8506,14 +9444,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8532,7 +9482,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthreads_lmach_lexc=yes else @@ -8562,7 +9512,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthreads -lexc echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6 -echo "configure:8566: checking for pthread link with -lpthreads -lexc" >&5 +echo "configure:9516: checking for pthread link with -lpthreads -lexc" >&5 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8573,7 +9523,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8592,14 +9542,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8617,7 +9579,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthreads_lexc=yes else @@ -8629,7 +9591,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8652,14 +9614,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8678,7 +9652,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lpthreads_lexc=yes else @@ -8709,7 +9683,7 @@ fi if test "$ol_link_threads" = no ; then # try -lpthreads echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6 -echo "configure:8713: checking for pthread link with -lpthreads" >&5 +echo "configure:9687: checking for pthread link with -lpthreads" >&5 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8720,7 +9694,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8739,14 +9713,26 @@ int main() { /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8764,7 +9750,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lib_lpthreads=yes else @@ -8776,7 +9762,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8799,14 +9785,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -8825,7 +9823,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:8829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_lib_lpthreads=yes else @@ -8867,12 +9865,12 @@ EOF for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8871: checking for $ac_func" >&5 +echo "configure:9869: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8924,7 +9922,7 @@ done if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 -echo "configure:8928: checking for sched_yield in -lrt" >&5 +echo "configure:9926: checking for sched_yield in -lrt" >&5 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8932,7 +9930,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8975,12 +9973,12 @@ fi for ac_func in thr_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8979: checking for $ac_func" >&5 +echo "configure:9977: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9035,15 +10033,15 @@ done echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 fi - for ac_func in pthread_kill + for ac_func in pthread_kill pthread_rwlock_destroy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9042: checking for $ac_func" >&5 +echo "configure:10040: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9093,13 +10091,13 @@ done echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 -echo "configure:9097: checking for pthread_detach with " >&5 +echo "configure:10095: checking for pthread_detach with " >&5 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -9111,7 +10109,7 @@ int main() { pthread_detach(NULL); ; return 0; } EOF -if { (eval echo configure:9115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_func_pthread_detach=yes else @@ -9143,12 +10141,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9147: checking for $ac_func" >&5 +echo "configure:10145: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9198,21 +10196,23 @@ done - echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6 -echo "configure:9203: checking for pthread_kill_other_threads_np" >&5 -if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then + for ac_func in pthread_kill_other_threads_np +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10203: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pthread_kill_other_threads_np(); +char $ac_func(); char (*f)(); int main() { @@ -9220,35 +10220,40 @@ int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = pthread_kill_other_threads_np; +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_pthread_kill_other_threads_np=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_pthread_kill_other_threads_np=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 -echo "configure:9252: checking for LinuxThreads implementation" >&5 +echo "configure:10257: checking for LinuxThreads implementation" >&5 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9261,7 +10266,7 @@ echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 -echo "configure:9265: checking for LinuxThreads consistency" >&5 +echo "configure:10270: checking for LinuxThreads consistency" >&5 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9286,7 +10291,7 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 fi echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6 -echo "configure:9290: checking if pthread_create() works" >&5 +echo "configure:10295: checking if pthread_create() works" >&5 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9295,7 +10300,7 @@ else ol_cv_pthread_create_works=yes else cat > conftest.$ac_ext < @@ -9318,14 +10323,26 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; +#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED) + /* This system (e.g. AIX) defaults detached; must override */ + pthread_attr_t attr; - /* make sure pthread_create() isn't just a stub */ + status = pthread_attr_init(&attr); + if( status ) exit( status ); + + status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED); + if( status ) exit( status ); + +#define ATTR &attr +#else #if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#define ATTR pthread_attr_default #else - status = pthread_create(&t, NULL, task, NULL); +#define ATTR NULL #endif - +#endif + /* make sure pthread_create() isn't just a stub */ + status = pthread_create(&t, ATTR, task, NULL); if( status ) exit( status ); /* make sure pthread_detach() isn't just a stub */ @@ -9344,7 +10361,7 @@ int main(argc, argv) } EOF -if { (eval echo configure:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_create_works=yes else @@ -9366,7 +10383,7 @@ echo "$ac_t""$ol_cv_pthread_create_works" 1>&6 if test $ol_with_yielding_select = auto ; then echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6 -echo "configure:9370: checking if select yields when using pthreads" >&5 +echo "configure:10387: checking if select yields when using pthreads" >&5 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9375,7 +10392,7 @@ else ol_cv_pthread_select_yields=cross else cat > conftest.$ac_ext < @@ -9451,7 +10468,7 @@ int main(argc, argv) exit(2); } EOF -if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_pthread_select_yields=no else @@ -9495,17 +10512,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9499: checking for $ac_hdr" >&5 +echo "configure:10516: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9535,12 +10552,12 @@ done ol_with_threads=found echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:9539: checking for cthread_fork" >&5 +echo "configure:10556: checking for cthread_fork" >&5 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_cthread_fork=yes" else @@ -9586,7 +10603,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 -echo "configure:9590: checking for cthread_fork with -all_load" >&5 +echo "configure:10607: checking for cthread_fork with -all_load" >&5 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9594,7 +10611,7 @@ else save_LIBS="$LIBS" LIBS="-all_load $LIBS" cat > conftest.$ac_ext < int main() { @@ -9603,7 +10620,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_cthread_all_load=yes else @@ -9648,17 +10665,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9652: checking for $ac_hdr" >&5 +echo "configure:10669: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9687,7 +10704,7 @@ done if test $ac_cv_header_pth_h = yes ; then echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6 -echo "configure:9691: checking for pth_version in -lpth" >&5 +echo "configure:10708: checking for pth_version in -lpth" >&5 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9695,7 +10712,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpth $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9750,17 +10767,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9754: checking for $ac_hdr" >&5 +echo "configure:10771: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9788,7 +10805,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:9792: checking for thr_create in -lthread" >&5 +echo "configure:10809: checking for thr_create in -lthread" >&5 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9796,7 +10813,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9847,12 +10864,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9851: checking for $ac_func" >&5 +echo "configure:10868: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9907,17 +10924,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9911: checking for $ac_hdr" >&5 +echo "configure:10928: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9945,7 +10962,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:9949: checking for lwp_create in -llwp" >&5 +echo "configure:10966: checking for lwp_create in -llwp" >&5 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9953,7 +10970,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10017,17 +11034,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10021: checking for $ac_hdr" >&5 +echo "configure:11038: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10056,12 +11073,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10060: checking for $ac_func" >&5 +echo "configure:11077: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10111,12 +11128,12 @@ done echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:10115: checking for LinuxThreads pthread.h" >&5 +echo "configure:11132: checking for LinuxThreads pthread.h" >&5 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -10146,17 +11163,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10150: checking for $ac_hdr" >&5 +echo "configure:11167: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10186,17 +11203,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10190: checking for $ac_hdr" >&5 +echo "configure:11207: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10226,17 +11243,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10230: checking for $ac_hdr" >&5 +echo "configure:11247: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10264,7 +11281,7 @@ done fi -if test $ol_link_threads != no ; then +if test $ol_link_threads != no -a $ol_link_threads != nt ; then cat >> confdefs.h <<\EOF #define REENTRANT 1 EOF @@ -10295,20 +11312,20 @@ EOF echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 -echo "configure:10299: checking for thread specific errno" >&5 +echo "configure:11316: checking for thread specific errno" >&5 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { errno = 0; ; return 0; } EOF -if { (eval echo configure:10312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_errno_thread_specific=yes else @@ -10324,20 +11341,20 @@ fi echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6 -echo "configure:10328: checking for thread specific h_errno" >&5 +echo "configure:11345: checking for thread specific h_errno" >&5 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { h_errno = 0; ; return 0; } EOF -if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_h_errno_thread_specific=yes else @@ -10384,77 +11401,29 @@ EOF fi - ol_link_ldbm=no -if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then - echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:10392: checking for DB2 library" >&5 -if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ol_LIBS="$LIBS" - echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:10398: checking for db_open in -ldb" >&5 -ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldb $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_db2=-ldb -else - echo "$ac_t""no" 1>&6 -ol_cv_lib_db2=no -fi - - LIBS="$ol_LIBS" - -fi -echo "$ac_t""$ol_cv_lib_db2" 1>&6 +if test $ol_with_ldbm_api = auto \ + -o $ol_with_ldbm_api = berkeley \ + -o $ol_with_ldbm_api = bcompat ; then -for ac_hdr in db.h + if test $ol_with_ldbm_api = bcompat; then \ + ol_cv_berkeley_db=no +for ac_hdr in db_185.h db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10448: checking for $ac_hdr" >&5 +echo "configure:11417: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10480,117 +11449,388 @@ else fi done -if test $ac_cv_header_db_h = yes ; then - echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:10486: checking if db.h is DB2" >&5 -if eval "test \"\${ol_cv_header_db2+set}\" = set"; then +if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then + echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6 +echo "configure:11455: checking if Berkeley DB header compatibility" >&5 +if eval "test \"\${ol_cv_header_db1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < - /* this check could be improved */ -# ifdef DB_VERSION_MAJOR -# if DB_VERSION_MAJOR == 2 - __db_version_2 -# endif -# endif - +#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 + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__db_version_2" >/dev/null 2>&1; then + egrep "__db_version_1" >/dev/null 2>&1; then rm -rf conftest* - ol_cv_header_db2=yes + ol_cv_header_db1=yes else rm -rf conftest* - ol_cv_header_db2=no + ol_cv_header_db1=no fi rm -f conftest* fi -echo "$ac_t""$ol_cv_header_db2" 1>&6 +echo "$ac_t""$ol_cv_header_db1" 1>&6 + + if test ol_cv_header_db1=yes ; then + ol_cv_lib_db=no +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6 +echo "configure:11498: checking for Berkeley DB link (default)" >&5 +if eval "test \"\${ol_cv_db_none+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - ol_cv_header_db2=no + + ol_DB_LIB= + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" + + cat > conftest.$ac_ext < +#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 > 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; } +EOF +if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_none=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_none=no fi +rm -f conftest* + LIBS="$ol_LIBS" - - echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:10524: checking for Berkeley DB2" >&5 -if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then +fi + +echo "$ac_t""$ol_cv_db_none" 1>&6 + + if test $ol_cv_db_none = yes ; then + ol_cv_lib_db=yes + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6 +echo "configure:11561: checking for Berkeley DB link (-ldb)" >&5 +if eval "test \"\${ol_cv_db_db+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then - ol_cv_berkeley_db2=no - else - ol_cv_berkeley_db2=yes - fi + ol_DB_LIB=-ldb + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" -fi + cat > conftest.$ac_ext <&6 - if test $ol_cv_berkeley_db2 = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_BERKELEY_DB2 1 -EOF +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif - fi +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif +#ifndef NULL +#define NULL ((void*)0) +#endif - if test $ol_cv_berkeley_db2 = yes ; then - ol_link_ldbm=db2 - ol_with_ldbm_api=db2 +int main() { - if test $ol_with_ldbm_type = hash ; then - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBHASH 1 +#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; } EOF +if { (eval echo configure:11600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db=no +fi +rm -f conftest* - else - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBBTREE 1 + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db" 1>&6 + + if test $ol_cv_db_db = yes ; then + ol_cv_lib_db=-ldb + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6 +echo "configure:11624: checking for Berkeley DB link (-ldb3)" >&5 +if eval "test \"\${ol_cv_db_db3+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb3 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" + + cat > conftest.$ac_ext < +#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 > 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; } EOF +if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db3=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db3=no +fi +rm -f conftest* - fi + LIBS="$ol_LIBS" - if test $ol_cv_lib_db2 != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" - fi +fi + +echo "$ac_t""$ol_cv_db_db3" 1>&6 + + if test $ol_cv_db_db3 = yes ; then + ol_cv_lib_db=-ldb3 fi fi -ol_link_bdb2=no -if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then - ol_link_bdb2=yes +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6 +echo "configure:11687: checking for Berkeley DB link (-ldb2)" >&5 +if eval "test \"\${ol_cv_db_db2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb2 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" + + cat > conftest.$ac_ext < +#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 > 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; } +EOF +if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db2=no +fi +rm -f conftest* + + LIBS="$ol_LIBS" + fi -if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then - echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:10575: checking for Berkeley DB library" >&5 -if eval "test \"\${ol_cv_lib_db+set}\" = set"; then +echo "$ac_t""$ol_cv_db_db2" 1>&6 + + if test $ol_cv_db_db2 = yes ; then + ol_cv_lib_db=-ldb2 + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6 +echo "configure:11750: checking for Berkeley DB link (-ldb1)" >&5 +if eval "test \"\${ol_cv_db_db1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - for ac_hdr in db1/db.h + ol_DB_LIB=-ldb1 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" + + cat > conftest.$ac_ext < +#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 > 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; } +EOF +if { (eval echo configure:11789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db1=no +fi +rm -f conftest* + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db1" 1>&6 + + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 + fi +fi + + + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + fi + fi +fi + + else + ol_cv_berkeley_db=no +for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10584: checking for $ac_hdr" >&5 +echo "configure:11824: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10616,222 +11856,428 @@ else fi done - ol_LIBS="$LIBS" - echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:10622: checking for dbopen" >&5 -if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then +if test $ac_cv_header_db_h = yes; then + ol_cv_lib_db=no +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6 +echo "configure:11864: checking for Berkeley DB link (default)" >&5 +if eval "test \"\${ol_cv_db_none+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dbopen(); -char (*f)(); + +#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() { -/* 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_dbopen) || defined (__stub___dbopen) -choke me +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else -f = dbopen; + (void) dbopen( NULL, 0, 0, 0, NULL); #endif ; return 0; } EOF -if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_dbopen=yes" + ol_cv_db_none=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_dbopen=no" + ol_cv_db_none=no fi rm -f conftest* + + LIBS="$ol_LIBS" + fi -if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=yes -else - echo "$ac_t""no" 1>&6 +echo "$ac_t""$ol_cv_db_none" 1>&6 - echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6 -echo "configure:10670: checking for dbopen in -ldb1" >&5 -ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + if test $ol_cv_db_none = yes ; then + ol_cv_lib_db=yes + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6 +echo "configure:11927: checking for Berkeley DB link (-ldb)" >&5 +if eval "test \"\${ol_cv_db_db+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldb1 $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif int main() { -dbopen() + +#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; } EOF -if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_db_db=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ol_cv_db_db=no fi rm -f conftest* -LIBS="$ac_save_LIBS" + + LIBS="$ol_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=-ldb1 + +echo "$ac_t""$ol_cv_db_db" 1>&6 + + if test $ol_cv_db_db = yes ; then + ol_cv_lib_db=-ldb + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6 +echo "configure:11990: checking for Berkeley DB link (-ldb3)" >&5 +if eval "test \"\${ol_cv_db_db3+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 + + ol_DB_LIB=-ldb3 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" - echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:10709: checking for dbopen in -ldb" >&5 -ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + cat > conftest.$ac_ext < +#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 > 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; } +EOF +if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db3=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db3=no +fi +rm -f conftest* + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db3" 1>&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 $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6 +echo "configure:12053: checking for Berkeley DB link (-ldb2)" >&5 +if eval "test \"\${ol_cv_db_db2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldb $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif int main() { -dbopen() + +#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; } EOF -if { (eval echo configure:10728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_db_db2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ol_cv_db_db2=no fi rm -f conftest* -LIBS="$ac_save_LIBS" + + LIBS="$ol_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=-ldb + +echo "$ac_t""$ol_cv_db_db2" 1>&6 + + if test $ol_cv_db_db2 = yes ; then + ol_cv_lib_db=-ldb2 + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6 +echo "configure:12116: checking for Berkeley DB link (-ldb1)" >&5 +if eval "test \"\${ol_cv_db_db1+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 -ol_cv_lib_db=no + + ol_DB_LIB=-ldb1 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LIBS" + + cat > conftest.$ac_ext < +#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 > 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; } +EOF +if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db1=no +fi +rm -f conftest* + + LIBS="$ol_LIBS" + fi - -fi +echo "$ac_t""$ol_cv_db_db1" 1>&6 + + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 + fi +fi + + + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6 +echo "configure:12181: checking for Berkeley DB thread support" >&5 +if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_LIBS="$LIBS" + if test $ol_cv_lib_db != yes ; then + LIBS="$ol_cv_lib_db" + fi + + if test "$cross_compiling" = yes; then + ol_cv_berkeley_db_thread=cross +else + cat > conftest.$ac_ext < +#endif +#ifndef NULL +#define NULL ((void *)0) +#endif +main() +{ + int rc; + u_int32_t flags = DB_CREATE | DB_THREAD; - -fi +#if DB_VERSION_MAJOR > 2 + DB_ENV *env = NULL; - LIBS="$ol_LIBS" + rc = db_env_create( &env, 0 ); -fi + if( rc == 0 ) { +#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 + } -echo "$ac_t""$ol_cv_lib_db" 1>&6 +#else + DB_ENV env; + memset( &env, '\0', sizeof(env) ); + rc = db_appinit( NULL, NULL, &env, flags ); -for ac_hdr in db_185.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10766: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < + if( rc == 0 ) { + db_appexit( &env ); + } +#endif +#if DB_VERSION_MAJOR > 2 +#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) + env->remove( env, NULL, DB_FORCE); +#else + env->remove( env, NULL, NULL, DB_FORCE); +#endif +#endif + + return rc; +} EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_berkeley_db_thread=yes else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* + rm -fr conftest* + ol_cv_berkeley_db_thread=no fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +rm -fr conftest* fi -done -if test "$ol_cv_header_db2" = yes ; then - - ol_cv_header_db=$ac_cv_header_db_185_h -else - ol_cv_header_db=$ac_cv_header_db_h -fi + LIBS="$ol_LIBS" + + if test $ol_cv_berkeley_db_thread != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB_THREAD 1 +EOF - - echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:10812: checking for Berkeley DB" >&5 -if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then - ol_cv_berkeley_db=no - else - ol_cv_berkeley_db=yes fi fi -echo "$ac_t""$ol_cv_berkeley_db" 1>&6 - if test $ol_cv_berkeley_db = yes ; then - cat >> confdefs.h <<\EOF +echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6 + fi +fi + + fi + + if test $ol_cv_berkeley_db != no ; then + cat >> confdefs.h <<\EOF #define HAVE_BERKELEY_DB 1 EOF - fi - - if test $ol_cv_berkeley_db = yes ; then - ol_link_ldbm=db + ol_link_ldbm=berkeley ol_with_ldbm_api=db if test $ol_with_ldbm_type = hash ; then @@ -10852,53 +12298,6 @@ EOF fi fi -if test $ol_with_ldbm_api = manual ; then - ol_link_ldbm=yes - - echo "configure: warning: LDBM defines and link options must be set manually" 1>&2 - - for ac_hdr in db.h db_185.h gdbm.h ndbm.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10865: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -fi - if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then echo "configure: warning: Could not find LDBM with BTREE support" 1>&2 ol_with_ldbm_api=none @@ -10906,18 +12305,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then echo $ac_n "checking for MDBM library""... $ac_c" 1>&6 -echo "configure:10910: checking for MDBM library" >&5 +echo "configure:12309: checking for MDBM library" >&5 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6 -echo "configure:10916: checking for mdbm_set_chain" >&5 +echo "configure:12315: checking for mdbm_set_chain" >&5 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_mdbm_set_chain=yes" else @@ -10960,7 +12359,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 -echo "configure:10964: checking for mdbm_set_chain in -lmdbm" >&5 +echo "configure:12363: checking for mdbm_set_chain in -lmdbm" >&5 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10968,7 +12367,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11014,17 +12413,17 @@ echo "$ac_t""$ol_cv_lib_mdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11018: checking for $ac_hdr" >&5 +echo "configure:12417: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11051,7 +12450,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11055: checking for db" >&5 +echo "configure:12454: checking for db" >&5 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11084,18 +12483,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:11088: checking for GDBM library" >&5 +echo "configure:12487: checking for GDBM library" >&5 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:11094: checking for gdbm_open" >&5 +echo "configure:12493: checking for gdbm_open" >&5 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -11138,7 +12537,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11142: checking for gdbm_open in -lgdbm" >&5 +echo "configure:12541: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11146,7 +12545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11192,17 +12591,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11196: checking for $ac_hdr" >&5 +echo "configure:12595: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11229,7 +12628,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11233: checking for db" >&5 +echo "configure:12632: checking for db" >&5 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11261,22 +12660,20 @@ EOF fi fi -if test $ol_with_ldbm_api = auto ; then - echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2 -elif test $ol_with_ldbm_api = ndbm ; then +if test $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:11269: checking for NDBM library" >&5 +echo "configure:12666: checking for NDBM library" >&5 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:11275: checking for dbm_open" >&5 +echo "configure:12672: checking for dbm_open" >&5 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -11319,7 +12716,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:11323: checking for dbm_open in -lndbm" >&5 +echo "configure:12720: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11327,7 +12724,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11358,7 +12755,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11362: checking for dbm_open in -ldbm" >&5 +echo "configure:12759: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11366,7 +12763,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11414,17 +12811,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11418: checking for $ac_hdr" >&5 +echo "configure:12815: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11451,7 +12848,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11455: checking for db" >&5 +echo "configure:12852: checking for db" >&5 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11493,22 +12890,28 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then ol_enable_ldbm=no fi +if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then + LINK_BINS_DYNAMIC="yes" +else + LINK_BINS_DYNAMIC="no" +fi + if test $ol_enable_wrappers != no ; then for ac_hdr in tcpd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11502: checking for $ac_hdr" >&5 +echo "configure:12905: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11538,43 +12941,27 @@ done if test $ac_cv_header_tcpd_h != yes ; then have_wrappers=no else - echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6 -echo "configure:11543: checking for main in -lwrap" >&5 -ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lwrap $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + have_wrappers=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + have_wrappers=no fi rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_wrappers=yes -else - echo "$ac_t""no" 1>&6 -have_wrappers=no -fi - fi if test $have_wrappers = yes ; then @@ -11582,10 +12969,10 @@ fi #define HAVE_TCPD 1 EOF - SLAPD_LIBS="$SLAPD_LIBS -lwrap" + WRAP_LIBS="-lwrap" echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:11589: checking for main in -lnsl" >&5 +echo "configure:12976: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11593,14 +12980,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11635,17 +13022,18 @@ fi echo "configure: warning: disabling wrappers support" 1>&2 ol_enable_wrappers=no + WRAP_LIBS="" fi fi if test $ol_enable_syslog != no ; then echo $ac_n "checking for openlog""... $ac_c" 1>&6 -echo "configure:11644: checking for openlog" >&5 +echo "configure:13032: checking for openlog" >&5 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_openlog=yes" else @@ -11694,68 +13082,74 @@ fi ol_enable_syslog=$ac_cv_func_openlog fi -if test $ol_enable_dmalloc != no ; then - for ac_hdr in dmalloc.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11703: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + +ol_link_sql=no +if test $ol_enable_sql != no ; then + echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6 +echo "configure:13090: checking for SQLDriverConnect in -liodbc" >&5 +ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SQLDriverConnect(); + +int main() { +SQLDriverConnect() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then +if { (eval echo configure:13109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +have_iodbc=no fi -done - echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6 -echo "configure:11740: checking for dmalloc_shutdown in -ldmalloc" >&5 -ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'` + if test $have_iodbc = yes ; then + ol_link_sql="-liodbc" + else + echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6 +echo "configure:13134: checking for SQLDriverConnect in -lodbc" >&5 +ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldmalloc $LIBS" +LIBS="-lodbc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11770,18 +13164,23 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +have_odbc=no fi + if test $have_odbc = yes ; then + ol_link_sql="-lodbc" + fi + fi + + if test $ol_link_sql != no ; then + SLAPD_SQL_LIBS="$ol_link_sql" + + elif test $ol_enable_sql != auto ; then + { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; } + fi fi if test $ol_enable_tcl != no ; then @@ -11789,17 +13188,17 @@ if test $ol_enable_tcl != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11793: checking for $ac_hdr" >&5 +echo "configure:13192: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11826,105 +13225,27 @@ fi done - if test $ac_cv_header_tcl_h != yes ; then - have_tcl=no - else - echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6 -echo "configure:11834: checking for main in -ltcl" >&5 -ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ltcl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl" -else - echo "$ac_t""no" 1>&6 -have_tcl=no -fi - - - if test $have_tcl != yes; then - echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6 -echo "configure:11873: checking for main in -ltcl7.6" >&5 -ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ltcl7.6 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6" -else - echo "$ac_t""no" 1>&6 -have_tcl=no -fi - - fi - - if test $have_tcl != yes; then - echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6 -echo "configure:11913: checking for main in -ltcl8.0" >&5 -ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'` + if test $ac_cv_header_tcl_h != yes ; then + have_tcl=no + else + for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do + echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6 +echo "configure:13234: checking for main in -l$lib" >&5 +ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltcl8.0 $LIBS" +LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11939,13 +13260,18 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0" + have_tcl=yes + if test x"$ol_with_tcl_module" = "xstatic" ; then + SLAPD_LIBS="$SLAPD_LIBS -l${lib}" + else + MOD_TCL_LIB="-l${lib}" + fi;break else echo "$ac_t""no" 1>&6 have_tcl=no fi - fi + done fi if test $have_tcl != yes ; then @@ -11958,23 +13284,22 @@ fi fi fi -# ud needs termcap (should insert check here) ol_link_termcap=no for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11968: checking for $ac_hdr" >&5 +echo "configure:13293: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12003,7 +13328,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:12007: checking for tputs in -ltermcap" >&5 +echo "configure:13332: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12011,7 +13336,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12055,7 +13380,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:12059: checking for initscr in -lncurses" >&5 +echo "configure:13384: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12063,7 +13388,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12114,20 +13439,21 @@ EOF fi ol_link_sasl=no +ol_link_spasswd=no if test $ol_with_cyrus_sasl != no ; then ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sasl.h""... $ac_c" 1>&6 -echo "configure:12121: checking for sasl.h" >&5 +echo "configure:13447: checking for sasl.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12151,7 +13477,7 @@ fi if test $ac_cv_header_sasl_h = yes ; then echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6 -echo "configure:12155: checking for sasl_client_init in -lsasl" >&5 +echo "configure:13481: checking for sasl_client_init in -lsasl" >&5 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12159,7 +13485,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsasl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12202,23 +13528,58 @@ EOF fi fi - if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then - { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; } + if test $ol_link_sasl = no ; then + if test $ol_with_cyrus_sasl != auto ; then + { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; } + else + echo "configure: warning: Could not locate Cyrus SASL" 1>&2 + echo "configure: warning: SASL authentication not supported!" 1>&2 + if test $ol_link_tls = no ; then + echo "configure: warning: Strong authentication not supported!" 1>&2 + fi + fi + fi +else + echo "configure: warning: SASL authentication not supported!" 1>&2 + if test $ol_link_tls = no ; then + echo "configure: warning: Strong authentication not supported!" 1>&2 + fi +fi + +if test $cross_compiling != yes ; then + dev=no + if test -r /dev/urandom ; then + dev="/dev/urandom"; + elif test -r /idev/urandom ; then + dev="/idev/urandom"; + elif test -r /dev/srandom ; then + dev="/dev/srandom"; + elif test -r /dev/random ; then + dev="/dev/random"; + elif test -r /idev/random ; then + dev="/idev/random"; + fi + + if test $dev != no ; then + cat >> confdefs.h <&6 -echo "configure:12216: checking fetch(3) library" >&5 +echo "configure:13577: checking fetch(3) library" >&5 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12228,7 +13589,7 @@ int main() { struct url *u = fetchParseURL("file:///"); ; return 0; } EOF -if { (eval echo configure:12232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_lib_fetch=yes else @@ -12266,17 +13627,17 @@ if test $ol_with_readline != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12270: checking for $ac_hdr" >&5 +echo "configure:13631: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12307,7 +13668,7 @@ done save_LIBS="$LIBS" LIBS="$TERMCAP_LIBS $LIBS" echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:12311: checking for readline in -lreadline" >&5 +echo "configure:13672: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12315,7 +13676,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12366,15 +13727,14 @@ EOF fi -# FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:12373: checking for crypt" >&5 +echo "configure:13733: checking for crypt" >&5 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -12417,7 +13777,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12421: checking for crypt in -lcrypt" >&5 +echo "configure:13781: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12425,7 +13785,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12477,15 +13837,14 @@ EOF fi fi -# FreeBSD (and others) have setproctitle(3) in -lutil if test $ol_enable_proctitle != no ; then echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 -echo "configure:12484: checking for setproctitle" >&5 +echo "configure:13843: checking for setproctitle" >&5 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setproctitle=yes" else @@ -12528,7 +13887,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:12532: checking for setproctitle in -lutil" >&5 +echo "configure:13891: checking for setproctitle in -lutil" >&5 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12536,7 +13895,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12568,6 +13927,7 @@ else echo "$ac_t""no" 1>&6 have_setproctitle=no LIBOBJS="$LIBOBJS setproctitle.o" + LIBSRCS="$LIBSRCS setproctitle.c" fi fi @@ -12581,117 +13941,13 @@ EOF fi fi -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:12586: checking for uid_t in sys/types.h" >&5 -if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:12620: checking type of array argument to getgroups" >&5 -if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat > conftest.$ac_ext < -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} - -EOF -if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int -fi -rm -fr conftest* -fi - -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int -fi -rm -f conftest* - -fi -fi - -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <&6 -echo "configure:12690: checking for ANSI C header files" >&5 +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:13946: checking for ANSI C header files" >&5 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12699,7 +13955,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12716,7 +13972,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -12734,7 +13990,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -12755,18 +14011,25 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < +#if ((' ' & 0x0FF) == 0x020) #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:12770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12790,18 +14053,19 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:12794: checking for mode_t" >&5 +echo "configure:14057: checking for mode_t" >&5 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -12825,18 +14089,19 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:12829: checking for off_t" >&5 +echo "configure:14093: checking for off_t" >&5 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -12860,18 +14125,19 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:12864: checking for pid_t" >&5 +echo "configure:14129: checking for pid_t" >&5 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -12895,19 +14161,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:12899: checking for ptrdiff_t" >&5 +echo "configure:14165: checking for ptrdiff_t" >&5 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ptrdiff_t p ; return 0; } EOF -if { (eval echo configure:12911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -12928,12 +14194,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:12932: checking return type of signal handlers" >&5 +echo "configure:14198: checking return type of signal handlers" >&5 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12950,7 +14216,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:12954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -12968,81 +14234,123 @@ cat >> confdefs.h <&6 -echo "configure:12973: checking for sig_atomic_t" >&5 -if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:14239: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -int main() { -sig_atomic_t atomic; -; return 0; } +#include +#if STDC_HEADERS +#include +#include +#endif + EOF -if { (eval echo configure:12985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ol_cv_type_sig_atomic_t=yes + eval "ac_cv_type_size_t=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_type_sig_atomic_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* + fi +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 - if test $ol_cv_type_sig_atomic_t = no; then - cat >> confdefs.h <<\EOF -#define sig_atomic_t int +fi + + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:14276: checking for ssize_t" >&5 +if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval "ac_cv_type_ssize_t=yes" +else + rm -rf conftest* + eval "ac_cv_type_ssize_t=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:13006: checking for size_t" >&5 -if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then +fi + +echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 +echo "configure:14312: checking for caddr_t" >&5 +if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - eval "ac_cv_type_size_t=yes" + eval "ac_cv_type_caddr_t=yes" else rm -rf conftest* - eval "ac_cv_type_size_t=no" + eval "ac_cv_type_caddr_t=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then +if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 cat >> confdefs.h <&6 -echo "configure:13041: checking for socklen_t" >&5 +echo "configure:14349: checking for socklen_t" >&5 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_socklen_t=yes else @@ -13077,12 +14385,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:13081: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:14389: checking for member st_blksize in aggregate type struct stat" >&5 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13090,7 +14398,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:13094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -13112,12 +14420,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:13116: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:14424: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13126,7 +14434,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:13130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -13147,12 +14455,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:13151: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:14459: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13160,7 +14468,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:13164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -13180,15 +14488,84 @@ EOF fi +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:14493: checking for uid_t in sys/types.h" >&5 +if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 +echo "configure:14527: checking for sig_atomic_t" >&5 +if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +sig_atomic_t atomic; +; return 0; } +EOF +if { (eval echo configure:14539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_type_sig_atomic_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_type_sig_atomic_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6 + if test $ol_cv_type_sig_atomic_t = no; then + cat >> confdefs.h <<\EOF +#define sig_atomic_t int +EOF + + fi + + + # test for pw_gecos in struct passwd echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 -echo "configure:13186: checking struct passwd for pw_gecos" >&5 +echo "configure:14563: checking struct passwd for pw_gecos" >&5 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13198,7 +14575,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -13220,13 +14597,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:13224: checking struct passwd for pw_passwd" >&5 +echo "configure:14601: checking struct passwd for pw_passwd" >&5 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13236,7 +14613,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -13258,7 +14635,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:13262: checking if toupper() requires islower()" >&5 +echo "configure:14639: checking if toupper() requires islower()" >&5 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13267,7 +14644,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -13279,7 +14656,7 @@ main() exit(1); } EOF -if { (eval echo configure:13283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -13302,12 +14679,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:13306: checking for working const" >&5 +echo "configure:14683: checking for working const" >&5 if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -13377,12 +14754,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:13381: checking if compiler understands volatile" >&5 +echo "configure:14758: checking if compiler understands volatile" >&5 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -13419,30 +14796,16 @@ if test $cross_compiling = yes ; then #define CROSS_COMPILING 1 EOF - - cat >> confdefs.h <<\EOF -#define LBER_INT_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_SOCKET_T int -EOF - - else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:13439: checking whether byte ordering is bigendian" >&5 +echo "configure:14802: checking whether byte ordering is bigendian" >&5 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -13453,11 +14816,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -13468,7 +14831,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -13488,7 +14851,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -13524,162 +14887,155 @@ EOF fi - echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:13529: checking size of short" >&5 +fi + +echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:14894: checking size of short" >&5 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat > conftest.$ac_ext < + + +int main() { +switch (0) case 0: case (sizeof (short) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +if { (eval echo configure:14910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_short=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_short != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 + +if test x$ac_cv_sizeof_short = x ; then + { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 -echo "configure:13568: checking size of int" >&5 + +echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:14933: checking size of int" >&5 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (int) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:13587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +if { (eval echo configure:14949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_int=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_int != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 + +if test x$ac_cv_sizeof_int = x ; then + { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:13607: checking size of long" >&5 + +echo $ac_n "checking size of long""... $ac_c" 1>&6 +echo "configure:14972: checking size of long" >&5 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (long) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:13626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` +if { (eval echo configure:14988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_long=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_long != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 + +if test x$ac_cv_sizeof_long = x ; then + { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&2 - if test "$ac_cv_sizeof_int" -lt 4 ; then - echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2 - - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define LBER_INT_T long EOF - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_SOCKET_T int -EOF - - else - cat >> confdefs.h <<\EOF +else + cat >> confdefs.h <<\EOF #define LBER_INT_T int EOF - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long +fi + +cat >> confdefs.h <<\EOF +#define LBER_LEN_T long EOF - cat >> confdefs.h <<\EOF +cat >> confdefs.h <<\EOF #define LBER_SOCKET_T int EOF - fi -fi - cat >> confdefs.h <<\EOF -#define LBER_LEN_T long +#define LBER_TAG_T long EOF echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:13683: checking for 8-bit clean memcmp" >&5 +echo "configure:15039: checking for 8-bit clean memcmp" >&5 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13687,7 +15043,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -13715,12 +15071,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:13719: checking for strftime" >&5 +echo "configure:15075: checking for strftime" >&5 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -13766,7 +15122,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:13770: checking for strftime in -lintl" >&5 +echo "configure:15126: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13774,7 +15130,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13813,12 +15169,12 @@ fi echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 -echo "configure:13817: checking for inet_aton()" >&5 +echo "configure:15173: checking for inet_aton()" >&5 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_func_inet_aton=yes else @@ -13861,13 +15217,176 @@ EOF fi +echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 +echo "configure:15222: checking for _spawnlp" >&5 +if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _spawnlp(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__spawnlp) || defined (__stub____spawnlp) +choke me +#else +f = _spawnlp; +#endif + +; return 0; } +EOF +if { (eval echo configure:15251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__spawnlp=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__spawnlp=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SPAWNLP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 +echo "configure:15275: checking for _snprintf" >&5 +if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _snprintf(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__snprintf) || defined (__stub____snprintf) +choke me +#else +f = _snprintf; +#endif + +; return 0; } +EOF +if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__snprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__snprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_func_snprintf=yes + cat >> confdefs.h <<\EOF +#define snprintf _snprintf +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 +echo "configure:15330: checking for _vsnprintf" >&5 +if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _vsnprintf(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__vsnprintf) || defined (__stub____vsnprintf) +choke me +#else +f = _vsnprintf; +#endif + +; return 0; } +EOF +if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__vsnprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__vsnprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_func_vsnprintf=yes + cat >> confdefs.h <<\EOF +#define vsnprintf _vsnprintf +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:13866: checking for vprintf" >&5 +echo "configure:15385: checking for vprintf" >&5 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -13915,12 +15434,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:13919: checking for _doprnt" >&5 +echo "configure:15438: checking for _doprnt" >&5 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -13973,12 +15492,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in vsnprintf vsprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13977: checking for $ac_func" >&5 +echo "configure:15496: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14031,6 +15550,7 @@ fi for ac_func in \ bcopy \ closesocket \ + chroot \ endgrent \ endpwent \ flock \ @@ -14038,6 +15558,7 @@ for ac_func in \ getgrgid \ gethostname \ getpass \ + getpassphrase \ getpwuid \ getpwnam \ getspnam \ @@ -14047,6 +15568,7 @@ for ac_func in \ memcpy \ memmove \ mkstemp \ + pipe \ read \ recv \ recvfrom \ @@ -14056,6 +15578,7 @@ for ac_func in \ setsid \ setuid \ seteuid \ + sigaction \ signal \ sigset \ snprintf \ @@ -14077,12 +15600,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14081: checking for $ac_func" >&5 +echo "configure:15604: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14134,12 +15657,12 @@ done for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14138: checking for $ac_func" >&5 +echo "configure:15661: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14190,25 +15713,36 @@ done +if test "$ac_cv_func_getopt" != yes; then + LIBSRCS="$LIBSRCS getopt.c" +fi + +if test "$ac_cv_func_tempnam" != yes; then + LIBSRCS="$LIBSRCS tempnam.c" +fi + # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:14196: checking declaration of sys_errlist" >&5 +echo "configure:15727: checking declaration of sys_errlist" >&5 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include -#include +#include +#ifdef WINNT +#include +#endif int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes ol_cv_have_sys_errlist=yes @@ -14231,20 +15765,20 @@ EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:14235: checking existence of sys_errlist" >&5 +echo "configure:15769: checking existence of sys_errlist" >&5 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -14291,9 +15825,9 @@ if test "$ol_enable_cache" = no ; then EOF fi -if test "$ol_enable_dns" != no ; then +if test "$ol_link_kbind" != no ; then cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION +#define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION EOF fi @@ -14309,22 +15843,39 @@ if test "$ol_enable_referrals" != no ; then EOF fi -if test "$ol_enable_cldap" != no ; then +if test "$ol_enable_local" != no; then + cat >> confdefs.h <<\EOF +#define LDAP_PF_LOCAL 1 +EOF + +fi +if test "$ol_enable_ipv6" != no; then cat >> confdefs.h <<\EOF -#define LDAP_CONNECTIONLESS 1 +#define LDAP_PF_INET6 1 EOF fi +if test "$ol_enable_cleartext" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_CLEARTEXT 1 +EOF +fi if test "$ol_enable_crypt" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_CRYPT 1 EOF fi -if test "$ol_enable_cleartext" != no ; then +if test "$ol_link_kpasswd" != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_CLEARTEXT 1 +#define SLAPD_KPASSWD 1 +EOF + +fi +if test "$ol_link_spasswd" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SPASSWD 1 EOF fi @@ -14351,12 +15902,6 @@ if test "$ol_enable_aci" != no ; then #define SLAPD_ACI_ENABLED 1 EOF -fi -if test "$ol_enable_discreteaci" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_ACI_DISCRETE_RIGHTS 1 -EOF - fi if test "$ol_link_modules" != no ; then @@ -14365,25 +15910,24 @@ if test "$ol_link_modules" != no ; then EOF BUILD_SLAPD=yes - MODULES_LIBS=-lltdl SLAPD_MODULES_LDFLAGS="-dlopen self" fi -if test "$ol_link_bdb2" != no ; then +if test "$ol_link_dnssrv" != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_BDB2 1 +#define SLAPD_DNSSRV 1 EOF BUILD_SLAPD=yes - BUILD_BDB2=yes - if test "$ol_with_bdb2_module" != static ; then + BUILD_DNSSRV=yes + if test "$ol_with_dnssrv_module" != static ; then cat >> confdefs.h <<\EOF -#define SLAPD_BDB2_DYNAMIC 1 +#define SLAPD_DNSSRV_DYNAMIC 1 EOF - BUILD_BDB2=mod - BUILD_BDB2_DYNAMIC=shared - SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la" + BUILD_DNSSRV=mod + BUILD_DNSSRV_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la" fi fi @@ -14495,18 +16039,54 @@ EOF fi fi +if test "$ol_link_sql" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SQL 1 +EOF + + BUILD_SLAPD=yes + BUILD_SQL=yes + if test "$ol_with_sql_module" != static; then + cat >> confdefs.h <<\EOF +#define SLAPD_SQL_DYNAMIC 1 +EOF + + BUILD_SQL=mod + BUILD_SQL_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la" + fi +fi + if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \ $BUILD_SLAPD = yes ; then BUILD_SLURPD=yes fi -if test "$ol_link_isode" != no ; then - BUILD_LDAPD=yes + +if test "$LINK_BINS_DYNAMIC" = yes; then + LIB_LINKAGE=DYN + LT_LIB_LINKAGE=shared +else + LIB_LINKAGE=STAT + LT_LIB_LINKAGE=static +fi + +if test "$ac_cv_mingw32" = yes ; then + PLAT=NT + DYN_EXT=dll +else + PLAT=UNIX + DYN_EXT=so fi + + + + + @@ -14522,6 +16102,16 @@ fi + + + + + + + + + + @@ -14618,6 +16208,7 @@ clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ +clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.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 \ @@ -14627,16 +16218,17 @@ libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib. libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.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 \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ -servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ -servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/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-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-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-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/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \ servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ @@ -14712,9 +16304,10 @@ s%@top_builddir@%$top_builddir%g s%@ldap_subdir@%$ldap_subdir%g s%@CC@%$CC%g s%@RANLIB@%$RANLIB%g -s%@LD@%$LD%g -s%@NM@%$NM%g s%@LN_S@%$LN_S%g +s%@DLLTOOL@%$DLLTOOL%g +s%@AS@%$AS%g +s%@OBJDUMP@%$OBJDUMP%g s%@LIBTOOL@%$LIBTOOL%g s%@LN_H@%$LN_H%g s%@SENDMAIL@%$SENDMAIL%g @@ -14726,45 +16319,57 @@ s%@EXEEXT@%$EXEEXT%g s%@OBJEXT@%$OBJEXT%g s%@OL_MKDEP@%$OL_MKDEP%g s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g -s%@PEPSY@%$PEPSY%g s%@LIBOBJS@%$LIBOBJS%g -s%@BUILD_LDAPD@%$BUILD_LDAPD%g +s%@LIBSRCS@%$LIBSRCS%g +s%@PLAT@%$PLAT%g +s%@LIB_LINKAGE@%$LIB_LINKAGE%g +s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g +s%@DYN_EXT@%$DYN_EXT%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g -s%@BUILD_BDB2@%$BUILD_BDB2%g +s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g s%@BUILD_LDAP@%$BUILD_LDAP%g s%@BUILD_LDBM@%$BUILD_LDBM%g s%@BUILD_PASSWD@%$BUILD_PASSWD%g s%@BUILD_PERL@%$BUILD_PERL%g -s%@BUILD_QUIPU@%$BUILD_QUIPU%g s%@BUILD_SHELL@%$BUILD_SHELL%g +s%@BUILD_SQL@%$BUILD_SQL%g s%@BUILD_TCL@%$BUILD_TCL%g -s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g +s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g +s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g s%@LDAP_LIBS@%$LDAP_LIBS%g -s%@LDAPD_LIBS@%$LDAPD_LIBS%g s%@LDIF_LIBS@%$LDIF_LIBS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g s%@LDBM_LIBS@%$LDBM_LIBS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g +s%@WRAP_LIBS@%$WRAP_LIBS%g +s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g +s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g -s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g +s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g -s%@KRB_LIBS@%$KRB_LIBS%g +s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g +s%@KRB4_LIBS@%$KRB4_LIBS%g +s%@KRB5_LIBS@%$KRB5_LIBS%g s%@READLINE_LIBS@%$READLINE_LIBS%g s%@SASL_LIBS@%$SASL_LIBS%g s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g s%@TLS_LIBS@%$TLS_LIBS%g s%@MODULES_LIBS@%$MODULES_LIBS%g +s%@AUTH_LIBS@%$AUTH_LIBS%g +s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g +s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g +s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g CEOF EOF @@ -14821,6 +16426,7 @@ clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \ clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \ clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \ clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ +clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.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 \ @@ -14830,16 +16436,17 @@ libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib. libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.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 \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ -servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ -servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/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-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-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-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/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \ servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ @@ -14893,7 +16500,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in - *Makefile*) ac_comsub="1i\\ + *[Mm]akefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac