X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=fe1f00b8821abd5faf1e60fc0395cf211b47b68a;hb=865f0db180001881a54526202353f26f3761e25a;hp=8a785c86c5e21fc82049ebc6eb807ebbab8a91af;hpb=2438e33b35e7d86f5e2445e59e5ec558d5f2abbd;p=openldap diff --git a/configure b/configure index 8a785c86c5..fe1f00b882 100755 --- a/configure +++ b/configure @@ -1,16 +1,21 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.490 2003/10/18 00:39:12 kurt Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.556 2004/11/20 13:20:31 hyc Exp -# Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved. -# +# This work is part of OpenLDAP Software . +# +# Copyright 1998-2004 The OpenLDAP Foundation. +# All rights reserved. +# # Redistribution and use in source and binary forms, with or without # modification, are permitted only as authorized by the OpenLDAP -# Public License. A copy of this license is available at -# http://www.OpenLDAP.org/license.html or in file LICENSE in the -# top-level directory of the distribution. +# Public License. +# +# A copy of this license is available in the file LICENSE in the +# top-level directory of the distribution or, alternatively, at +# . -echo "Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved." +echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved." echo " Restrictions apply, see COPYRIGHT and LICENSE files." # Guess values for system-dependent variables and create Makefiles. @@ -39,8 +44,6 @@ ac_help="$ac_help --enable-ipv6 enable IPv6 support [auto]" ac_help="$ac_help --enable-local enable AF_LOCAL (AF_UNIX) socket support [auto]" -ac_help="$ac_help - --enable-x-compile enable cross compiling [no]" ac_help="$ac_help --with-cyrus-sasl with Cyrus SASL support [auto]" ac_help="$ac_help @@ -52,6 +55,10 @@ ac_help="$ac_help ac_help="$ac_help --with-yielding-select with implicitly yielding select [auto]" ac_help="$ac_help + --with-multiple-precision + multiple precision support for statistics + auto|bignum|gmp [auto]" +ac_help="$ac_help SLAPD (Standalone LDAP Daemon) Options:" ac_help="$ac_help @@ -69,7 +76,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-modules enable dynamic module support [no]" ac_help="$ac_help - --enable-rewrite enable DN rewriting in back-ldap and back-meta [no]" + --enable-rewrite enable DN rewriting in back-ldap and the rwm overlay [auto]" ac_help="$ac_help --enable-rlookups enable reverse lookups of client hostnames [no]" ac_help="$ac_help @@ -79,61 +86,65 @@ ac_help="$ac_help ac_help="$ac_help --enable-wrappers enable tcp wrapper support [no]" ac_help="$ac_help - --enable-bdb enable Berkeley DB backend [yes]" + +SLAPD Backend Options:" +ac_help="$ac_help + --enable-backends enable all available backends no|yes|mod [no]" ac_help="$ac_help - --with-bdb-module module type static|dynamic [static]" + --enable-bdb enable Berkeley DB backend no|yes|mod [yes]" ac_help="$ac_help - --enable-dnssrv enable dnssrv backend [no]" + --enable-dnssrv enable dnssrv backend no|yes|mod [no]" ac_help="$ac_help - --with-dnssrv-module module type static|dynamic [static]" + --enable-hdb enable Hierarchical DB backend no|yes|mod [no]" ac_help="$ac_help - --enable-hdb enable Hierarchical DB backend [no]" + --enable-ldap enable ldap backend no|yes|mod [no]" ac_help="$ac_help - --with-hdb-module module type static|dynamic [static]" + --enable-ldbm enable ldbm backend no|yes|mod [no]" ac_help="$ac_help - --enable-ldap enable ldap backend [no]" + --with-ldbm-api with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]" ac_help="$ac_help - --with-ldap-module module type static|dynamic [static]" + --with-ldbm-type use LDBM type auto|btree|hash [auto]" ac_help="$ac_help - --enable-ldbm enable ldbm backend [no]" + --enable-meta enable metadirectory backend no|yes|mod [no]" ac_help="$ac_help - --with-ldbm-api with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]" + --enable-monitor enable monitor backend no|yes|mod [yes]" ac_help="$ac_help - --with-ldbm-module module type static|dynamic [static]" + --enable-null enable null backend no|yes|mod [no]" ac_help="$ac_help - --with-ldbm-type use LDBM type auto|btree|hash [auto]" + --enable-passwd enable passwd backend no|yes|mod [no]" ac_help="$ac_help - --enable-meta enable metadirectory backend [no]" + --enable-perl enable perl backend no|yes|mod [no]" ac_help="$ac_help - --with-meta-module module type static|dynamic [static]" + --enable-relay enable relay backend no|yes|mod [yes]" ac_help="$ac_help - --enable-monitor enable monitor backend [yes]" + --enable-shell enable shell backend no|yes|mod [no]" ac_help="$ac_help - --with-monitor-module module type static|dynamic [static]" + --enable-sql enable sql backend no|yes|mod [no]" ac_help="$ac_help - --enable-null enable null backend [no]" + +SLAPD Overlay Options:" ac_help="$ac_help - --with-null-module module type static|dynamic [static]" + --enable-overlays enable all available overlays no|yes|mod [no]" ac_help="$ac_help - --enable-passwd enable passwd backend [no]" + --enable-chain LDAP Chain Response no|yes|mod [no]" ac_help="$ac_help - --with-passwd-module module type static|dynamic [static]" + --enable-denyop Deny Operation overlay no|yes|mod [no]" ac_help="$ac_help - --enable-perl enable perl backend [no]" + --enable-dyngroup Dynamic Group overlay no|yes|mod [no]" ac_help="$ac_help - --with-perl-module module type static|dynamic [static]" + --enable-lastmod Last Modification overlay no|yes|mod [no]" ac_help="$ac_help - --enable-shell enable shell backend [no]" + --enable-ppolicy Password Policy overlay no|yes|mod [no]" ac_help="$ac_help - --with-shell-module module type static|dynamic [static]" + --enable-proxycache Proxy Cache overlay no|yes|mod [no]" ac_help="$ac_help - --enable-sql enable sql backend [no]" + --enable-refint Referential Integrity overlay no|yes|mod [no]" ac_help="$ac_help - --with-sql-module module type static|dynamic [static]" + --enable-rwm Rewrite/Remap overlay no|yes|mod [no]" ac_help="$ac_help - --enable-tcl enable tcl backend [no]" + --enable-syncprov Syncrepl Provider overlay no|yes|mod [yes]" ac_help="$ac_help - --with-tcl-module module type static|dynamic [static]" + --enable-unique Attribute Uniqueness overlay no|yes|mod [no]" ac_help="$ac_help SLURPD (Replication Daemon) Options:" @@ -876,7 +887,7 @@ echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..." echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:880: checking host system type" >&5 +echo "configure:891: 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. @@ -917,7 +928,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:921: checking target system type" >&5 +echo "configure:932: 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. @@ -957,7 +968,7 @@ target_os=$ac_cv_target_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:961: checking build system type" >&5 +echo "configure:972: 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. @@ -1034,7 +1045,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:1038: checking for a BSD compatible install" >&5 +echo "configure:1049: 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 @@ -1091,7 +1102,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:1095: checking whether build environment is sane" >&5 +echo "configure:1106: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1152,7 +1163,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:1156: checking for $ac_word" >&5 +echo "configure:1167: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1182,7 +1193,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1197: 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 @@ -1222,7 +1233,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1226: checking for working aclocal" >&5 +echo "configure:1237: 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. @@ -1235,7 +1246,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1239: checking for working autoconf" >&5 +echo "configure:1250: 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. @@ -1248,7 +1259,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1252: checking for working automake" >&5 +echo "configure:1263: 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. @@ -1261,7 +1272,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1265: checking for working autoheader" >&5 +echo "configure:1276: 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. @@ -1274,7 +1285,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1278: checking for working makeinfo" >&5 +echo "configure:1289: 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. @@ -1294,7 +1305,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:1298: checking for $ac_word" >&5 +echo "configure:1309: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1357,14 +1368,16 @@ cat >> confdefs.h <&6 -echo "configure:1368: checking configure arguments" >&5 +echo "configure:1381: checking configure arguments" >&5 top_builddir=`pwd` @@ -1512,26 +1525,6 @@ else ol_enable_local="auto" fi # end --enable-local -# OpenLDAP --enable-x_compile - # Check whether --enable-x_compile or --disable-x_compile was given. -if test "${enable_x_compile+set}" = set; then - enableval="$enable_x_compile" - - ol_arg=invalid - for ol_val in 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_x_compile="$ol_arg" - -else - ol_enable_x_compile="no" -fi -# end --enable-x_compile # OpenLDAP --with-cyrus_sasl @@ -1640,6 +1633,27 @@ else fi # end --with-yielding_select +# OpenLDAP --with-multiple_precision + # Check whether --with-multiple_precision or --without-multiple_precision was given. +if test "${with_multiple_precision+set}" = set; then + withval="$with_multiple_precision" + + ol_arg=invalid + for ol_val in auto bignum gmp yes no ; 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-multiple_precision" 1>&2; exit 1; } + fi + ol_with_multiple_precision="$ol_arg" + +else + ol_with_multiple_precision="auto" +fi +# end --with-multiple_precision + # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given. @@ -1728,7 +1742,6 @@ else ol_enable_crypt="no" fi # end --enable-crypt -ol_enable_kpasswd=${ol_enable_kpasswd-no} # OpenLDAP --enable-lmpasswd # Check whether --enable-lmpasswd or --disable-lmpasswd was given. if test "${enable_lmpasswd+set}" = set; then @@ -1807,7 +1820,7 @@ if test "${enable_rewrite+set}" = set; then ol_enable_rewrite="$ol_arg" else - ol_enable_rewrite="no" + ol_enable_rewrite="auto" fi # end --enable-rewrite # OpenLDAP --enable-rlookups @@ -1891,55 +1904,63 @@ else fi # end --enable-wrappers +Backends="bdb dnssrv hdb ldap ldbm meta monitor null \ + passwd perl relay shell sql" -# OpenLDAP --enable-bdb - # Check whether --enable-bdb or --disable-bdb was given. -if test "${enable_bdb+set}" = set; then - enableval="$enable_bdb" +# Check whether --with-xxslapbackends or --without-xxslapbackends was given. +if test "${with_xxslapbackends+set}" = set; then + withval="$with_xxslapbackends" + : +fi + + +# OpenLDAP --enable-backends + # Check whether --enable-backends or --disable-backends was given. +if test "${enable_backends+set}" = set; then + enableval="$enable_backends" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; } fi - ol_enable_bdb="$ol_arg" + ol_enable_backends="$ol_arg" else - ol_enable_bdb="yes" + ol_enable_backends="no" fi -# 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" +# end --enable-backends +# 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 static dynamic ; do - if test "$withval" = "$ol_val" ; then + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; } fi - ol_with_bdb_module="$ol_arg" + ol_enable_bdb="$ol_arg" else - ol_with_bdb_module="static" + ol_enable_bdb="yes" fi -# end --with-bdb_module - +# end --enable-bdb # 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 + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1953,34 +1974,13 @@ else ol_enable_dnssrv="no" fi # 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 - 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-dnssrv_module" 1>&2; exit 1; } - fi - ol_with_dnssrv_module="$ol_arg" - -else - ol_with_dnssrv_module="static" -fi -# end --with-dnssrv_module - # OpenLDAP --enable-hdb # Check whether --enable-hdb or --disable-hdb was given. if test "${enable_hdb+set}" = set; then enableval="$enable_hdb" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1994,34 +1994,13 @@ else ol_enable_hdb="no" fi # end --enable-hdb -# OpenLDAP --with-hdb_module - # Check whether --with-hdb_module or --without-hdb_module was given. -if test "${with_hdb_module+set}" = set; then - withval="$with_hdb_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-hdb_module" 1>&2; exit 1; } - fi - ol_with_hdb_module="$ol_arg" - -else - ol_with_hdb_module="static" -fi -# end --with-hdb_module - # OpenLDAP --enable-ldap # Check whether --enable-ldap or --disable-ldap was given. if test "${enable_ldap+set}" = set; then enableval="$enable_ldap" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2035,34 +2014,13 @@ else ol_enable_ldap="no" fi # end --enable-ldap -# OpenLDAP --with-ldap_module - # Check whether --with-ldap_module or --without-ldap_module was given. -if test "${with_ldap_module+set}" = set; then - withval="$with_ldap_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-ldap_module" 1>&2; exit 1; } - fi - ol_with_ldap_module="$ol_arg" - -else - ol_with_ldap_module="static" -fi -# end --with-ldap_module - # OpenLDAP --enable-ldbm # Check whether --enable-ldbm or --disable-ldbm was given. if test "${enable_ldbm+set}" = set; then enableval="$enable_ldbm" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2097,27 +2055,6 @@ else fi # end --with-ldbm_api -# OpenLDAP --with-ldbm_module - # Check whether --with-ldbm_module or --without-ldbm_module was given. -if test "${with_ldbm_module+set}" = set; then - withval="$with_ldbm_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-ldbm_module" 1>&2; exit 1; } - fi - ol_with_ldbm_module="$ol_arg" - -else - ol_with_ldbm_module="static" -fi -# end --with-ldbm_module - # OpenLDAP --with-ldbm_type # Check whether --with-ldbm_type or --without-ldbm_type was given. if test "${with_ldbm_type+set}" = set; then @@ -2145,7 +2082,7 @@ if test "${enable_meta+set}" = set; then enableval="$enable_meta" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2159,34 +2096,13 @@ else ol_enable_meta="no" fi # 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 - 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-meta_module" 1>&2; exit 1; } - fi - ol_with_meta_module="$ol_arg" - -else - ol_with_meta_module="static" -fi -# end --with-meta_module - # 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 + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2200,34 +2116,13 @@ else ol_enable_monitor="yes" fi # 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 - 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-monitor_module" 1>&2; exit 1; } - fi - ol_with_monitor_module="$ol_arg" - -else - ol_with_monitor_module="static" -fi -# end --with-monitor_module - # OpenLDAP --enable-null # Check whether --enable-null or --disable-null was given. if test "${enable_null+set}" = set; then enableval="$enable_null" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2241,34 +2136,13 @@ else ol_enable_null="no" fi # end --enable-null -# OpenLDAP --with-null_module - # Check whether --with-null_module or --without-null_module was given. -if test "${with_null_module+set}" = set; then - withval="$with_null_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-null_module" 1>&2; exit 1; } - fi - ol_with_null_module="$ol_arg" - -else - ol_with_null_module="static" -fi -# end --with-null_module - # 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 + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2282,34 +2156,13 @@ else ol_enable_passwd="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" - - 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 + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2323,34 +2176,33 @@ 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" +# OpenLDAP --enable-relay + # Check whether --enable-relay or --disable-relay was given. +if test "${enable_relay+set}" = set; then + enableval="$enable_relay" ol_arg=invalid - for ol_val in static dynamic ; do - if test "$withval" = "$ol_val" ; then + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; } fi - ol_with_perl_module="$ol_arg" + ol_enable_relay="$ol_arg" else - ol_with_perl_module="static" + ol_enable_relay="yes" fi -# end --with-perl_module - +# end --enable-relay # 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 + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -2364,172 +2216,331 @@ 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 - withval="$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 static dynamic ; do - if test "$withval" = "$ol_val" ; then + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; } fi - ol_with_shell_module="$ol_arg" + ol_enable_sql="$ol_arg" else - ol_with_shell_module="static" + ol_enable_sql="no" fi -# end --with-shell_module +# end --enable-sql -# OpenLDAP --enable-sql - # Check whether --enable-sql or --disable-sql was given. -if test "${enable_sql+set}" = set; then - enableval="$enable_sql" +Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \ + refint syncprov unique" + +# Check whether --with-xxslapoverlays or --without-xxslapoverlays was given. +if test "${with_xxslapoverlays+set}" = set; then + withval="$with_xxslapoverlays" + : +fi + + +# OpenLDAP --enable-overlays + # Check whether --enable-overlays or --disable-overlays was given. +if test "${enable_overlays+set}" = set; then + enableval="$enable_overlays" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; } fi - ol_enable_sql="$ol_arg" + ol_enable_overlays="$ol_arg" else - ol_enable_sql="no" + ol_enable_overlays="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" +# end --enable-overlays +# OpenLDAP --enable-chain + # Check whether --enable-chain or --disable-chain was given. +if test "${enable_chain+set}" = set; then + enableval="$enable_chain" ol_arg=invalid - for ol_val in static dynamic ; do - if test "$withval" = "$ol_val" ; then + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; } fi - ol_with_sql_module="$ol_arg" + ol_enable_chain="$ol_arg" else - ol_with_sql_module="static" + ol_enable_chain="no" fi -# end --with-sql_module +# end --enable-chain -# OpenLDAP --enable-tcl - # Check whether --enable-tcl or --disable-tcl was given. -if test "${enable_tcl+set}" = set; then - enableval="$enable_tcl" +# OpenLDAP --enable-denyop + # Check whether --enable-denyop or --disable-denyop was given. +if test "${enable_denyop+set}" = set; then + enableval="$enable_denyop" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; } fi - ol_enable_tcl="$ol_arg" + ol_enable_denyop="$ol_arg" else - ol_enable_tcl="no" + ol_enable_denyop="no" fi -# end --enable-tcl -# OpenLDAP --with-tcl_module - # Check whether --with-tcl_module or --without-tcl_module was given. -if test "${with_tcl_module+set}" = set; then - withval="$with_tcl_module" +# end --enable-denyop + +# OpenLDAP --enable-dyngroup + # Check whether --enable-dyngroup or --disable-dyngroup was given. +if test "${enable_dyngroup+set}" = set; then + enableval="$enable_dyngroup" ol_arg=invalid - for ol_val in static dynamic ; do - if test "$withval" = "$ol_val" ; then + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; } fi - ol_with_tcl_module="$ol_arg" + ol_enable_dyngroup="$ol_arg" else - ol_with_tcl_module="static" + ol_enable_dyngroup="no" fi -# end --with-tcl_module +# end --enable-dyngroup +# OpenLDAP --enable-lastmod + # Check whether --enable-lastmod or --disable-lastmod was given. +if test "${enable_lastmod+set}" = set; then + enableval="$enable_lastmod" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; } + fi + ol_enable_lastmod="$ol_arg" -# Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given. -if test "${with_xxslurpdoptions+set}" = set; then - withval="$with_xxslurpdoptions" - : +else + ol_enable_lastmod="no" fi +# end --enable-lastmod -# OpenLDAP --enable-slurpd - # Check whether --enable-slurpd or --disable-slurpd was given. -if test "${enable_slurpd+set}" = set; then - enableval="$enable_slurpd" +# OpenLDAP --enable-ppolicy + # Check whether --enable-ppolicy or --disable-ppolicy was given. +if test "${enable_ppolicy+set}" = set; then + enableval="$enable_ppolicy" ol_arg=invalid - for ol_val in auto yes no ; do + for ol_val in no yes mod ; do if test "$enableval" = "$ol_val" ; then ol_arg="$ol_val" fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; } fi - ol_enable_slurpd="$ol_arg" + ol_enable_ppolicy="$ol_arg" else - ol_enable_slurpd="auto" + ol_enable_ppolicy="no" fi -# end --enable-slurpd +# end --enable-ppolicy -# Check whether --with-xxliboptions or --without-xxliboptions was given. -if test "${with_xxliboptions+set}" = set; then - withval="$with_xxliboptions" - : -fi +# OpenLDAP --enable-proxycache + # Check whether --enable-proxycache or --disable-proxycache was given. +if test "${enable_proxycache+set}" = set; then + enableval="$enable_proxycache" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; } + fi + ol_enable_proxycache="$ol_arg" -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -case $enableval in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac else - enable_static=yes + ol_enable_proxycache="no" fi +# end --enable-proxycache -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} -case $enableval in -yes) enable_shared=yes ;; +# OpenLDAP --enable-refint + # Check whether --enable-refint or --disable-refint was given. +if test "${enable_refint+set}" = set; then + enableval="$enable_refint" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; } + fi + ol_enable_refint="$ol_arg" + +else + ol_enable_refint="no" +fi +# end --enable-refint + +# OpenLDAP --enable-rwm + # Check whether --enable-rwm or --disable-rwm was given. +if test "${enable_rwm+set}" = set; then + enableval="$enable_rwm" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; } + fi + ol_enable_rwm="$ol_arg" + +else + ol_enable_rwm="no" +fi +# end --enable-rwm + +# OpenLDAP --enable-syncprov + # Check whether --enable-syncprov or --disable-syncprov was given. +if test "${enable_syncprov+set}" = set; then + enableval="$enable_syncprov" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; } + fi + ol_enable_syncprov="$ol_arg" + +else + ol_enable_syncprov="yes" +fi +# end --enable-syncprov + +# OpenLDAP --enable-unique + # Check whether --enable-unique or --disable-unique was given. +if test "${enable_unique+set}" = set; then + enableval="$enable_unique" + + ol_arg=invalid + for ol_val in no yes mod ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; } + fi + ol_enable_unique="$ol_arg" + +else + ol_enable_unique="no" +fi +# end --enable-unique + + + +# Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given. +if test "${with_xxslurpdoptions+set}" = set; then + withval="$with_xxslurpdoptions" + : +fi + +# OpenLDAP --enable-slurpd + # Check whether --enable-slurpd or --disable-slurpd was given. +if test "${enable_slurpd+set}" = set; then + enableval="$enable_slurpd" + + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; } + fi + ol_enable_slurpd="$ol_arg" + +else + ol_enable_slurpd="auto" +fi +# end --enable-slurpd + +# Check whether --with-xxliboptions or --without-xxliboptions was given. +if test "${with_xxliboptions+set}" = set; then + withval="$with_xxliboptions" + : +fi + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case $enableval in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=yes +fi + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case $enableval in +yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no @@ -2549,50 +2560,41 @@ fi +# Activate any backends that were not explicitly enabled. +# Note that back_bdb defaults to "yes" so this loop won't touch it. +if test $ol_enable_backends != no ; then + for i in $Backends; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp = no ; then + eval "ol_enable_$i=$ol_enable_backends" + fi + done +fi +# Activate the overlays +if test $ol_enable_overlays != no ; then + for i in $Overlays; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp = no ; then + eval "ol_enable_$i=$ol_enable_overlays" + fi + done +fi + # validate options if test $ol_enable_slapd = no ; then if test $ol_enable_slapi = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2 fi - 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_hdb = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2 - fi - if test $ol_enable_ldap = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2 - fi - 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_null = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2 - fi - if test $ol_enable_passwd = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2 - fi - if test $ol_enable_perl = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2 - fi - if test $ol_enable_shell = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2 - fi - 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 + if test $ol_enable_backends != no ; then + echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2 fi + for i in $Backends; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp != no ; then + echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2 + eval "ol_enable_$i=no" + fi + done if test $ol_enable_modules = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2 fi @@ -2614,92 +2616,37 @@ if test $ol_enable_slapd = no ; then 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_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_hdb_module != static ; then - echo "configure: warning: slapd disabled, ignoring --with-hdb-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 - fi - 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_null_module != static ; then - echo "configure: warning: slapd disabled, ignoring --with-null-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 - if test $ol_with_perl_module != static ; then - echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2 - fi - if test $ol_with_shell_module != static ; then - echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2 - fi - 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 + if test $ol_enable_overlays != no ; then + echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2 + fi + for i in $Overlays; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp != no ; then + echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2 + eval "ol_enable_$i=no" + fi + done # force settings to no ol_enable_slapi=no - ol_enable_bdb=no - ol_enable_dnssrv=no - ol_enable_hdb=no - ol_enable_ldap=no - ol_enable_ldbm=no - ol_enable_meta=no - ol_enable_monitor=no - ol_enable_null=no - ol_enable_passwd=no - ol_enable_perl=no - ol_enable_shell=no - ol_enable_tcl=no - ol_enable_sql=no + ol_enable_backends=no + ol_enable_overlays=no ol_enable_modules=no ol_enable_multimaster=no ol_enable_rlookups=no ol_enable_aci=no ol_enable_wrappers=no - ol_enable_dynamic=no ol_with_ldbm_api=no ol_with_ldbm_type=no - ol_with_bdb_module=static - ol_with_dnssrv_module=static - ol_with_hdb_module=static - ol_with_ldap_module=static - ol_with_ldbm_module=static - ol_with_meta_module=static - ol_with_monitor_module=static - ol_with_null_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 @@ -2714,10 +2661,6 @@ elif test $ol_enable_ldbm = no ; then echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2 fi - if test $ol_with_ldbm_module != static ; then - echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2 - fi - if test $ol_enable_modules != yes -a \ $ol_enable_bdb = no -a \ $ol_enable_dnssrv = no -a \ @@ -2728,9 +2671,9 @@ elif test $ol_enable_ldbm = no ; then $ol_enable_null = no -a \ $ol_enable_passwd = no -a \ $ol_enable_perl = no -a \ + $ol_enable_relay = no -a \ $ol_enable_shell = no -a \ - $ol_enable_sql = no -a \ - $ol_enable_tcl = no ; then + $ol_enable_sql = no ; then if test $ol_enable_slapd = yes ; then { echo "configure: error: slapd requires a backend" 1>&2; exit 1; } @@ -2742,7 +2685,6 @@ elif test $ol_enable_ldbm = no ; then ol_with_ldbm_api=no ol_with_ldbm_type=no - ol_with_ldbm_module=static if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then ol_with_ldbm_api=berkeley @@ -2762,22 +2704,23 @@ else { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; } fi - if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then + if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; 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/HDB" 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_chain != no -a $ol_enable_ldap = no ; then + { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; } +fi + +if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then + { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; } +fi + if test $ol_enable_slurpd = yes ; then if test $ol_with_threads = no ; then { echo "configure: error: slurpd requires threads" 1>&2; exit 1; } @@ -2790,14 +2733,14 @@ if test $ol_enable_lmpasswd = yes ; then fi fi -if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then +if test $ol_enable_kbind = yes ; then if test $ol_with_kerberos = no ; then { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; } elif test $ol_with_kerberos = auto ; then ol_with_kerberos=yes fi -elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then +elif test $ol_enable_kbind = no ; then if test $ol_with_kerberos = auto ; then ol_with_kerberos=no elif test $ol_with_kerberos != no ; then @@ -2816,7 +2759,6 @@ fi echo "$ac_t""done" 1>&6 LDAP_LIBS= -LDIF_LIBS= LDBM_LIBS= LTHREAD_LIBS= LUTIL_LIBS= @@ -2839,27 +2781,24 @@ BUILD_LDAP=no BUILD_LDBM=no BUILD_META=no BUILD_MONITOR=no -BUILD_CACHE=no BUILD_NULL=no BUILD_PASSWD=no BUILD_PERL=no +BUILD_RELAY=no BUILD_SHELL=no BUILD_SQL=no -BUILD_TCL=no - -BUILD_BDB_DYNAMIC=static -BUILD_DNSSRV_DYNAMIC=static -BUILD_HDB_DYNAMIC=static -BUILD_LDAP_DYNAMIC=static -BUILD_LDBM_DYNAMIC=static -BUILD_META_DYNAMIC=static -BUILD_MONITOR_DYNAMIC=static -BUILD_NULL_DYNAMIC=static -BUILD_PASSWD_DYNAMIC=static -BUILD_PERL_DYNAMIC=static -BUILD_SHELL_DYNAMIC=static -BUILD_TCL_DYNAMIC=static -BUILD_SQL_DYNAMIC=static + +BUILD_CHAIN=no +BUILD_DENYOP=no +BUILD_DYNGROUP=no +BUILD_LASTMOD=no +BUILD_PPOLICY=no +BUILD_PROXYCACHE=no +BUILD_REFINT=no +BUILD_RWM=no +BUILD_UNIQUE=no + +SLAPD_DYNAMIC_OVERLAYS= SLAPD_MODULES_LDFLAGS= SLAPD_MODULES_CPPFLAGS= @@ -2875,11 +2814,9 @@ SLAPD_SQL_LDFLAGS= SLAPD_SQL_LIBS= SLAPD_SQL_INCLUDES= -MOD_TCL_LIB= KRB4_LIBS= KRB5_LIBS= SASL_LIBS= -TERMCAP_LIBS= TLS_LIBS= MODULES_LIBS= SLAPI_LIBS= @@ -2888,75 +2825,7 @@ LIBSLAPITOOLS= AUTH_LIBS= SLAPD_SLP_LIBS= - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# 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:2906: 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 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +SLAPD_GMP_LIBS= cat >> confdefs.h <<\EOF @@ -2983,7 +2852,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:2987: checking for $ac_word" >&5 +echo "configure:2856: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3035,7 +2904,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:3039: checking for $ac_word" >&5 +echo "configure:2908: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3077,7 +2946,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:3081: checking for $ac_word" >&5 +echo "configure:2950: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3127,12 +2996,12 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3131: checking for Cygwin environment" >&5 +echo "configure:3000: 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:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -3159,19 +3028,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:3163: checking for mingw32 environment" >&5 +echo "configure:3032: 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:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3187,19 +3056,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:3191: checking for EMX OS/2 environment" >&5 +echo "configure:3060: 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:3072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -3215,7 +3084,7 @@ echo "$ac_t""$ac_cv_emxos2" 1>&6 EMXOS2= test "$ac_cv_emxos2" = yes && EMXOS2=yes echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3219: checking how to run the C preprocessor" >&5 +echo "configure:3088: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3230,13 +3099,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:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3109: \"$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 : @@ -3247,13 +3116,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:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3126: \"$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 : @@ -3264,13 +3133,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:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3143: \"$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 : @@ -3320,7 +3189,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:3324: checking for $ac_word" >&5 +echo "configure:3193: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3350,7 +3219,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:3354: checking for $ac_word" >&5 +echo "configure:3223: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3401,7 +3270,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:3405: checking for $ac_word" >&5 +echo "configure:3274: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3433,7 +3302,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3437: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:3306: 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. @@ -3444,12 +3313,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3448 "configure" +#line 3317 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3322: \"$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 @@ -3475,12 +3344,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:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3348: 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:3484: checking whether we are using GNU C" >&5 +echo "configure:3353: 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 @@ -3489,7 +3358,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3493: \"$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:3362: \"$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 @@ -3508,7 +3377,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:3512: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3381: 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 @@ -3551,7 +3420,7 @@ ac_prog=ld if test "$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:3555: checking for ld used by GCC" >&5 +echo "configure:3424: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -3581,10 +3450,10 @@ echo "configure:3555: 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:3585: checking for GNU ld" >&5 +echo "configure:3454: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:3588: checking for non-GNU ld" >&5 +echo "configure:3457: checking for non-GNU ld" >&5 fi if eval "test \"\${lt_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3619,7 +3488,7 @@ else 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:3623: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:3492: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3636,7 +3505,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:3640: checking for $LD option to reload object files" >&5 +echo "configure:3509: checking for $LD option to reload object files" >&5 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3648,7 +3517,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:3652: checking for BSD-compatible nm" >&5 +echo "configure:3521: checking for BSD-compatible nm" >&5 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3686,7 +3555,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 -echo "configure:3690: checking for a sed that does not truncate output" >&5 +echo "configure:3559: checking for a sed that does not truncate output" >&5 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3770,7 +3639,7 @@ fi echo "$ac_t""$SED" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3774: checking whether ln -s works" >&5 +echo "configure:3643: 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 @@ -3791,7 +3660,7 @@ else fi echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 -echo "configure:3795: checking how to recognise dependent libraries" >&5 +echo "configure:3664: checking how to recognise dependent libraries" >&5 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3925,6 +3794,10 @@ openbsd*) fi ;; +openedition*) + lt_cv_deplibs_check_method=pass_all + ;; + osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' @@ -3977,13 +3850,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:3981: checking for object suffix" >&5 +echo "configure:3854: 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:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -4004,7 +3877,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4008: checking for executable suffix" >&5 +echo "configure:3881: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4014,7 +3887,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -4045,7 +3918,7 @@ fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:4049: checking command to parse $NM output" >&5 +echo "configure:3922: checking command to parse $NM output" >&5 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4128,10 +4001,10 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func();return(0);} EOF - if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo configure:4135: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then + if { (eval echo configure:4008: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4182,7 +4055,7 @@ EOF save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then + if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" @@ -4231,17 +4104,17 @@ for ac_hdr in dlfcn.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4235: checking for $ac_hdr" >&5 +echo "configure:4108: 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:4245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4118: \"$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* @@ -4277,7 +4150,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:4281: checking for ${ac_tool_prefix}file" >&5 +echo "configure:4154: checking for ${ac_tool_prefix}file" >&5 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4339,7 +4212,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:4343: checking for file" >&5 +echo "configure:4216: checking for file" >&5 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4410,7 +4283,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4414: checking for $ac_word" >&5 +echo "configure:4287: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4442,7 +4315,7 @@ if test -n "$ac_tool_prefix"; then # 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:4446: checking for $ac_word" >&5 +echo "configure:4319: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4477,7 +4350,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4481: checking for $ac_word" >&5 +echo "configure:4354: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4509,7 +4382,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4513: checking for $ac_word" >&5 +echo "configure:4386: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4558,8 +4431,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4562 "configure"' > conftest.$ac_ext - if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 4435 "configure"' > conftest.$ac_ext + if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -4580,7 +4453,7 @@ 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:4584: checking whether the C compiler needs -belf" >&5 +echo "configure:4457: 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 @@ -4593,14 +4466,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4477: \"$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 @@ -4630,7 +4503,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # 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:4634: checking for $ac_word" >&5 +echo "configure:4507: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4662,7 +4535,7 @@ 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:4666: checking for $ac_word" >&5 +echo "configure:4539: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4697,7 +4570,7 @@ 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:4701: checking for $ac_word" >&5 +echo "configure:4574: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4729,7 +4602,7 @@ 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:4733: checking for $ac_word" >&5 +echo "configure:4606: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4764,7 +4637,7 @@ 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:4768: checking for $ac_word" >&5 +echo "configure:4641: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4796,7 +4669,7 @@ 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:4800: checking for $ac_word" >&5 +echo "configure:4673: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4832,12 +4705,12 @@ fi # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 -echo "configure:4836: checking if libtool should supply DllMain function" >&5 +echo "configure:4709: checking if libtool should supply DllMain function" >&5 if eval "test \"\${lt_cv_need_dllmain+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:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else @@ -4866,19 +4739,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 -echo "configure:4870: checking how to link DLLs" >&5 +echo "configure:4743: checking how to link DLLs" >&5 if eval "test \"\${lt_cv_cc_dll_switch+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:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else @@ -4992,7 +4865,7 @@ set dummy $CC compiler="$2" echo $ac_n "checking for objdir""... $ac_c" 1>&6 -echo "configure:4996: checking for objdir" >&5 +echo "configure:4869: checking for objdir" >&5 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -5019,7 +4892,7 @@ test -z "$pic_mode" && pic_mode=default # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 -echo "configure:5023: checking for $compiler option to produce PIC" >&5 +echo "configure:4896: checking for $compiler option to produce PIC" >&5 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5109,6 +4982,10 @@ else lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; + + openedition) + # XPLINK code is PIC by default + ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. @@ -5167,21 +5044,21 @@ else # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 -echo "configure:5171: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 +echo "configure:5048: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* case $host_os in hpux9* | hpux10* | hpux11*) @@ -5233,7 +5110,7 @@ if test -n "$lt_cv_prog_cc_shlib"; then fi echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 -echo "configure:5237: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 +echo "configure:5114: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5241,14 +5118,14 @@ else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_prog_cc_static_works=yes else @@ -5275,7 +5152,7 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 -echo "configure:5279: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo "configure:5156: checking if $compiler supports -c -o file.$ac_objext" >&5 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5294,7 +5171,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -5323,7 +5200,7 @@ echo "$ac_t""$compiler_c_o" 1>&6 if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 -echo "configure:5327: checking if $compiler supports -c -o file.lo" >&5 +echo "configure:5204: checking if $compiler supports -c -o file.lo" >&5 if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5334,14 +5211,14 @@ else save_objext="$ac_objext" ac_objext=lo cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -5372,7 +5249,7 @@ hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 -echo "configure:5376: checking if we can lock with hard links" >&5 +echo "configure:5253: checking if we can lock with hard links" >&5 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no @@ -5391,20 +5268,20 @@ fi if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 -echo "configure:5395: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo "configure:5272: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -5431,7 +5308,7 @@ fi # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 -echo "configure:5435: checking whether the linker ($LD) supports shared libraries" >&5 +echo "configure:5312: checking whether the linker ($LD) supports shared libraries" >&5 allow_undefined_flag= no_undefined_flag= @@ -5934,6 +5811,12 @@ else fi ;; + openedition*) + archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib && + cp \$linknames \$output_objdir && linknames=''" + export_dynamic_flag_spec="-Wl,DLL" + ;; + os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes @@ -6130,7 +6013,7 @@ test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 -echo "configure:6134: checking how to hardcode library paths into programs" >&5 +echo "configure:6017: checking how to hardcode library paths into programs" >&5 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then @@ -6158,7 +6041,7 @@ echo "$ac_t""$hardcode_action" 1>&6 striplib= old_striplib= echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 -echo "configure:6162: checking whether stripping libraries is possible" >&5 +echo "configure:6045: checking whether stripping libraries is possible" >&5 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" @@ -6172,7 +6055,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 -echo "configure:6176: checking dynamic linker characteristics" >&5 +echo "configure:6059: checking dynamic linker characteristics" >&5 library_names_spec= libname_spec='lib$name' soname_spec= @@ -6474,6 +6357,17 @@ openbsd*) shlibpath_var=LD_LIBRARY_PATH ;; +openedition*) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=yes + shlibpath_var=LIBPATH + postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib" + # the library's exports are in libname.x; this is the file that must + # actually be linked with to use a DLL. + library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x" + ;; + os2*) libname_spec='$name' need_lib_prefix=no @@ -6583,11 +6477,11 @@ test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 -echo "configure:6587: checking if libtool supports shared libraries" >&5 +echo "configure:6481: checking if libtool supports shared libraries" >&5 echo "$ac_t""$can_build_shared" 1>&6 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 -echo "configure:6591: checking whether to build shared libraries" >&5 +echo "configure:6485: checking whether to build shared libraries" >&5 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -6610,7 +6504,7 @@ esac echo "$ac_t""$enable_shared" 1>&6 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 -echo "configure:6614: checking whether to build static libraries" >&5 +echo "configure:6508: checking whether to build static libraries" >&5 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$ac_t""$enable_static" 1>&6 @@ -6650,21 +6544,21 @@ else ;; *) - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "configure:6655: checking for shl_load" >&5 -if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then + echo $ac_n "checking for dllload""... $ac_c" 1>&6 +echo "configure:6549: checking for dllload" >&5 +if eval "test \"\${ac_cv_func_dllload+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 shl_load(); +char dllload(); char (*f)(); int main() { @@ -6672,41 +6566,88 @@ 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_shl_load) || defined (__stub___shl_load) +#if defined (__stub_dllload) || defined (__stub___dllload) choke me #else -f = shl_load; +f = dllload; #endif ; return 0; } EOF -if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_shl_load=yes" + eval "ac_cv_func_dllload=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_shl_load=no" + eval "ac_cv_func_dllload=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" + lt_cv_dlopen="dllload" else echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:6702: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "configure:6596: checking for shl_load" >&5 +if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" + 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 shl_load(); +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_shl_load) || defined (__stub___shl_load) +choke me +#else +f = shl_load; +#endif + +; return 0; } +EOF +if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "configure:6643: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | 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="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6662: \"$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 @@ -6736,12 +6677,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:6740: checking for dlopen" >&5 +echo "configure:6681: checking for dlopen" >&5 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6710: \"$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 @@ -6783,7 +6724,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:6787: checking for dlopen in -ldl" >&5 +echo "configure:6728: 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 @@ -6791,7 +6732,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6747: \"$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 @@ -6821,7 +6762,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 -echo "configure:6825: checking for dlopen in -lsvld" >&5 +echo "configure:6766: checking for dlopen in -lsvld" >&5 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6829,7 +6770,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsvld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6785: \"$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 @@ -6859,7 +6800,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "configure:6863: checking for dld_link in -ldld" >&5 +echo "configure:6804: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6867,7 +6808,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6823: \"$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 @@ -6911,6 +6852,9 @@ fi fi +fi + + fi ;; @@ -6934,7 +6878,7 @@ fi LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "configure:6938: checking whether a program can dlopen itself" >&5 +echo "configure:6882: checking whether a program can dlopen itself" >&5 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6944,7 +6888,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in @@ -7028,7 +6972,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "configure:7032: checking whether a statically linked program can dlopen itself" >&5 +echo "configure:6976: checking whether a statically linked program can dlopen itself" >&5 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7038,7 +6982,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in @@ -7148,14 +7092,14 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 -echo "configure:7152: checking whether -lc should be explicitly linked in" >&5 +echo "configure:7096: checking whether -lc should be explicitly linked in" >&5 if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else $rm conftest* echo 'static int dummy;' > conftest.$ac_ext - if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:7103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -7168,7 +7112,7 @@ else libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo configure:7172: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + if { (eval echo configure:7116: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } then lt_cv_archive_cmds_need_lc=no else @@ -7753,58 +7697,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -# test for ln hardlink support -echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:7759: 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:7782: 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 - - ol_link_perl=no 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:7808: checking for $ac_word" >&5 +echo "configure:7706: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7845,18 +7743,19 @@ fi else PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" - PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/\ -lc\ //g -e s/\ -lc\$// `" - if test x"$ol_with_perl_module" = "xstatic" ; then - SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"" + PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`" + + if test x"$ol_enable_perl" = "xyes" ; then + SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS" else - MOD_PERL_LDFLAGS="$PERL_LDFLAGS"" + MOD_PERL_LDFLAGS="$PERL_LDFLAGS" fi ol_link_perl=yes fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:7860: checking how to run the C preprocessor" >&5 +echo "configure:7759: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -7871,13 +7770,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:7881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7780: \"$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 : @@ -7888,13 +7787,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:7898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7797: \"$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 : @@ -7905,13 +7804,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:7915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7814: \"$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 : @@ -7936,26 +7835,14 @@ fi echo "$ac_t""$CPP" 1>&6 -if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then - echo "configure: warning: cross compiling.... some functionality will be removed." 1>&2 - -elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then - echo "configure: warning: programs compiled here do run here..." 1>&2 - { echo "configure: error: if not cross compiling, use --disable-x-compile." 1>&2; exit 1; } - -elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then - echo "configure: warning: programs compiled here do not run here..." 1>&2 - { echo "configure: error: if cross compiling, add --enable-x-compile." 1>&2; exit 1; } -fi - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:7954: checking for Cygwin environment" >&5 +echo "configure:7841: 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:7857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -7982,19 +7869,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:7986: checking for mingw32 environment" >&5 +echo "configure:7873: 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:7885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -8013,7 +7900,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:8017: checking for executable suffix" >&5 +echo "configure:7904: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8023,7 +7910,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:8027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -8044,13 +7931,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:8048: checking for object suffix" >&5 +echo "configure:7935: 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:8054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -8074,7 +7961,7 @@ EOF echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 -echo "configure:8078: checking for be_app in -lbe" >&5 +echo "configure:7965: 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 @@ -8082,7 +7969,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:7984: \"$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 @@ -8119,7 +8006,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:8123: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:8010: 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 @@ -8136,7 +8023,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 @@ -8173,7 +8060,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -8207,7 +8094,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:8211: checking for ${OL_MKDEP} depend flag" >&5 +echo "configure:8098: 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 @@ -8217,7 +8104,7 @@ else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } \ + if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8108: \"$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 @@ -8250,7 +8137,7 @@ if test "${ol_cv_mkdep}" = no ; then fi echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6 -echo "configure:8254: checking for afopen in -ls" >&5 +echo "configure:8141: 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 @@ -8258,7 +8145,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8160: \"$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 @@ -8312,17 +8199,17 @@ if test $ol_enable_modules != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8316: checking for $ac_hdr" >&5 +echo "configure:8203: 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:8326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8213: \"$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* @@ -8354,7 +8241,7 @@ done fi echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 -echo "configure:8358: checking for lt_dlinit in -lltdl" >&5 +echo "configure:8245: 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 @@ -8362,7 +8249,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:8264: \"$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 @@ -8404,31 +8291,33 @@ fi { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; } fi ol_link_modules=yes + else - ol_with_bdb_module=static - ol_with_dnssrv_module=static - ol_with_hdb_module=static - ol_with_ldap_module=static - ol_with_ldbm_module=static - ol_with_meta_module=static - ol_with_monitor_module=static - ol_with_null_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 + for i in $Backends; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp = mod ; then + echo "configure: warning: building static $i backend" 1>&2 + eval "ol_enable_$i=yes" + fi + done + for i in $Overlays; do + eval "ol_tmp=\$ol_enable_$i" + if test $ol_tmp = mod ; then + echo "configure: warning: building static $i overlay" 1>&2 + eval "ol_enable_$i=yes" + fi + done fi # test for EBCDIC echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 -echo "configure:8426: checking for EBCDIC" >&5 +echo "configure:8315: 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:8330: \"$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* @@ -8461,12 +8350,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8465: checking for ANSI C header files" >&5 +echo "configure:8354: 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 @@ -8474,7 +8363,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8367: \"$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* @@ -8491,7 +8380,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 @@ -8509,7 +8398,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 @@ -8530,7 +8419,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #ifndef HAVE_EBCDIC @@ -8548,7 +8437,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then : else @@ -8582,12 +8471,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:8586: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8475: 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> @@ -8595,7 +8484,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8620,7 +8509,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:8624: checking for opendir in -ldir" >&5 +echo "configure:8513: 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 @@ -8628,7 +8517,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:8532: \"$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 @@ -8661,7 +8550,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8665: checking for opendir in -lx" >&5 +echo "configure:8554: 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 @@ -8669,7 +8558,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:8573: \"$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 @@ -8703,12 +8592,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:8707: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:8596: 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 @@ -8724,7 +8613,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:8728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -8745,12 +8634,12 @@ EOF fi echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:8749: checking POSIX termios" >&5 +echo "configure:8638: 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 @@ -8760,7 +8649,7 @@ int main() { tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:8764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_sys_posix_termios=yes else @@ -8776,7 +8665,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:8780: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +echo "configure:8669: 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 @@ -8785,7 +8674,7 @@ else gwinsz_in_termios_h=no if test $am_cv_sys_posix_termios = yes; then cat > conftest.$ac_ext < # include @@ -8805,7 +8694,7 @@ rm -f conftest* if test $gwinsz_in_termios_h = no; then cat > conftest.$ac_ext < # include @@ -8844,6 +8733,7 @@ for ac_hdr in \ arpa/inet.h \ arpa/nameser.h \ assert.h \ + bits/types.h \ conio.h \ crypt.h \ direct.h \ @@ -8892,17 +8782,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8896: checking for $ac_hdr" >&5 +echo "configure:8786: 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:8906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8796: \"$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* @@ -8931,105 +8821,8 @@ done -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:8936: checking for dlopen" >&5 -if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* 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 dlopen(); -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_dlopen) || defined (__stub___dlopen) -choke me -#else -f = dlopen; -#endif - -; return 0; } -EOF -if { (eval echo configure:8965: \"$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:8983: 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:9033: checking for sigset in -lV3" >&5 +echo "configure:8826: 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 @@ -9037,7 +8830,7 @@ 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:8845: \"$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 @@ -9076,41 +8869,41 @@ else fi +if test "$ac_cv_header_winsock_h" = yes; then echo $ac_n "checking for winsock""... $ac_c" 1>&6 -echo "configure:9081: checking for winsock" >&5 -save_LIBS="$LIBS" +echo "configure:8875: checking for winsock" >&5 +if eval "test \"\${ol_cv_winsock+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + save_LIBS="$LIBS" for curlib in ws2_32 wsock32; do LIBS="$LIBS -l$curlib" cat > conftest.$ac_ext < int main() { - socket@12(); - select@20(); - closesocket@4(); - gethostname@8(); + socket(0,0,0); + select(0,NULL,NULL,NULL,NULL); + closesocket(0); + gethostname(NULL,0); ; return 0; } EOF -if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - have_winsock=yes + ol_cv_winsock=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - have_winsock=no + ol_cv_winsock=no fi rm -f conftest* - if test $have_winsock = yes; then + if test $ol_cv_winsock = yes; then cat >> confdefs.h <<\EOF #define HAVE_WINSOCK 1 EOF @@ -9120,7 +8913,7 @@ EOF ac_cv_func_closesocket=yes ac_cv_func_gethostname=yes if test $curlib = ws2_32; then - have_winsock=winsock2 + ol_cv_winsock=winsock2 cat >> confdefs.h <<\EOF #define HAVE_WINSOCK2 1 EOF @@ -9130,16 +8923,19 @@ EOF fi LIBS="$save_LIBS" done -echo "$ac_t""$have_winsock" 1>&6 +fi + +echo "$ac_t""$ol_cv_winsock" 1>&6 +fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9138: checking for socket" >&5 +echo "configure:8934: 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:8963: \"$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 @@ -9182,7 +8978,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:9186: checking for main in -lsocket" >&5 +echo "configure:8982: 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 @@ -9190,14 +8986,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:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9225,7 +9021,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:9229: checking for main in -lnet" >&5 +echo "configure:9025: 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 @@ -9233,14 +9029,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 +if { (eval echo configure:9040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9268,7 +9064,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:9272: checking for main in -lnsl_s" >&5 +echo "configure:9068: 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 @@ -9276,14 +9072,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:9083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9311,7 +9107,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:9315: checking for main in -lnsl" >&5 +echo "configure:9111: 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 @@ -9319,14 +9115,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:9126: \"$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 @@ -9354,7 +9150,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:9358: checking for socket in -linet" >&5 +echo "configure:9154: 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 @@ -9362,7 +9158,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:9173: \"$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 @@ -9401,7 +9197,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:9405: checking for main in -lgen" >&5 +echo "configure:9201: 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 @@ -9409,14 +9205,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:9216: \"$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 @@ -9448,12 +9244,12 @@ fi echo $ac_n "checking for select""... $ac_c" 1>&6 -echo "configure:9452: checking for select" >&5 +echo "configure:9248: 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:9277: \"$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 @@ -9500,7 +9296,7 @@ fi if test "${ac_cv_header_winsock_h}" != yes; then echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 -echo "configure:9504: checking types of arguments for select()" >&5 +echo "configure:9300: 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 @@ -9514,7 +9310,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 < @@ -9533,7 +9329,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_not_found=no ; break 3 else @@ -9574,21 +9370,77 @@ EOF fi -for ac_hdr in regex.h +for ac_func in poll +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9377: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + +; return 0; } +EOF +if { (eval echo configure:9406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9582: checking for $ac_hdr" >&5 +echo "configure:9434: 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:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9444: \"$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* @@ -9614,146 +9466,22 @@ else fi done -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 library containing regfree""... $ac_c" 1>&6 -echo "configure:9623: checking for library containing regfree" >&5 -if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then +for ac_hdr in sys/epoll.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:9475: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_regfree="no" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_regfree="none required" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do -LIBS="-l$ac_lib $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_regfree="-l$ac_lib" -break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi - -echo "$ac_t""$ac_cv_search_regfree" 1>&6 -if test "$ac_cv_search_regfree" != "no"; then - test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS" - : -else : - { echo "configure: error: POSIX regex required." 1>&2; exit 1; } -fi - - -echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 -echo "configure:9686: 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 - - if test "$cross_compiling" = yes; then - ol_cv_c_posix_regex=cross -else - cat > conftest.$ac_ext < -#include -static char *pattern, *string; -main() -{ - int rc; - regex_t re; - - pattern = "^A"; - - if(regcomp(&re, pattern, 0)) { - return -1; - } - - string = "ALL MATCH"; - - rc = regexec(&re, string, 0, (void*)0, 0); - - regfree(&re); - - return rc; -} -EOF -if { (eval echo configure:9721: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ol_cv_c_posix_regex=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ol_cv_c_posix_regex" 1>&6 - -if test "$ol_cv_c_posix_regex" = no ; then - { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; } -fi - - -have_uuid=no -for ac_hdr in sys/uuid.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9747: 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 < conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9485: \"$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* @@ -9779,135 +9507,133 @@ else fi done -if test $ac_cv_header_sys_uuid_h = yes ; then - save_LIBS="$LIBS" - -echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6 -echo "configure:9787: checking for library containing uuid_to_str" >&5 -if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_header_sys_epoll_h}" = yes; then +echo $ac_n "checking for epoll system call""... $ac_c" 1>&6 +echo "configure:9513: checking for epoll system call" >&5 +if test "$cross_compiling" = yes; then + echo "$ac_t""no" 1>&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_uuid_to_str="no" -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_uuid_to_str="none required" +if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + echo "$ac_t""yes" 1>&6 +cat >> confdefs.h <<\EOF +#define HAVE_EPOLL 1 +EOF + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""no" 1>&6 fi -rm -f conftest* -test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do -LIBS="-l$ac_lib $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&6 +echo "configure:9546: 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 +#ifdef WINNT +#include +#endif int main() { -uuid_to_str() +char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_search_uuid_to_str="-l$ac_lib" -break + ol_cv_dcl_sys_errlist=yes + ol_cv_have_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_dcl_sys_errlist=no fi rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi - -echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6 -if test "$ac_cv_search_uuid_to_str" != "no"; then - test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS" - have_uuid=yes -else : - : fi - LIBS="$save_LIBS" - if test have_uuid = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_UUID_TO_STR 1 +echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6 +# +# It's possible (for near-UNIX clones) that sys_errlist doesn't exist +if test $ol_cv_dcl_sys_errlist = no ; then + cat >> confdefs.h <<\EOF +#define DECL_SYS_ERRLIST 1 EOF - test "$ac_cv_search_uuid_to_str" = "none required" || \ - SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str" - fi -fi - -if test $have_uuid = no ; then - echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6 -echo "configure:9862: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5 - save_LIBS="$LIBS" - LIBS="$LIBS -lrpcrt4" - cat > conftest.$ac_ext <&6 +echo "configure:9588: 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() { - - UuidCreate@4(); - UuidToStringA@8(); - +char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - need_rpcrt=yes + ol_cv_have_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - need_rpcrt=no + ol_cv_have_sys_errlist=no fi rm -f conftest* - if test $need_rpcrt = yes; then - SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4" - fi - LIBS="$save_LIBS" - echo "$ac_t""$need_rpcrt" 1>&6 fi -ol_link_dnssrv=no -echo $ac_n "checking for res_query""... $ac_c" 1>&6 -echo "configure:9898: checking for res_query" >&5 -if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then +echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 +fi +if test $ol_cv_have_sys_errlist = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_ERRLIST 1 +EOF + +fi + for ac_func in strerror strerror_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9624: 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 res_query(); +char $ac_func(); char (*f)(); int main() { @@ -9915,460 +9641,385 @@ 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_query) || defined (__stub___res_query) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = res_query; +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_res_query=yes" + 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_res_query=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'res_query`\" = 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 -if test $ac_cv_func_res_query = no ; then - echo $ac_n "checking for __res_query""... $ac_c" 1>&6 -echo "configure:9948: checking for __res_query" >&5 -if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then +ol_cv_func_strerror_r=no +if test "${ac_cv_func_strerror_r}" = yes ; then + echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6 +echo "configure:9680: checking non-posix strerror_r" >&5 +if eval "test \"\${ol_cv_nonposix_strerror_r+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 __res_query(); -char (*f)(); +#include +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strerror_r" >/dev/null 2>&1; then + rm -rf conftest* + ol_decl_strerror_r=yes +else + rm -rf conftest* + ol_decl_strerror_r=no +fi +rm -f conftest* + if test $ol_decl_strerror_r = yes ; then + cat > conftest.$ac_ext < 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_query) || defined (__stub_____res_query) -choke me -#else -f = __res_query; -#endif - + /* from autoconf 2.59 */ + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + ; return 0; } EOF -if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func___res_query=yes" + ol_cv_nonposix_strerror_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func___res_query=no" + ol_cv_nonposix_strerror_r=no fi rm -f conftest* -fi + else + if test "$cross_compiling" = yes; then + ol_cv_nonposix_strerror=no +else + cat > conftest.$ac_ext <&6 - : + main() { + char buf[100]; + buf[0] = 0; + strerror_r( 1, buf, sizeof buf ); + exit( buf[0] == 0 ); + } + +EOF +if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_nonposix_strerror_r=yes else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_nonposix_strerror=no +fi +rm -fr conftest* fi - ac_cv_func_res_query=$ac_cv_func___res_query + fi + fi -if test $ac_cv_func_res_query = no ; then - echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6 -echo "configure:10001: 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_t""$ol_cv_nonposix_strerror_r" 1>&6 +if test $ol_cv_nonposix_strerror_r = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NONPOSIX_STRERROR_R 1 +EOF + +fi + +elif test "${ac_cv_func_strerror}" = no ; then + echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 +echo "configure:9765: 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 - ac_save_LIBS="$LIBS" -LIBS="-lbind $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#ifdef WINNT +#include +#endif int main() { -res_query() +char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_dcl_sys_errlist=yes + ol_cv_have_sys_errlist=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_dcl_sys_errlist=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 -fi +echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6 +# +# It's possible (for near-UNIX clones) that sys_errlist doesn't exist +if test $ol_cv_dcl_sys_errlist = no ; then + cat >> confdefs.h <<\EOF +#define DECL_SYS_ERRLIST 1 +EOF - ac_cv_func_res_query=$ac_cv_lib_bind_res_query -fi -if test $ac_cv_func_res_query = no ; then - echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6 -echo "configure:10052: 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 "checking existence of sys_errlist""... $ac_c" 1>&6 +echo "configure:9807: 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 - ac_save_LIBS="$LIBS" -LIBS="-lbind $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -__res_query() +char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9820: \"$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_have_sys_errlist=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_have_sys_errlist=no fi rm -f conftest* -LIBS="$ac_save_LIBS" +fi +echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 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 <> confdefs.h <<\EOF +#define HAVE_SYS_ERRLIST 1 EOF - LIBS="-lbind $LIBS" - -else - echo "$ac_t""no" 1>&6 fi - ac_cv_func_res_query=$ac_cv_lib_bind___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:10103: 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 + +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:9848: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:9858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi +done - ac_cv_func_res_query=$ac_cv_lib_resolv_res_query +if test "$ac_cv_header_regex_h" != yes ; then + { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; } 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:10154: 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 "checking for library containing regfree""... $ac_c" 1>&6 +echo "configure:9889: checking for library containing regfree" >&5 +if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" + ac_func_search_save_LIBS="$LIBS" +ac_cv_search_regfree="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9907: \"$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" + ac_cv_search_regfree="none required" 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" +test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do +LIBS="-l$ac_lib $ac_func_search_save_LIBS" +cat > conftest.$ac_ext <&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - ac_cv_func_res_query=$ac_cv_lib_resolv___res_query -fi - -if test "$ac_cv_func_res_query" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_RES_QUERY 1 -EOF - - - 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 - -for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10221: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -char (*f)(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - -; return 0; } -EOF -if { (eval echo configure:10250: \"$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" +if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_regfree="-l$ac_lib" +break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi done - - -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 -elif test $ol_enable_ipv6 != no ; then - echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6 -echo "configure:10282: 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 +LIBS="$ac_func_search_save_LIBS" fi -rm -f conftest* +echo "$ac_t""$ac_cv_search_regfree" 1>&6 +if test "$ac_cv_search_regfree" != "no"; then + test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS" + : +else : + { echo "configure: error: POSIX regex required." 1>&2; exit 1; } fi -echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6 - - echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6 -echo "configure:10313: checking struct sockaddr_storage" >&5 -if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then +echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 +echo "configure:9952: 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 - cat > conftest.$ac_ext < conftest.$ac_ext < -#include +#include +static char *pattern, *string; +main() +{ + int rc; + regex_t re; -int main() { + pattern = "^A"; - struct sockaddr_storage ss; + if(regcomp(&re, pattern, 0)) { + return -1; + } + + string = "ALL MATCH"; + + rc = regexec(&re, string, 0, (void*)0, 0); -; return 0; } + regfree(&re); + + return rc; +} EOF -if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_struct_sockaddr_storage=yes +if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_c_posix_regex=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_struct_sockaddr_storage=no + rm -fr conftest* + ol_cv_c_posix_regex=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6 +fi - if test $ol_cv_inet6_addrstrlen = yes \ - -a $ol_cv_struct_sockaddr_storage = yes ; then - ol_link_ipv6=yes - elif test $ol_enable_ipv6 = yes \ - -a $ol_cv_inet6_addrstrlen = no ; then - { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; } - elif test $ol_enable_ipv6 = yes \ - -a $ol_cv_struct_sockaddr_storage = no ; then - { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; } - fi +echo "$ac_t""$ol_cv_c_posix_regex" 1>&6 + +if test "$ol_cv_c_posix_regex" = no ; then + { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; } fi -if test $ol_enable_local != no ; then - for ac_hdr in sys/un.h + +have_uuid=no +for ac_hdr in sys/uuid.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10362: checking for $ac_hdr" >&5 +echo "configure:10013: 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:10372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10023: \"$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* @@ -10394,129 +10045,244 @@ else fi done - - if test $ol_enable_local = auto ; then - ol_enable_local=$ac_cv_header_sys_un_h - elif test $ac_cv_header_sys_un_h = no ; then - { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; } - fi -fi - -ol_link_kbind=no -ol_link_kpasswd=no -ol_link_krb5=no -ol_link_krb4=no - -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:10419: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +if test $ac_cv_header_sys_uuid_h = yes ; then + save_LIBS="$LIBS" + +echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6 +echo "configure:10053: checking for library containing uuid_to_str" >&5 +if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - 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 uuid_to_str(); + +int main() { +uuid_to_str() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10429: \"$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:10071: \"$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" + ac_cv_search_uuid_to_str="none required" 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 < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_uuid_to_str="-l$ac_lib" +break else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi +rm -f conftest* done +LIBS="$ac_func_search_save_LIBS" +fi +echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6 +if test "$ac_cv_search_uuid_to_str" != "no"; then + test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS" + have_uuid=yes +else : + : +fi + LIBS="$save_LIBS" - 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:10461: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + if test have_uuid = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_UUID_TO_STR 1 +EOF + + + test "$ac_cv_search_uuid_to_str" = "none required" || \ + SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str" + fi +fi + +if test $have_uuid = no ; then + echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6 +echo "configure:10128: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5 + save_LIBS="$LIBS" + LIBS="$LIBS -lrpcrt4" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + need_rpcrt=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + need_rpcrt=no +fi +rm -f conftest* + if test $need_rpcrt = yes; then + SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4" + fi + LIBS="$save_LIBS" + echo "$ac_t""$need_rpcrt" 1>&6 +fi + +ol_link_dnssrv=no +echo $ac_n "checking for res_query""... $ac_c" 1>&6 +echo "configure:10164: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char res_query(); 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 res_query(); +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_res_query) || defined (__stub___res_query) +choke me +#else +f = res_query; +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10471: \"$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:10193: \"$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_func_res_query=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_func_res_query=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +fi + +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for __res_query""... $ac_c" 1>&6 +echo "configure:10214: 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_query(); +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___res_query) || defined (__stub_____res_query) +choke me +#else +f = __res_query; +#endif + +; return 0; } EOF - +if { (eval echo configure:10243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_query=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func___res_query=no" +fi +rm -f conftest* +fi + +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 -done - if test $ac_cv_header_heim_err_h = yes ; then - krb5_impl=heimdal - else - krb5_impl=mit - fi + ac_cv_func_res_query=$ac_cv_func___res_query +fi - if test $krb5_impl = mit; then - echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6 -echo "configure:10505: checking for main in -lk5crypto" >&5 -ac_lib_var=`echo k5crypto'_'main | 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:10267: 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="-lk5crypto $LIBS" +LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10286: \"$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 @@ -10531,30 +10297,43 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - krb5crypto=k5crypto + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -krb5crypto=crypto fi + ac_cv_func_res_query=$ac_cv_lib_bind_res_query +fi - echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 -echo "configure:10543: checking for main in -lkrb5" >&5 -ac_lib_var=`echo krb5'_'main | 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:10318: 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="-lkrb5 -l$krb5crypto -lcom_err $LIBS" +LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10337: \"$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 @@ -10569,32 +10348,43 @@ 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 -l$krb5crypto -lcom_err" + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -have_krb5=no fi + ac_cv_func_res_query=$ac_cv_lib_bind___res_query +fi - elif test $krb5_impl = heimdal; then - echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6 -echo "configure:10583: checking for main in -ldes" >&5 -ac_lib_var=`echo des'_'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:10369: 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="-ldes $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10388: \"$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 @@ -10609,30 +10399,43 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - krb5crypto=des + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -krb5crypto=crypto fi + ac_cv_func_res_query=$ac_cv_lib_resolv_res_query +fi - echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 -echo "configure:10621: checking for main in -lkrb5" >&5 -ac_lib_var=`echo krb5'_'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:10420: 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="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS" +LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10439: \"$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 @@ -10647,83 +10450,136 @@ 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 -l$krb5crypto -lasn1 -lroken -lcom_err" + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -have_krb5=no fi + ac_cv_func_res_query=$ac_cv_lib_resolv___res_query +fi - cat >> confdefs.h <<\EOF -#define HAVE_HEIMDAL_KERBEROS 1 -EOF - +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6 +echo "configure:10471: checking for _res_9_query in -lresolv" >&5 +ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&2 - fi - - if test $have_krb5 = yes ; then - ol_link_krb5=yes +int main() { +_res_9_query() +; return 0; } +EOF +if { (eval echo configure:10490: \"$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" - cat >> confdefs.h <<\EOF -#define HAVE_KRB5 1 +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' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi - if test $ol_with_kerberos = k5only ; then - ol_with_kerberos=found - fi + ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query +fi + +if test "$ac_cv_func_res_query" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_RES_QUERY 1 +EOF - elif test $ol_with_kerberos != auto ; then - { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; } - fi + if test $ol_enable_dnssrv != no ; then + ol_link_dnssrv=yes fi fi -if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \ - $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then +if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then + { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; } +fi - for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +for ac_func in hstrerror do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10699: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10538: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); 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 $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 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10709: \"$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:10567: \"$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_func_$ac_func=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_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 -echo "configure:10739: 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 +for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10595: 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="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $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:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - 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 - have_k425=yes - KRB4_LIBS="-lkrb4 -ldes425" + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 -have_k425=no fi +done - elif test $krb5_impl = heimdal; then - echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:10779: 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 +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 +elif test $ol_enable_ipv6 != no ; then + echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6 +echo "configure:10656: checking INET6_ADDRSTRLEN" >&5 +if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +# ifdef INET6_ADDRSTRLEN + __has_inet6_addrstrlen__; +# endif + EOF -if { (eval echo configure:10794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_inet6_addrstrlen=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_inet6_addrstrlen=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_t""$ol_cv_inet6_addrstrlen" 1>&6 - echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 -echo "configure:10836: checking for des_debug in Kerberos libraries" >&5 -if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then + echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6 +echo "configure:10687: checking struct sockaddr_storage" >&5 +if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - save_LIBS="$LIBS" - LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < -#include -extern int des_debug; +#include +#include int main() { -des_debug = 1; + struct sockaddr_storage ss; ; return 0; } EOF -if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_var_des_debug=yes + ol_cv_struct_sockaddr_storage=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_var_des_debug=no + ol_cv_struct_sockaddr_storage=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 +echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6 - LIBS="$save_LIBS" - fi + if test $ol_cv_inet6_addrstrlen = yes \ + -a $ol_cv_struct_sockaddr_storage = yes ; then + ol_link_ipv6=yes + elif test $ol_enable_ipv6 = yes \ + -a $ol_cv_inet6_addrstrlen = no ; then + { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; } + elif test $ol_enable_ipv6 = yes \ + -a $ol_cv_struct_sockaddr_storage = no ; then + { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; } 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 +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:10896: checking for $ac_hdr" >&5 +echo "configure:10736: 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:10906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10746: \"$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* @@ -10929,104 +10769,78 @@ 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:10935: 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 + 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_kbind=no +ol_link_krb5=no +ol_link_krb4=no + +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:10792: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lkrb -ldes $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:10802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_k4=yes + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -have_k4=no -fi - - - if test $have_k4 = yes ; then - ol_with_kerberos=found - ol_link_krb4=yes - - cat >> confdefs.h <<\EOF -#define HAVE_KRB4 1 -EOF - - - KRB4_LIBS="-lkrb -ldes" - - if test $ac_cv_header_krb_archaeology_h = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_KTH_KERBEROS 1 -EOF - - fi - fi - fi -fi - -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 +done -if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_KERBEROS 1 -EOF - - -elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then - { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; } -fi -ol_link_tls=no -if test $ol_with_tls != no ; then - for ac_hdr in openssl/ssl.h ssl.h + 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:11020: checking for $ac_hdr" >&5 +echo "configure:10834: 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:11030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10844: \"$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* @@ -11052,30 +10866,30 @@ else fi 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:11060: checking for SSLeay_add_ssl_algorithms in -lssl" >&5 -ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'` + 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:10878: 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="-lssl -lcrypto $LIBS" +LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10893: \"$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 @@ -11090,36 +10904,30 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_ssleay=yes - need_rsaref=no + krb5crypto=k5crypto else echo "$ac_t""no" 1>&6 -have_ssleay=no +krb5crypto=crypto fi - - if test $have_ssleay = no ; then - echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 -echo "configure:11104: checking for SSL_library_init in -lssl" >&5 -ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'` + + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:10916: 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="-lssl -lcrypto $LIBS" +LIBS="-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:10931: \"$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 @@ -11134,37 +10942,32 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_ssleay=yes - need_rsaref=no + have_krb5=yes + KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err" else echo "$ac_t""no" 1>&6 -have_ssleay=no +have_krb5=no fi - fi - if test $have_ssleay = no ; then - echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 -echo "configure:11149: checking for ssl3_accept in -lssl" >&5 -ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'` + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6 +echo "configure:10956: checking for main in -ldes" >&5 +ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" +LIBS="-ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10971: \"$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 @@ -11179,171 +10982,296 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_ssleay=yes - need_rsaref=yes + krb5crypto=des else echo "$ac_t""no" 1>&6 -have_ssleay=no +krb5crypto=crypto fi - fi - if test $have_ssleay = yes ; then - ol_with_tls=found - ol_link_tls=yes + echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6 +echo "configure:10994: 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 -lasn1 -lroken -lcom_err $LIBS" +cat > conftest.$ac_ext <> confdefs.h <<\EOF -#define HAVE_SSLEAY 1 +int main() { +main() +; return 0; } EOF +if { (eval echo configure:11009: \"$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_krb5=yes + KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err" +else + echo "$ac_t""no" 1>&6 +have_krb5=no +fi - if test $need_rsaref = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_RSAREF 1 + cat >> confdefs.h <<\EOF +#define HAVE_HEIMDAL_KERBEROS 1 EOF - TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" - else - TLS_LIBS="-lssl -lcrypto" - fi + else + have_krb5=no + echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2 fi - fi -else - echo "configure: warning: TLS data protection not supported!" 1>&2 -fi + if test $have_krb5 = yes ; then + ol_link_krb5=yes -WITH_TLS=no -if test $ol_link_tls = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TLS 1 + cat >> confdefs.h <<\EOF +#define HAVE_KRB5 1 EOF - WITH_TLS=yes -elif test $ol_with_tls = auto ; then - echo "configure: warning: Could not locate TLS/SSL package" 1>&2 - echo "configure: warning: TLS data protection not supported!" 1>&2 + if test $ol_with_kerberos = k5only ; then + ol_with_kerberos=found + fi -elif test $ol_with_tls != no ; then - { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; } -fi + elif test $ol_with_kerberos != auto ; then + { echo "configure: error: Required Kerberos 5 support not available" 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 -ol_link_threads=no - -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = nt ; then +if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \ + $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then - - echo $ac_n "checking for _beginthread""... $ac_c" 1>&6 -echo "configure:11252: checking for _beginthread" >&5 -if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then + for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:11068: 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 < -/* 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)(); +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:11078: \"$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 -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 + 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:11108: 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 -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:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func__beginthread=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func__beginthread=no" + 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 -if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then + + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:11148: 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 -l$krb5crypto -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 - if test $ac_cv_func__beginthread = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_NT_THREADS 1 + 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 - ol_cv_nt_threads=yes - fi + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF - if test "$ol_cv_nt_threads" = yes ; then - ol_link_threads=nt - ol_with_threads=found - ol_with_yielding_select=yes + echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 +echo "configure:11205: 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 <> confdefs.h <<\EOF -#define HAVE_NT_SERVICE_MANAGER 1 +#include +#include +extern int des_debug; + +int main() { + +des_debug = 1; + +; return 0; } EOF +if { (eval echo configure:11226: \"$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 - cat >> confdefs.h <<\EOF -#define HAVE_NT_EVENT_LOG 1 +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 + fi - if test $ol_with_threads = nt ; then - { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; } + LIBS="$save_LIBS" + fi fi fi -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = posix ; then +if test $ol_link_krb5 = yes ; then + ol_with_kerberos=found +fi - for ac_hdr in pthread.h +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:11337: checking for $ac_hdr" >&5 +echo "configure:11265: 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:11347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11275: \"$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* @@ -11370,202 +11298,101 @@ fi done - if test $ac_cv_header_pthread_h = yes ; then - echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:11376: checking POSIX thread version" >&5 -if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then + if test $ac_cv_header_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 +echo "configure:11304: 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 - - cat > conftest.$ac_ext < conftest.$ac_ext < - int main() { - - int i = PTHREAD_CREATE_JOINABLE; - +main() ; return 0; } EOF -if { (eval echo configure:11393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_detach" >/dev/null 2>&1; then +if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_version=10 + 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_pthread_version=8 + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k4=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat > conftest.$ac_ext <&6 +have_k4=no +fi -# include -# ifdef PTHREAD_CREATE_UNDETACHED - draft7 -# endif - + + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_krb4=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "draft7" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_pthread_version=7 -else - rm -rf conftest* - - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_attr_init" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_pthread_version=6 -else - rm -rf conftest* - - cat > conftest.$ac_ext < -#ifdef PTHREAD_MUTEX_INITIALIZER - draft5 -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "draft5" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_pthread_version=5 -else - rm -rf conftest* - ol_cv_pthread_version=4 -fi -rm -f conftest* - -fi -rm -f conftest* - -fi -rm -f conftest* - -fi -rm -f conftest* -fi - -echo "$ac_t""$ol_cv_pthread_version" 1>&6 + KRB4_LIBS="-lkrb -ldes" - if test $ol_cv_pthread_version != 0 ; then - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_KTH_KERBEROS 1 EOF - else - { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi fi - - # consider threads found - ol_with_threads=found - - - echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:11493: 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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_header_linux_threads=yes -else - rm -rf conftest* - ol_cv_header_linux_threads=no + fi fi -rm -f conftest* - +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 -echo "$ac_t""$ol_cv_header_linux_threads" 1>&6 - if test $ol_cv_header_linux_threads = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LINUX_THREADS 1 +if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 EOF - fi - - - echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6 -echo "configure:11525: checking for GNU Pth pthread.h" >&5 -if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifdef _POSIX_THREAD_IS_GNU_PTH - __gnu_pth__; -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__gnu_pth__" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_header_gnu_pth_pthread_h=yes -else - rm -rf conftest* - ol_cv_header_gnu_pth_pthread_h=no -fi -rm -f conftest* - +elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then + { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; } fi -echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6 - - - if test $ol_cv_header_gnu_pth_pthread_h = no ; then - for ac_hdr in sched.h + +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:11559: checking for $ac_hdr" >&5 +echo "configure:11386: 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:11569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11396: \"$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* @@ -11591,100 +11418,1062 @@ else fi done - fi - - echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 -echo "configure:11599: checking for pthread_create in default libraries" >&5 -if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then + 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:11426: 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 else - - if test "$cross_compiling" = yes; then - cat > conftest.$ac_ext < conftest.$ac_ext < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} +/* 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 SSLeay_add_ssl_algorithms(); int main() { +SSLeay_add_ssl_algorithms() +; return 0; } +EOF +if { (eval echo configure:11445: \"$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" - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; -#endif - if( status ) return status; -#else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_ssleay=yes + need_rsaref=no +else + echo "$ac_t""no" 1>&6 +have_ssleay=no +fi - return 0; + + if test $have_ssleay = no ; then + echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 +echo "configure:11470: 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 +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:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_create=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_pthread_create=no + 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_ssleay=yes + need_rsaref=no else - cat > conftest.$ac_ext < + echo "$ac_t""no" 1>&6 +have_ssleay=no +fi + + fi + + if test $have_ssleay = no ; then + echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 +echo "configure:11515: 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 +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 + 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_ssleay=yes + need_rsaref=yes +else + echo "$ac_t""no" 1>&6 +have_ssleay=no +fi + + fi + + if test $have_ssleay = yes ; then + ol_with_tls=found + ol_link_tls=yes + + cat >> confdefs.h <<\EOF +#define HAVE_SSLEAY 1 +EOF + + + if test $need_rsaref = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_RSAREF 1 +EOF + + + TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" + else + TLS_LIBS="-lssl -lcrypto" + fi + fi + echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6 +echo "configure:11579: checking OpenSSL library version (CRL checking capability)" >&5 +if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#else +#include +#endif + +/* Require 0.9.7d+ */ +#if OPENSSL_VERSION_NUMBER >= 0x0090704fL + char *__ssl_compat = "0.9.7d"; +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__ssl_compat" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_ssl_crl_compat=yes +else + rm -rf conftest* + ol_cv_ssl_crl_compat=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6 + + if test $ol_cv_ssl_crl_compat = no ; then + ol_link_ssl=no + else + cat >> confdefs.h <<\EOF +#define HAVE_OPENSSL_CRL 1 +EOF + + fi + fi + +else + echo "configure: warning: TLS data protection not supported!" 1>&2 +fi + +WITH_TLS=no +if test $ol_link_tls = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TLS 1 +EOF + + WITH_TLS=yes + +elif test $ol_with_tls = auto ; then + echo "configure: warning: Could not locate TLS/SSL package" 1>&2 + echo "configure: warning: TLS data 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 + +ol_link_threads=no + +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = nt ; then + + + echo $ac_n "checking for _beginthread""... $ac_c" 1>&6 +echo "configure:11662: checking for _beginthread" >&5 +if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _beginthread(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__beginthread) || defined (__stub____beginthread) +choke me +#else +f = _beginthread; +#endif + +; return 0; } +EOF +if { (eval echo configure:11691: \"$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 + + ol_cv_nt_threads=yes + 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:11747: 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:11757: \"$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_pthread_h = yes ; then + echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 +echo "configure:11786: 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 < + +int main() { + + int i = PTHREAD_CREATE_JOINABLE; + +; return 0; } +EOF +if { (eval echo configure:11803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_detach" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_pthread_version=10 +else + rm -rf conftest* + ol_cv_pthread_version=8 +fi +rm -f conftest* + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat > conftest.$ac_ext < +# ifdef PTHREAD_CREATE_UNDETACHED + draft7 +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "draft7" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_pthread_version=7 +else + rm -rf conftest* + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_attr_init" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_pthread_version=6 +else + rm -rf conftest* + + cat > conftest.$ac_ext < +#ifdef PTHREAD_MUTEX_INITIALIZER + draft5 +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "draft5" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_pthread_version=5 +else + rm -rf conftest* + ol_cv_pthread_version=4 +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_pthread_version" 1>&6 + + + if test $ol_cv_pthread_version != 0 ; then + cat >> confdefs.h <&2; exit 1; } + fi + + # consider threads found + ol_with_threads=found + + + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:11903: 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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_linux_threads=yes +else + rm -rf conftest* + ol_cv_header_linux_threads=no +fi +rm -f conftest* + + +fi + +echo "$ac_t""$ol_cv_header_linux_threads" 1>&6 + if test $ol_cv_header_linux_threads = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF + + fi + + + echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6 +echo "configure:11935: checking for GNU Pth pthread.h" >&5 +if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef _POSIX_THREAD_IS_GNU_PTH + __gnu_pth__; +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__gnu_pth__" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_gnu_pth_pthread_h=yes +else + rm -rf conftest* + ol_cv_header_gnu_pth_pthread_h=no +fi +rm -f conftest* + + +fi + +echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6 + + + if test $ol_cv_header_gnu_pth_pthread_h = no ; then + for ac_hdr in sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:11969: 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:11979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + fi + + + echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 +echo "configure:12009: 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 < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +; return 0; } +EOF +if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_create=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_create=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +} + +EOF +if { (eval echo configure:12167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_pthread_create=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_create=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ol_cv_pthread_create" 1>&6 + + if test $ol_cv_pthread_create != no ; then + ol_link_threads=posix + ol_link_pthreads="" + fi + + # Pthread try link: -kthread (ol_cv_pthread_kthread) +if test "$ol_link_threads" = no ; then + # try -kthread + echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6 +echo "configure:12192: 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 + + # save the flags + ol_LIBS="$LIBS" + LIBS="-kthread $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +; return 0; } +EOF +if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_kthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_kthread=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +} + +EOF +if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_pthread_kthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_kthread=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_kthread" 1>&6 + + if test $ol_cv_pthread_kthread = yes ; then + ol_link_pthreads="-kthread" + ol_link_threads=posix + fi +fi + + # Pthread try link: -pthread (ol_cv_pthread_pthread) +if test "$ol_link_threads" = no ; then + # try -pthread + echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6 +echo "configure:12384: 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 + + # save the flags + ol_LIBS="$LIBS" + LIBS="-pthread $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +; return 0; } +EOF +if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_pthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_pthread=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < #if HAVE_PTHREADS < 7 #include #endif @@ -11753,43 +12542,240 @@ int main(argc, argv) } EOF -if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_create=yes + ol_cv_pthread_pthread=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_create=no + ol_cv_pthread_pthread=no fi rm -fr conftest* fi + + # restore the LIBS + LIBS="$ol_LIBS" + fi -echo "$ac_t""$ol_cv_pthread_create" 1>&6 +echo "$ac_t""$ol_cv_pthread_pthread" 1>&6 - if test $ol_cv_pthread_create != no ; then - ol_link_threads=posix - ol_link_pthreads="" - fi - - # Pthread try link: -kthread (ol_cv_pthread_kthread) + if test $ol_cv_pthread_pthread = yes ; then + ol_link_pthreads="-pthread" + ol_link_threads=posix + fi +fi + + # Pthread try link: -pthreads (ol_cv_pthread_pthreads) if test "$ol_link_threads" = no ; then - # try -kthread - echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6 -echo "configure:11782: checking for pthread link with -kthread" >&5 -if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then + # try -pthreads + echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6 +echo "configure:12576: 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 + + # save the flags + ol_LIBS="$LIBS" + LIBS="-pthreads $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +; return 0; } +EOF +if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_pthreads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_pthreads=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#if HAVE_PTHREADS < 7 +#include +#endif +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + pthread_t t; + int status; + int detach = PTHREAD_CREATE_DETACHED; + +#if HAVE_PTHREADS > 4 + /* Final pthreads */ + pthread_attr_t attr; + + status = pthread_attr_init(&attr); + if( status ) return status; + +#if HAVE_PTHREADS < 7 + status = pthread_attr_setdetachstate(&attr, &detach); + if( status < 0 ) status = errno; +#else + status = pthread_attr_setdetachstate(&attr, detach); +#endif + if( status ) return status; + status = pthread_create( &t, &attr, task, NULL ); +#if HAVE_PTHREADS < 7 + if( status < 0 ) status = errno; +#endif + if( status ) return status; +#else + /* Draft 4 pthreads */ + status = pthread_create( &t, pthread_attr_default, task, NULL ); + if( status ) return errno; + + /* give thread a chance to complete */ + /* it should remain joinable and hence detachable */ + sleep( 1 ); + + status = pthread_detach( &t ); + if( status ) return errno; +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + return 0; + +} + +EOF +if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_pthread_pthreads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_pthreads=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6 + + if test $ol_cv_pthread_pthreads = yes ; then + ol_link_pthreads="-pthreads" + ol_link_threads=posix + fi +fi + + # Pthread try link: -mthreads (ol_cv_pthread_mthreads) +if test "$ol_link_threads" = no ; then + # try -mthreads + echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6 +echo "configure:12768: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-kthread $LIBS" + LIBS="-mthreads $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -11856,19 +12842,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_kthread=yes + ol_cv_pthread_mthreads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_kthread=no + ol_cv_pthread_mthreads=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -11940,14 +12926,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_kthread=yes + ol_cv_pthread_mthreads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_kthread=no + ol_cv_pthread_mthreads=no fi rm -fr conftest* fi @@ -11958,30 +12944,30 @@ fi fi -echo "$ac_t""$ol_cv_pthread_kthread" 1>&6 +echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6 - if test $ol_cv_pthread_kthread = yes ; then - ol_link_pthreads="-kthread" + if test $ol_cv_pthread_mthreads = yes ; then + ol_link_pthreads="-mthreads" ol_link_threads=posix fi fi - # Pthread try link: -pthread (ol_cv_pthread_pthread) + # Pthread try link: -thread (ol_cv_pthread_thread) if test "$ol_link_threads" = no ; then - # try -pthread - echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6 -echo "configure:11974: checking for pthread link with -pthread" >&5 -if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then + # try -thread + echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6 +echo "configure:12960: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-pthread $LIBS" + LIBS="-thread $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -12048,19 +13034,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_pthread=yes + ol_cv_pthread_thread=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_pthread=no + ol_cv_pthread_thread=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -12132,14 +13118,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_pthread=yes + ol_cv_pthread_thread=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_pthread=no + ol_cv_pthread_thread=no fi rm -fr conftest* fi @@ -12150,30 +13136,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_pthread" 1>&6 +echo "$ac_t""$ol_cv_pthread_thread" 1>&6 - if test $ol_cv_pthread_pthread = yes ; then - ol_link_pthreads="-pthread" + if test $ol_cv_pthread_thread = yes ; then + ol_link_pthreads="-thread" ol_link_threads=posix fi fi - # Pthread try link: -pthreads (ol_cv_pthread_pthreads) + + # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) if test "$ol_link_threads" = no ; then - # try -pthreads - echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6 -echo "configure:12166: checking for pthread link with -pthreads" >&5 -if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; 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:13153: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-pthreads $LIBS" + LIBS="-lpthread -lmach -lexc -lc_r $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -12240,19 +13227,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_pthreads=yes + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_pthreads=no + ol_cv_pthread_lpthread_lmach_lexc_lc_r=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -12324,14 +13311,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_pthreads=yes + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_pthreads=no + ol_cv_pthread_lpthread_lmach_lexc_lc_r=no fi rm -fr conftest* fi @@ -12342,30 +13329,30 @@ fi fi -echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6 - if test $ol_cv_pthread_pthreads = yes ; then - ol_link_pthreads="-pthreads" + if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then + ol_link_pthreads="-lpthread -lmach -lexc -lc_r" ol_link_threads=posix fi fi - # Pthread try link: -mthreads (ol_cv_pthread_mthreads) + # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) if test "$ol_link_threads" = no ; then - # try -mthreads - echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6 -echo "configure:12358: checking for pthread link with -mthreads" >&5 -if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then + # try -lpthread -lmach -lexc + echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6 +echo "configure:13345: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-mthreads $LIBS" + LIBS="-lpthread -lmach -lexc $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -12432,19 +13419,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_mthreads=yes + ol_cv_pthread_lpthread_lmach_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_mthreads=no + ol_cv_pthread_lpthread_lmach_lexc=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -12516,14 +13503,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_mthreads=yes + ol_cv_pthread_lpthread_lmach_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_mthreads=no + ol_cv_pthread_lpthread_lmach_lexc=no fi rm -fr conftest* fi @@ -12534,30 +13521,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6 - if test $ol_cv_pthread_mthreads = yes ; then - ol_link_pthreads="-mthreads" + if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then + ol_link_pthreads="-lpthread -lmach -lexc" ol_link_threads=posix fi fi - # Pthread try link: -thread (ol_cv_pthread_thread) + + # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) if test "$ol_link_threads" = no ; then - # try -thread - echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6 -echo "configure:12550: checking for pthread link with -thread" >&5 -if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then + # try -lpthread -Wl,-woff,85 + echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6 +echo "configure:13538: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-thread $LIBS" + LIBS="-lpthread -Wl,-woff,85 $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -12624,19 +13612,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_thread=yes + ol_cv_pthread_lib_lpthread_woff=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_thread=no + ol_cv_pthread_lib_lpthread_woff=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -12708,14 +13696,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_thread=yes + ol_cv_pthread_lib_lpthread_woff=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_thread=no + ol_cv_pthread_lib_lpthread_woff=no fi rm -fr conftest* fi @@ -12726,31 +13714,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_thread" 1>&6 +echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6 - if test $ol_cv_pthread_thread = yes ; then - ol_link_pthreads="-thread" + if test $ol_cv_pthread_lib_lpthread_woff = yes ; then + ol_link_pthreads="-lpthread -Wl,-woff,85" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) + # Pthread try link: -lpthread (ol_cv_pthread_lpthread) if test "$ol_link_threads" = no ; then - # try -lpthread -lmach -lexc -lc_r - echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6 -echo "configure:12743: 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 + # try -lpthread + echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6 +echo "configure:13731: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -lmach -lexc -lc_r $LIBS" + LIBS="-lpthread $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -12817,19 +13805,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13809: \"$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 + ol_cv_pthread_lpthread=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthread_lmach_lexc_lc_r=no + ol_cv_pthread_lpthread=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -12901,14 +13889,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes + ol_cv_pthread_lpthread=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lpthread_lmach_lexc_lc_r=no + ol_cv_pthread_lpthread=no fi rm -fr conftest* fi @@ -12919,30 +13907,30 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6 - if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then - ol_link_pthreads="-lpthread -lmach -lexc -lc_r" + if test $ol_cv_pthread_lpthread = yes ; then + ol_link_pthreads="-lpthread" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) + # Pthread try link: -lc_r (ol_cv_pthread_lc_r) if test "$ol_link_threads" = no ; then - # try -lpthread -lmach -lexc - echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6 -echo "configure:12935: checking for pthread link with -lpthread -lmach -lexc" >&5 -if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then + # try -lc_r + echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6 +echo "configure:13923: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -lmach -lexc $LIBS" + LIBS="-lc_r $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13009,19 +13997,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14001: \"$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 + ol_cv_pthread_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthread_lmach_lexc=no + ol_cv_pthread_lc_r=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -13093,14 +14081,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lpthread_lmach_lexc=yes + ol_cv_pthread_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lpthread_lmach_lexc=no + ol_cv_pthread_lc_r=no fi rm -fr conftest* fi @@ -13111,31 +14099,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6 +echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6 - if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then - ol_link_pthreads="-lpthread -lmach -lexc" + if test $ol_cv_pthread_lc_r = yes ; then + ol_link_pthreads="-lc_r" ol_link_threads=posix fi fi - # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) + # Pthread try link: -threads (ol_cv_pthread_threads) if test "$ol_link_threads" = no ; then - # try -lpthread -Wl,-woff,85 - echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6 -echo "configure:13128: checking for pthread link with -lpthread -Wl,-woff,85" >&5 -if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then + # try -threads + echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6 +echo "configure:14116: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread -Wl,-woff,85 $LIBS" + LIBS="-threads $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13202,19 +14190,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14194: \"$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 + ol_cv_pthread_threads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lib_lpthread_woff=no + ol_cv_pthread_threads=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -13286,14 +14274,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lib_lpthread_woff=yes + ol_cv_pthread_threads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lib_lpthread_woff=no + ol_cv_pthread_threads=no fi rm -fr conftest* fi @@ -13304,31 +14292,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6 +echo "$ac_t""$ol_cv_pthread_threads" 1>&6 - if test $ol_cv_pthread_lib_lpthread_woff = yes ; then - ol_link_pthreads="-lpthread -Wl,-woff,85" + if test $ol_cv_pthread_threads = yes ; then + ol_link_pthreads="-threads" ol_link_threads=posix fi fi - # Pthread try link: -lpthread (ol_cv_pthread_lpthread) + # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) if test "$ol_link_threads" = no ; then - # try -lpthread - echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6 -echo "configure:13321: checking for pthread link with -lpthread" >&5 -if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; 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:14309: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lpthread $LIBS" + LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13395,19 +14383,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_lpthread=yes + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthread=no + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -13479,14 +14467,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lpthread=yes + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lpthread=no + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -fr conftest* fi @@ -13497,30 +14485,30 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6 - if test $ol_cv_pthread_lpthread = yes ; then - ol_link_pthreads="-lpthread" + if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then + ol_link_pthreads="-lpthreads -lmach -lexc -lc_r" ol_link_threads=posix fi fi - # Pthread try link: -lc_r (ol_cv_pthread_lc_r) + # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc) if test "$ol_link_threads" = no ; then - # try -lc_r - echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6 -echo "configure:13513: checking for pthread link with -lc_r" >&5 -if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then + # try -lpthreads -lmach -lexc + echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6 +echo "configure:14501: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lc_r $LIBS" + LIBS="-lpthreads -lmach -lexc $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13587,19 +14575,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_lc_r=yes + ol_cv_pthread_lpthreads_lmach_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lc_r=no + ol_cv_pthread_lpthreads_lmach_lexc=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -13671,14 +14659,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lc_r=yes + ol_cv_pthread_lpthreads_lmach_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lc_r=no + ol_cv_pthread_lpthreads_lmach_lexc=no fi rm -fr conftest* fi @@ -13689,31 +14677,30 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6 - if test $ol_cv_pthread_lc_r = yes ; then - ol_link_pthreads="-lc_r" + if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then + ol_link_pthreads="-lpthreads -lmach -lexc" ol_link_threads=posix fi fi - - # Pthread try link: -threads (ol_cv_pthread_threads) + # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc) if test "$ol_link_threads" = no ; then - # try -threads - echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6 -echo "configure:13706: checking for pthread link with -threads" >&5 -if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then + # try -lpthreads -lexc + echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6 +echo "configure:14693: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-threads $LIBS" + LIBS="-lpthreads -lexc $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13780,19 +14767,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_threads=yes + ol_cv_pthread_lpthreads_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_threads=no + ol_cv_pthread_lpthreads_lexc=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -13864,14 +14851,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_threads=yes + ol_cv_pthread_lpthreads_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_threads=no + ol_cv_pthread_lpthreads_lexc=no fi rm -fr conftest* fi @@ -13882,31 +14869,31 @@ fi fi -echo "$ac_t""$ol_cv_pthread_threads" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6 - if test $ol_cv_pthread_threads = yes ; then - ol_link_pthreads="-threads" + if test $ol_cv_pthread_lpthreads_lexc = yes ; then + ol_link_pthreads="-lpthreads -lexc" ol_link_threads=posix fi fi - # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) + # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads) if test "$ol_link_threads" = no ; then - # try -lpthreads -lmach -lexc -lc_r - echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6 -echo "configure:13899: 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 + # try -lpthreads + echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6 +echo "configure:14886: 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 # save the flags ol_LIBS="$LIBS" - LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" + LIBS="-lpthreads $LIBS" if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < @@ -13973,19 +14960,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14964: \"$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 + ol_cv_pthread_lib_lpthreads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no + ol_cv_pthread_lib_lpthreads=no fi rm -f conftest* else cat > conftest.$ac_ext < @@ -14057,14 +15044,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes + ol_cv_pthread_lib_lpthreads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no + ol_cv_pthread_lib_lpthreads=no fi rm -fr conftest* fi @@ -14075,301 +15062,403 @@ fi fi -echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6 +echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6 - if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then - ol_link_pthreads="-lpthreads -lmach -lexc -lc_r" + if test $ol_cv_pthread_lib_lpthreads = yes ; then + ol_link_pthreads="-lpthreads" ol_link_threads=posix fi fi - # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc) -if test "$ol_link_threads" = no ; then - # try -lpthreads -lmach -lexc - echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6 -echo "configure:14091: checking for pthread link with -lpthreads -lmach -lexc" >&5 -if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then + + if test $ol_link_threads != no ; then + LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" + + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + + for ac_func in sched_yield pthread_yield thr_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15085: 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 - - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads -lmach -lexc $LIBS" - - if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); 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 $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 -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} +; return 0; } +EOF +if { (eval echo configure:15114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no -a \ + $ac_cv_func_thr_yield = no ; then + echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 +echo "configure:15143: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lrt $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" - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LTHREAD_LIBS="$LTHREAD_LIBS -lrt" + cat >> confdefs.h <<\EOF +#define HAVE_SCHED_YIELD 1 +EOF -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; + ac_cv_func_sched_yield=yes +else + echo "$ac_t""no" 1>&6 +ac_cv_func_sched_yield=no +fi - status = pthread_attr_init(&attr); - if( status ) return status; + fi + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no -a \ + "$ac_cv_func_thr_yield" = no ; then + echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 + fi -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; + for ac_func in pthread_kill pthread_rwlock_destroy +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15198: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; +f = $ac_func; #endif - if( status ) return status; -#else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); +; return 0; } +EOF +if { (eval echo configure:15227: \"$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 - status = pthread_detach( &t ); - if( status ) return errno; -#endif +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 -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - return 0; + echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 +echo "configure:15253: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif +int main() { +pthread_detach(NULL); ; return 0; } EOF -if { (eval echo configure:14169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15271: \"$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 + ol_cv_func_pthread_detach=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthreads_lmach_lexc=no + ol_cv_func_pthread_detach=no fi rm -f conftest* -else - cat > conftest.$ac_ext < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif + +fi -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} +echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6 + if test $ol_cv_func_pthread_detach = no ; then + { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; } + fi -int main(argc, argv) - int argc; - char **argv; -{ + cat >> confdefs.h <<\EOF +#define HAVE_PTHREAD_DETACH 1 +EOF - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; + for ac_func in \ + pthread_setconcurrency \ + pthread_getconcurrency \ + thr_setconcurrency \ + thr_getconcurrency \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15303: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +char (*f)(); - status = pthread_attr_init(&attr); - if( status ) return status; +int main() { -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; -#endif - if( status ) return status; +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me #else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); +f = $ac_func; #endif - return 0; - -} - +; return 0; } EOF -if { (eval echo configure:14253: \"$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 +if { (eval echo configure:15332: \"$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 -fr conftest* - ol_cv_pthread_lpthreads_lmach_lexc=no + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi -rm -fr conftest* +rm -f conftest* fi - - # restore the LIBS - LIBS="$ol_LIBS" - +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_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6 - - if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then - ol_link_pthreads="-lpthreads -lmach -lexc" - ol_link_threads=posix - fi -fi - # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc) -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:14283: checking for pthread link with -lpthreads -lexc" >&5 -if eval "test \"\${ol_cv_pthread_lpthreads_lexc+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:15361: 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 - - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads -lexc $LIBS" - - if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); 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 $ac_func(); +char (*f)(); int main() { - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 +/* 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 - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; +; return 0; } +EOF +if { (eval echo configure:15390: \"$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 - status = pthread_attr_init(&attr); - if( status ) return status; +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; -#endif - if( status ) return status; -#else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; + echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 +echo "configure:15415: 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 + ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np +fi - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); +echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 + + + + + echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 +echo "configure:15428: checking for LinuxThreads consistency" >&5 +if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_header_linux_threads = yes -a \ + $ol_cv_sys_linux_threads = yes; then + ol_cv_linux_threads=yes + elif test $ol_cv_header_linux_threads = no -a \ + $ol_cv_sys_linux_threads = no; then + ol_cv_linux_threads=no + else + ol_cv_linux_threads=error + fi + +fi - status = pthread_detach( &t ); - if( status ) return errno; -#endif +echo "$ac_t""$ol_cv_linux_threads" 1>&6 -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - return 0; + if test $ol_cv_linux_threads = error; then + { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; }; + fi -; return 0; } -EOF -if { (eval echo configure:14361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ol_cv_pthread_lpthreads_lexc=yes + echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6 +echo "configure:15453: 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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_pthread_lpthreads_lexc=no -fi -rm -f conftest* + + if test "$cross_compiling" = yes; then + ol_cv_pthread_create_works=yes else cat > conftest.$ac_ext < @@ -14441,282 +15530,507 @@ int main(argc, argv) } EOF -if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then - ol_cv_pthread_lpthreads_lexc=yes + ol_cv_pthread_create_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_lpthreads_lexc=no + ol_cv_pthread_create_works=no fi rm -fr conftest* fi - - # restore the LIBS - LIBS="$ol_LIBS" - fi -echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6 - - if test $ol_cv_pthread_lpthreads_lexc = yes ; then - ol_link_pthreads="-lpthreads -lexc" - ol_link_threads=posix - fi -fi +echo "$ac_t""$ol_cv_pthread_create_works" 1>&6 + if test $ol_cv_pthread_create_works = no ; then + { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; } + fi - # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads) -if test "$ol_link_threads" = no ; then - # try -lpthreads - echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6 -echo "configure:14476: checking for pthread link with -lpthreads" >&5 -if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then + if test $ol_with_yielding_select = auto ; then + echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6 +echo "configure:15556: 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 - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads $LIBS" - - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then + ol_cv_pthread_select_yields=cross +else cat > conftest.$ac_ext < +#include +#include #include -#if HAVE_PTHREADS < 7 -#include -#endif #ifndef NULL -#define NULL (void*)0 +#define NULL (void*) 0 #endif +static int fildes[2]; + static void *task(p) void *p; { - return (void *) (p == NULL); -} + int i; + struct timeval tv; -int main() { + fd_set rfds; - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif + tv.tv_sec=10; + tv.tv_usec=0; + + FD_ZERO(&rfds); + FD_SET(fildes[0], &rfds); + + /* we're not interested in any fds */ + i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv); + + if(i < 0) { + perror("select"); + exit(10); + } + + exit(0); /* if we exit here, the select blocked the whole process */ +} + +int main(argc, argv) + int argc; + char **argv; +{ pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; + /* create a pipe to select */ + if(pipe(&fildes[0])) { + perror("select"); + exit(1); + } - status = pthread_attr_init(&attr); - if( status ) return status; +#ifdef HAVE_PTHREAD_SETCONCURRENCY + (void) pthread_setconcurrency(2); +#else +#ifdef HAVE_THR_SETCONCURRENCY + /* Set Solaris LWP concurrency to 2 */ + thr_setconcurrency(2); +#endif +#endif -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; +#if HAVE_PTHREADS < 6 + pthread_create(&t, pthread_attr_default, task, NULL); #else - status = pthread_attr_setdetachstate(&attr, detach); + pthread_create(&t, NULL, task, NULL); #endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; + + /* make sure task runs first */ +#if HAVE_THR_YIELD + thr_yield(); +#elif defined( HAVE_SCHED_YIELD ) + sched_yield(); +#elif defined( HAVE_PTHREAD_YIELD ) + pthread_yield(); #endif - if( status ) return status; + + exit(2); +} +EOF +if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_pthread_select_yields=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_select_yields=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 + + if test $ol_cv_pthread_select_yields = cross ; then + { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; } + fi + + if test $ol_cv_pthread_select_yields = yes ; then + ol_with_yielding_select=yes + fi + fi + + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + else + { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; } + fi + fi + + if test $ol_with_threads = posix ; then + { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } + fi +fi + +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = mach ; then + + for ac_hdr in mach/cthreads.h cthreads.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:15686: 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:15696: \"$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_mach_cthreads_h = yes ; then + ol_with_threads=found + + echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 +echo "configure:15726: 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 < +/* 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 cthread_fork(); +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_cthread_fork) || defined (__stub___cthread_fork) +choke me #else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; +f = cthread_fork; +#endif - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); +; return 0; } +EOF +if { (eval echo configure:15755: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_cthread_fork=no" +fi +rm -f conftest* +fi - status = pthread_detach( &t ); - if( status ) return errno; -#endif +if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_link_threads=yes +else + echo "$ac_t""no" 1>&6 +fi -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - return 0; + if test $ol_link_threads = no ; then + echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 +echo "configure:15777: 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 + + save_LIBS="$LIBS" + LIBS="-all_load $LIBS" + cat > conftest.$ac_ext < +int main() { + cthread_fork((void *)0, (void *)0); + ; return 0; } EOF -if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_lib_lpthreads=yes + ol_cv_cthread_all_load=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lib_lpthreads=no + ol_cv_cthread_all_load=no fi rm -f conftest* + LIBS="$save_LIBS" + +fi + +echo "$ac_t""$ol_cv_cthread_all_load" 1>&6 + + if test $ol_cv_cthread_all_load = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -all_load" + ol_link_threads=mach + ol_with_threads=found + fi + fi + + elif test $ac_cv_header_cthreads_h = yes ; then + + ol_with_threads=found + + save_LIBS="$LIBS" + LIBS="$LIBS -lthreads" + echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 +echo "configure:15824: 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 < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char cthread_fork(); 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 cthread_fork(); +char (*f)(); -int main(argc, argv) - int argc; - char **argv; -{ +int main() { - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) +choke me +#else +f = cthread_fork; #endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; +; return 0; } +EOF +if { (eval echo configure:15853: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_cthread_fork=no" +fi +rm -f conftest* +fi - status = pthread_attr_init(&attr); - if( status ) return status; +if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_link_threads=yes +else + echo "$ac_t""no" 1>&6 +fi -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; -#endif - if( status ) return status; -#else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; + LIBS="$save_LIBS" - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); + if test $ol_link_threads = yes ; then + LTHREAD_LIBS="-lthreads" + ol_link_threads=mach + ol_with_threads=found + else + { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; } + fi - status = pthread_detach( &t ); - if( status ) return errno; -#endif + elif test $ol_with_threads = mach ; then + { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; } + fi -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif + if test $ol_link_threads = mach ; then + cat >> confdefs.h <<\EOF +#define HAVE_MACH_CTHREADS 1 +EOF - return 0; + elif test $ol_with_threads = found ; then + { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; } + fi +fi -} +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = pth ; then + for ac_hdr in pth.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:15903: 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 -if { (eval echo configure:14638: \"$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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:15913: \"$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 -fr conftest* - ol_cv_pthread_lib_lpthreads=no + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi -rm -fr conftest* +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 - # restore the LIBS - LIBS="$ol_LIBS" - + if test $ac_cv_header_pth_h = yes ; then + echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6 +echo "configure:15942: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lpth $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_pth=yes +else + echo "$ac_t""no" 1>&6 +have_pth=no fi -echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6 - if test $ol_cv_pthread_lib_lpthreads = yes ; then - ol_link_pthreads="-lpthreads" - ol_link_threads=posix - fi -fi + if test $have_pth = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_GNU_PTH 1 +EOF + LTHREAD_LIBS="$LTHREAD_LIBS -lpth" + ol_link_threads=pth + ol_with_threads=found - if test $ol_link_threads != no ; then - LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes + fi + fi + fi +fi - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = lwp ; then - for ac_func in sched_yield pthread_yield thr_yield + for ac_hdr in thread.h synch.h do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14675: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16006: 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 < -/* 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; } +#include <$ac_hdr> EOF -if { (eval echo configure:14704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:16016: \"$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_func_$ac_func=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 -echo "configure:14733: checking for sched_yield in -lrt" >&5 -ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'` + 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:16044: 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 else ac_save_LIBS="$LIBS" -LIBS="-lrt $LIBS" +LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16063: \"$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 @@ -14763,33 +16074,37 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LTHREAD_LIBS="$LTHREAD_LIBS -lrt" - cat >> confdefs.h <<\EOF -#define HAVE_SCHED_YIELD 1 -EOF - - ac_cv_func_sched_yield=yes + have_thr=yes else echo "$ac_t""no" 1>&6 -ac_cv_func_sched_yield=no +have_thr=no fi - fi - if test $ac_cv_func_sched_yield = no -a \ - $ac_cv_func_pthread_yield = no -a \ - "$ac_cv_func_thr_yield" = no ; then - echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 + + if test $have_thr = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_THR 1 +EOF + + LTHREAD_LIBS="$LTHREAD_LIBS -lthread" + ol_link_threads=thr + + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes fi - for ac_func in pthread_kill pthread_rwlock_destroy + for ac_func in \ + thr_setconcurrency \ + thr_getconcurrency \ + do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14788: checking for $ac_func" >&5 +echo "configure:16103: 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:16132: \"$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 @@ -14837,104 +16152,152 @@ else fi done + fi + fi - echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 -echo "configure:14843: checking for pthread_detach with " >&5 -if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then + for ac_hdr in lwp/lwp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16163: 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 < conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:16173: \"$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 -#include -#ifndef NULL -#define NULL (void*)0 -#endif + 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:16201: 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 +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:16220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_pthread_detach=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_func_pthread_detach=no + 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_lwp=yes +else + echo "$ac_t""no" 1>&6 +have_lwp=no fi -echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6 - if test $ol_cv_func_pthread_detach = no ; then - { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; } + if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + ol_link_threads=lwp + + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=no fi + fi + fi +fi - cat >> confdefs.h <<\EOF -#define HAVE_PTHREAD_DETACH 1 +if test $ol_with_yielding_select = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_YIELDING_SELECT 1 EOF +fi - for ac_func in \ - pthread_setconcurrency \ - pthread_getconcurrency \ - thr_setconcurrency \ - thr_getconcurrency \ - +if test $ol_with_threads = manual ; then + ol_link_threads=yes + + echo "configure: warning: thread defines and link options must be set manually" 1>&2 + + for ac_hdr in pthread.h sched.h do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14893: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16273: 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 < -/* 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; } +#include <$ac_hdr> EOF -if { (eval echo configure:14922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:16283: \"$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_func_$ac_func=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 -echo "configure:14951: checking for $ac_func" >&5 +echo "configure:16312: 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 - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 -echo "configure:15005: 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 - ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np -fi - -echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 - - - - - echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 -echo "configure:15018: checking for LinuxThreads consistency" >&5 -if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test $ol_cv_header_linux_threads = yes -a \ - $ol_cv_sys_linux_threads = yes; then - ol_cv_linux_threads=yes - elif test $ol_cv_header_linux_threads = no -a \ - $ol_cv_sys_linux_threads = no; then - ol_cv_linux_threads=no - else - ol_cv_linux_threads=error - fi - -fi - -echo "$ac_t""$ol_cv_linux_threads" 1>&6 - - - if test $ol_cv_linux_threads = error; then - { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; }; - fi - - echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6 -echo "configure:15043: 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 - - if test "$cross_compiling" = yes; then - ol_cv_pthread_create_works=yes -else - cat > conftest.$ac_ext < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif - -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} - - -int main(argc, argv) - int argc; - char **argv; -{ - - /* pthread test function */ -#ifndef PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED 1 -#endif - pthread_t t; - int status; - int detach = PTHREAD_CREATE_DETACHED; - -#if HAVE_PTHREADS > 4 - /* Final pthreads */ - pthread_attr_t attr; - - status = pthread_attr_init(&attr); - if( status ) return status; - -#if HAVE_PTHREADS < 7 - status = pthread_attr_setdetachstate(&attr, &detach); - if( status < 0 ) status = errno; -#else - status = pthread_attr_setdetachstate(&attr, detach); -#endif - if( status ) return status; - status = pthread_create( &t, &attr, task, NULL ); -#if HAVE_PTHREADS < 7 - if( status < 0 ) status = errno; -#endif - if( status ) return status; -#else - /* Draft 4 pthreads */ - status = pthread_create( &t, pthread_attr_default, task, NULL ); - if( status ) return errno; - - /* give thread a chance to complete */ - /* it should remain joinable and hence detachable */ - sleep( 1 ); - - status = pthread_detach( &t ); - if( status ) return errno; -#endif - -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - - return 0; - -} - -EOF -if { (eval echo configure:15124: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ol_cv_pthread_create_works=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ol_cv_pthread_create_works" 1>&6 - - if test $ol_cv_pthread_create_works = no ; then - { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; } - fi - - if test $ol_with_yielding_select = auto ; then - echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6 -echo "configure:15146: 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 - - if test "$cross_compiling" = yes; then - ol_cv_pthread_select_yields=cross -else - cat > conftest.$ac_ext < -#include -#include -#include -#ifndef NULL -#define NULL (void*) 0 -#endif - -static int fildes[2]; - -static void *task(p) - void *p; -{ - int i; - struct timeval tv; - - fd_set rfds; - - tv.tv_sec=10; - tv.tv_usec=0; - - FD_ZERO(&rfds); - FD_SET(fildes[0], &rfds); - - /* we're not interested in any fds */ - i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv); - - if(i < 0) { - perror("select"); - exit(10); - } - - exit(0); /* if we exit here, the select blocked the whole process */ -} - -int main(argc, argv) - int argc; - char **argv; -{ - pthread_t t; - - /* create a pipe to select */ - if(pipe(&fildes[0])) { - perror("select"); - exit(1); - } - -#ifdef HAVE_PTHREAD_SETCONCURRENCY - (void) pthread_setconcurrency(2); -#else -#ifdef HAVE_THR_SETCONCURRENCY - /* Set Solaris LWP concurrency to 2 */ - thr_setconcurrency(2); -#endif -#endif - -#if HAVE_PTHREADS < 6 - pthread_create(&t, pthread_attr_default, task, NULL); -#else - pthread_create(&t, NULL, task, NULL); -#endif - - /* make sure task runs first */ -#if HAVE_THR_YIELD - thr_yield(); -#elif defined( HAVE_SCHED_YIELD ) - sched_yield(); -#elif defined( HAVE_PTHREAD_YIELD ) - pthread_yield(); -#endif - - exit(2); -} -EOF -if { (eval echo configure:15232: \"$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 +if { (eval echo configure:16341: \"$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 -fr conftest* - ol_cv_pthread_select_yields=yes + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi -rm -fr conftest* +rm -f conftest* fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done -echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 + + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:16367: 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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_linux_threads=yes +else + rm -rf conftest* + ol_cv_header_linux_threads=no +fi +rm -f conftest* - if test $ol_cv_pthread_select_yields = cross ; then - { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; } - fi + +fi - if test $ol_cv_pthread_select_yields = yes ; then - ol_with_yielding_select=yes - fi - fi +echo "$ac_t""$ol_cv_header_linux_threads" 1>&6 + if test $ol_cv_header_linux_threads = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF - CPPFLAGS="$save_CPPFLAGS" - LIBS="$save_LIBS" - else - { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; } - fi fi - if test $ol_with_threads = posix ; then - { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } - fi + + for ac_hdr in mach/cthreads.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16402: 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:16412: \"$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_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = mach ; then + for ac_hdr in lwp/lwp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:16442: 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:16452: \"$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 - for ac_hdr in mach/cthreads.h cthreads.h + for ac_hdr in thread.h synch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15276: checking for $ac_hdr" >&5 +echo "configure:16482: 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:15286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16492: \"$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* @@ -15302,30 +16508,154 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then cat >> confdefs.h <&6 + +else + echo "$ac_t""no" 1>&6 +fi +done + +fi + +if test $ol_link_threads != no -a $ol_link_threads != nt ; then + cat >> confdefs.h <<\EOF +#define REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF +#define THREAD_SAFE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 +EOF + + cat >> confdefs.h <<\EOF +#define THREADSAFE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _THREADSAFE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _SGI_MP_SOURCE 1 +EOF + + + echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 +echo "configure:16551: 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:16564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_errno_thread_specific=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_errno_thread_specific=no +fi +rm -f conftest* + +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:16580: 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:16593: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_h_errno_thread_specific=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6 + + if test $ol_cv_errno_thread_specific != yes \ + -o $ol_cv_h_errno_thread_specific != yes ; then + LIBS="$LTHREAD_LIBS $LIBS" + LTHREAD_LIBS="" + fi + +fi + +if test $ol_link_threads = no ; then + if test $ol_with_threads = yes ; then + { echo "configure: error: no suitable thread support" 1>&2; exit 1; } + fi + + if test $ol_with_threads = auto ; then + echo "configure: warning: no suitable thread support, disabling threads" 1>&2 + ol_with_threads=no + fi + + cat >> confdefs.h <<\EOF +#define NO_THREADS 1 +EOF + + LTHREAD_LIBS="" +fi + +if test $ol_link_threads != no ; then + cat >> confdefs.h <<\EOF +#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 +EOF + fi -done - if test $ac_cv_header_mach_cthreads_h = yes ; then - ol_with_threads=found +for ac_func in \ + ctime_r \ + gethostbyname_r gethostbyaddr_r \ - echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:15316: checking for cthread_fork" >&5 -if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16646: 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 cthread_fork(); +char $ac_func(); char (*f)(); int main() { @@ -15333,276 +16663,313 @@ 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_cthread_fork) || defined (__stub___cthread_fork) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = cthread_fork; +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:15345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16675: \"$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" + 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_cthread_fork=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done - if test $ol_link_threads = no ; then - echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 -echo "configure:15367: checking for cthread_fork with -all_load" >&5 -if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then +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:16704: 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 - - save_LIBS="$LIBS" - LIBS="-all_load $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { - - cthread_fork((void *)0, (void *)0); - +time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } EOF -if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_cthread_all_load=yes + ol_cv_func_ctime_r_nargs3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_cthread_all_load=no + ol_cv_func_ctime_r_nargs3=no fi rm -f conftest* - LIBS="$save_LIBS" - -fi - -echo "$ac_t""$ol_cv_cthread_all_load" 1>&6 - if test $ol_cv_cthread_all_load = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -all_load" - ol_link_threads=mach - ol_with_threads=found - fi - fi - - elif test $ac_cv_header_cthreads_h = yes ; then - - ol_with_threads=found - - save_LIBS="$LIBS" - LIBS="$LIBS -lthreads" - echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:15414: 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 < 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 cthread_fork(); -char (*f)(); - +#include 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_cthread_fork) || defined (__stub___cthread_fork) -choke me -#else -f = cthread_fork; -#endif - +time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } EOF -if { (eval echo configure:15443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_cthread_fork=yes" + ol_cv_func_ctime_r_nargs2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_cthread_fork=no" + ol_cv_func_ctime_r_nargs2=no fi rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_link_threads=yes -else - echo "$ac_t""no" 1>&6 -fi + if test $ol_cv_func_ctime_r_nargs3 = yes -a \ + $ol_cv_func_ctime_r_nargs2 = no ; then - LIBS="$save_LIBS" + ol_cv_func_ctime_r_nargs=3 - if test $ol_link_threads = yes ; then - LTHREAD_LIBS="-lthreads" - ol_link_threads=mach - ol_with_threads=found - else - { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; } - fi + elif test $ol_cv_func_ctime_r_nargs3 = no -a \ + $ol_cv_func_ctime_r_nargs2 = yes ; then - elif test $ol_with_threads = mach ; then - { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; } + ol_cv_func_ctime_r_nargs=2 + + else + ol_cv_func_ctime_r_nargs=0 fi + +fi - if test $ol_link_threads = mach ; then - cat >> confdefs.h <<\EOF -#define HAVE_MACH_CTHREADS 1 +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 <&2; exit 1; } - fi -fi + fi -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = pth ; then +fi - for ac_hdr in pth.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15493: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +if test "$ac_cv_func_gethostbyname_r" = yes ; then + echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6 +echo "configure:16775: 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 +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) +int main() { +struct hostent hent; char buffer[BUFSIZE]; + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyname_r("segovia.cs.purdue.edu", &hent, + buffer, bufsize, &h_errno); +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15503: \"$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:16794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ol_cv_func_gethostbyname_r_nargs5=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" + ol_cv_func_gethostbyname_r_nargs5=no +fi +rm -f conftest* + + cat > conftest.$ac_ext < +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) +int main() { +struct hostent hent;struct hostent *rhent; + char buffer[BUFSIZE]; + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyname_r("localhost", &hent, buffer, bufsize, + &rhent, &h_errno); +; return 0; } +EOF +if { (eval echo configure:16821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + 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_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 -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 + if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then + cat >> confdefs.h <&6 +echo "configure:16862: 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 +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) +int main() { +struct hostent hent; char buffer[BUFSIZE]; + struct in_addr add; + size_t alen=sizeof(struct in_addr); + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyaddr_r( (void *)&(add.s_addr), + alen, AF_INET, &hent, buffer, bufsize, &h_errno); +; return 0; } EOF - +if { (eval echo configure:16883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_func_gethostbyaddr_r_nargs7=yes else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_func_gethostbyaddr_r_nargs7=no fi -done - +rm -f conftest* - if test $ac_cv_header_pth_h = yes ; then - echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6 -echo "configure:15532: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lpth $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { -pth_version() +struct hostent hent; + struct hostent *rhent; char buffer[BUFSIZE]; + struct in_addr add; + size_t alen=sizeof(struct in_addr); + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyaddr_r( (void *)&(add.s_addr), + alen, AF_INET, &hent, buffer, bufsize, + &rhent, &h_errno); ; return 0; } EOF -if { (eval echo configure:15551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_func_gethostbyaddr_r_nargs8=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_func_gethostbyaddr_r_nargs8=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_pth=yes -else - echo "$ac_t""no" 1>&6 -have_pth=no -fi + 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 - if test $have_pth = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_GNU_PTH 1 -EOF + elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \ + $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -lpth" - ol_link_threads=pth - ol_with_threads=found + ol_cv_func_gethostbyaddr_r_nargs=8 - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - fi + else + ol_cv_func_gethostbyaddr_r_nargs=0 fi + fi -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = lwp ; then +echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6 + if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then + cat >> confdefs.h <&6 -echo "configure:15596: checking for $ac_hdr" >&5 +echo "configure:16963: 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:15606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16973: \"$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* @@ -15628,1019 +16995,1358 @@ else fi 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:15634: 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 +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:17001: 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 - ac_save_LIBS="$LIBS" -LIBS="-lthread $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#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 echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__db_version_1" >/dev/null 2>&1; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_header_db1=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_header_db1=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_thr=yes -else - echo "$ac_t""no" 1>&6 -have_thr=no -fi - - - if test $have_thr = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_THR 1 -EOF - - LTHREAD_LIBS="$LTHREAD_LIBS -lthread" - ol_link_threads=thr - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi +echo "$ac_t""$ol_cv_header_db1" 1>&6 - for ac_func in \ - thr_setconcurrency \ - thr_getconcurrency \ - -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15693: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + 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:17044: 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 < -/* 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)(); + + ol_DB_LIB= + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" -int main() { + cat > conftest.$ac_ext < #else -f = $ac_func; +# include #endif -; return 0; } -EOF -if { (eval echo configure:15722: \"$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 +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif -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 +#ifndef NULL +#define NULL ((void*)0) +#endif - fi - fi +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif - for ac_hdr in lwp/lwp.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15753: 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 < +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15763: \"$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:17101: \"$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" + ol_cv_db_none=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" + ol_cv_db_none=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 + +echo "$ac_t""$ol_cv_db_none" 1>&6 + + if test $ol_cv_db_none = yes ; then + ol_cv_lib_db=yes + fi fi -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:15791: 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 +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6 +echo "configure:17125: checking for Berkeley DB link (-ldb43)" >&5 +if eval "test \"\${ol_cv_db_db43+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-llwp $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() { -lwp_create() + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:15810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17182: \"$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_db43=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_db43=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 - have_lwp=yes -else - echo "$ac_t""no" 1>&6 -have_lwp=no + +echo "$ac_t""$ol_cv_db_db43" 1>&6 + + if test $ol_cv_db_db43 = yes ; then + ol_cv_lib_db=-ldb43 + fi fi +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6 +echo "configure:17206: checking for Berkeley DB link (-ldb-43)" >&5 +if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb-43 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - if test $have_lwp = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_LWP 1 -EOF + cat > conftest.$ac_ext < +#else +# include +#endif - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=no - fi - fi - fi -fi +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif -if test $ol_with_yielding_select = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_YIELDING_SELECT 1 -EOF +#ifndef NULL +#define NULL ((void*)0) +#endif -fi +int main() { -if test $ol_with_threads = manual ; then - ol_link_threads=yes +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; - echo "configure: warning: thread defines and link options must be set manually" 1>&2 + version = db_version( &major, &minor, &patch ); - for ac_hdr in pthread.h sched.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15863: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15873: \"$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:17263: \"$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" + ol_cv_db_db_43=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" + ol_cv_db_db_43=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 + +echo "$ac_t""$ol_cv_db_db_43" 1>&6 + + if test $ol_cv_db_db_43 = yes ; then + ol_cv_lib_db=-ldb-43 + fi fi -done - for ac_func in sched_yield pthread_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15902: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6 +echo "configure:17287: checking for Berkeley DB link (-ldb-4.3)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_3+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 $ac_func(); -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_$ac_func) || defined (__stub___$ac_func) -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" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else -f = $ac_func; + (void) dbopen( NULL, 0, 0, 0, NULL); #endif ; return 0; } EOF -if { (eval echo configure:15931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17344: \"$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" + ol_cv_db_db_4_dot_3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + ol_cv_db_db_4_dot_3=no fi rm -f conftest* + + LIBS="$ol_LIBS" + fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 +echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6 + + if test $ol_cv_db_db_4_dot_3 = yes ; then + ol_cv_lib_db=-ldb-4.3 + fi fi -done - - echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:15957: checking for LinuxThreads pthread.h" >&5 -if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6 +echo "configure:17368: checking for Berkeley DB link (-ldb-4-3)" >&5 +if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_header_linux_threads=yes -else - rm -rf conftest* - ol_cv_header_linux_threads=no -fi -rm -f conftest* - -fi +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif -echo "$ac_t""$ol_cv_header_linux_threads" 1>&6 - if test $ol_cv_header_linux_threads = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LINUX_THREADS 1 -EOF +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif - fi +#ifndef NULL +#define NULL ((void*)0) +#endif +int main() { - for ac_hdr in mach/cthreads.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15992: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16002: \"$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:17425: \"$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" + ol_cv_db_db_4_3=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" + ol_cv_db_db_4_3=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 + +echo "$ac_t""$ol_cv_db_db_4_3" 1>&6 + + if test $ol_cv_db_db_4_3 = yes ; then + ol_cv_lib_db=-ldb-4-3 + fi fi -done - for ac_hdr in lwp/lwp.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:16032: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6 +echo "configure:17449: checking for Berkeley DB link (-ldb42)" >&5 +if eval "test \"\${ol_cv_db_db42+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < + +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16042: \"$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:17506: \"$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" + ol_cv_db_db42=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" + ol_cv_db_db42=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 + +echo "$ac_t""$ol_cv_db_db42" 1>&6 + + if test $ol_cv_db_db42 = yes ; then + ol_cv_lib_db=-ldb42 + fi fi -done - for ac_hdr in thread.h synch.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:16072: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6 +echo "configure:17530: checking for Berkeley DB link (-ldb-42)" >&5 +if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < + +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif + +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16082: \"$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:17587: \"$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" + ol_cv_db_db_42=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" + ol_cv_db_db_42=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 +echo "$ac_t""$ol_cv_db_db_42" 1>&6 + + if test $ol_cv_db_db_42 = yes ; then + ol_cv_lib_db=-ldb-42 + fi fi -if test $ol_link_threads != no -a $ol_link_threads != nt ; then - cat >> confdefs.h <<\EOF -#define REENTRANT 1 -EOF +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6 +echo "configure:17611: checking for Berkeley DB link (-ldb-4.2)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb-4.2 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF + cat > conftest.$ac_ext <> confdefs.h <<\EOF -#define THREAD_SAFE 1 -EOF +#ifdef HAVE_DB_185_H +# include +#else +# include +#endif - cat >> confdefs.h <<\EOF -#define _THREAD_SAFE 1 -EOF +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif - cat >> confdefs.h <<\EOF -#define THREADSAFE 1 -EOF +#ifndef NULL +#define NULL ((void*)0) +#endif - cat >> confdefs.h <<\EOF -#define _THREADSAFE 1 -EOF +int main() { - cat >> confdefs.h <<\EOF -#define _SGI_MP_SOURCE 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" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif - echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 -echo "configure:16141: 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:16154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_errno_thread_specific=yes + ol_cv_db_db_4_dot_2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_errno_thread_specific=no + ol_cv_db_db_4_dot_2=no fi rm -f conftest* - + + LIBS="$ol_LIBS" + fi -echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6 - echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6 -echo "configure:16170: checking for thread specific h_errno" >&5 -if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then + if test $ol_cv_db_db_4_dot_2 = yes ; then + ol_cv_lib_db=-ldb-4.2 + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6 +echo "configure:17692: checking for Berkeley DB link (-ldb-4-2)" >&5 +if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < + +#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() { -h_errno = 0; + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:16183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17749: \"$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 + ol_cv_db_db_4_2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_h_errno_thread_specific=no + ol_cv_db_db_4_2=no fi rm -f conftest* - -fi -echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6 + LIBS="$ol_LIBS" - if test $ol_cv_errno_thread_specific != yes \ - -o $ol_cv_h_errno_thread_specific != yes ; then - LIBS="$LTHREAD_LIBS $LIBS" - LTHREAD_LIBS="" - fi +fi -fi +echo "$ac_t""$ol_cv_db_db_4_2" 1>&6 -if test $ol_link_threads = no ; then - if test $ol_with_threads = yes ; then - { echo "configure: error: no suitable thread support" 1>&2; exit 1; } + if test $ol_cv_db_db_4_2 = yes ; then + ol_cv_lib_db=-ldb-4-2 fi +fi - if test $ol_with_threads = auto ; then - echo "configure: warning: no suitable thread support, disabling threads" 1>&2 - ol_with_threads=no - fi +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6 +echo "configure:17773: checking for Berkeley DB link (-ldb-4)" >&5 +if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb-4 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - cat >> confdefs.h <<\EOF -#define NO_THREADS 1 -EOF + cat > conftest.$ac_ext < +#else +# include +#endif -if test $ol_link_threads != no ; then - cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 -EOF +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif -fi +#ifndef NULL +#define NULL ((void*)0) +#endif -for ac_func in \ - ctime_r \ - gethostbyname_r gethostbyaddr_r \ +int main() { -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16236: checking for $ac_func" >&5 -if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -char (*f)(); +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; -int main() { + version = db_version( &major, &minor, &patch ); -/* 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 + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); #else -f = $ac_func; + (void) dbopen( NULL, 0, 0, 0, NULL); #endif ; return 0; } EOF -if { (eval echo configure:16265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17830: \"$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" + ol_cv_db_db_4=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + ol_cv_db_db_4=no fi rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 + LIBS="$ol_LIBS" + fi -done +echo "$ac_t""$ol_cv_db_db_4" 1>&6 -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:16294: checking number of arguments of ctime_r" >&5 -if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then + if test $ol_cv_db_db_4 = yes ; then + ol_cv_lib_db=-ldb-4 + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6 +echo "configure:17854: checking for Berkeley DB link (-ldb4)" >&5 +if eval "test \"\${ol_cv_db_db4+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < -int main() { -time_t ti; char *buffer; ctime_r(&ti,buffer,32); -; return 0; } -EOF -if { (eval echo configure:16306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_ctime_r_nargs3=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_func_ctime_r_nargs3=no -fi -rm -f conftest* + + ol_DB_LIB=-ldb4 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext < + +#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() { -time_t ti; char *buffer; ctime_r(&ti,buffer); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:16325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_ctime_r_nargs2=yes + ol_cv_db_db4=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_ctime_r_nargs2=no + ol_cv_db_db4=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 + LIBS="$ol_LIBS" - elif test $ol_cv_func_ctime_r_nargs3 = no -a \ - $ol_cv_func_ctime_r_nargs2 = yes ; then +fi - ol_cv_func_ctime_r_nargs=2 +echo "$ac_t""$ol_cv_db_db4" 1>&6 - else - ol_cv_func_ctime_r_nargs=0 + if test $ol_cv_db_db4 = yes ; then + ol_cv_lib_db=-ldb4 fi - fi -echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6 +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6 +echo "configure:17935: 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 + + ol_DB_LIB=-ldb + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - if test $ol_cv_func_ctime_r_nargs -gt 1 ; then - cat >> confdefs.h < conftest.$ac_ext < +#else +# include +#endif -fi +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif -if test "$ac_cv_func_gethostbyname_r" = yes ; then - echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6 -echo "configure:16365: 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 -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) int main() { -struct hostent hent; char buffer[BUFSIZE]; - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyname_r("segovia.cs.purdue.edu", &hent, - buffer, bufsize, &h_errno); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:16384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs5=yes + ol_cv_db_db=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs5=no + ol_cv_db_db=no fi rm -f conftest* + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db" 1>&6 + + if test $ol_cv_db_db = yes ; then + ol_cv_lib_db=-ldb + fi +fi + +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6 +echo "configure:18016: checking for Berkeley DB link (-ldb41)" >&5 +if eval "test \"\${ol_cv_db_db41+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb41 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" + cat > conftest.$ac_ext < -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) + +#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() { -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); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:16411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs6=yes + ol_cv_db_db41=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs6=no + ol_cv_db_db41=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 + LIBS="$ol_LIBS" - elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \ - $ol_cv_func_gethostbyname_r_nargs6 = yes ; then +fi - ol_cv_func_gethostbyname_r_nargs=6 +echo "$ac_t""$ol_cv_db_db41" 1>&6 - else - ol_cv_func_gethostbyname_r_nargs=0 + if test $ol_cv_db_db41 = yes ; then + ol_cv_lib_db=-ldb41 fi - fi -echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6 - if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then - cat >> confdefs.h <&6 -echo "configure:16452: checking number of arguments of gethostbyaddr_r" >&5 -if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6 +echo "configure:18097: checking for Berkeley DB link (-ldb-41)" >&5 +if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) -int main() { -struct hostent hent; char buffer[BUFSIZE]; - struct in_addr add; - size_t alen=sizeof(struct in_addr); - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyaddr_r( (void *)&(add.s_addr), - alen, AF_INET, &hent, buffer, bufsize, &h_errno); -; return 0; } -EOF -if { (eval echo configure:16473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs7=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs7=no -fi -rm -f conftest* + + ol_DB_LIB=-ldb-41 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext < -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) + +#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() { -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); + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + ; return 0; } EOF -if { (eval echo configure:16503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs8=yes + ol_cv_db_db_41=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs8=no + ol_cv_db_db_41=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 + LIBS="$ol_LIBS" - elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \ - $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then +fi - ol_cv_func_gethostbyaddr_r_nargs=8 +echo "$ac_t""$ol_cv_db_db_41" 1>&6 - else - ol_cv_func_gethostbyaddr_r_nargs=0 + if test $ol_cv_db_db_41 = yes ; then + ol_cv_lib_db=-ldb-41 fi - fi -echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6 - if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then - cat >> confdefs.h <&6 +echo "configure:18178: checking for Berkeley DB link (-ldb-4.1)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_DB_LIB=-ldb-4.1 + ol_LIBS=$LIBS + LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" - fi + cat > conftest.$ac_ext < +#else +# include +#endif -ol_link_ldbm=no +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif -if test $ol_with_ldbm_api = auto \ - -o $ol_with_ldbm_api = berkeley \ - -o $ol_with_ldbm_api = bcompat ; then +#ifndef NULL +#define NULL ((void*)0) +#endif - if test $ol_with_ldbm_api = bcompat; then \ - 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:16553: 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 < +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16563: \"$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:18235: \"$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" + ol_cv_db_db_4_dot_1=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" + ol_cv_db_db_4_dot_1=no fi rm -f conftest* + + LIBS="$ol_LIBS" + 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 + +echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6 + + if test $ol_cv_db_db_4_dot_1 = yes ; then + ol_cv_lib_db=-ldb-4.1 + fi fi -done -if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then - echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6 -echo "configure:16591: checking if Berkeley DB header compatibility" >&5 -if eval "test \"\${ol_cv_header_db1+set}\" = set"; then +if test $ol_cv_lib_db = no ; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6 +echo "configure:18259: checking for Berkeley DB link (-ldb-4-1)" >&5 +if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < +#ifdef HAVE_DB_185_H +# include #else -# include +# include #endif - /* this check could be improved */ #ifndef DB_VERSION_MAJOR -# define DB_VERSION_MAJOR 1 +# define DB_VERSION_MAJOR 1 #endif -#if DB_VERSION_MAJOR == 1 - __db_version_1 +#ifndef NULL +#define NULL ((void*)0) +#endif + +int main() { + +#if DB_VERSION_MAJOR > 1 + { + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || + minor < DB_VERSION_MINOR ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } + } +#endif + +#if DB_VERSION_MAJOR > 2 + db_env_create( NULL, 0 ); +#elif DB_VERSION_MAJOR > 1 + db_appexit( NULL ); +#else + (void) dbopen( NULL, 0, 0, 0, NULL); #endif +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__db_version_1" >/dev/null 2>&1; then +if { (eval echo configure:18316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_header_db1=yes + ol_cv_db_db_4_1=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_header_db1=no + ol_cv_db_db_4_1=no fi rm -f conftest* + LIBS="$ol_LIBS" + fi -echo "$ac_t""$ol_cv_header_db1" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_1" 1>&6 + + if test $ol_cv_db_db_4_1 = yes ; then + ol_cv_lib_db=-ldb-4-1 + fi +fi - 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:16634: checking for Berkeley DB link (default)" >&5 -if eval "test \"\${ol_cv_db_none+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6 +echo "configure:18340: checking for Berkeley DB link (-ldb3)" >&5 +if eval "test \"\${ol_cv_db_db3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB= + ol_DB_LIB=-ldb3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_none=yes + ol_cv_db_db3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_none=no + ol_cv_db_db3=no fi rm -f conftest* @@ -16702,26 +18408,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_none" 1>&6 +echo "$ac_t""$ol_cv_db_db3" 1>&6 - if test $ol_cv_db_none = yes ; then - ol_cv_lib_db=yes + 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 (-ldb41)""... $ac_c" 1>&6 -echo "configure:16715: checking for Berkeley DB link (-ldb41)" >&5 -if eval "test \"\${ol_cv_db_db41+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6 +echo "configure:18421: checking for Berkeley DB link (-ldb-3)" >&5 +if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb41 + ol_DB_LIB=-ldb-3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db41=yes + ol_cv_db_db_3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db41=no + ol_cv_db_db_3=no fi rm -f conftest* @@ -16783,26 +18489,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db41" 1>&6 +echo "$ac_t""$ol_cv_db_db_3" 1>&6 - if test $ol_cv_db_db41 = yes ; then - ol_cv_lib_db=-ldb41 + if test $ol_cv_db_db_3 = yes ; then + ol_cv_lib_db=-ldb-3 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6 -echo "configure:16796: checking for Berkeley DB link (-ldb-41)" >&5 -if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6 +echo "configure:18502: checking for Berkeley DB link (-ldb2)" >&5 +if eval "test \"\${ol_cv_db_db2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-41 + ol_DB_LIB=-ldb2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_41=yes + ol_cv_db_db2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_41=no + ol_cv_db_db2=no fi rm -f conftest* @@ -16864,26 +18570,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_41" 1>&6 +echo "$ac_t""$ol_cv_db_db2" 1>&6 - if test $ol_cv_db_db_41 = yes ; then - ol_cv_lib_db=-ldb-41 + 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 (-ldb-4.1)""... $ac_c" 1>&6 -echo "configure:16877: checking for Berkeley DB link (-ldb-4.1)" >&5 -if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6 +echo "configure:18583: checking for Berkeley DB link (-ldb-2)" >&5 +if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-4.1 + ol_DB_LIB=-ldb-2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4_dot_1=yes + ol_cv_db_db_2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4_dot_1=no + ol_cv_db_db_2=no fi rm -f conftest* @@ -16945,26 +18651,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6 +echo "$ac_t""$ol_cv_db_db_2" 1>&6 - if test $ol_cv_db_db_4_dot_1 = yes ; then - ol_cv_lib_db=-ldb-4.1 + if test $ol_cv_db_db_2 = yes ; then + ol_cv_lib_db=-ldb-2 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6 -echo "configure:16958: checking for Berkeley DB link (-ldb-4-1)" >&5 -if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6 +echo "configure:18664: 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=-ldb-4-1 + ol_DB_LIB=-ldb1 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4_1=yes + ol_cv_db_db1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4_1=no + ol_cv_db_db1=no fi rm -f conftest* @@ -17026,26 +18732,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4_1" 1>&6 +echo "$ac_t""$ol_cv_db_db1" 1>&6 - if test $ol_cv_db_db_4_1 = yes ; then - ol_cv_lib_db=-ldb-4-1 + if test $ol_cv_db_db1 = yes ; then + ol_cv_lib_db=-ldb1 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6 -echo "configure:17039: checking for Berkeley DB link (-ldb-4)" >&5 -if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6 +echo "configure:18745: checking for Berkeley DB link (-ldb-1)" >&5 +if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-4 + ol_DB_LIB=-ldb-1 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4=yes + ol_cv_db_db_1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4=no + ol_cv_db_db_1=no fi rm -f conftest* @@ -17107,26 +18813,77 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4" 1>&6 +echo "$ac_t""$ol_cv_db_db_1" 1>&6 - if test $ol_cv_db_db_4 = yes ; then - ol_cv_lib_db=-ldb-4 + if test $ol_cv_db_db_1 = yes ; then + ol_cv_lib_db=-ldb-1 + fi +fi + + + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + fi fi fi + else + ol_cv_berkeley_db=no +for ac_hdr in db.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:18837: 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:18847: \"$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_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 (-ldb4)""... $ac_c" 1>&6 -echo "configure:17120: checking for Berkeley DB link (-ldb4)" >&5 -if eval "test \"\${ol_cv_db_db4+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6 +echo "configure:18877: 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=-ldb4 + ol_DB_LIB= ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db4=yes + ol_cv_db_none=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db4=no + ol_cv_db_none=no fi rm -f conftest* @@ -17188,26 +18945,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db4" 1>&6 +echo "$ac_t""$ol_cv_db_none" 1>&6 - if test $ol_cv_db_db4 = yes ; then - ol_cv_lib_db=-ldb4 + 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:17201: checking for Berkeley DB link (-ldb)" >&5 -if eval "test \"\${ol_cv_db_db+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6 +echo "configure:18958: checking for Berkeley DB link (-ldb43)" >&5 +if eval "test \"\${ol_cv_db_db43+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb + ol_DB_LIB=-ldb43 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db=yes + ol_cv_db_db43=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db=no + ol_cv_db_db43=no fi rm -f conftest* @@ -17269,26 +19026,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db" 1>&6 +echo "$ac_t""$ol_cv_db_db43" 1>&6 - if test $ol_cv_db_db = yes ; then - ol_cv_lib_db=-ldb + if test $ol_cv_db_db43 = yes ; then + ol_cv_lib_db=-ldb43 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:17282: checking for Berkeley DB link (-ldb3)" >&5 -if eval "test \"\${ol_cv_db_db3+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6 +echo "configure:19039: checking for Berkeley DB link (-ldb-43)" >&5 +if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb3 + ol_DB_LIB=-ldb-43 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db3=yes + ol_cv_db_db_43=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db3=no + ol_cv_db_db_43=no fi rm -f conftest* @@ -17350,26 +19107,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db3" 1>&6 +echo "$ac_t""$ol_cv_db_db_43" 1>&6 - if test $ol_cv_db_db3 = yes ; then - ol_cv_lib_db=-ldb3 + if test $ol_cv_db_db_43 = yes ; then + ol_cv_lib_db=-ldb-43 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6 -echo "configure:17363: checking for Berkeley DB link (-ldb-3)" >&5 -if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6 +echo "configure:19120: checking for Berkeley DB link (-ldb-4.3)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-3 + ol_DB_LIB=-ldb-4.3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_3=yes + ol_cv_db_db_4_dot_3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_3=no + ol_cv_db_db_4_dot_3=no fi rm -f conftest* @@ -17431,26 +19188,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_3" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6 - if test $ol_cv_db_db_3 = yes ; then - ol_cv_lib_db=-ldb-3 + if test $ol_cv_db_db_4_dot_3 = yes ; then + ol_cv_lib_db=-ldb-4.3 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:17444: checking for Berkeley DB link (-ldb2)" >&5 -if eval "test \"\${ol_cv_db_db2+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6 +echo "configure:19201: checking for Berkeley DB link (-ldb-4-3)" >&5 +if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb2 + ol_DB_LIB=-ldb-4-3 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db2=yes + ol_cv_db_db_4_3=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db2=no + ol_cv_db_db_4_3=no fi rm -f conftest* @@ -17512,26 +19269,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db2" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_3" 1>&6 - if test $ol_cv_db_db2 = yes ; then - ol_cv_lib_db=-ldb2 + if test $ol_cv_db_db_4_3 = yes ; then + ol_cv_lib_db=-ldb-4-3 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6 -echo "configure:17525: checking for Berkeley DB link (-ldb-2)" >&5 -if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6 +echo "configure:19282: checking for Berkeley DB link (-ldb42)" >&5 +if eval "test \"\${ol_cv_db_db42+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-2 + ol_DB_LIB=-ldb42 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_2=yes + ol_cv_db_db42=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_2=no + ol_cv_db_db42=no fi rm -f conftest* @@ -17593,26 +19350,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_2" 1>&6 +echo "$ac_t""$ol_cv_db_db42" 1>&6 - if test $ol_cv_db_db_2 = yes ; then - ol_cv_lib_db=-ldb-2 + if test $ol_cv_db_db42 = yes ; then + ol_cv_lib_db=-ldb42 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:17606: checking for Berkeley DB link (-ldb1)" >&5 -if eval "test \"\${ol_cv_db_db1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6 +echo "configure:19363: checking for Berkeley DB link (-ldb-42)" >&5 +if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb1 + ol_DB_LIB=-ldb-42 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db1=yes + ol_cv_db_db_42=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db1=no + ol_cv_db_db_42=no fi rm -f conftest* @@ -17674,26 +19431,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db1" 1>&6 +echo "$ac_t""$ol_cv_db_db_42" 1>&6 - if test $ol_cv_db_db1 = yes ; then - ol_cv_lib_db=-ldb1 + if test $ol_cv_db_db_42 = yes ; then + ol_cv_lib_db=-ldb-42 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6 -echo "configure:17687: checking for Berkeley DB link (-ldb-1)" >&5 -if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6 +echo "configure:19444: checking for Berkeley DB link (-ldb-4.2)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-1 + ol_DB_LIB=-ldb-4.2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_1=yes + ol_cv_db_db_4_dot_2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_1=no + ol_cv_db_db_4_dot_2=no fi rm -f conftest* @@ -17755,77 +19512,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_1" 1>&6 - - if test $ol_cv_db_db_1 = yes ; then - ol_cv_lib_db=-ldb-1 - fi -fi - +echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6 - if test "$ol_cv_lib_db" != no ; then - ol_cv_berkeley_db=yes - fi + if test $ol_cv_db_db_4_dot_2 = yes ; then + ol_cv_lib_db=-ldb-4.2 fi fi - else - ol_cv_berkeley_db=no -for ac_hdr in db.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:17779: 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:17789: \"$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_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:17819: checking for Berkeley DB link (default)" >&5 -if eval "test \"\${ol_cv_db_none+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6 +echo "configure:19525: checking for Berkeley DB link (-ldb-4-2)" >&5 +if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB= + ol_DB_LIB=-ldb-4-2 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_none=yes + ol_cv_db_db_4_2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_none=no + ol_cv_db_db_4_2=no fi rm -f conftest* @@ -17887,26 +19593,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_none" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_2" 1>&6 - if test $ol_cv_db_none = yes ; then - ol_cv_lib_db=yes + if test $ol_cv_db_db_4_2 = yes ; then + ol_cv_lib_db=-ldb-4-2 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6 -echo "configure:17900: checking for Berkeley DB link (-ldb41)" >&5 -if eval "test \"\${ol_cv_db_db41+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6 +echo "configure:19606: checking for Berkeley DB link (-ldb-4)" >&5 +if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb41 + ol_DB_LIB=-ldb-4 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db41=yes + ol_cv_db_db_4=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db41=no + ol_cv_db_db_4=no fi rm -f conftest* @@ -17968,26 +19674,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db41" 1>&6 +echo "$ac_t""$ol_cv_db_db_4" 1>&6 - if test $ol_cv_db_db41 = yes ; then - ol_cv_lib_db=-ldb41 + if test $ol_cv_db_db_4 = yes ; then + ol_cv_lib_db=-ldb-4 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6 -echo "configure:17981: checking for Berkeley DB link (-ldb-41)" >&5 -if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6 +echo "configure:19687: checking for Berkeley DB link (-ldb4)" >&5 +if eval "test \"\${ol_cv_db_db4+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-41 + ol_DB_LIB=-ldb4 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_41=yes + ol_cv_db_db4=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_41=no + ol_cv_db_db4=no fi rm -f conftest* @@ -18049,26 +19755,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_41" 1>&6 +echo "$ac_t""$ol_cv_db_db4" 1>&6 - if test $ol_cv_db_db_41 = yes ; then - ol_cv_lib_db=-ldb-41 + if test $ol_cv_db_db4 = yes ; then + ol_cv_lib_db=-ldb4 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6 -echo "configure:18062: checking for Berkeley DB link (-ldb-4.1)" >&5 -if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6 +echo "configure:19768: 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 - ol_DB_LIB=-ldb-4.1 + ol_DB_LIB=-ldb ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4_dot_1=yes + ol_cv_db_db=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4_dot_1=no + ol_cv_db_db=no fi rm -f conftest* @@ -18130,26 +19836,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6 +echo "$ac_t""$ol_cv_db_db" 1>&6 - if test $ol_cv_db_db_4_dot_1 = yes ; then - ol_cv_lib_db=-ldb-4.1 + if test $ol_cv_db_db = 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 (-ldb-4-1)""... $ac_c" 1>&6 -echo "configure:18143: checking for Berkeley DB link (-ldb-4-1)" >&5 -if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6 +echo "configure:19849: checking for Berkeley DB link (-ldb41)" >&5 +if eval "test \"\${ol_cv_db_db41+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-4-1 + ol_DB_LIB=-ldb41 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4_1=yes + ol_cv_db_db41=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4_1=no + ol_cv_db_db41=no fi rm -f conftest* @@ -18211,26 +19917,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4_1" 1>&6 +echo "$ac_t""$ol_cv_db_db41" 1>&6 - if test $ol_cv_db_db_4_1 = yes ; then - ol_cv_lib_db=-ldb-4-1 + if test $ol_cv_db_db41 = yes ; then + ol_cv_lib_db=-ldb41 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6 -echo "configure:18224: checking for Berkeley DB link (-ldb-4)" >&5 -if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6 +echo "configure:19930: checking for Berkeley DB link (-ldb-41)" >&5 +if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb-4 + ol_DB_LIB=-ldb-41 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db_4=yes + ol_cv_db_db_41=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db_4=no + ol_cv_db_db_41=no fi rm -f conftest* @@ -18292,26 +19998,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db_4" 1>&6 +echo "$ac_t""$ol_cv_db_db_41" 1>&6 - if test $ol_cv_db_db_4 = yes ; then - ol_cv_lib_db=-ldb-4 + if test $ol_cv_db_db_41 = yes ; then + ol_cv_lib_db=-ldb-41 fi fi if test $ol_cv_lib_db = no ; then - echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6 -echo "configure:18305: checking for Berkeley DB link (-ldb4)" >&5 -if eval "test \"\${ol_cv_db_db4+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6 +echo "configure:20011: checking for Berkeley DB link (-ldb-4.1)" >&5 +if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb4 + ol_DB_LIB=-ldb-4.1 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db4=yes + ol_cv_db_db_4_dot_1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db4=no + ol_cv_db_db_4_dot_1=no fi rm -f conftest* @@ -18373,26 +20079,26 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db4" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6 - if test $ol_cv_db_db4 = yes ; then - ol_cv_lib_db=-ldb4 + if test $ol_cv_db_db_4_dot_1 = yes ; then + ol_cv_lib_db=-ldb-4.1 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:18386: checking for Berkeley DB link (-ldb)" >&5 -if eval "test \"\${ol_cv_db_db+set}\" = set"; then + echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6 +echo "configure:20092: checking for Berkeley DB link (-ldb-4-1)" >&5 +if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ol_DB_LIB=-ldb + ol_DB_LIB=-ldb-4-1 ol_LIBS=$LIBS LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_db_db=yes + ol_cv_db_db_4_1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_db_db=no + ol_cv_db_db_4_1=no fi rm -f conftest* @@ -18454,16 +20160,16 @@ rm -f conftest* fi -echo "$ac_t""$ol_cv_db_db" 1>&6 +echo "$ac_t""$ol_cv_db_db_4_1" 1>&6 - if test $ol_cv_db_db = yes ; then - ol_cv_lib_db=-ldb + if test $ol_cv_db_db_4_1 = yes ; then + ol_cv_lib_db=-ldb-4-1 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:18467: checking for Berkeley DB link (-ldb3)" >&5 +echo "configure:20173: 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 @@ -18473,7 +20179,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db3=yes else @@ -18544,7 +20250,7 @@ fi if test $ol_cv_lib_db = no ; then echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6 -echo "configure:18548: checking for Berkeley DB link (-ldb-3)" >&5 +echo "configure:20254: checking for Berkeley DB link (-ldb-3)" >&5 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18554,7 +20260,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db_3=yes else @@ -18625,7 +20331,7 @@ fi if test $ol_cv_lib_db = no ; then echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6 -echo "configure:18629: checking for Berkeley DB link (-ldb2)" >&5 +echo "configure:20335: 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 @@ -18635,7 +20341,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db2=yes else @@ -18706,7 +20412,7 @@ fi if test $ol_cv_lib_db = no ; then echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6 -echo "configure:18710: checking for Berkeley DB link (-ldb-2)" >&5 +echo "configure:20416: checking for Berkeley DB link (-ldb-2)" >&5 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18716,7 +20422,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db_2=yes else @@ -18787,7 +20493,7 @@ fi if test $ol_cv_lib_db = no ; then echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6 -echo "configure:18791: checking for Berkeley DB link (-ldb1)" >&5 +echo "configure:20497: 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 @@ -18797,7 +20503,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db1=yes else @@ -18868,7 +20574,7 @@ fi if test $ol_cv_lib_db = no ; then echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6 -echo "configure:18872: checking for Berkeley DB link (-ldb-1)" >&5 +echo "configure:20578: checking for Berkeley DB link (-ldb-1)" >&5 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18878,7 +20584,7 @@ else LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_db_db_1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_db_db_1=no +fi +rm -f conftest* + + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_db_db_1" 1>&6 + + if test $ol_cv_db_db_1 = yes ; then + ol_cv_lib_db=-ldb-1 + fi +fi + + + if test "$ol_cv_lib_db" != no ; then + ol_cv_berkeley_db=yes + echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6 +echo "configure:20661: checking for Berkeley DB version match" >&5 +if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ol_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + if test $ol_cv_lib_db != yes ; then + LIBS="$ol_cv_lib_db $LIBS" + fi + + if test "$cross_compiling" = yes; then + ol_cv_berkeley_db_version=cross +else + cat > conftest.$ac_ext < +#endif +#ifndef DB_VERSION_MAJOR +# define DB_VERSION_MAJOR 1 +#endif +#ifndef NULL +#define NULL ((void *)0) +#endif +main() +{ +#if DB_VERSION_MAJOR > 1 + char *version; + int major, minor, patch; + + version = db_version( &major, &minor, &patch ); + + if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } +#endif + + return 0; +} EOF -if { (eval echo configure:18929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ol_cv_db_db_1=yes +if { (eval echo configure:20709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 +then + ol_cv_berkeley_db_version=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_db_db_1=no + rm -fr conftest* + ol_cv_berkeley_db_version=no +fi +rm -fr conftest* fi -rm -f conftest* + LIBS="$ol_LIBS" fi -echo "$ac_t""$ol_cv_db_db_1" 1>&6 +echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6 - if test $ol_cv_db_db_1 = yes ; then - ol_cv_lib_db=-ldb-1 + if test $ol_cv_berkeley_db_version = no ; then + { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; } fi -fi - - if test "$ol_cv_lib_db" != no ; then - ol_cv_berkeley_db=yes echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6 -echo "configure:18955: checking for Berkeley DB thread support" >&5 +echo "configure:20733: 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 @@ -18966,7 +20744,7 @@ else ol_cv_berkeley_db_thread=cross 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:20815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then ol_cv_berkeley_db_thread=yes else @@ -19091,17 +20869,18 @@ EOF fi fi -if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then - { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; } -elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then - echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6 -echo "configure:19099: checking Berkeley DB version for BDB backend" >&5 +if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then + if test $ol_link_ldbm != berkeley ; then + { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; } + else + echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6 +echo "configure:20878: checking Berkeley DB version for BDB backend" >&5 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -19114,8 +20893,8 @@ else # define DB_VERSION_MINOR 0 #endif -/* require 4.1 or later */ -#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1) +/* require 4.2 or later */ +#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2) __db_version_compat #endif @@ -19135,17 +20914,11 @@ fi echo "$ac_t""$ol_cv_bdb_compat" 1>&6 - if test $ol_cv_bdb_compat = yes ; then - ol_enable_bdb=yes - elif test $ol_enable_bdb = yes ; then - { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; } - else - ol_enable_bdb=no + if test $ol_cv_bdb_compat != yes ; then + { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; } + fi fi fi -if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then - { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; } -fi if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then echo "configure: warning: Could not find LDBM with BTREE support" 1>&2 @@ -19154,18 +20927,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:19158: checking for MDBM library" >&5 +echo "configure:20931: 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:19164: checking for mdbm_set_chain" >&5 +echo "configure:20937: 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:20966: \"$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 @@ -19208,7 +20981,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 -echo "configure:19212: checking for mdbm_set_chain in -lmdbm" >&5 +echo "configure:20985: 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 @@ -19216,7 +20989,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:21004: \"$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 @@ -19262,17 +21035,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:19266: checking for $ac_hdr" >&5 +echo "configure:21039: 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:19276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21049: \"$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* @@ -19299,7 +21072,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19303: checking for db" >&5 +echo "configure:21076: checking for db" >&5 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19332,18 +21105,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:19336: checking for GDBM library" >&5 +echo "configure:21109: 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:19342: checking for gdbm_open" >&5 +echo "configure:21115: 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:21144: \"$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 @@ -19386,7 +21159,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:19390: checking for gdbm_open in -lgdbm" >&5 +echo "configure:21163: 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 @@ -19394,7 +21167,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:21182: \"$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 @@ -19440,17 +21213,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:19444: checking for $ac_hdr" >&5 +echo "configure:21217: 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:19454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21227: \"$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* @@ -19477,7 +21250,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19481: checking for db" >&5 +echo "configure:21254: checking for db" >&5 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19511,18 +21284,18 @@ fi if test $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:19515: checking for NDBM library" >&5 +echo "configure:21288: 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:19521: checking for dbm_open" >&5 +echo "configure:21294: 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:21323: \"$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 @@ -19565,7 +21338,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:19569: checking for dbm_open in -lndbm" >&5 +echo "configure:21342: 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 @@ -19573,7 +21346,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:21361: \"$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 @@ -19604,7 +21377,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:19608: checking for dbm_open in -ldbm" >&5 +echo "configure:21381: 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 @@ -19612,7 +21385,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:21400: \"$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 @@ -19660,17 +21433,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:19664: checking for $ac_hdr" >&5 +echo "configure:21437: 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:19674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21447: \"$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* @@ -19697,7 +21470,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19701: checking for db" >&5 +echo "configure:21474: checking for db" >&5 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19730,13 +21503,13 @@ EOF fi if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then - echo "configure: warning: could not find suitable LDBM backend" 1>&2 - if test $ol_enable_ldbm = yes ; then - { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; } - fi + { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; } +fi - echo "configure: warning: disabling LDBM" 1>&2 - ol_enable_ldbm=no +if test $ol_enable_bdb = yes -o \ + $ol_enable_hdb = yes -o \ + $ol_enable_ldbm = yes ; then + SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)" fi @@ -19757,17 +21530,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:19761: checking for $ac_hdr" >&5 +echo "configure:21534: 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:19771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21544: \"$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* @@ -19789,11 +21562,11 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then EOF echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6 -echo "configure:19793: checking for TCP wrappers library" >&5 +echo "configure:21566: checking for TCP wrappers library" >&5 save_LIBS="$LIBS" LIBS="$LIBS -lwrap" cat > conftest.$ac_ext < @@ -19808,7 +21581,7 @@ hosts_access(req) ; return 0; } EOF -if { (eval echo configure:19812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""-lwrap" 1>&6 have_wrappers=yes @@ -19820,7 +21593,7 @@ else LIBS="$LIBS -lnsl" cat > conftest.$ac_ext < @@ -19835,7 +21608,7 @@ hosts_access(req) ; return 0; } EOF -if { (eval echo configure:19839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""-lwrap -lnsl" 1>&6 have_wrappers=yes @@ -19866,330 +21639,87 @@ EOF WRAP_LIBS="-lwrap" elif test $ol_enable_wrappers = yes ; then - { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; } + { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; } else echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2 WRAP_LIBS="" fi -fi - -if test $ol_enable_syslog != no ; then - echo $ac_n "checking for openlog""... $ac_c" 1>&6 -echo "configure:19879: 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 < -/* 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 openlog(); -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_openlog) || defined (__stub___openlog) -choke me -#else -f = openlog; -#endif - -; return 0; } -EOF -if { (eval echo configure:19908: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_openlog=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then - { echo "configure: error: could not find syslog" 1>&2; exit 1; } - fi - ol_enable_syslog=$ac_cv_func_openlog -fi - - -ol_link_sql=no -if test $ol_enable_sql != no ; then - for ac_hdr in sql.h sqlext.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19940: 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:19950: \"$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 -{ echo "configure: error: could not locate SQL headers" 1>&2; exit 1; } - -fi -done - - - echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6 -echo "configure:19980: 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 - ac_save_LIBS="$LIBS" -LIBS="-liodbc $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_iodbc=yes -else - echo "$ac_t""no" 1>&6 -have_iodbc=no -fi - - 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:20024: 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="-lodbc $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_odbc=yes -else - echo "$ac_t""no" 1>&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 - for ac_hdr in tcl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20082: 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:20092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - +fi - if test $ac_cv_header_tcl_h != yes ; then - have_tcl=no - else - for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do - echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6 -echo "configure:20124: 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 +if test $ol_enable_syslog != no ; then + echo $ac_n "checking for openlog""... $ac_c" 1>&6 +echo "configure:21652: checking for openlog" >&5 +if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-l$lib $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 openlog(); +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_openlog) || defined (__stub___openlog) +choke me +#else +f = openlog; +#endif + ; return 0; } EOF -if { (eval echo configure:20139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21681: \"$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_openlog=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_openlog=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_'openlog`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_tcl=yes - if test x"$ol_with_tcl_module" = "xstatic" ; then - SLAPD_LIBS="$SLAPD_LIBS -l${lib}" - else - MOD_TCL_LIB="-l${lib}" - fi;break + : else echo "$ac_t""no" 1>&6 -have_tcl=no fi - done - fi - - if test $have_tcl != yes ; then - echo "configure: warning: could not find -ltcl" 1>&2 - if test $ol_enable_tcl = yes ; then - { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; } - fi - - ol_enable_tcl=no + if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then + { echo "configure: error: could not find syslog" 1>&2; exit 1; } fi + ol_enable_syslog=$ac_cv_func_openlog fi -ol_link_termcap=no -for ac_hdr in termcap.h ncurses.h + +ol_link_sql=no +if test $ol_enable_sql != no ; then + for ac_hdr in sql.h sqlext.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20183: checking for $ac_hdr" >&5 +echo "configure:21713: 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:20193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21723: \"$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* @@ -20212,32 +21742,33 @@ EOF else echo "$ac_t""no" 1>&6 +{ echo "configure: error: could not locate SQL headers" 1>&2; exit 1; } + fi done -if test $ol_link_termcap = no ; then - echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:20222: checking for tputs in -ltermcap" >&5 -ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'` + echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6 +echo "configure:21753: 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 ac_save_LIBS="$LIBS" -LIBS="-ltermcap $LIBS" +LIBS="-liodbc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21772: \"$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 @@ -20252,44 +21783,36 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_termcap=yes + have_iodbc=yes else echo "$ac_t""no" 1>&6 -have_termcap=no -fi - - if test $have_termcap = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TERMCAP 1 -EOF - - ol_link_termcap=yes - TERMCAP_LIBS=-ltermcap - fi +have_iodbc=no fi -if test $ol_link_termcap = no ; then - echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:20274: checking for initscr in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'initscr | 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:21797: 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="-lncurses $LIBS" +LIBS="-lodbc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21816: \"$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 @@ -20304,30 +21827,26 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_ncurses=yes + have_odbc=yes else echo "$ac_t""no" 1>&6 -have_ncurses=no +have_odbc=no fi - if test $have_ncurses = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_NCURSES 1 -EOF - - ol_link_termcap=yes - TERMCAP_LIBS=-lncurses + if test $have_odbc = yes ; then + ol_link_sql="-lodbc" + fi fi -fi -if test $ol_link_termcap = no ; then - cat >> confdefs.h <<\EOF -#define NO_TERMCAP 1 -EOF + if test $ol_link_sql != no ; then + SLAPD_SQL_LIBS="$ol_link_sql" - TERMCAP_LIBS= + elif test $ol_enable_sql != auto ; then + { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; } + fi fi +WITH_SASL=no ol_link_sasl=no ol_link_spasswd=no if test $ol_with_cyrus_sasl != no ; then @@ -20335,17 +21854,17 @@ if test $ol_with_cyrus_sasl != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20339: checking for $ac_hdr" >&5 +echo "configure:21858: 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:20349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21868: \"$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* @@ -20374,7 +21893,7 @@ done if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6 -echo "configure:20378: checking for sasl_client_init in -lsasl2" >&5 +echo "configure:21897: checking for sasl_client_init in -lsasl2" >&5 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -20382,7 +21901,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsasl2 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21916: \"$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 @@ -20412,7 +21931,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6 -echo "configure:20416: checking for sasl_client_init in -lsasl" >&5 +echo "configure:21935: 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 @@ -20420,7 +21939,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:21954: \"$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 @@ -20467,13 +21986,13 @@ fi fi else echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6 -echo "configure:20471: checking Cyrus SASL library version" >&5 +echo "configure:21990: checking Cyrus SASL library version" >&5 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #endif -/* require 2.1.3 or later */ +/* Require 2.1.15+ */ #if SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1 char *__sasl_compat = "2.2+ or better okay (we guess)"; #elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR == 1 \ - && SASL_VERSION_STEP >=3 - char *__sasl_compat = "2.1.3+ or better okay"; + && SASL_VERSION_STEP >=15 + char *__sasl_compat = "2.1.15+ or better okay"; #endif EOF @@ -20507,7 +22026,7 @@ echo "$ac_t""$ol_cv_sasl_compat" 1>&6 if test $ol_cv_sasl_compat = no ; then ol_link_sasl=no - { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; } + { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; } fi cat >> confdefs.h <<\EOF @@ -20522,12 +22041,12 @@ EOF ac_save_LIBS="$LIBS" LIBS="$LIBS $ol_link_sasl" echo $ac_n "checking for sasl_version""... $ac_c" 1>&6 -echo "configure:20526: checking for sasl_version" >&5 +echo "configure:22045: checking for sasl_version" >&5 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sasl_version=yes" else @@ -20574,6 +22093,8 @@ else fi LIBS="$ac_save_LIBS" + + WITH_SASL=yes fi else @@ -20610,13 +22131,13 @@ if test $ol_with_fetch != no ; then ol_LIBS=$LIBS LIBS="-lfetch -lcom_err $LIBS" echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6 -echo "configure:20614: checking fetch(3) library" >&5 +echo "configure:22135: 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 < @@ -20626,7 +22147,7 @@ int main() { struct url *u = fetchParseURL("file:///"); ; return 0; } EOF -if { (eval echo configure:20630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_lib_fetch=yes else @@ -20650,7 +22171,7 @@ fi if test $ol_cv_lib_fetch != no ; then - LDIF_LIBS="$LDIF_LIBS $ol_link_fetch" + LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch" ol_link_fetch=freebsd elif test $ol_with_fetch != auto ; then @@ -20663,12 +22184,12 @@ if test $ol_enable_crypt != no ; then LIBS="$TLS_LIBS $LIBS" echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:20667: checking for crypt" >&5 +echo "configure:22188: 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:22217: \"$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 @@ -20712,7 +22233,7 @@ else LIBS="$save_LIBS" echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:20716: checking for crypt in -lcrypt" >&5 +echo "configure:22237: 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 @@ -20720,7 +22241,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:22256: \"$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 @@ -20766,7 +22287,7 @@ EOF else echo "configure: warning: could not find crypt" 1>&2 if test $ol_enable_crypt = yes ; then - { echo "configure: error: could not find crypt" 1>&2; exit 1; } + { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; } fi echo "configure: warning: disabling crypt support" 1>&2 @@ -20776,12 +22297,12 @@ fi if test $ol_enable_proctitle != no ; then echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 -echo "configure:20780: checking for setproctitle" >&5 +echo "configure:22301: 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:22330: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setproctitle=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_setproctitle=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 +echo "configure:22349: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lutil $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_setproctitle=yes + LUTIL_LIBS="$LUTIL_LIBS -lutil" +else + echo "$ac_t""no" 1>&6 +have_setproctitle=no + LIBOBJS="$LIBOBJS setproctitle.o" + LIBSRCS="$LIBSRCS setproctitle.c" +fi + +fi + + + if test $have_setproctitle = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_SETPROCTITLE 1 +EOF + + fi +fi + +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:22408: 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:22418: \"$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_slp_h = yes ; then + echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6 +echo "configure:22447: 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 + ac_save_LIBS="$LIBS" +LIBS="-lslp $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_slp=yes +else + echo "$ac_t""no" 1>&6 +have_slp=no +fi + + if test $have_slp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_SLP 1 +EOF + + SLAPD_SLP_LIBS=-lslp + fi + + elif test $ol_enable_slp = yes ; then + { echo "configure: error: SLP not found" 1>&2; exit 1; } + fi +fi + +if test "$ol_with_multiple_precision" != "no" ; then + ol_have_bignum=no + ol_have_gmp=no + + for ac_hdr in openssl/bn.h bn.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:22508: 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:22518: \"$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_func_setproctitle=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_setproctitle=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_setproctitle=yes + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done - echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:20828: 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 + for ac_hdr in openssl/crypto.h crypto.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:22548: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lutil $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:20847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:22558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_setproctitle=yes - LUTIL_LIBS="$LUTIL_LIBS -lutil" + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -have_setproctitle=no - LIBOBJS="$LIBOBJS setproctitle.o" - LIBSRCS="$LIBSRCS setproctitle.c" -fi - -fi - - - if test $have_setproctitle = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_SETPROCTITLE 1 -EOF - - fi fi +done -if test $ol_enable_slp != no ; then - for ac_hdr in slp.h + for ac_hdr in gmp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20887: checking for $ac_hdr" >&5 +echo "configure:22588: 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:20897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:22598: \"$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* @@ -20920,28 +22621,48 @@ fi done - if test $ac_cv_header_slp_h = yes ; then - echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6 -echo "configure:20926: checking for SLPOpen in -lslp" >&5 -ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'` + if test "$ol_with_tls" = "found" ; then + ol_have_bn_h=no + ol_have_crypto_h=no + + if test "$ac_cv_header_openssl_bn_h" = "yes" \ + -o "$ac_cv_header_bn_h" = "yes" ; then + ol_have_bn_h=yes + fi + + if test "$ac_cv_header_openssl_crypto_h" = "yes" \ + -o "$ac_cv_header_crypto_h" = "yes" ; then + ol_have_crypto_h=yes + fi + + if test "$ol_have_bn_h" = "yes" \ + -a "$ol_have_crypto_h" = "yes" ; then + ol_have_bignum=yes + fi + fi + + if test $ac_cv_header_gmp_h = yes ; then + echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6 +echo "configure:22647: checking for __gmpz_add_ui in -lgmp" >&5 +ac_lib_var=`echo gmp'_'__gmpz_add_ui | 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="-lslp $LIBS" +LIBS="-lgmp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22666: \"$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 @@ -20956,41 +22677,91 @@ 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 + have_gmp=yes else echo "$ac_t""no" 1>&6 -have_slp=no +have_gmp=no fi - if test $have_slp = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_SLP 1 -EOF + if test $have_gmp = yes ; then + ol_have_gmp=yes + fi + fi - SLAPD_SLP_LIBS=-lslp + echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6 +echo "configure:22693: checking for multiple precision support" >&5 + + ol_mp_support="none" + case "$ol_with_multiple_precision" in + auto) + if test "$ol_have_bignum" = "yes" ; then + ol_mp_support="bignum" + else + if test "$ol_have_gmp" = "yes" ; then + ol_mp_support="gmp" + fi + fi + ;; + bignum) + if test "$ol_have_bignum" != "yes" ; then + { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; } + fi + ol_mp_support="bignum" + ;; + gmp) + if test "$ol_have_gmp" != "yes" ; then + { echo "configure: error: GMP not available" 1>&2; exit 1; } + fi + ol_mp_support="gmp" + ;; + yes) + if test "$ol_have_bignum" = "yes" ; then + ol_mp_support="bignum" + elif test "$ol_have_gmp" = "yes" ; then + ol_mp_support="gmp" + else + { echo "configure: error: not available" 1>&2; exit 1; } fi + ;; + esac - elif test $ol_enable_slp = yes ; then - { echo "configure: error: SLP not found" 1>&2; exit 1; } - fi + case "$ol_mp_support" in + bignum) + cat >> confdefs.h <<\EOF +#define HAVE_BIGNUM 1 +EOF + + ;; + gmp) + cat >> confdefs.h <<\EOF +#define HAVE_GMP 1 +EOF + + SLAPD_GMP_LIBS=-lgmp + ;; + none) + ;; + esac + + echo "$ac_t""$ol_mp_support" 1>&6 fi echo $ac_n "checking long long""... $ac_c" 1>&6 -echo "configure:20981: checking long long" >&5 +echo "configure:22752: checking long long" >&5 if eval "test \"\${ol_cv_type_long_long+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:22765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_long_long=yes else @@ -21011,12 +22782,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:21015: checking for ANSI C header files" >&5 +echo "configure:22786: 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 @@ -21024,7 +22795,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:21028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:22799: \"$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* @@ -21041,7 +22812,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 @@ -21059,7 +22830,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 @@ -21080,7 +22851,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #if ((' ' & 0x0FF) == 0x020) @@ -21098,7 +22869,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:21102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:22873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then : else @@ -21122,12 +22893,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:21126: checking for mode_t" >&5 +echo "configure:22897: 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 @@ -21158,12 +22929,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:21162: checking for off_t" >&5 +echo "configure:22933: 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 @@ -21194,12 +22965,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:21198: checking for pid_t" >&5 +echo "configure:22969: 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 @@ -21230,19 +23001,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:21234: checking for ptrdiff_t" >&5 +echo "configure:23005: 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:21246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -21263,12 +23034,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:21267: checking return type of signal handlers" >&5 +echo "configure:23038: 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 @@ -21285,7 +23056,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:21289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -21304,12 +23075,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:21308: checking for size_t" >&5 +echo "configure:23079: 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 < #if STDC_HEADERS @@ -21341,12 +23112,12 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:21345: checking for ssize_t" >&5 +echo "configure:23116: 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 @@ -21377,12 +23148,12 @@ EOF fi echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 -echo "configure:21381: checking for caddr_t" >&5 +echo "configure:23152: 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 @@ -21414,12 +23185,12 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:21418: checking for socklen_t" >&5 +echo "configure:23189: 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:23208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_socklen_t=yes else @@ -21454,12 +23225,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:21458: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:23229: 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 @@ -21467,7 +23238,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:21471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -21489,12 +23260,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:21493: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:23264: 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 @@ -21503,7 +23274,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:21507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -21524,12 +23295,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:21528: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:23299: 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 @@ -21537,7 +23308,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:21541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -21558,12 +23329,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:21562: checking for uid_t in sys/types.h" >&5 +echo "configure:23333: 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 @@ -21592,19 +23363,19 @@ EOF fi echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 -echo "configure:21596: checking for sig_atomic_t" >&5 +echo "configure:23367: 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:21608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_sig_atomic_t=yes else @@ -21628,13 +23399,13 @@ EOF # test for pw_gecos in struct passwd echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 -echo "configure:21632: checking struct passwd for pw_gecos" >&5 +echo "configure:23403: 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() { @@ -21644,7 +23415,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:21648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -21666,13 +23437,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:21670: checking struct passwd for pw_passwd" >&5 +echo "configure:23441: 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() { @@ -21682,7 +23453,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:21686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -21704,7 +23475,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:21708: checking if toupper() requires islower()" >&5 +echo "configure:23479: 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 @@ -21713,7 +23484,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -21725,7 +23496,7 @@ main() exit(1); } EOF -if { (eval echo configure:21729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:23500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then ol_cv_c_upper_lower=no else @@ -21748,12 +23519,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:21752: checking for working const" >&5 +echo "configure:23523: 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:23577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -21823,12 +23594,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:21827: checking if compiler understands volatile" >&5 +echo "configure:23598: 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:23612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -21861,20 +23632,21 @@ EOF if test $cross_compiling = yes ; then + echo "configure: warning: Crossing compiling... all bets are off!" 1>&2 cat >> confdefs.h <<\EOF #define CROSS_COMPILING 1 EOF else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:21871: checking whether byte ordering is bigendian" >&5 +echo "configure:23643: 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 @@ -21885,11 +23657,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:21889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23661: \"$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 @@ -21900,7 +23672,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:21904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -21920,7 +23692,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:23709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then ac_cv_c_bigendian=no else @@ -21959,15 +23731,16 @@ fi fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:21963: checking size of short" >&5 +echo "configure:23735: checking size of short" >&5 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < #include @@ -21975,7 +23748,7 @@ int main() { switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:21979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else @@ -21998,15 +23771,16 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:22002: checking size of int" >&5 +echo "configure:23775: checking size of int" >&5 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < #include @@ -22014,7 +23788,7 @@ int main() { switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:22018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else @@ -22037,15 +23811,16 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:22041: checking size of long" >&5 +echo "configure:23815: checking size of long" >&5 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < #include @@ -22053,7 +23828,7 @@ int main() { switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:22057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else @@ -22075,6 +23850,46 @@ cat >> confdefs.h <&6 +echo "configure:23855: checking size of wchar_t" >&5 +if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat > conftest.$ac_ext < +#include + + +int main() { +switch (0) case 0: case (sizeof (wchar_t) == $ac_size):; +; return 0; } +EOF +if { (eval echo configure:23872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_wchar_t=$ac_size +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + if test x$ac_cv_sizeof_wchar_t != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_wchar_t = x ; then + { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 +cat >> confdefs.h <&2 @@ -22104,7 +23919,7 @@ EOF echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:22108: checking for 8-bit clean memcmp" >&5 +echo "configure:23923: 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 @@ -22112,7 +23927,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:23941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5 then ac_cv_func_memcmp_clean=yes else @@ -22140,12 +23955,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:22144: checking for strftime" >&5 +echo "configure:23959: 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:23988: \"$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 @@ -22191,7 +24006,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:22195: checking for strftime in -lintl" >&5 +echo "configure:24010: 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 @@ -22199,7 +24014,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:24029: \"$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 @@ -22238,12 +24053,12 @@ fi echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 -echo "configure:22242: checking for inet_aton()" >&5 +echo "configure:24057: 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:24084: \"$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 @@ -22287,12 +24102,12 @@ EOF echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 -echo "configure:22291: checking for _spawnlp" >&5 +echo "configure:24106: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:24135: \"$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 @@ -22340,12 +24155,12 @@ fi echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 -echo "configure:22344: checking for _snprintf" >&5 +echo "configure:24159: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:24188: \"$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 @@ -22395,12 +24210,12 @@ fi echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 -echo "configure:22399: checking for _vsnprintf" >&5 +echo "configure:24214: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:24243: \"$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 @@ -22450,12 +24265,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:22454: checking for vprintf" >&5 +echo "configure:24269: 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:24298: \"$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 @@ -22503,12 +24318,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:22507: checking for _doprnt" >&5 +echo "configure:24322: 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:24351: \"$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 @@ -22561,12 +24376,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in snprintf vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:22565: checking for $ac_func" >&5 +echo "configure:24380: 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:24409: \"$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 @@ -22654,7 +24469,6 @@ for ac_func in \ signal \ sigset \ strdup \ - strerror \ strpbrk \ strrchr \ strsep \ @@ -22676,12 +24490,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:22680: checking for $ac_func" >&5 +echo "configure:24494: 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:24523: \"$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 @@ -22733,12 +24547,12 @@ done for ac_func in getopt getpeereid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:22737: checking for $ac_func" >&5 +echo "configure:24551: 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:24580: \"$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 @@ -22784,144 +24598,65 @@ EOF else echo "$ac_t""no" 1>&6 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" -fi -done - - - -if test "$ac_cv_func_getopt" != yes; then - LIBSRCS="$LIBSRCS getopt.c" -fi -if test "$ac_cv_func_getpeereid" != yes; then - echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6 -echo "configure:22798: checking for msg_accrights in msghdr" >&5 -if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct msghdr m; m.msg_accrightslen=0 -; return 0; } -EOF -if { (eval echo configure:22810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_msghdr_msg_accrights=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_msghdr_msg_accrights=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6 - if test $ol_cv_msghdr_msg_accrights = "yes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_MSGHDR_MSG_ACCRIGHTS 1 -EOF - - fi - - LIBSRCS="$LIBSRCS getpeereid.c" -fi -if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then - if test "$ac_cv_func_snprintf" != yes; then - cat >> confdefs.h <<\EOF -#define snprintf ber_pvt_snprintf -EOF - - fi - if test "$ac_cv_func_vsnprintf" != yes; then - cat >> confdefs.h <<\EOF -#define vsnprintf ber_pvt_vsnprintf -EOF - - fi -fi - -# Check Configuration -echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:22850: 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 -#ifdef WINNT -#include -#endif -int main() { -char *c = (char *) *sys_errlist -; return 0; } -EOF -if { (eval echo configure:22869: \"$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 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_dcl_sys_errlist=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6 -# -# It's possible (for near-UNIX clones) that sys_errlist doesn't exist -if test $ol_cv_dcl_sys_errlist = no ; then - cat >> confdefs.h <<\EOF -#define DECL_SYS_ERRLIST 1 -EOF +fi +done - echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:22892: checking existence of sys_errlist" >&5 -if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then + +if test "$ac_cv_func_getopt" != yes; then + LIBSRCS="$LIBSRCS getopt.c" +fi +if test "$ac_cv_func_getpeereid" != yes; then + echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6 +echo "configure:24612: checking for msg_accrights in msghdr" >&5 +if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -char *c = (char *) *sys_errlist +struct msghdr m; m.msg_accrightslen=0 ; return 0; } EOF -if { (eval echo configure:22905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:24624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_have_sys_errlist=yes + ol_cv_msghdr_msg_accrights=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_have_sys_errlist=no + ol_cv_msghdr_msg_accrights=no fi rm -f conftest* + fi -echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 -fi -if test $ol_cv_have_sys_errlist = yes ; then +echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6 + if test $ol_cv_msghdr_msg_accrights = "yes" ; then cat >> confdefs.h <<\EOF -#define HAVE_SYS_ERRLIST 1 +#define HAVE_MSGHDR_MSG_ACCRIGHTS 1 EOF + fi + + LIBSRCS="$LIBSRCS getpeereid.c" fi +if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then + if test "$ac_cv_func_snprintf" != yes; then + cat >> confdefs.h <<\EOF +#define snprintf ber_pvt_snprintf +EOF + + fi + if test "$ac_cv_func_vsnprintf" != yes; then + cat >> confdefs.h <<\EOF +#define vsnprintf ber_pvt_vsnprintf +EOF + fi +fi if test "$ol_enable_slapi" != no ; then @@ -22929,17 +24664,17 @@ if test "$ol_enable_slapi" != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:22933: checking for $ac_hdr" >&5 +echo "configure:24668: 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:22943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:24678: \"$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* @@ -22970,7 +24705,7 @@ done { echo "configure: error: could not locate " 1>&2; exit 1; } fi echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 -echo "configure:22974: checking for lt_dlinit in -lltdl" >&5 +echo "configure:24709: 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 @@ -22978,7 +24713,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:24728: \"$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 @@ -23078,12 +24813,6 @@ if test "$ol_enable_crypt" != no ; then #define SLAPD_CRYPT 1 EOF -fi -if test "$ol_link_kpasswd" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_KPASSWD 1 -EOF - fi if test "$ol_link_spasswd" != no ; then cat >> confdefs.h <<\EOF @@ -23119,278 +24848,366 @@ EOF SLAPD_MODULES_LDFLAGS="-dlopen self" fi -if test "$ol_enable_bdb" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_BDB 1 +cat >> confdefs.h <<\EOF +#define SLAPD_MOD_STATIC 1 EOF - BUILD_SLAPD=yes - BUILD_BDB=yes - if test "$ol_with_bdb_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_BDB_DYNAMIC 1 +cat >> confdefs.h <<\EOF +#define SLAPD_MOD_DYNAMIC 2 EOF - BUILD_BDB=mod - BUILD_BDB_DYNAMIC=shared + +if test "$ol_enable_bdb" != no ; then + BUILD_SLAPD=yes + BUILD_BDB=$ol_enable_bdb + if test "$ol_enable_bdb" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb" + MFLAG=SLAPD_MOD_STATIC fi -fi - -if test "$ol_link_dnssrv" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_DNSSRV 1 + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_DNSSRV_DYNAMIC 1 -EOF +fi - BUILD_DNSSRV=mod - BUILD_DNSSRV_DYNAMIC=shared +if test "$ol_enable_dnssrv" != no ; then + BUILD_SLAPD=yes + BUILD_DNSSRV=$ol_enable_dnssrv + if test "$ol_enable_dnssrv" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_HDB 1 -EOF - BUILD_SLAPD=yes - BUILD_HDB=yes - if test "$ol_with_hdb_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_HDB_DYNAMIC 1 -EOF - - BUILD_HDB=mod - BUILD_HDB_DYNAMIC=shared + BUILD_HDB=$ol_enable_hdb + if test "$ol_enable_hdb" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_LDAP 1 -EOF - BUILD_SLAPD=yes - BUILD_LDAP=yes - if test "$ol_with_ldap_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_LDAP_DYNAMIC 1 -EOF - - BUILD_LDAP=mod - BUILD_LDAP_DYNAMIC=shared + BUILD_LDAP=$ol_enable_ldap + if test "$ol_enable_ldap" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_LDBM 1 -EOF - BUILD_SLAPD=yes - BUILD_LDBM=yes - if test "$ol_with_ldbm_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_LDBM_DYNAMIC 1 -EOF - - BUILD_LDBM=mod - BUILD_LDBM_DYNAMIC=shared + BUILD_LDBM=$ol_enable_ldbm + if test "$ol_enable_ldbm" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <&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 + BUILD_META=$ol_enable_meta BUILD_REWRITE=yes - if test $ol_enable_ldbm = yes -o \ - $ol_enable_bdb = yes ; then - BUILD_CACHE=yes - fi - 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 + if test "$ol_enable_meta" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> 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 + BUILD_MONITOR=$ol_enable_monitor + if test "$ol_enable_monitor" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_NULL 1 -EOF - BUILD_SLAPD=yes - BUILD_NULL=yes - if test "$ol_with_null_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_NULL_DYNAMIC 1 -EOF - - BUILD_NULL=mod - BUILD_NULL_DYNAMIC=shared + BUILD_NULL=$ol_enable_null + if test "$ol_enable_null" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_PASSWD 1 -EOF - BUILD_SLAPD=yes - BUILD_PASSWD=yes - if test "$ol_with_passwd_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_PASSWD_DYNAMIC 1 -EOF - - BUILD_PASSWD=mod - BUILD_PASSWD_DYNAMIC=shared + BUILD_PASSWD=$ol_enable_passwd + if test "$ol_enable_passwd" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd" + MFLAG=SLAPD_MOD_STATIC fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_PERL 1 -EOF - BUILD_SLAPD=yes - BUILD_PERL=yes - if test "$ol_with_perl_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_PERL_DYNAMIC 1 -EOF - - BUILD_PERL=mod - BUILD_PERL_DYNAMIC=shared + BUILD_PERL=$ol_enable_perl + if test "$ol_enable_perl" = mod ; then SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl" + MFLAG=SLAPD_MOD_DYNAMIC else SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl" + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <&2 fi - cat >> confdefs.h <<\EOF -#define SLAPD_SHELL 1 + BUILD_SLAPD=yes + BUILD_SHELL=$ol_enable_shell + if test "$ol_enable_shell" = mod ; then + SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell" + MFLAG=SLAPD_MOD_DYNAMIC + else + SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell" + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_SHELL_DYNAMIC 1 + BUILD_SQL=$ol_enable_sql + if test "$ol_enable_sql" = mod; then + SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql" + MFLAG=SLAPD_MOD_DYNAMIC + else + SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql" + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_TCL 1 +if test "$ol_enable_dyngroup" != no ; then + BUILD_DYNGROUP=$ol_enable_dyngroup + if test "$ol_enable_dyngroup" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_TCL_DYNAMIC 1 +fi + +if test "$ol_enable_lastmod" != no ; then + BUILD_LASTMOD=$ol_enable_lastmod + if test "$ol_enable_lastmod" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_SQL 1 +if test "$ol_enable_proxycache" != no ; then + BUILD_PROXYCACHE=$ol_enable_proxycache + if test "$ol_enable_proxycache" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_SQL_DYNAMIC 1 +fi + +if test "$ol_enable_refint" != no ; then + BUILD_REFINT=$ol_enable_refint + if test "$ol_enable_refint" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h < $BACKEND_HEADER << EOF +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2004 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ +/* This file is automatically generated by configure; please do not edit. + */ + +EOF + +for b in $SLAPD_STATIC_BACKENDS; do + bb=`echo "$b" | sed -e 's;back-;;'` + + cat >> $BACKEND_HEADER << EOF +extern BI_init ${bb}_back_initialize; +EOF +done + +cat >> $BACKEND_HEADER << EOF + +static BackendInfo binfo[] = { +EOF + +for b in $SLAPD_STATIC_BACKENDS; do + bb=`echo "$b" | sed -e 's;back-;;'` + + cat >> $BACKEND_HEADER << EOF + { "$bb", ${bb}_back_initialize }, +EOF +done + +cat >> $BACKEND_HEADER << EOF + { NULL, NULL } +}; + +/* end of generated file */ +EOF + + + @@ -23461,11 +25328,6 @@ fi - - - - - @@ -23580,12 +25442,9 @@ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ -libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \ libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ -libraries/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 \ @@ -23601,12 +25460,12 @@ servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Make servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \ servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \ servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \ +servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \ servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \ servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \ -servers/slapd/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/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk \ -servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ +servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \ tests/run \ @@ -23673,6 +25532,7 @@ s%@AMTAR@%$AMTAR%g s%@AWK@%$AWK%g s%@AMTARFLAGS@%$AMTARFLAGS%g s%@SET_MAKE@%$SET_MAKE%g +s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g s%@top_builddir@%$top_builddir%g @@ -23690,7 +25550,6 @@ s%@AS@%$AS%g s%@OBJDUMP@%$OBJDUMP%g s%@CPP@%$CPP%g s%@LIBTOOL@%$LIBTOOL%g -s%@LN_H@%$LN_H%g s%@PERLBIN@%$PERLBIN%g s%@OL_MKDEP@%$OL_MKDEP%g s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g @@ -23698,7 +25557,9 @@ s%@LTSTATIC@%$LTSTATIC%g s%@LIBOBJS@%$LIBOBJS%g s%@LIBSRCS@%$LIBSRCS%g s%@PLAT@%$PLAT%g +s%@WITH_SASL@%$WITH_SASL%g s%@WITH_TLS@%$WITH_TLS%g +s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g s%@BUILD_SLAPI@%$BUILD_SLAPI%g @@ -23710,48 +25571,42 @@ s%@BUILD_LDAP@%$BUILD_LDAP%g s%@BUILD_LDBM@%$BUILD_LDBM%g s%@BUILD_META@%$BUILD_META%g s%@BUILD_MONITOR@%$BUILD_MONITOR%g -s%@BUILD_CACHE@%$BUILD_CACHE%g s%@BUILD_NULL@%$BUILD_NULL%g s%@BUILD_PASSWD@%$BUILD_PASSWD%g +s%@BUILD_RELAY@%$BUILD_RELAY%g s%@BUILD_PERL@%$BUILD_PERL%g s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_SQL@%$BUILD_SQL%g -s%@BUILD_TCL@%$BUILD_TCL%g -s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g -s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g -s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g -s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g -s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g -s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g -s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g -s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g -s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g -s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g -s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g -s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g -s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g +s%@BUILD_CHAIN@%$BUILD_CHAIN%g +s%@BUILD_DENYOP@%$BUILD_DENYOP%g +s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g +s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g +s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g +s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g +s%@BUILD_REFINT@%$BUILD_REFINT%g +s%@BUILD_RWM@%$BUILD_RWM%g +s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g +s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g s%@LDAP_LIBS@%$LDAP_LIBS%g -s%@LDIF_LIBS@%$LDIF_LIBS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g s%@LDBM_LIBS@%$LDBM_LIBS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g s%@WRAP_LIBS@%$WRAP_LIBS%g -s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g +s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g s%@KRB4_LIBS@%$KRB4_LIBS%g s%@KRB5_LIBS@%$KRB5_LIBS%g s%@SASL_LIBS@%$SASL_LIBS%g -s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g s%@TLS_LIBS@%$TLS_LIBS%g s%@MODULES_LIBS@%$MODULES_LIBS%g s%@SLAPI_LIBS@%$SLAPI_LIBS%g @@ -23759,6 +25614,7 @@ s%@LIBSLAPI@%$LIBSLAPI%g s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g s%@AUTH_LIBS@%$AUTH_LIBS%g s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g +s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g @@ -23815,12 +25671,9 @@ clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \ clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ -libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \ libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \ libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ -libraries/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 \ @@ -23836,12 +25689,12 @@ servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Make servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \ servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \ servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \ +servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \ servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \ servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \ -servers/slapd/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/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk \ -servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ +servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \ tests/run \