X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=7d713331ada1073af76961cba72139c15392a77a;hb=afd0037eda581f6a4af250e9bdf4d743e772fbf5;hp=e6559b5df19d2c510b1957ec567c5bbf76b41b43;hpb=7f9a10d58a1223893a192856673ac8a6968dd9b4;p=openldap diff --git a/configure b/configure index e6559b5df1..7d713331ad 100755 --- a/configure +++ b/configure @@ -1,16 +1,17 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.264 1999/10/01 03:11:40 kdz Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.375 2001/10/24 05:31:28 kurt Exp -# Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved. +# Copyright 1998-2001 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. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted only as authorized by the OpenLDAP +# Public License. A copy of this license is available at +# http://www.OpenLDAP.org/license.html or in file LICENSE in the +# top-level directory of the distribution. -echo "Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved." -echo "Copying restrictions apply, see COPYRIGHT file." +echo "Copyright 1998-2001 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 @@ -25,105 +26,121 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr/local ac_help="$ac_help - --with-subdir=DIR change default subdirectory used for installs" + --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 (experimental) [no]" ac_help="$ac_help - --enable-dns enable V2 DX Referrals extension (no)" + --enable-referrals enable LDAPv2+ Referrals (experimental) [no]" ac_help="$ac_help - --enable-referrals enable V2 Referrals extension (yes)" + --enable-kbind enable LDAPv2+ Kerberos IV bind (deprecated) [no]" 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-rewrite enable rewrite [no]" ac_help="$ac_help - --with-cyrus-sasl with Cyrus SASL support (auto)" + --enable-x-compile enable cross compiling [no]" ac_help="$ac_help - --with-fetch with fetch URL support (auto)" + --with-cyrus-sasl with Cyrus SASL support [auto]" ac_help="$ac_help - --with-kerberos with Kerberos support (auto)" + --with-fetch with fetch URL support [auto]" ac_help="$ac_help - --with-readline with readline support (auto)" + --with-kerberos with Kerberos support [auto]" ac_help="$ac_help - --with-threads use threads (auto)" + --with-readline with readline support [auto]" ac_help="$ac_help - --with-tls with TLS/SSL support (auto)" + --with-threads with threads [auto]" ac_help="$ac_help - --with-yielding-select with implicitly yielding select (auto)" + --with-tls with TLS/SSL support [auto]" ac_help="$ac_help -LDAPD (X.500-to-LDAP Gateway) Options:" -ac_help="$ac_help - --enable-ldapd enable building ldapd (no)" + --with-yielding-select with implicitly yielding select [auto]" ac_help="$ac_help SLAPD (Standalone LDAP Daemon) Options:" ac_help="$ac_help - --enable-slapd enable building slapd (yes)" + --enable-slapd enable building slapd [yes]" +ac_help="$ac_help + --enable-aci enable per-object ACIs (experimental) [no]" +ac_help="$ac_help + --enable-cleartext enable cleartext passwords [yes]" +ac_help="$ac_help + --enable-crypt enable crypt(3) passwords [no]" +ac_help="$ac_help + --enable-dynamic enable linking built binaries with dynamic libs [no]" +ac_help="$ac_help + --enable-kpasswd enable Kerberos password verification [no]" +ac_help="$ac_help + --enable-lmpasswd enable LAN Manager passwords [no]" +ac_help="$ac_help + --enable-spasswd enable (Cyrus) SASL password verification [no]" ac_help="$ac_help - --enable-cleartext enable cleartext passwords (yes)" + --enable-modules enable dynamic module support [no]" ac_help="$ac_help - --enable-crypt enable crypt(3) passwords (auto)" + --enable-phonetic enable phonetic/soundex [no]" ac_help="$ac_help - --enable-modules enable dynamic module support (no)" + --enable-rlookups enable reverse lookups [no]" ac_help="$ac_help - --enable-multimaster enable multimaster replication (no)" + --enable-slp enable SLPv2 support [no]" ac_help="$ac_help - --enable-phonetic enable phonetic/soundex (no)" + --enable-wrappers enable tcp wrapper support [no]" ac_help="$ac_help - --enable-quipu build quipu migration tools (no)" + --enable-bdb enable Berkeley DB backend [no]" ac_help="$ac_help - --enable-rlookups enable reverse lookups (auto)" + --with-bdb-module module type [static]" ac_help="$ac_help - --enable-aci enable per-object ACIs (no)" + --enable-dnssrv enable dnssrv backend [no]" ac_help="$ac_help - --enable-discreteaci enable discrete rights in ACIs (no)" + --with-dnssrv-module module type [static]" ac_help="$ac_help - --enable-wrappers enable tcp wrapper support (no)" + --enable-ldap enable ldap backend [no]" ac_help="$ac_help - --enable-dynamic enable linking built binaries with dynamic libs (no)" + --with-ldap-module module type [static]" ac_help="$ac_help - --enable-bdb2 enable bdb2 backend (no)" + --enable-ldbm enable ldbm backend [yes]" ac_help="$ac_help - --with-bdb2-module module type (static)" + --with-ldbm-api with LDBM API [auto]" ac_help="$ac_help - --enable-ldap enable ldap backend (no)" + --with-ldbm-module module type [static]" ac_help="$ac_help - --with-ldap-module module type (static)" + --with-ldbm-type use LDBM type [auto]" ac_help="$ac_help - --enable-ldbm enable ldbm backend (yes)" + --enable-meta enable metadirectory backend [no]" ac_help="$ac_help - --with-ldbm-api use LDBM API (auto)" + --with-meta-module module type [static]" ac_help="$ac_help - --with-ldbm-module module type (static)" + --enable-monitor enable monitor backend [no]" ac_help="$ac_help - --with-ldbm-type use LDBM type (auto)" + --with-monitor-module module type [static]" ac_help="$ac_help - --enable-passwd enable passwd backend (no)" + --enable-passwd enable passwd backend [no]" ac_help="$ac_help - --with-passwd-module module type (static)" + --with-passwd-module module type [static]" ac_help="$ac_help - --enable-perl enable perl backend (no)" + --enable-perl enable perl backend [no]" ac_help="$ac_help - --with-perl-module module type (static)" + --with-perl-module module type [static]" ac_help="$ac_help - --enable-shell enable shell backend (no)" + --enable-shell enable shell backend [no]" ac_help="$ac_help - --with-shell-module module type (static)" + --with-shell-module module type [static]" ac_help="$ac_help - --enable-tcl enable tcl backend (no)" + --enable-sql enable sql backend [no]" ac_help="$ac_help - --with-tcl-module module type (static)" + --with-sql-module module type [static]" +ac_help="$ac_help + --enable-tcl enable tcl backend [no]" +ac_help="$ac_help + --with-tcl-module module type [static]" ac_help="$ac_help SLURPD (Replication Daemon) Options:" ac_help="$ac_help - --enable-slurpd enable building slurpd (auto)" + --enable-slurpd enable building slurpd [auto]" ac_help="$ac_help Library Generation & Linking Options" ac_help="$ac_help @@ -576,7 +593,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=build/version +ac_unique_file=build/version.sh # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -638,6 +655,16 @@ else ac_n= ac_c='\c' ac_t= fi + +# set unset (borrowed from autoconf 2.49c) +if (OL_FOO=OL_FOO; unset OL_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 @@ -648,6 +675,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 @@ -657,16 +688,16 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -OL_VERSION=`cat $ac_aux_dir/version` -if test -z "$OL_VERSION"; then +eval `$ac_aux_dir/version.sh` +if test -z "$OL_STRING"; then { echo "configure: error: could not determine version" 1>&2; exit 1; } fi -echo "Configuring OpenLDAP $OL_VERSION ..." +echo "Configuring $OL_STRING ..." echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:670: checking host system type" >&5 +echo "configure:701: 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. @@ -707,7 +738,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:711: checking target system type" >&5 +echo "configure:742: 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. @@ -747,7 +778,7 @@ target_os=$ac_cv_target_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:751: checking build system type" >&5 +echo "configure:782: 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. @@ -824,7 +855,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:828: checking for a BSD compatible install" >&5 +echo "configure:859: 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 @@ -881,7 +912,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:885: checking whether build environment is sane" >&5 +echo "configure:916: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -942,7 +973,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:946: checking for $ac_word" >&5 +echo "configure:977: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -972,7 +1003,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:976: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1007: 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 @@ -1000,7 +1031,7 @@ fi -PACKAGE=OpenLDAP +PACKAGE=$OL_PACKAGE VERSION=$OL_VERSION @@ -1012,7 +1043,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1016: checking for working aclocal" >&5 +echo "configure:1047: 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. @@ -1025,7 +1056,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1029: checking for working autoconf" >&5 +echo "configure:1060: 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. @@ -1038,7 +1069,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1042: checking for working automake" >&5 +echo "configure:1073: 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. @@ -1051,7 +1082,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1055: checking for working autoheader" >&5 +echo "configure:1086: 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. @@ -1064,7 +1095,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1068: checking for working makeinfo" >&5 +echo "configure:1099: 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. @@ -1084,7 +1115,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:1088: checking for $ac_word" >&5 +echo "configure:1119: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1121,8 +1152,6 @@ if test -n "$AMTAR"; then fi fi - - cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:1139: checking configure arguments" >&5 +echo "configure:1187: checking configure arguments" >&5 top_builddir=`pwd` @@ -1238,13 +1286,13 @@ if test "${enable_cache+set}" = set; then ol_enable_cache="$ol_arg" else - ol_enable_cache="yes" + ol_enable_cache="no" 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 @@ -1253,18 +1301,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="no" 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 @@ -1273,18 +1321,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="no" 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 @@ -1293,39 +1341,38 @@ 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-rewrite + # Check whether --enable-rewrite or --disable-rewrite was given. +if test "${enable_rewrite+set}" = set; then + enableval="$enable_rewrite" ol_arg=invalid for ol_val in auto yes no ; do @@ -1334,14 +1381,35 @@ if test "${enable_dmalloc+set}" = set; then 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-rewrite" 1>&2; exit 1; } + fi + ol_enable_rewrite="$ol_arg" + +else + ol_enable_rewrite="no" +fi +# end --enable-rewrite +# 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 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; } 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. @@ -1391,7 +1459,7 @@ if test "${with_kerberos+set}" = set; then withval="$with_kerberos" ol_arg=invalid - for ol_val in auto k5 kth 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 @@ -1433,7 +1501,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 @@ -1491,32 +1559,6 @@ fi # end --with-yielding_select -# 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 @@ -1544,6 +1586,26 @@ else ol_enable_slapd="yes" fi # end --enable-slapd +# OpenLDAP --enable-aci + # Check whether --enable-aci or --disable-aci was given. +if test "${enable_aci+set}" = set; then + enableval="$enable_aci" + + 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-aci" 1>&2; exit 1; } + fi + ol_enable_aci="$ol_arg" + +else + ol_enable_aci="no" +fi +# end --enable-aci # OpenLDAP --enable-cleartext # Check whether --enable-cleartext or --disable-cleartext was given. if test "${enable_cleartext+set}" = set; then @@ -1581,13 +1643,13 @@ if test "${enable_crypt+set}" = set; then ol_enable_crypt="$ol_arg" else - ol_enable_crypt="auto" + ol_enable_crypt="no" fi # end --enable-crypt -# OpenLDAP --enable-modules - # Check whether --enable-modules or --disable-modules was given. -if test "${enable_modules+set}" = set; then - enableval="$enable_modules" +# 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 @@ -1596,18 +1658,18 @@ if test "${enable_modules+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; } fi - ol_enable_modules="$ol_arg" + ol_enable_dynamic="$ol_arg" else - ol_enable_modules="no" + ol_enable_dynamic="no" fi -# end --enable-modules -# OpenLDAP --enable-multimaster - # Check whether --enable-multimaster or --disable-multimaster was given. -if test "${enable_multimaster+set}" = set; then - enableval="$enable_multimaster" +# end --enable-dynamic +# 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 @@ -1616,18 +1678,18 @@ if test "${enable_multimaster+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; } fi - ol_enable_multimaster="$ol_arg" + ol_enable_kpasswd="$ol_arg" else - ol_enable_multimaster="no" + ol_enable_kpasswd="no" fi -# end --enable-multimaster -# OpenLDAP --enable-phonetic - # Check whether --enable-phonetic or --disable-phonetic was given. -if test "${enable_phonetic+set}" = set; then - enableval="$enable_phonetic" +# end --enable-kpasswd +# OpenLDAP --enable-lmpasswd + # Check whether --enable-lmpasswd or --disable-lmpasswd was given. +if test "${enable_lmpasswd+set}" = set; then + enableval="$enable_lmpasswd" ol_arg=invalid for ol_val in auto yes no ; do @@ -1636,18 +1698,18 @@ if test "${enable_phonetic+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; } fi - ol_enable_phonetic="$ol_arg" + ol_enable_lmpasswd="$ol_arg" else - ol_enable_phonetic="no" + ol_enable_lmpasswd="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" +# end --enable-lmpasswd +# 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 @@ -1656,18 +1718,18 @@ if test "${enable_quipu+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; } fi - ol_enable_quipu="$ol_arg" + ol_enable_spasswd="$ol_arg" else - ol_enable_quipu="no" + ol_enable_spasswd="no" fi -# end --enable-quipu -# OpenLDAP --enable-rlookups - # Check whether --enable-rlookups or --disable-rlookups was given. -if test "${enable_rlookups+set}" = set; then - enableval="$enable_rlookups" +# end --enable-spasswd +# OpenLDAP --enable-modules + # Check whether --enable-modules or --disable-modules was given. +if test "${enable_modules+set}" = set; then + enableval="$enable_modules" ol_arg=invalid for ol_val in auto yes no ; do @@ -1676,18 +1738,18 @@ if test "${enable_rlookups+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; } fi - ol_enable_rlookups="$ol_arg" + ol_enable_modules="$ol_arg" else - ol_enable_rlookups="auto" + ol_enable_modules="no" fi -# end --enable-rlookups -# OpenLDAP --enable-aci - # Check whether --enable-aci or --disable-aci was given. -if test "${enable_aci+set}" = set; then - enableval="$enable_aci" +# end --enable-modules +# OpenLDAP --enable-phonetic + # Check whether --enable-phonetic or --disable-phonetic was given. +if test "${enable_phonetic+set}" = set; then + enableval="$enable_phonetic" ol_arg=invalid for ol_val in auto yes no ; do @@ -1696,18 +1758,38 @@ if test "${enable_aci+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; } fi - ol_enable_aci="$ol_arg" + ol_enable_phonetic="$ol_arg" else - ol_enable_aci="no" + ol_enable_phonetic="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" +# end --enable-phonetic +# OpenLDAP --enable-rlookups + # Check whether --enable-rlookups or --disable-rlookups was given. +if test "${enable_rlookups+set}" = set; then + enableval="$enable_rlookups" + + 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-rlookups" 1>&2; exit 1; } + fi + ol_enable_rlookups="$ol_arg" + +else + ol_enable_rlookups="no" +fi +# end --enable-rlookups +# OpenLDAP --enable-slp + # Check whether --enable-slp or --disable-slp was given. +if test "${enable_slp+set}" = set; then + enableval="$enable_slp" ol_arg=invalid for ol_val in auto yes no ; do @@ -1716,14 +1798,14 @@ 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-slp" 1>&2; exit 1; } fi - ol_enable_discreteaci="$ol_arg" + ol_enable_slp="$ol_arg" else - ol_enable_discreteaci="no" + ol_enable_slp="no" fi -# end --enable-discreteaci +# end --enable-slp # OpenLDAP --enable-wrappers # Check whether --enable-wrappers or --disable-wrappers was given. if test "${enable_wrappers+set}" = set; then @@ -1744,10 +1826,11 @@ else ol_enable_wrappers="no" fi # 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" + +# OpenLDAP --enable-bdb + # Check whether --enable-bdb or --disable-bdb was given. +if test "${enable_bdb+set}" = set; then + enableval="$enable_bdb" ol_arg=invalid for ol_val in auto yes no ; do @@ -1756,19 +1839,39 @@ if test "${enable_dynamic+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; } fi - ol_enable_dynamic="$ol_arg" + ol_enable_bdb="$ol_arg" else - ol_enable_dynamic="no" + ol_enable_bdb="no" fi -# end --enable-dynamic +# end --enable-bdb +# OpenLDAP --with-bdb_module + # Check whether --with-bdb_module or --without-bdb_module was given. +if test "${with_bdb_module+set}" = set; then + withval="$with_bdb_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-bdb_module" 1>&2; exit 1; } + fi + ol_with_bdb_module="$ol_arg" + +else + ol_with_bdb_module="static" +fi +# end --with-bdb_module -# 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 @@ -1777,18 +1880,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 @@ -1797,14 +1900,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. @@ -1873,7 +1976,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 @@ -1930,11 +2033,10 @@ 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 - enableval="$enable_passwd" +# OpenLDAP --enable-meta + # Check whether --enable-meta or --disable-meta was given. +if test "${enable_meta+set}" = set; then + enableval="$enable_meta" ol_arg=invalid for ol_val in auto yes no ; do @@ -1943,18 +2045,18 @@ if test "${enable_passwd+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; } fi - ol_enable_passwd="$ol_arg" + ol_enable_meta="$ol_arg" else - ol_enable_passwd="no" + ol_enable_meta="no" fi -# end --enable-passwd -# OpenLDAP --with-passwd_module - # Check whether --with-passwd_module or --without-passwd_module was given. -if test "${with_passwd_module+set}" = set; then - withval="$with_passwd_module" +# end --enable-meta +# OpenLDAP --with-meta_module + # Check whether --with-meta_module or --without-meta_module was given. +if test "${with_meta_module+set}" = set; then + withval="$with_meta_module" ol_arg=invalid for ol_val in static dynamic ; do @@ -1963,19 +2065,19 @@ if test "${with_passwd_module+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; } + { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; } fi - ol_with_passwd_module="$ol_arg" + ol_with_meta_module="$ol_arg" else - ol_with_passwd_module="static" + ol_with_meta_module="static" fi -# end --with-passwd_module +# end --with-meta_module -# OpenLDAP --enable-perl - # Check whether --enable-perl or --disable-perl was given. -if test "${enable_perl+set}" = set; then - enableval="$enable_perl" +# OpenLDAP --enable-monitor + # Check whether --enable-monitor or --disable-monitor was given. +if test "${enable_monitor+set}" = set; then + enableval="$enable_monitor" ol_arg=invalid for ol_val in auto yes no ; do @@ -1984,18 +2086,18 @@ if test "${enable_perl+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; } fi - ol_enable_perl="$ol_arg" + ol_enable_monitor="$ol_arg" else - ol_enable_perl="no" + ol_enable_monitor="no" fi -# end --enable-perl -# OpenLDAP --with-perl_module - # Check whether --with-perl_module or --without-perl_module was given. -if test "${with_perl_module+set}" = set; then - withval="$with_perl_module" +# end --enable-monitor +# OpenLDAP --with-monitor_module + # Check whether --with-monitor_module or --without-monitor_module was given. +if test "${with_monitor_module+set}" = set; then + withval="$with_monitor_module" ol_arg=invalid for ol_val in static dynamic ; do @@ -2004,19 +2106,19 @@ if test "${with_perl_module+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; } + { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; } fi - ol_with_perl_module="$ol_arg" + ol_with_monitor_module="$ol_arg" else - ol_with_perl_module="static" + ol_with_monitor_module="static" fi -# end --with-perl_module +# end --with-monitor_module -# OpenLDAP --enable-shell - # Check whether --enable-shell or --disable-shell was given. -if test "${enable_shell+set}" = set; then - enableval="$enable_shell" +# OpenLDAP --enable-passwd + # Check whether --enable-passwd or --disable-passwd was given. +if test "${enable_passwd+set}" = set; then + enableval="$enable_passwd" ol_arg=invalid for ol_val in auto yes no ; do @@ -2025,14 +2127,96 @@ if test "${enable_shell+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; } fi - ol_enable_shell="$ol_arg" + ol_enable_passwd="$ol_arg" else - ol_enable_shell="no" + ol_enable_passwd="no" fi -# end --enable-shell +# end --enable-passwd +# OpenLDAP --with-passwd_module + # Check whether --with-passwd_module or --without-passwd_module was given. +if test "${with_passwd_module+set}" = set; then + withval="$with_passwd_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-passwd_module" 1>&2; exit 1; } + fi + ol_with_passwd_module="$ol_arg" + +else + ol_with_passwd_module="static" +fi +# end --with-passwd_module + +# OpenLDAP --enable-perl + # Check whether --enable-perl or --disable-perl was given. +if test "${enable_perl+set}" = set; then + enableval="$enable_perl" + + 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-perl" 1>&2; exit 1; } + fi + ol_enable_perl="$ol_arg" + +else + ol_enable_perl="no" +fi +# end --enable-perl +# OpenLDAP --with-perl_module + # Check whether --with-perl_module or --without-perl_module was given. +if test "${with_perl_module+set}" = set; then + withval="$with_perl_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-perl_module" 1>&2; exit 1; } + fi + ol_with_perl_module="$ol_arg" + +else + ol_with_perl_module="static" +fi +# end --with-perl_module + +# OpenLDAP --enable-shell + # Check whether --enable-shell or --disable-shell was given. +if test "${enable_shell+set}" = set; then + enableval="$enable_shell" + + 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-shell" 1>&2; exit 1; } + fi + ol_enable_shell="$ol_arg" + +else + ol_enable_shell="no" +fi +# end --enable-shell # OpenLDAP --with-shell_module # Check whether --with-shell_module or --without-shell_module was given. if test "${with_shell_module+set}" = set; then @@ -2054,6 +2238,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 @@ -2178,19 +2403,12 @@ 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 - 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_bdb = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2 + fi + 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 @@ -2198,6 +2416,12 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_ldbm = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2 fi + if test $ol_enable_meta = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2 + fi + if test $ol_enable_monitor = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2 + fi if test $ol_enable_passwd = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2 fi @@ -2210,38 +2434,35 @@ 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 - if test $ol_enable_multimaster = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2 - fi if test $ol_enable_wrappers = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2 fi 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_bdb_module != static ; then + echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2 + fi + 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 @@ -2249,6 +2470,12 @@ if test $ol_enable_slapd = no ; then if test $ol_with_ldbm_module != static ; then echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2 fi + if test $ol_with_meta_module != static ; then + echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2 + fi + if test $ol_with_monitor_module != static ; then + echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2 + fi if test $ol_with_passwd_module != static ; then echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2 fi @@ -2261,42 +2488,55 @@ 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 + if test $ol_enable_rewrite = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2 + fi # force settings to no - ol_enable_bdb2=no + ol_enable_bdb=no + ol_enable_dnssrv=no ol_enable_ldap=no ol_enable_ldbm=no + ol_enable_meta=no + ol_enable_monitor=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_bdb_module=static + ol_with_dnssrv_module=static ol_with_ldap_module=static ol_with_ldbm_module=static + ol_with_meta_module=static + ol_with_monitor_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 + ol_enable_rewrite=no + elif test $ol_enable_ldbm = no ; then if test $ol_with_ldbm_api != auto ; then @@ -2311,43 +2551,36 @@ 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_bdb = no -a \ + $ol_enable_dnssrv = no -a \ $ol_enable_ldap = no -a \ + $ol_enable_meta = no -a \ + $ol_enable_monitor = 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; } + + if test $ol_enable_slapd = yes ; then + { echo "configure: error: slapd requires a backend" 1>&2; exit 1; } + else + echo "configure: warning: skipping slapd, no backend specified" 1>&2 + ol_enable_slapd=no + fi fi ol_with_ldbm_api=no 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; } + if test $ol_enable_bdb != no ; then + ol_with_ldbm_api=berkeley 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 @@ -2359,6 +2592,21 @@ else $ol_with_ldbm_type = btree ; then { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; } fi + + if test $ol_enable_bdb = yes ; then + if test $ol_with_ldbm_api = auto ; then + ol_with_ldbm_api=berkeley + elif test $ol_with_ldbm_api != berkeley ; then + { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; } + fi + + elif test $ol_enable_bdb = auto ; then + if test $ol_with_ldbm_api != berkeley \ + -o $ol_with_ldbm_api != auto ; then + echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2 + ol_enable_bdb=no + fi + fi fi if test $ol_enable_slurpd = yes ; then @@ -2367,39 +2615,75 @@ if test $ol_enable_slurpd = yes ; then fi fi +if test $ol_enable_lmpasswd = yes ; then + if test $ol_with_tls = no ; then + { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; } + 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; } + elif $ol_with_kerberos = auto ; then + ol_with_kerberos=yes + fi + +elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then + if test $ol_with_kerberos = auto ; then + ol_with_kerberos=no + elif test $ol_with_kerberos != no ; then + echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2; + 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_with_cyrus_sasl=yes +fi + echo "$ac_t""done" 1>&6 LDAP_LIBS= LDIF_LIBS= +LDBM_LIB= 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_BDB=no +BUILD_DNSSRV=no BUILD_LDAP=no BUILD_LDBM=no +BUILD_META=no +BUILD_MONITOR=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_BDB_DYNAMIC=static +BUILD_DNSSRV_DYNAMIC=static BUILD_LDAP_DYNAMIC=static BUILD_LDBM_DYNAMIC=static +BUILD_META_DYNAMIC=static +BUILD_MONITOR_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= @@ -2409,13 +2693,21 @@ SLAPD_PERL_LDFLAGS= MOD_PERL_LDFLAGS= PERL_CPPFLAGS= +SLAPD_SQL_LDFLAGS= +SLAPD_SQL_LIBS= +SLAPD_SQL_INCLUDES= + MOD_TCL_LIB= -KRB_LIBS= +KRB4_LIBS= +KRB5_LIBS= READLINE_LIBS= SASL_LIBS= TERMCAP_LIBS= TLS_LIBS= MODULES_LIBS= +AUTH_LIBS= + +SLAPD_SLP_LIBS= @@ -2443,7 +2735,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:2447: checking for $ac_word" >&5 +echo "configure:2739: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2495,7 +2787,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:2499: checking for $ac_word" >&5 +echo "configure:2791: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2528,6 +2820,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" @@ -2554,7 +2847,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:2558: checking for $ac_word" >&5 +echo "configure:2851: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2584,7 +2877,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:2588: checking for $ac_word" >&5 +echo "configure:2881: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2614,7 +2907,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:2618: checking for $ac_word" >&5 +echo "configure:2911: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2665,7 +2958,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:2669: checking for $ac_word" >&5 +echo "configure:2962: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2697,7 +2990,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2701: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:2994: 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. @@ -2708,12 +3001,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2712 "configure" +#line 3005 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3010: \"$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 @@ -2739,12 +3032,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:2743: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3036: 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:2748: checking whether we are using GNU C" >&5 +echo "configure:3041: 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 @@ -2753,7 +3046,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2757: \"$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:3050: \"$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 @@ -2772,7 +3065,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:2776: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3069: 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 @@ -2815,7 +3108,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:2819: checking for ld used by GCC" >&5 +echo "configure:3112: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -2839,10 +3132,10 @@ echo "configure:2819: 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:2843: checking for GNU ld" >&5 +echo "configure:3136: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2846: checking for non-GNU ld" >&5 +echo "configure:3139: 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 @@ -2876,9 +3169,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:2882: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:3174: 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 @@ -2894,7 +3186,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:2898: checking for BSD-compatible nm" >&5 +echo "configure:3190: 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 @@ -2929,9 +3221,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:2935: checking whether ln -s works" >&5 +echo "configure:3226: 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 @@ -2951,6 +3242,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" @@ -2960,7 +3262,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" @@ -2972,11 +3274,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 2979 "configure"' > conftest.$ac_ext - if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 3281 "configure"' > conftest.$ac_ext + if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2997,19 +3299,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:3001: checking whether the C compiler needs -belf" >&5 +echo "configure:3303: 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:3315: \"$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 @@ -3028,124 +3330,327 @@ 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:3067: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then +echo "configure:3338: 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:3098: 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:3370: 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:3121: 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 - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 else - echo "$ac_t""no" 1>&6 + DLLTOOL="false" fi - - -if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then - LN_S="$LN_H" +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:3405: 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:3437: 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:3472: 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:3504: 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:3572: 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:3603: 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:3626: 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 + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then + LN_S="$LN_H" 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:3149: checking for $ac_word" >&5 +echo "configure:3654: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3153,7 +3658,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. ;; *) @@ -3181,7 +3686,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:3185: checking for $ac_word" >&5 +echo "configure:3690: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3189,7 +3694,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. ;; *) @@ -3217,7 +3722,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:3221: checking for $ac_word" >&5 +echo "configure:3726: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3225,7 +3730,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. ;; *) @@ -3256,7 +3761,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:3260: checking for $ac_word" >&5 +echo "configure:3765: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3264,7 +3769,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. ;; *) @@ -3297,7 +3802,7 @@ fi else PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" - if test x"$ol_with_perl_module" == "xstatic" ; then + 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//`" @@ -3307,7 +3812,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3311: checking how to run the C preprocessor" >&5 +echo "configure:3816: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3322,13 +3827,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:3332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3837: \"$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 : @@ -3339,13 +3844,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:3349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3854: \"$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 : @@ -3356,13 +3861,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:3366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3871: \"$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 : @@ -3400,9 +3905,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:3404: checking for AIX" >&5 +echo "configure:3909: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3428: checking for POSIXized ISC" >&5 +echo "configure:3933: 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 @@ -3446,17 +3951,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:3450: checking for minix/config.h" >&5 +echo "configure:3955: 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:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3965: \"$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* @@ -3495,12 +4000,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3499: checking for Cygwin environment" >&5 +echo "configure:4004: 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:4020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -3527,19 +4032,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:3531: checking for mingw32 environment" >&5 +echo "configure:4036: 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:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3555,19 +4060,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:3559: checking for EMX OS/2 environment" >&5 +echo "configure:4064: 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:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -3586,7 +4091,7 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3590: checking for executable suffix" >&5 +echo "configure:4095: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3596,7 +4101,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -3617,13 +4122,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:3621: checking for object suffix" >&5 +echo "configure:4126: 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:3627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -3647,7 +4152,7 @@ EOF echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 -echo "configure:3651: checking for be_app in -lbe" >&5 +echo "configure:4156: 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 @@ -3655,7 +4160,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:4175: \"$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 @@ -3692,7 +4197,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:3696: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:4201: 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 @@ -3709,7 +4214,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 @@ -3746,7 +4251,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -3780,7 +4285,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:3784: checking for ${OL_MKDEP} depend flag" >&5 +echo "configure:4289: 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 @@ -3790,7 +4295,7 @@ else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } \ + if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4299: \"$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 @@ -3822,23 +4327,71 @@ if test "${ol_cv_mkdep}" = no ; then echo "configure: warning: do not know how to generate dependencies" 1>&2 fi +echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6 +echo "configure:4332: 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="-ls $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 + + AUTH_LIBS=-ls + cat >> confdefs.h <<\EOF +#define HAVE_AIX_SECURITY 1 +EOF + + +else + echo "$ac_t""no" 1>&6 +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:3832: checking for $ac_hdr" >&5 +echo "configure:4385: 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:3842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4395: \"$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* @@ -3870,7 +4423,7 @@ done fi echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 -echo "configure:3874: checking for lt_dlinit in -lltdl" >&5 +echo "configure:4427: 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 @@ -3878,7 +4431,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lltdl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4446: \"$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 @@ -3904,42 +4457,45 @@ 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_LIBLTDL 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_bdb_module=static + ol_with_dnssrv_module=static ol_with_ldap_module=static ol_with_ldbm_module=static + ol_with_meta_module=static + ol_with_monitor_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:3937: checking for EBCDIC" >&5 +echo "configure:4493: 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:4508: \"$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* @@ -3972,12 +4528,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3976: checking for ANSI C header files" >&5 +echo "configure:4532: 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 @@ -3985,7 +4541,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4545: \"$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* @@ -4002,7 +4558,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 @@ -4020,7 +4576,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 @@ -4041,7 +4597,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #ifndef HAVE_EBCDIC @@ -4059,7 +4615,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4093,12 +4649,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:4097: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4653: 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> @@ -4106,7 +4662,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4131,7 +4687,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:4135: checking for opendir in -ldir" >&5 +echo "configure:4691: 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 @@ -4139,7 +4695,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:4710: \"$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 @@ -4172,7 +4728,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4176: checking for opendir in -lx" >&5 +echo "configure:4732: 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 @@ -4180,7 +4736,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:4751: \"$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 @@ -4214,12 +4770,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4218: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4774: 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 @@ -4235,7 +4791,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4256,12 +4812,12 @@ EOF fi echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:4260: checking POSIX termios" >&5 +echo "configure:4816: 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 @@ -4271,7 +4827,7 @@ int main() { tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4831: \"$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 @@ -4287,7 +4843,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:4291: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +echo "configure:4847: 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 @@ -4296,7 +4852,7 @@ else gwinsz_in_termios_h=no if test $am_cv_sys_posix_termios = yes; then cat > conftest.$ac_ext < # include @@ -4316,7 +4872,7 @@ rm -f conftest* if test $gwinsz_in_termios_h = no; then cat > conftest.$ac_ext < # include @@ -4355,12 +4911,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 \ @@ -4369,6 +4928,7 @@ for ac_hdr in \ memory.h \ psap.h \ pwd.h \ + process.h \ resolv.h \ sgtty.h \ shadow.h \ @@ -4390,21 +4950,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:4398: checking for $ac_hdr" >&5 +echo "configure:4959: 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:4408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4969: \"$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* @@ -4432,27 +4993,125 @@ done -echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:4437: 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 "checking for dlopen""... $ac_c" 1>&6 +echo "configure:4999: checking for dlopen" >&5 +if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lV3 $LIBS" -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 sigset(); +char dlopen(); +char (*f)(); int main() { -sigset() + +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +f = dlopen; +#endif + +; return 0; } +EOF +if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:5046: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $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 dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + + +echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:5096: 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 +if { (eval echo configure:5115: \"$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 @@ -4480,14 +5139,59 @@ else fi +if test $ac_cv_header_winsock_h = yes; then + echo $ac_n "checking for winsock""... $ac_c" 1>&6 +echo "configure:5145: checking for winsock" >&5 +if eval "test \"\${ol_cv_winsock+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + + socket(0,0,0); + select(0,NULL,NULL,NULL,NULL); + closesocket(0); + gethostname(NULL,0); + +; return 0; } +EOF +if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_winsock=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_winsock=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_winsock" 1>&6 + + if test $ol_cv_winsock = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_WINSOCK 1 +EOF + + 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:4486: checking for socket" >&5 +echo "configure:5190: checking for socket" >&5 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5219: \"$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 @@ -4530,7 +5234,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4534: checking for main in -lsocket" >&5 +echo "configure:5238: 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 @@ -4538,14 +5242,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5253: \"$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 @@ -4573,7 +5277,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:4577: checking for main in -lnet" >&5 +echo "configure:5281: 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 @@ -4581,61 +5285,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $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 net | 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:4620: checking for socket in -lnet" >&5 -ac_lib_var=`echo net'_'socket | 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:5296: \"$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 @@ -4663,7 +5320,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:4667: checking for main in -lnsl_s" >&5 +echo "configure:5324: 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 @@ -4671,14 +5328,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:5339: \"$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 @@ -4706,7 +5363,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4710: checking for main in -lnsl" >&5 +echo "configure:5367: 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 @@ -4714,14 +5371,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:5382: \"$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 @@ -4749,7 +5406,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:4753: checking for socket in -linet" >&5 +echo "configure:5410: 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 @@ -4757,7 +5414,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:5429: \"$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 @@ -4796,7 +5453,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:4800: checking for main in -lgen" >&5 +echo "configure:5457: 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 @@ -4804,14 +5461,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:5472: \"$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 @@ -4843,12 +5500,12 @@ fi echo $ac_n "checking for select""... $ac_c" 1>&6 -echo "configure:4847: checking for select" >&5 +echo "configure:5504: 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:5533: \"$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 @@ -4893,8 +5550,9 @@ else fi -echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 -echo "configure:4898: 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:5556: 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 @@ -4908,7 +5566,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 < @@ -4927,7 +5585,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_not_found=no ; break 3 else @@ -4965,23 +5623,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:4975: checking for $ac_hdr" >&5 +echo "configure:5634: 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:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5644: \"$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* @@ -5011,12 +5670,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:5015: checking for regfree" >&5 +echo "configure:5674: 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:5703: \"$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 @@ -5063,7 +5722,7 @@ fi echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 -echo "configure:5067: checking for compatible POSIX regex" >&5 +echo "configure:5726: 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 @@ -5072,7 +5731,7 @@ else ol_cv_c_posix_regex=cross else cat > conftest.$ac_ext < @@ -5098,7 +5757,7 @@ main() return rc; } EOF -if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5761: \"$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 @@ -5118,21 +5777,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 res_search""... $ac_c" 1>&6 -echo "configure:5123: 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:5783: 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() { @@ -5140,106 +5800,108 @@ 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:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5812: \"$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:5173: checking for res_search in -lbind" >&5 -ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for __res_query""... $ac_c" 1>&6 +echo "configure:5833: 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 - ac_save_LIBS="$LIBS" -LIBS="-lbind $LIBS" -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 res_search(); +char __res_query(); +char (*f)(); int main() { -res_search() + +/* 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_query) || defined (__stub_____res_query) +choke me +#else +f = __res_query; +#endif + ; return 0; } EOF -if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5862: \"$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" + 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_lib_$ac_lib_var=no" + eval "ac_cv_func___res_query=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 bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 + : 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_func___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:5224: 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:5886: 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:5905: \"$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 @@ -5266,31 +5928,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:5275: 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 -lbind""... $ac_c" 1>&6 +echo "configure:5937: 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="-lresolv $LIBS" +LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5956: \"$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 @@ -5305,54 +5967,43 @@ 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 resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi - ac_cv_func_res_search=$ac_cv_lib_resolv_res_search -fi - -if test "$ac_cv_func_res_search" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_RES_SEARCH 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 + ac_cv_func_res_query=$ac_cv_lib_bind___res_query fi - -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 - - echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 -echo "configure:5341: checking for main in -lxtpp" >&5 -ac_lib_var=`echo xtpp'_'main | 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:5988: 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="-lxtpp -lxtdsap -lxtisode -losi $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6007: \"$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 @@ -5367,36 +6018,43 @@ 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_XTPP 1 + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: fi - echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 -echo "configure:5385: checking for main in -ldsap" >&5 -ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'` + ac_cv_func_res_query=$ac_cv_lib_resolv_res_query +fi + +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6 +echo "configure:6039: 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="-ldsap -lisode $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6058: \"$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 @@ -5411,163 +6069,209 @@ 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_DSAP 1 + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: fi - echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 -echo "configure:5429: checking for main in -lisode" >&5 -ac_lib_var=`echo isode'_'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" -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" + ac_cv_func_res_query=$ac_cv_lib_resolv___res_query fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_ISODE 1 +if test "$ac_cv_func_res_query" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_RES_QUERY 1 EOF - LDAPD_LIBS="$LDAPD_LIBS -lisode" - -else - echo "$ac_t""no" 1>&6 -: + + 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 -if test $ol_link_isode != no; then - echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 -echo "configure:5476: checking for main in -lpp" >&5 -ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_func in getaddrinfo inet_ntop +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6106: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpp $LIBS" -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 $ac_func(); +char (*f)(); int main() { -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:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6135: \"$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" + 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_lib_$ac_lib_var=no" + eval "ac_cv_func_$ac_func=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_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define HAVE_PP 1 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 -: fi +done - # 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:5522: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then +ol_link_ipv6=no +if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then + if test $ol_enable_ipv6 = yes ; then + { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; } + fi +else + for ac_func in gai_strerror +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6169: 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 - 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 + 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:6198: \"$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 -PEPSY="$ac_cv_path_PEPSY" -if test -n "$PEPSY"; then - echo "$ac_t""$PEPSY" 1>&6 + +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 + + + echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6 +echo "configure:6224: checking INET6_ADDRSTRLEN" >&5 +if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +# ifdef INET6_ADDRSTRLEN + __has_inet6_addrstrlen__; +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_inet6_addrstrlen=yes +else + rm -rf conftest* + ol_cv_inet6_addrstrlen=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6 + if test $ol_cv_inet6_addrstrlen = yes ; then + ol_link_ipv6=yes + elif test $ol_enable_ipv6 = yes ; then + { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; } + fi fi -if test $ol_enable_quipu != no ; then - for ac_hdr in quipu/commonarg.h +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:5561: checking for $ac_hdr" >&5 +echo "configure:6265: 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:5571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6275: \"$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* @@ -5594,33 +6298,37 @@ 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; } + 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_kerberos=no +ol_link_kbind=no +ol_link_kpasswd=no +ol_link_krb5=no +ol_link_krb4=no -if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then - for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \ + -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \ + -o $ol_with_kerberos = k425 ; 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:5614: checking for $ac_hdr" >&5 +echo "configure:6322: 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:5624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6332: \"$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* @@ -5647,24 +6355,71 @@ 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:5653: checking for main in -lkrb4" >&5 -ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'` + 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:6364: 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:6374: \"$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_heim_err_h = yes ; then + krb5_impl=heimdal + else + krb5_impl=mit + fi + + if test $krb5_impl = mit; then + echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6 +echo "configure:6408: checking for main in -lk5crypto" >&5 +ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6423: \"$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 @@ -5679,89 +6434,143 @@ 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 + krb5crypto=k5crypto else echo "$ac_t""no" 1>&6 -have_k5=no +krb5crypto=crypto fi - if test $have_k5 = yes ; then - ol_with_kerberos=found - ol_link_kerberos=yes + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:6446: 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="-lkrb5 -l$krb5crypto -lcom_err $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" - KRB_LIBS="-lkrb4 -lkrb5 -ldes425" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_krb5=yes + KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err" +else + echo "$ac_t""no" 1>&6 +have_krb5=no +fi - LIBS="$KRB_LIBS $LIBS" - echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 -echo "configure:5699: checking for des_debug in Kerberos libraries" >&5 -if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:6486: 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 - - save_LIBS="$LIBS" - LIBS="$KRB_LIBS $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < -#include -extern int des_debug; - int main() { - -des_debug = 1; - +main() ; return 0; } EOF -if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_var_des_debug=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_var_des_debug=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - LIBS="$save_LIBS" - +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_krb5=yes + KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err" +else + echo "$ac_t""no" 1>&6 +have_krb5=no fi -echo "$ac_t""$ol_cv_var_des_debug" 1>&6 - if test $ol_cv_var_des_debug = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_DES_DEBUG 1 + cat >> confdefs.h <<\EOF +#define HAVE_HEIMDAL_KERBEROS 1 +EOF + + + else + have_krb5=no + echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2 + fi + + 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 - LIBS="$save_LIBS" + 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_with_kerberos = auto -o $ol_with_kerberos = k4 \ - -o $ol_with_kerberos = kth ; then +if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \ + $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then - for ac_hdr in krb.h des.h krb-archaeology.h + 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:5755: checking for $ac_hdr" >&5 +echo "configure:6564: 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:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6574: \"$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* @@ -5788,24 +6597,221 @@ fi done - if test $ac_cv_header_krb_h = yes ; then - echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:5794: checking for main in -lkrb" >&5 -ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'` + 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:6604: 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="-lkrb -ldes $LIBS" +LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k425=yes + KRB4_LIBS="-lkrb4 -ldes425" +else + echo "$ac_t""no" 1>&6 +have_k425=no +fi + + + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:6644: 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 -ldes -lasn1 -lroken -lcom_err $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_k425=yes + KRB4_LIBS="-lkrb4" +else + echo "$ac_t""no" 1>&6 +have_k425=no +fi + + + else + have_425=no + echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2 + fi + + if test $have_k425 = yes ; then + ol_with_kerberos=found + ol_link_krb4=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KRB425 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF + + + echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 +echo "configure:6701: 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="$KRB4_LIBS $KRB5_LIBS $LIBS" + cat > conftest.$ac_ext < +#include +extern int des_debug; + +int main() { + +des_debug = 1; + +; return 0; } +EOF +if { (eval echo configure:6722: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_var_des_debug=no +fi +rm -f conftest* + LIBS="$save_LIBS" + +fi + +echo "$ac_t""$ol_cv_var_des_debug" 1>&6 + + if test $ol_cv_var_des_debug = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_DES_DEBUG 1 +EOF + + fi + + LIBS="$save_LIBS" + fi + fi +fi + +if test $ol_link_krb5 = yes ; then + ol_with_kerberos=found +fi + +if test $ol_with_kerberos = yes -o $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:6761: 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:6771: \"$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_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 +echo "configure:6800: 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 +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 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5829,9 +6835,14 @@ 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 + - KRB_LIBS="-lkrb -ldes" + KRB4_LIBS="-lkrb -ldes" if test $ac_cv_header_krb_archaeology_h = yes ; then cat >> confdefs.h <<\EOF @@ -5843,34 +6854,44 @@ EOF 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 -a $ol_enable_kbind != no ; then + ol_link_kbind=yes + +elif test $ol_enable_kbind = yes ; then + { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; } +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; } + { 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:5864: checking for $ac_hdr" >&5 +echo "configure:6885: 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:5874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6895: \"$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* @@ -5899,7 +6920,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:5903: checking for SSLeay_add_ssl_algorithms in -lssl" >&5 +echo "configure:6924: 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 @@ -5907,7 +6928,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:6943: \"$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 @@ -5943,7 +6964,7 @@ fi if test $have_ssleay = no ; then echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 -echo "configure:5947: checking for SSL_library_init in -lssl" >&5 +echo "configure:6968: 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 @@ -5951,7 +6972,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:6987: \"$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 @@ -5988,7 +7009,7 @@ fi if test $have_ssleay = no ; then echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 -echo "configure:5992: checking for ssl3_accept in -lssl" >&5 +echo "configure:7013: 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 @@ -5996,7 +7017,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:7032: \"$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 @@ -6052,6 +7073,9 @@ EOF fi fi fi + +else + echo "configure: warning: TLS privacy protection not supported!" 1>&2 fi if test $ol_link_tls = yes ; then @@ -6059,7 +7083,25 @@ 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 + +if test $ol_enable_lmpasswd != no; then + if test $ol_link_tls != yes ; then + { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; } + fi + + cat >> confdefs.h <<\EOF +#define SLAPD_LMHASH 1 +EOF + +fi for ac_func in \ ctime_r \ @@ -6067,12 +7109,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6071: checking for $ac_func" >&5 +echo "configure:7113: 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:7142: \"$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 @@ -6125,50 +7167,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:6129: checking number of arguments of ctime_r" >&5 +echo "configure:7171: 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:6141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7183: \"$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:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7202: \"$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:6182: checking number of arguments of gethostbyname_r" >&5 +echo "configure:7242: 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 @@ -6197,15 +7257,19 @@ struct hostent hent; char buffer[BUFSIZE]; buffer, bufsize, &h_errno); ; return 0; } EOF -if { (eval echo configure:6201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7261: \"$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 @@ -6214,24 +7278,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:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7288: \"$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 @@ -6248,12 +7325,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:6252: checking number of arguments of gethostbyaddr_r" >&5 +echo "configure:7329: 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 @@ -6269,15 +7346,19 @@ struct hostent hent; char buffer[BUFSIZE]; alen, AF_INET, &hent, buffer, bufsize, &h_errno); ; return 0; } EOF -if { (eval echo configure:6273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7350: \"$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 @@ -6286,27 +7367,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:6299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7380: \"$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 @@ -6339,33 +7433,116 @@ EOF fi ol_link_threads=no + if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = posix ; then + -o $ol_with_threads = nt ; then - for ac_hdr in pthread.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6350: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + + echo $ac_n "checking for _beginthread""... $ac_c" 1>&6 +echo "configure:7443: checking for _beginthread" >&5 +if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6360: \"$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* +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _beginthread(); below. */ +#include +/* 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:7472: \"$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 + : +else + echo "$ac_t""no" 1>&6 +fi + + + if test $ac_cv_func__beginthread = 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 + + for ac_hdr in pthread.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7527: 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:7537: \"$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* @@ -6385,13 +7562,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:6389: checking POSIX thread version" >&5 +echo "configure:7566: 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 < @@ -6413,7 +7590,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -6466,12 +7643,12 @@ EOF echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:6470: checking for LinuxThreads pthread.h" >&5 +echo "configure:7647: 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 @@ -6498,12 +7675,12 @@ EOF echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6 -echo "configure:6502: checking for GNU Pth pthread.h" >&5 +echo "configure:7679: 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 @@ -6532,17 +7709,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:6536: checking for $ac_hdr" >&5 +echo "configure:7713: 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:6546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7723: \"$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* @@ -6572,14 +7749,14 @@ done echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 -echo "configure:6576: checking for pthread_create in default libraries" >&5 +echo "configure:7753: 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 < @@ -6598,32 +7775,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_create=yes else @@ -6635,7 +7849,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6658,33 +7872,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7939: \"$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 @@ -6709,7 +7960,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:6713: checking for pthread link with -kthread" >&5 +echo "configure:7964: 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 @@ -6720,7 +7971,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6739,32 +7990,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_kthread=yes else @@ -6776,7 +8064,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6799,33 +8087,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8154: \"$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 @@ -6855,7 +8180,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:6859: checking for pthread link with -pthread" >&5 +echo "configure:8184: 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 @@ -6866,7 +8191,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -6885,32 +8210,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_pthread=yes else @@ -6922,7 +8284,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -6945,33 +8307,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8374: \"$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 @@ -7001,7 +8400,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:7005: checking for pthread link with -pthreads" >&5 +echo "configure:8404: 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 @@ -7012,7 +8411,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7031,32 +8430,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_pthreads=yes else @@ -7068,7 +8504,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7091,33 +8527,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8594: \"$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 @@ -7147,7 +8620,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:7151: checking for pthread link with -mthreads" >&5 +echo "configure:8624: 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 @@ -7158,7 +8631,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7177,32 +8650,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_mthreads=yes else @@ -7214,7 +8724,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7237,33 +8747,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8814: \"$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 @@ -7293,7 +8840,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:7297: checking for pthread link with -thread" >&5 +echo "configure:8844: 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 @@ -7304,7 +8851,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7323,32 +8870,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_thread=yes else @@ -7360,7 +8944,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7383,33 +8967,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9034: \"$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 @@ -7440,7 +9061,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:7444: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 +echo "configure:9065: 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 @@ -7451,7 +9072,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7470,32 +9091,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9157: \"$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 @@ -7507,7 +9165,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7530,33 +9188,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9255: \"$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 @@ -7586,7 +9281,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:7590: checking for pthread link with -lpthread -lmach -lexc" >&5 +echo "configure:9285: 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 @@ -7597,7 +9292,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7616,32 +9311,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9377: \"$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 @@ -7653,7 +9385,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7676,33 +9408,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9475: \"$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 @@ -7733,7 +9502,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:7737: checking for pthread link with -lpthread -Wl,-woff,85" >&5 +echo "configure:9506: 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 @@ -7744,7 +9513,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7763,32 +9532,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9598: \"$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 @@ -7800,7 +9606,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7823,33 +9629,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9696: \"$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 @@ -7880,7 +9723,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:7884: checking for pthread link with -lpthread" >&5 +echo "configure:9727: 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 @@ -7891,7 +9734,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -7910,32 +9753,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_lpthread=yes else @@ -7947,7 +9827,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -7970,33 +9850,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9917: \"$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 @@ -8026,7 +9943,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:8030: checking for pthread link with -lc_r" >&5 +echo "configure:9947: 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 @@ -8037,7 +9954,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8056,32 +9973,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10039: \"$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 @@ -8093,7 +10047,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8116,33 +10070,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10137: \"$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 @@ -8173,7 +10164,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:8177: checking for pthread link with -threads" >&5 +echo "configure:10168: 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 @@ -8184,7 +10175,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8203,32 +10194,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_pthread_threads=yes else @@ -8240,7 +10268,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8263,33 +10291,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10358: \"$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 @@ -8320,7 +10385,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:8324: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 +echo "configure:10389: 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 @@ -8331,7 +10396,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8350,32 +10415,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10481: \"$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 @@ -8387,7 +10489,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8410,33 +10512,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10579: \"$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 @@ -8466,7 +10605,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:8470: checking for pthread link with -lpthreads -lmach -lexc" >&5 +echo "configure:10609: 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 @@ -8477,7 +10616,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8496,32 +10635,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10701: \"$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 @@ -8533,7 +10709,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8556,33 +10732,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10799: \"$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 @@ -8612,7 +10825,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:8616: checking for pthread link with -lpthreads -lexc" >&5 +echo "configure:10829: 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 @@ -8623,7 +10836,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8642,32 +10855,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10921: \"$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 @@ -8679,7 +10929,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8702,33 +10952,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11019: \"$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 @@ -8759,7 +11046,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:8763: checking for pthread link with -lpthreads" >&5 +echo "configure:11050: 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 @@ -8770,7 +11057,7 @@ else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -8789,32 +11076,69 @@ int main() { /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; ; return 0; } EOF -if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11142: \"$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 @@ -8826,7 +11150,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext < @@ -8849,33 +11173,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); #endif - if( status ) exit( status ); +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; +#endif + + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11240: \"$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 @@ -8917,12 +11278,12 @@ EOF for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8921: checking for $ac_func" >&5 +echo "configure:11282: 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:11311: \"$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 @@ -8974,7 +11335,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:8978: checking for sched_yield in -lrt" >&5 +echo "configure:11339: 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 @@ -8982,7 +11343,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:11358: \"$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 @@ -9025,12 +11386,12 @@ fi for ac_func in thr_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9029: checking for $ac_func" >&5 +echo "configure:11390: 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:11419: \"$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 @@ -9085,15 +11446,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:9092: checking for $ac_func" >&5 +echo "configure:11453: 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:11482: \"$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 @@ -9143,13 +11504,13 @@ done echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 -echo "configure:9147: checking for pthread_detach with " >&5 +echo "configure:11508: 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 < @@ -9161,7 +11522,7 @@ int main() { pthread_detach(NULL); ; return 0; } EOF -if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11526: \"$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 @@ -9193,12 +11554,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9197: checking for $ac_func" >&5 +echo "configure:11558: 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:11587: \"$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 @@ -9248,21 +11609,23 @@ done - echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6 -echo "configure:9253: 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:11616: 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() { @@ -9270,35 +11633,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:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11645: \"$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 - : + 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:9302: checking for LinuxThreads implementation" >&5 +echo "configure:11670: 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 @@ -9311,7 +11679,7 @@ echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 -echo "configure:9315: checking for LinuxThreads consistency" >&5 +echo "configure:11683: checking for LinuxThreads consistency" >&5 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9336,7 +11704,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:9340: checking if pthread_create() works" >&5 +echo "configure:11708: 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 @@ -9345,7 +11713,7 @@ else ol_cv_pthread_create_works=yes else cat > conftest.$ac_ext < @@ -9368,33 +11736,70 @@ int main(argc, argv) /* pthread test function */ pthread_t t; int status; + int detach = 1; - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); +#ifdef HAVE_PTHREADS_FINAL + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED ) + if( !detach ) { +#if defined( PTHREAD_CREATE_JOINABLE ) + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); #else - status = pthread_create(&t, NULL, task, NULL); + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED); +#endif + +#ifdef PTHREAD_CREATE_DETACHED + } else { + status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); +#endif + } + if( status ) return status; #endif - if( status ) exit( status ); + status = pthread_create( &t, &attr, task, NULL ); + if( status ) return status; + +#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED ) + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( t ); + if( status ) return status; + } +#endif - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); #else - status = pthread_detach( t ); + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return status; + + if( detach ) { + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return status; + } #endif #ifdef HAVE_LINUX_THREADS pthread_kill_other_threads_np(); #endif - exit( status ); + return 0; } EOF -if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11803: \"$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 @@ -9416,7 +11821,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:9420: checking if select yields when using pthreads" >&5 +echo "configure:11825: 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 @@ -9425,7 +11830,7 @@ else ol_cv_pthread_select_yields=cross else cat > conftest.$ac_ext < @@ -9501,7 +11906,7 @@ int main(argc, argv) exit(2); } EOF -if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11910: \"$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 @@ -9529,7 +11934,7 @@ echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else - { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } + { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; } fi fi @@ -9545,17 +11950,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:9549: checking for $ac_hdr" >&5 +echo "configure:11954: 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:9559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11964: \"$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* @@ -9585,12 +11990,12 @@ done ol_with_threads=found echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:9589: checking for cthread_fork" >&5 +echo "configure:11994: 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:12023: \"$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 @@ -9636,7 +12041,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:9640: checking for cthread_fork with -all_load" >&5 +echo "configure:12045: 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 @@ -9644,7 +12049,7 @@ else save_LIBS="$LIBS" LIBS="-all_load $LIBS" cat > conftest.$ac_ext < int main() { @@ -9653,7 +12058,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12062: \"$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 @@ -9698,17 +12103,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:9702: checking for $ac_hdr" >&5 +echo "configure:12107: 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:9712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12117: \"$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* @@ -9737,7 +12142,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:9741: checking for pth_version in -lpth" >&5 +echo "configure:12146: 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 @@ -9745,7 +12150,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:12165: \"$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 @@ -9800,17 +12205,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:9804: checking for $ac_hdr" >&5 +echo "configure:12209: 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:9814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12219: \"$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* @@ -9838,7 +12243,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:9842: checking for thr_create in -lthread" >&5 +echo "configure:12247: 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 @@ -9846,7 +12251,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:12266: \"$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 @@ -9897,12 +12302,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9901: checking for $ac_func" >&5 +echo "configure:12306: 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:12335: \"$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 @@ -9957,17 +12362,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9961: checking for $ac_hdr" >&5 +echo "configure:12366: 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:9971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12376: \"$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* @@ -9995,7 +12400,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:9999: checking for lwp_create in -llwp" >&5 +echo "configure:12404: 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 @@ -10003,7 +12408,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:12423: \"$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 @@ -10067,17 +12472,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:10071: checking for $ac_hdr" >&5 +echo "configure:12476: 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:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12486: \"$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* @@ -10106,12 +12511,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10110: checking for $ac_func" >&5 +echo "configure:12515: 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:12544: \"$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 @@ -10161,12 +12566,12 @@ done echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:10165: checking for LinuxThreads pthread.h" >&5 +echo "configure:12570: 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 @@ -10196,17 +12601,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10200: checking for $ac_hdr" >&5 +echo "configure:12605: 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:10210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12615: \"$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* @@ -10236,17 +12641,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10240: checking for $ac_hdr" >&5 +echo "configure:12645: 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:10250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12655: \"$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* @@ -10276,17 +12681,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10280: checking for $ac_hdr" >&5 +echo "configure:12685: 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:10290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12695: \"$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* @@ -10314,7 +12719,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 @@ -10345,20 +12750,20 @@ EOF echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 -echo "configure:10349: checking for thread specific errno" >&5 +echo "configure:12754: 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:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12767: \"$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 @@ -10374,20 +12779,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:10378: checking for thread specific h_errno" >&5 +echo "configure:12783: 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:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12796: \"$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 @@ -10434,77 +12839,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:10442: 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_appexit in -ldb""... $ac_c" 1>&6 -echo "configure:10448: checking for db_appexit in -ldb" >&5 -ac_lib_var=`echo db'_'db_appexit | 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 +if test $ol_with_ldbm_api = auto \ + -o $ol_with_ldbm_api = berkeley \ + -o $ol_with_ldbm_api = bcompat ; then - LIBS="$ol_LIBS" - -fi - -echo "$ac_t""$ol_cv_lib_db2" 1>&6 - -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:10498: checking for $ac_hdr" >&5 +echo "configure:12855: 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:10508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12865: \"$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* @@ -10530,186 +12887,478 @@ 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:10536: 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:12893: 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:12936: 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_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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } +EOF +if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_none=yes else - ol_cv_header_db2=no + 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:10574: 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:13017: 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 -EOF +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif - else - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBBTREE 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:13074: \"$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* - fi + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db" 1>&6 - echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6 -echo "configure:10613: checking for DB_THREAD support" >&5 -if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then + 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:13098: 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_LIBS="$LIBS" - if test $ol_cv_lib_db2 != yes ; then - LIBS="$ol_cv_lib_db2" + 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } +EOF +if { (eval echo configure:13155: \"$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 "$cross_compiling" = yes; then - ol_cv_berkeley_db2_db_thread=cross +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6 +echo "configure:13179: 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 - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL ((void *)0) +#ifdef HAVE_DB_185_H +# include +#else +# include #endif -main() -{ - int rc; - DB_ENV env; - u_int32_t flags = DB_CREATE | DB_THREAD; - memset( &env, '\0', sizeof(env) ); +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif - rc = db_appinit( NULL, NULL, &env, flags ); +#ifndef NULL +#define NULL ((void*)0) +#endif - if( rc == 0 ) { - db_appexit( &env ); +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } } +#endif - return rc; -} +#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:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ol_cv_berkeley_db2_db_thread=yes +if { (eval echo configure:13236: \"$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 -fr conftest* - ol_cv_berkeley_db2_db_thread=no + rm -rf conftest* + ol_cv_db_db2=no fi -rm -fr conftest* +rm -f conftest* + + LIBS="$ol_LIBS" + fi +echo "$ac_t""$ol_cv_db_db2" 1>&6 - LIBS="$ol_LIBS" + if test $ol_cv_db_db2 = yes ; then + ol_cv_lib_db=-ldb2 + fi +fi - if test $ol_cv_berkeley_db2_db_thread != no ; then - cat >> confdefs.h <<\EOF -#define HAVE_BERKELEY_DB2_DB_THREAD 1 +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6 +echo "configure:13260: 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 + + 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF +if { (eval echo configure:13317: \"$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* - fi + LIBS="$ol_LIBS" fi -echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6 +echo "$ac_t""$ol_cv_db_db1" 1>&6 - if test $ol_cv_lib_db2 != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" - fi + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 fi fi -ol_link_bdb2=no -if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then - if test $ol_cv_berkeley_db2_db_thread != no ; then - ol_link_bdb2=yes - else - echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2 + + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + fi fi 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:10694: checking for Berkeley DB library" >&5 -if eval "test \"\${ol_cv_lib_db+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - for ac_hdr in db1/db.h + 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:10703: checking for $ac_hdr" >&5 +echo "configure:13352: 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:10713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13362: \"$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* @@ -10735,223 +13384,536 @@ else fi done - ol_LIBS="$LIBS" - echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:10741: 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:13392: 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else -f = dbopen; + (void) dbopen( NULL, 0, 0, 0, NULL); #endif ; return 0; } EOF -if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13449: \"$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:10789: 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:13473: 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13530: \"$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:13554: 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:10828: 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } +EOF +if { (eval echo configure:13611: \"$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:13635: 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:10847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13692: \"$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:13716: 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 + + 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 > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\texpected: %s\n\tgot: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } +EOF +if { (eval echo configure:13773: \"$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 "$ac_t""no" 1>&6 -ol_cv_lib_db=no + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db1=no fi +rm -f conftest* - -fi + LIBS="$ol_LIBS" - fi - LIBS="$ol_LIBS" +echo "$ac_t""$ol_cv_db_db1" 1>&6 + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 + fi fi -echo "$ac_t""$ol_cv_lib_db" 1>&6 - -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:10885: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + 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:13799: 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 < + +#ifdef HAVE_DB_185_H + choke me; +#else +#include +#endif +#ifndef NULL +#define NULL ((void *)0) +#endif +main() +{ + int rc; + u_int32_t flags = DB_CREATE | +#ifdef DB_PRIVATE + DB_PRIVATE | +#endif + DB_THREAD; + +#if DB_VERSION_MAJOR > 2 + DB_ENV *env = NULL; + + rc = db_env_create( &env, 0 ); + + flags |= DB_INIT_MPOOL; +#ifdef DB_MPOOL_PRIVATE + flags |= DB_MPOOL_PRIVATE; +#endif + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } + +#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) + rc = env->open( env, NULL, flags, 0 ); +#else + rc = env->open( env, NULL, NULL, flags, 0 ); +#endif + + if ( rc == 0 ) { + rc = env->close( env, 0 ); + } + + if( rc ) { + printf("BerkeleyDB: %s\n", db_strerror(rc) ); + return rc; + } + +#else + DB_ENV env; + memset( &env, '\0', sizeof(env) ); + + rc = db_appinit( NULL, NULL, &env, flags ); + + if( rc == 0 ) { + db_appexit( &env ); + } + + unlink("__db_mpool.share"); + unlink("__db_lock.share"); +#endif + + return rc; +} EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10895: \"$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:13880: \"$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:10931: 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_with_ldbm_api=db + ol_link_ldbm=berkeley + ol_with_ldbm_api=berkeley if test $ol_with_ldbm_type = hash ; then cat >> confdefs.h <<\EOF @@ -10971,51 +13933,10 @@ 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:10984: 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:10994: \"$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_bdb = yes -a $ol_link_ldbm != berkeley ; then + { echo "configure: error: BerkeleyDB not availabl" 1>&2; exit 1; } +elif test $ol_enable_bdb != no -a $ol_link_ldbm != no ; then + ol_enable_bdb=yes fi if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then @@ -11025,18 +13946,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:11029: checking for MDBM library" >&5 +echo "configure:13950: 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:11035: checking for mdbm_set_chain" >&5 +echo "configure:13956: 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:13985: \"$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 @@ -11079,7 +14000,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 -echo "configure:11083: checking for mdbm_set_chain in -lmdbm" >&5 +echo "configure:14004: 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 @@ -11087,7 +14008,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:14023: \"$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 @@ -11133,17 +14054,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:11137: checking for $ac_hdr" >&5 +echo "configure:14058: 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:11147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14068: \"$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* @@ -11170,7 +14091,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11174: checking for db" >&5 +echo "configure:14095: checking for db" >&5 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11203,18 +14124,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:11207: checking for GDBM library" >&5 +echo "configure:14128: 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:11213: checking for gdbm_open" >&5 +echo "configure:14134: 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:14163: \"$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 @@ -11257,7 +14178,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11261: checking for gdbm_open in -lgdbm" >&5 +echo "configure:14182: 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 @@ -11265,7 +14186,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:14201: \"$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 @@ -11311,17 +14232,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:11315: checking for $ac_hdr" >&5 +echo "configure:14236: 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:11325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14246: \"$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* @@ -11348,7 +14269,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11352: checking for db" >&5 +echo "configure:14273: checking for db" >&5 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11380,22 +14301,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:11388: checking for NDBM library" >&5 +echo "configure:14307: 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:11394: checking for dbm_open" >&5 +echo "configure:14313: 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:14342: \"$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 @@ -11438,7 +14357,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:11442: checking for dbm_open in -lndbm" >&5 +echo "configure:14361: 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 @@ -11446,7 +14365,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:14380: \"$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 @@ -11477,7 +14396,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11481: checking for dbm_open in -ldbm" >&5 +echo "configure:14400: 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 @@ -11485,7 +14404,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:14419: \"$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 @@ -11533,17 +14452,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:11537: checking for $ac_hdr" >&5 +echo "configure:14456: 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:11547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14466: \"$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* @@ -11570,7 +14489,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:11574: checking for db" >&5 +echo "configure:14493: checking for db" >&5 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11623,17 +14542,17 @@ if test $ol_enable_wrappers != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11627: checking for $ac_hdr" >&5 +echo "configure:14546: 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:11637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14556: \"$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* @@ -11664,7 +14583,7 @@ done have_wrappers=no else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_wrappers=yes else @@ -11694,7 +14613,7 @@ EOF WRAP_LIBS="-lwrap" echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:11698: checking for main in -lnsl" >&5 +echo "configure:14617: 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 @@ -11702,14 +14621,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:14632: \"$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 @@ -11750,12 +14669,12 @@ fi if test $ol_enable_syslog != no ; then echo $ac_n "checking for openlog""... $ac_c" 1>&6 -echo "configure:11754: checking for openlog" >&5 +echo "configure:14673: 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:14702: \"$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 @@ -11804,68 +14723,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:11813: 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:14731: 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:11823: \"$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:14750: \"$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:11850: 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:14775: 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:14794: \"$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 @@ -11880,18 +14805,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 @@ -11899,17 +14829,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:11903: checking for $ac_hdr" >&5 +echo "configure:14833: 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:11913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14843: \"$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* @@ -11941,7 +14871,7 @@ done 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:11945: checking for main in -l$lib" >&5 +echo "configure:14875: 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 @@ -11949,14 +14879,14 @@ else ac_save_LIBS="$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:14890: \"$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 @@ -11972,7 +14902,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 have_tcl=yes - if test x"$ol_with_tcl_module" == "xstatic" ; then + if test x"$ol_with_tcl_module" = "xstatic" ; then SLAPD_LIBS="$SLAPD_LIBS -l${lib}" else MOD_TCL_LIB="-l${lib}" @@ -12000,17 +14930,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12004: checking for $ac_hdr" >&5 +echo "configure:14934: 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:12014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14944: \"$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* @@ -12039,7 +14969,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:12043: checking for tputs in -ltermcap" >&5 +echo "configure:14973: 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 @@ -12047,7 +14977,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:14992: \"$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 @@ -12091,7 +15021,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:12095: checking for initscr in -lncurses" >&5 +echo "configure:15025: 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 @@ -12099,7 +15029,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:15044: \"$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 @@ -12150,20 +15080,23 @@ 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:12157: checking for sasl.h" >&5 + for ac_hdr in sasl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:15090: 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 < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15100: \"$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* @@ -12179,15 +15112,20 @@ 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_sasl_h = yes ; then echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6 -echo "configure:12191: checking for sasl_client_init in -lsasl" >&5 +echo "configure:15129: 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 @@ -12195,7 +15133,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:15148: \"$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 @@ -12238,23 +15176,62 @@ 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 + + elif test $ol_enable_spasswd != no ; then + ol_link_spasswd=yes + 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:12252: checking fetch(3) library" >&5 +echo "configure:15229: 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 < @@ -12264,7 +15241,7 @@ int main() { struct url *u = fetchParseURL("file:///"); ; return 0; } EOF -if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_lib_fetch=yes else @@ -12302,17 +15279,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:12306: checking for $ac_hdr" >&5 +echo "configure:15283: 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:12316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15293: \"$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* @@ -12343,7 +15320,7 @@ done save_LIBS="$LIBS" LIBS="$TERMCAP_LIBS $LIBS" echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:12347: checking for readline in -lreadline" >&5 +echo "configure:15324: 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 @@ -12351,7 +15328,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:15343: \"$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 @@ -12404,12 +15381,12 @@ fi if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:12408: checking for crypt" >&5 +echo "configure:15385: 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:15414: \"$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 @@ -12452,7 +15429,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12456: checking for crypt in -lcrypt" >&5 +echo "configure:15433: 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 @@ -12460,7 +15437,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:15452: \"$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 @@ -12514,12 +15491,12 @@ fi if test $ol_enable_proctitle != no ; then echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 -echo "configure:12518: checking for setproctitle" >&5 +echo "configure:15495: 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:15524: \"$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 @@ -12562,7 +15539,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:12566: checking for setproctitle in -lutil" >&5 +echo "configure:15543: 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 @@ -12570,7 +15547,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:15562: \"$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 @@ -12602,6 +15579,7 @@ else echo "$ac_t""no" 1>&6 have_setproctitle=no LIBOBJS="$LIBOBJS setproctitle.o" + LIBSRCS="$LIBSRCS setproctitle.c" fi fi @@ -12615,117 +15593,110 @@ EOF fi fi -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:12620: checking for uid_t in sys/types.h" >&5 -if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then +if test $ol_enable_slp != no ; then + for ac_hdr in slp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:15602: 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 < +#include <$ac_hdr> EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:15612: \"$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* - ac_cv_type_uid_t=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* - ac_cv_type_uid_t=no + eval "ac_cv_header_$ac_safe=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 +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 + -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:12654: checking type of array argument to getgroups" >&5 -if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then + if test $ac_cv_header_slp_h = yes ; then + echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6 +echo "configure:15641: checking for SLPOpen in -lslp" >&5 +ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat > conftest.$ac_ext < 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); -} - +int main() { +SLPOpen() +; return 0; } EOF -if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t +if { (eval echo configure:15660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -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 + 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_slp=yes +else + echo "$ac_t""no" 1>&6 +have_slp=no fi -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_SLP 1 EOF - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:12724: checking for ANSI C header files" >&5 + SLAPD_SLP_LIBS=-lslp + fi + + elif test $ol_enable_slp = yes ; then + { echo "configure: error: SLP not found" 1>&2; exit 1; } + fi +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:15695: 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 @@ -12733,7 +15704,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15708: \"$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* @@ -12750,7 +15721,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 @@ -12768,7 +15739,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 @@ -12789,18 +15760,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:12804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12824,18 +15802,19 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:12828: checking for mode_t" >&5 +echo "configure:15806: 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 @@ -12859,18 +15838,19 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:12863: checking for off_t" >&5 +echo "configure:15842: 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 @@ -12894,18 +15874,19 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:12898: checking for pid_t" >&5 +echo "configure:15878: 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 @@ -12929,19 +15910,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:12933: checking for ptrdiff_t" >&5 +echo "configure:15914: 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:12945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -12962,12 +15943,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:12966: checking return type of signal handlers" >&5 +echo "configure:15947: 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 @@ -12984,7 +15965,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:12988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -13002,81 +15983,123 @@ cat >> confdefs.h <&6 -echo "configure:13007: 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:15988: 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:13019: \"$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 +echo "configure:16025: 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 -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 +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 - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:13040: checking for size_t" >&5 -if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then +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:16061: 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:13075: checking for socklen_t" >&5 +echo "configure:16098: 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:16117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_socklen_t=yes else @@ -13111,12 +16134,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:13115: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:16138: 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 @@ -13124,7 +16147,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:13128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -13146,12 +16169,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:13150: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:16173: 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 @@ -13160,7 +16183,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:13164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -13181,12 +16204,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:13185: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:16208: 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 @@ -13194,7 +16217,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:13198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -13214,15 +16237,84 @@ EOF fi +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:16242: 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:16276: 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:16288: \"$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:13220: checking struct passwd for pw_gecos" >&5 +echo "configure:16312: 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() { @@ -13232,7 +16324,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -13254,13 +16346,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:13258: checking struct passwd for pw_passwd" >&5 +echo "configure:16350: 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() { @@ -13270,7 +16362,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -13292,7 +16384,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:13296: checking if toupper() requires islower()" >&5 +echo "configure:16388: 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 @@ -13301,7 +16393,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -13313,7 +16405,7 @@ main() exit(1); } EOF -if { (eval echo configure:13317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16409: \"$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 @@ -13336,12 +16428,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:13340: checking for working const" >&5 +echo "configure:16432: 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:16486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -13411,12 +16503,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:13415: checking if compiler understands volatile" >&5 +echo "configure:16507: 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:16521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -13453,30 +16545,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:13473: checking whether byte ordering is bigendian" >&5 +echo "configure:16551: 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 @@ -13487,11 +16565,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16569: \"$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 @@ -13502,7 +16580,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -13522,7 +16600,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:16617: \"$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 @@ -13558,162 +16636,155 @@ EOF fi - echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:13563: checking size of short" >&5 +fi + +echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:16643: 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 + 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(short)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (short) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:13582: \"$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:16659: \"$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:13602: checking size of int" >&5 + +echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:16682: 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:13621: \"$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:16698: \"$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:13641: checking size of long" >&5 + +echo $ac_n "checking size of long""... $ac_c" 1>&6 +echo "configure:16721: 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); -} +#line 16727 "configure" +#include "confdefs.h" +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (long) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:13660: \"$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:16737: \"$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:13717: checking for 8-bit clean memcmp" >&5 +echo "configure:16788: 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 @@ -13721,7 +16792,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:16806: \"$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 @@ -13749,12 +16820,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:13753: checking for strftime" >&5 +echo "configure:16824: 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:16853: \"$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 @@ -13800,7 +16871,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:13804: checking for strftime in -lintl" >&5 +echo "configure:16875: 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 @@ -13808,7 +16879,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:16894: \"$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 @@ -13847,12 +16918,12 @@ fi echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 -echo "configure:13851: checking for inet_aton()" >&5 +echo "configure:16922: 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:16949: \"$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 @@ -13895,13 +16966,176 @@ EOF fi +echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 +echo "configure:16971: 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:17000: \"$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:17024: 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:17053: \"$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:17079: 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:17108: \"$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:13900: checking for vprintf" >&5 +echo "configure:17134: 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:17163: \"$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 @@ -13949,12 +17183,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:13953: checking for _doprnt" >&5 +echo "configure:17187: 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:17216: \"$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 @@ -14007,12 +17241,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:14011: checking for $ac_func" >&5 +echo "configure:17245: 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:17274: \"$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 @@ -14065,13 +17299,16 @@ fi for ac_func in \ bcopy \ closesocket \ + chroot \ endgrent \ endpwent \ + fcntl \ flock \ getdtablesize \ getgrgid \ gethostname \ getpass \ + getpassphrase \ getpwuid \ getpwnam \ getspnam \ @@ -14080,7 +17317,6 @@ for ac_func in \ lockf \ memcpy \ memmove \ - mkstemp \ pipe \ read \ recv \ @@ -14094,7 +17330,6 @@ for ac_func in \ sigaction \ signal \ sigset \ - snprintf \ strdup \ strerror \ strpbrk \ @@ -14105,6 +17340,7 @@ for ac_func in \ strtoul \ strspn \ sysconf \ + usleep \ waitpid \ wait4 \ write \ @@ -14113,12 +17349,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14117: checking for $ac_func" >&5 +echo "configure:17353: 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:17382: \"$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 @@ -14167,15 +17403,15 @@ fi done -for ac_func in getopt tempnam +for ac_func in getopt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14174: checking for $ac_func" >&5 +echo "configure:17410: 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:17439: \"$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 @@ -14226,25 +17462,32 @@ done +if test "$ac_cv_func_getopt" != yes; then + LIBSRCS="$LIBSRCS getopt.c" +fi + # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:14232: checking declaration of sys_errlist" >&5 +echo "configure:17472: 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:14248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17491: \"$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 @@ -14267,20 +17510,20 @@ EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:14271: checking existence of sys_errlist" >&5 +echo "configure:17514: 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:14284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17527: \"$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 @@ -14314,12 +17557,6 @@ if test "$ol_enable_syslog" = yes ; then #define LDAP_SYSLOG 1 EOF -fi -if test "$ol_enable_libui" = yes ; then - cat >> confdefs.h <<\EOF -#define LDAP_LIBUI 1 -EOF - fi if test "$ol_enable_cache" = no ; then cat >> confdefs.h <<\EOF @@ -14327,9 +17564,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 @@ -14345,28 +17582,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_link_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_enable_multimaster" != no ; then +if test "$ol_link_spasswd" != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_MULTIMASTER 1 +#define SLAPD_SPASSWD 1 EOF fi @@ -14388,38 +17636,49 @@ if test "$ol_enable_aci" != no ; then EOF fi -if test "$ol_enable_discreteaci" != no ; then + +if test "$ol_link_modules" != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_ACI_DISCRETE_RIGHTS 1 +#define SLAPD_MODULES 1 EOF + BUILD_SLAPD=yes + SLAPD_MODULES_LDFLAGS="-dlopen self" fi -if test "$ol_link_modules" != no ; then +if test "$ol_enable_bdb" != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_MODULES 1 +#define SLAPD_BDB 1 EOF BUILD_SLAPD=yes - MODULES_LIBS=-lltdl - SLAPD_MODULES_LDFLAGS="-dlopen self" + BUILD_BDB=yes + if test "$ol_with_bdb_module" != static ; then + cat >> confdefs.h <<\EOF +#define SLAPD_BDB_DYNAMIC 1 +EOF + + BUILD_BDB=mod + BUILD_BDB_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la" + fi 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 @@ -14441,13 +17700,14 @@ EOF fi fi -if test "$ol_link_ldbm" != no ; then +if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then cat >> confdefs.h <<\EOF #define SLAPD_LDBM 1 EOF BUILD_SLAPD=yes BUILD_LDBM=yes + LDBM_LIB="-lldbm" if test "$ol_with_ldbm_module" != static ; then cat >> confdefs.h <<\EOF #define SLAPD_LDBM_DYNAMIC 1 @@ -14459,6 +17719,48 @@ EOF fi fi +if test "$ol_enable_meta" != no ; then + if test "$ol_enable_ldap" = no ; then + { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; } + fi + if test "$ol_enable_rewrite" = no ; then + { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; } + fi + cat >> confdefs.h <<\EOF +#define SLAPD_META 1 +EOF + + BUILD_SLAPD=yes + BUILD_META=yes + if test "$ol_with_meta_module" != static ; then + cat >> confdefs.h <<\EOF +#define SLAPD_META_DYNAMIC 1 +EOF + + BUILD_META=mod + BUILD_META_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la" + fi +fi + +if test "$ol_enable_monitor" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MONITOR 1 +EOF + + BUILD_SLAPD=yes + BUILD_MONITOR=yes + if test "$ol_with_monitor_module" != static ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MONITOR_DYNAMIC 1 +EOF + + BUILD_MONITOR=mod + BUILD_MONITOR_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la" + fi +fi + if test "$ol_enable_passwd" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_PASSWD 1 @@ -14531,18 +17833,63 @@ 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 "$ol_enable_rewrite" != no ; then + cat >> confdefs.h <<\EOF +#define ENABLE_REWRITE 1 +EOF + + BUILD_REWRITE=yes + SLAPD_LIBS="$SLAPD_LIBS -lrewrite" +fi + + +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 + + + + + @@ -14558,6 +17905,22 @@ fi + + + + + + + + + + + + + + + + @@ -14653,11 +18016,9 @@ doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \ doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \ -clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \ -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 \ @@ -14667,25 +18028,27 @@ 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 \ +libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ -servers/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-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \ +servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \ servers/slapd/back-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-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \ +servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \ servers/slapd/back-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 \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \ tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \ -contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ -contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ -contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \ include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF @@ -14937,7 +18318,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