X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=4733a0030ca1dc595c2c098448287b085112ab98;hb=65587fea65b84322c87182ecf4662d0ba59e3040;hp=0227e5c90608bf9c3fdf1fe91781420600b39a26;hpb=acdbf29e9372109304aae530ff845fe9f4aef8de;p=openldap diff --git a/configure b/configure index 0227e5c906..4733a0030c 100755 --- a/configure +++ b/configure @@ -1,16 +1,21 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.464 2003/03/05 00:32:41 hyc Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.568 2005/03/10 03:35:59 hyc Exp -# Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved. -# +# This work is part of OpenLDAP Software . +# +# Copyright 1998-2005 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-2005 The OpenLDAP Foundation. All rights reserved." echo " Restrictions apply, see COPYRIGHT and LICENSE files." # Guess values for system-dependent variables and create Makefiles. @@ -39,16 +44,10 @@ 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 --with-fetch with fetch(3) URL support [auto]" -ac_help="$ac_help - --with-kerberos with Kerberos support [auto]" -ac_help="$ac_help - --with-readline with readline support [auto]" ac_help="$ac_help --with-threads with threads [auto]" ac_help="$ac_help @@ -56,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 @@ -66,8 +69,6 @@ ac_help="$ac_help --enable-cleartext enable cleartext passwords [yes]" ac_help="$ac_help --enable-crypt enable crypt(3) passwords [no]" -ac_help="$ac_help - --enable-kpasswd enable Kerberos password verification [no]" ac_help="$ac_help --enable-lmpasswd enable LAN Manager passwords [no]" ac_help="$ac_help @@ -75,69 +76,77 @@ ac_help="$ac_help ac_help="$ac_help --enable-modules enable dynamic module support [no]" ac_help="$ac_help - --enable-phonetic enable phonetic/soundex [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 - --enable-slapi enable installation of slapi library [no]" + --enable-slapi enable SLAPI support (experimental) [no]" ac_help="$ac_help --enable-slp enable SLPv2 support [no]" 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 + --enable-bdb enable Berkeley DB backend no|yes|mod [yes]" ac_help="$ac_help - --with-bdb-module module type static|dynamic [static]" + --enable-dnssrv enable dnssrv backend no|yes|mod [no]" ac_help="$ac_help - --enable-dnssrv enable dnssrv backend [no]" + --enable-hdb enable Hierarchical DB backend no|yes|mod [no]" ac_help="$ac_help - --with-dnssrv-module module type static|dynamic [static]" + --enable-ldap enable ldap backend no|yes|mod [no]" ac_help="$ac_help - --enable-ldap enable ldap backend [no]" + --enable-ldbm enable ldbm backend no|yes|mod [no]" ac_help="$ac_help - --with-ldap-module module type static|dynamic [static]" + --with-ldbm-api with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]" ac_help="$ac_help - --enable-ldbm enable ldbm backend [no]" + --with-ldbm-type use LDBM type auto|btree|hash [auto]" ac_help="$ac_help - --with-ldbm-api with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]" + --enable-meta enable metadirectory backend no|yes|mod [no]" ac_help="$ac_help - --with-ldbm-module module type static|dynamic [static]" + --enable-monitor enable monitor backend no|yes|mod [yes]" ac_help="$ac_help - --with-ldbm-type use LDBM type auto|btree|hash [auto]" + --enable-null enable null backend no|yes|mod [no]" ac_help="$ac_help - --enable-meta enable metadirectory backend [no]" + --enable-passwd enable passwd backend no|yes|mod [no]" ac_help="$ac_help - --with-meta-module module type static|dynamic [static]" + --enable-perl enable perl backend no|yes|mod [no]" ac_help="$ac_help - --enable-monitor enable monitor backend [no]" + --enable-relay enable relay backend no|yes|mod [yes]" ac_help="$ac_help - --with-monitor-module module type static|dynamic [static]" + --enable-shell enable shell backend no|yes|mod [no]" ac_help="$ac_help - --enable-null enable null backend [no]" + --enable-sql enable sql backend no|yes|mod [no]" ac_help="$ac_help - --with-null-module module type static|dynamic [static]" + +SLAPD Overlay Options:" +ac_help="$ac_help + --enable-overlays enable all available overlays no|yes|mod [no]" ac_help="$ac_help - --enable-passwd enable passwd backend [no]" + --enable-denyop Deny Operation overlay no|yes|mod [no]" ac_help="$ac_help - --with-passwd-module module type static|dynamic [static]" + --enable-dyngroup Dynamic Group overlay no|yes|mod [no]" ac_help="$ac_help - --enable-perl enable perl backend [no]" + --enable-glue Backend Glue overlay no|yes|mod [yes]" 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-translucent Translucent Proxy overlay no|yes|mod [no]" +ac_help="$ac_help + --enable-unique Attribute Uniqueness overlay no|yes|mod [no]" ac_help="$ac_help SLURPD (Replication Daemon) Options:" @@ -880,7 +889,7 @@ echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..." echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:884: checking host system type" >&5 +echo "configure:893: 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. @@ -921,7 +930,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:925: checking target system type" >&5 +echo "configure:934: 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. @@ -961,7 +970,7 @@ target_os=$ac_cv_target_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:965: checking build system type" >&5 +echo "configure:974: 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. @@ -1038,7 +1047,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:1042: checking for a BSD compatible install" >&5 +echo "configure:1051: 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 @@ -1095,7 +1104,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:1099: checking whether build environment is sane" >&5 +echo "configure:1108: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1156,7 +1165,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:1160: checking for $ac_word" >&5 +echo "configure:1169: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1186,7 +1195,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1190: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1199: 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 @@ -1226,7 +1235,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1230: checking for working aclocal" >&5 +echo "configure:1239: 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. @@ -1239,7 +1248,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1243: checking for working autoconf" >&5 +echo "configure:1252: 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. @@ -1252,7 +1261,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1256: checking for working automake" >&5 +echo "configure:1265: 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. @@ -1265,7 +1274,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1269: checking for working autoheader" >&5 +echo "configure:1278: 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. @@ -1278,7 +1287,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1282: checking for working makeinfo" >&5 +echo "configure:1291: 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. @@ -1298,7 +1307,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:1302: checking for $ac_word" >&5 +echo "configure:1311: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1361,14 +1370,16 @@ cat >> confdefs.h <&6 -echo "configure:1372: checking configure arguments" >&5 +echo "configure:1383: checking configure arguments" >&5 top_builddir=`pwd` @@ -1516,26 +1527,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 @@ -1580,48 +1571,7 @@ else fi # end --with-fetch -# OpenLDAP --with-kerberos - # Check whether --with-kerberos or --without-kerberos was given. -if test "${with_kerberos+set}" = set; then - withval="$with_kerberos" - - ol_arg=invalid - for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do - if test "$withval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; } - fi - ol_with_kerberos="$ol_arg" - -else - ol_with_kerberos="auto" -fi -# end --with-kerberos - -# OpenLDAP --with-readline - # Check whether --with-readline or --without-readline was given. -if test "${with_readline+set}" = set; then - withval="$with_readline" - - ol_arg=invalid - for ol_val in auto 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-readline" 1>&2; exit 1; } - fi - ol_with_readline="$ol_arg" - -else - ol_with_readline="auto" -fi -# end --with-readline - +ol_with_kerberos=${ol_with_kerberos-auto} # OpenLDAP --with-threads # Check whether --with-threads or --without-threads was given. if test "${with_threads+set}" = set; then @@ -1685,6 +1635,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. @@ -1773,26 +1744,6 @@ else ol_enable_crypt="no" fi # end --enable-crypt -# OpenLDAP --enable-kpasswd - # Check whether --enable-kpasswd or --disable-kpasswd was given. -if test "${enable_kpasswd+set}" = set; then - enableval="$enable_kpasswd" - - ol_arg=invalid - for ol_val in auto yes no ; do - if test "$enableval" = "$ol_val" ; then - ol_arg="$ol_val" - fi - done - if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; } - fi - ol_enable_kpasswd="$ol_arg" - -else - ol_enable_kpasswd="no" -fi -# end --enable-kpasswd # OpenLDAP --enable-lmpasswd # Check whether --enable-lmpasswd or --disable-lmpasswd was given. if test "${enable_lmpasswd+set}" = set; then @@ -1854,26 +1805,6 @@ else fi # end --enable-modules ol_enable_multimaster=${ol_enable_multimaster-no} -# OpenLDAP --enable-phonetic - # Check whether --enable-phonetic or --disable-phonetic was given. -if test "${enable_phonetic+set}" = set; then - enableval="$enable_phonetic" - - ol_arg=invalid - for ol_val in auto yes no ; do - 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-phonetic" 1>&2; exit 1; } - fi - ol_enable_phonetic="$ol_arg" - -else - ol_enable_phonetic="no" -fi -# end --enable-phonetic # OpenLDAP --enable-rewrite # Check whether --enable-rewrite or --disable-rewrite was given. if test "${enable_rewrite+set}" = set; then @@ -1891,7 +1822,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 @@ -1975,55 +1906,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 @@ -2037,34 +1976,33 @@ 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" +# 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 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-dnssrv_module" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; } fi - ol_with_dnssrv_module="$ol_arg" + ol_enable_hdb="$ol_arg" else - ol_with_dnssrv_module="static" + ol_enable_hdb="no" fi -# end --with-dnssrv_module - +# end --enable-hdb # 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 @@ -2078,34 +2016,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 @@ -2140,27 +2057,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 @@ -2188,7 +2084,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 @@ -2202,34 +2098,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 @@ -2240,37 +2115,16 @@ if test "${enable_monitor+set}" = set; then ol_enable_monitor="$ol_arg" else - ol_enable_monitor="no" + 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 @@ -2284,34 +2138,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 @@ -2325,34 +2158,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 @@ -2366,34 +2178,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 @@ -2407,142 +2218,322 @@ 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="denyop dyngroup glue lastmod ppolicy proxycache rwm \ + refint syncprov translucent 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-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 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-denyop" 1>&2; exit 1; } fi - ol_with_sql_module="$ol_arg" + ol_enable_denyop="$ol_arg" else - ol_with_sql_module="static" + ol_enable_denyop="no" fi -# end --with-sql_module +# end --enable-denyop -# OpenLDAP --enable-tcl - # Check whether --enable-tcl or --disable-tcl was given. -if test "${enable_tcl+set}" = set; then - enableval="$enable_tcl" +# 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 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-dyngroup" 1>&2; exit 1; } fi - ol_enable_tcl="$ol_arg" + ol_enable_dyngroup="$ol_arg" else - ol_enable_tcl="no" + ol_enable_dyngroup="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-dyngroup + +# OpenLDAP --enable-glue + # Check whether --enable-glue or --disable-glue was given. +if test "${enable_glue+set}" = set; then + enableval="$enable_glue" 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-glue" 1>&2; exit 1; } fi - ol_with_tcl_module="$ol_arg" + ol_enable_glue="$ol_arg" else - ol_with_tcl_module="static" + ol_enable_glue="yes" fi -# end --with-tcl_module +# end --enable-glue +# 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" + +else + ol_enable_proxycache="no" +fi +# end --enable-proxycache + +# 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-translucent + # Check whether --enable-translucent or --disable-translucent was given. +if test "${enable_translucent+set}" = set; then + enableval="$enable_translucent" + + 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-translucent" 1>&2; exit 1; } + fi + ol_enable_translucent="$ol_arg" + +else + ol_enable_translucent="no" +fi +# end --enable-translucent + +# 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 @@ -2592,47 +2583,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_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 @@ -2642,9 +2627,6 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_wrappers = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2 fi - if test $ol_enable_phonetic = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2 - fi if test $ol_enable_rlookups = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2 fi @@ -2657,88 +2639,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_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_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_phonetic=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_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 @@ -2753,22 +2684,19 @@ 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 \ + $ol_enable_hdb = no -a \ $ol_enable_ldap = no -a \ $ol_enable_meta = no -a \ $ol_enable_monitor = no -a \ $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; } @@ -2780,9 +2708,8 @@ 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 ; then + if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then ol_with_ldbm_api=berkeley fi @@ -2800,22 +2727,19 @@ else { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; } fi - if test $ol_enable_bdb = 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" 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 + { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; } fi fi 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; } @@ -2828,14 +2752,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 @@ -2854,7 +2778,6 @@ fi echo "$ac_t""done" 1>&6 LDAP_LIBS= -LDIF_LIBS= LDBM_LIBS= LTHREAD_LIBS= LUTIL_LIBS= @@ -2872,6 +2795,7 @@ SLAPD_SLAPI_DEPEND= BUILD_BDB=no BUILD_DNSSRV=no +BUILD_HDB=no BUILD_LDAP=no BUILD_LDBM=no BUILD_META=no @@ -2879,22 +2803,24 @@ BUILD_MONITOR=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_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_GLUE=no +BUILD_LASTMOD=no +BUILD_PPOLICY=no +BUILD_PROXYCACHE=no +BUILD_REFINT=no +BUILD_RWM=no +BUILD_SYNCPROV=no +BUILD_TRANSLUCENT=no +BUILD_UNIQUE=no + +SLAPD_DYNAMIC_OVERLAYS= SLAPD_MODULES_LDFLAGS= SLAPD_MODULES_CPPFLAGS= @@ -2910,12 +2836,9 @@ SLAPD_SQL_LDFLAGS= SLAPD_SQL_LIBS= SLAPD_SQL_INCLUDES= -MOD_TCL_LIB= KRB4_LIBS= KRB5_LIBS= -READLINE_LIBS= SASL_LIBS= -TERMCAP_LIBS= TLS_LIBS= MODULES_LIBS= SLAPI_LIBS= @@ -2924,75 +2847,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:2942: 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 @@ -3019,7 +2874,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:3023: checking for $ac_word" >&5 +echo "configure:2878: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3071,7 +2926,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:3075: checking for $ac_word" >&5 +echo "configure:2930: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3113,7 +2968,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:3117: checking for $ac_word" >&5 +echo "configure:2972: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3163,12 +3018,12 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3167: checking for Cygwin environment" >&5 +echo "configure:3022: 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:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -3195,19 +3050,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:3199: checking for mingw32 environment" >&5 +echo "configure:3054: 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:3066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3223,19 +3078,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:3227: checking for EMX OS/2 environment" >&5 +echo "configure:3082: 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:3094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -3251,7 +3106,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:3255: checking how to run the C preprocessor" >&5 +echo "configure:3110: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3266,13 +3121,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:3276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3131: \"$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 : @@ -3283,13 +3138,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:3293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3148: \"$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 : @@ -3300,13 +3155,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:3310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3356,7 +3211,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:3360: checking for $ac_word" >&5 +echo "configure:3215: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3386,7 +3241,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:3390: checking for $ac_word" >&5 +echo "configure:3245: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3437,7 +3292,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:3441: checking for $ac_word" >&5 +echo "configure:3296: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3469,7 +3324,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3473: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:3328: 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. @@ -3480,12 +3335,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3484 "configure" +#line 3339 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3344: \"$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 @@ -3511,12 +3366,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:3515: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3370: 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:3520: checking whether we are using GNU C" >&5 +echo "configure:3375: 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 @@ -3525,7 +3380,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3529: \"$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:3384: \"$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 @@ -3544,7 +3399,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:3548: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3403: 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 @@ -3587,7 +3442,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:3591: checking for ld used by GCC" >&5 +echo "configure:3446: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -3617,10 +3472,10 @@ echo "configure:3591: 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:3621: checking for GNU ld" >&5 +echo "configure:3476: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:3624: checking for non-GNU ld" >&5 +echo "configure:3479: 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 @@ -3655,7 +3510,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:3659: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:3514: 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 @@ -3672,7 +3527,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:3676: checking for $LD option to reload object files" >&5 +echo "configure:3531: 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 @@ -3684,7 +3539,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:3688: checking for BSD-compatible nm" >&5 +echo "configure:3543: 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 @@ -3722,7 +3577,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:3726: checking for a sed that does not truncate output" >&5 +echo "configure:3581: 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 @@ -3806,7 +3661,7 @@ fi echo "$ac_t""$SED" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:3810: checking whether ln -s works" >&5 +echo "configure:3665: 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 @@ -3827,7 +3682,7 @@ else fi echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 -echo "configure:3831: checking how to recognise dependent libraries" >&5 +echo "configure:3686: 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 @@ -3961,6 +3816,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' @@ -4013,13 +3872,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:4017: checking for object suffix" >&5 +echo "configure:3876: 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:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -4040,7 +3899,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4044: checking for executable suffix" >&5 +echo "configure:3903: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4050,7 +3909,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -4081,7 +3940,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:4085: checking command to parse $NM output" >&5 +echo "configure:3944: 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 @@ -4164,10 +4023,10 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func();return(0);} EOF - if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo configure:4171: \"$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:4030: \"$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" @@ -4218,7 +4077,7 @@ EOF save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then + if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" @@ -4267,17 +4126,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:4271: checking for $ac_hdr" >&5 +echo "configure:4130: 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:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4140: \"$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* @@ -4313,7 +4172,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:4317: checking for ${ac_tool_prefix}file" >&5 +echo "configure:4176: 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 @@ -4375,7 +4234,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:4379: checking for file" >&5 +echo "configure:4238: checking for file" >&5 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4446,7 +4305,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:4450: checking for $ac_word" >&5 +echo "configure:4309: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4478,7 +4337,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:4482: checking for $ac_word" >&5 +echo "configure:4341: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4513,7 +4372,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:4517: checking for $ac_word" >&5 +echo "configure:4376: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4545,7 +4404,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:4549: checking for $ac_word" >&5 +echo "configure:4408: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4594,8 +4453,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4598 "configure"' > conftest.$ac_ext - if { (eval echo configure:4599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 4457 "configure"' > conftest.$ac_ext + if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -4616,7 +4475,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:4620: checking whether the C compiler needs -belf" >&5 +echo "configure:4479: 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 @@ -4629,14 +4488,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:4499: \"$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 @@ -4666,7 +4525,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:4670: checking for $ac_word" >&5 +echo "configure:4529: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4698,7 +4557,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:4702: checking for $ac_word" >&5 +echo "configure:4561: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4733,7 +4592,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:4737: checking for $ac_word" >&5 +echo "configure:4596: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4765,7 +4624,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:4769: checking for $ac_word" >&5 +echo "configure:4628: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4800,7 +4659,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:4804: checking for $ac_word" >&5 +echo "configure:4663: 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,7 +4691,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:4836: checking for $ac_word" >&5 +echo "configure:4695: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4868,12 +4727,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:4872: checking if libtool should supply DllMain function" >&5 +echo "configure:4731: 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:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else @@ -4902,19 +4761,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:4906: checking how to link DLLs" >&5 +echo "configure:4765: 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:4777: \"$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 @@ -5028,7 +4887,7 @@ set dummy $CC compiler="$2" echo $ac_n "checking for objdir""... $ac_c" 1>&6 -echo "configure:5032: checking for objdir" >&5 +echo "configure:4891: checking for objdir" >&5 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -5055,7 +4914,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:5059: checking for $compiler option to produce PIC" >&5 +echo "configure:4918: 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 @@ -5145,6 +5004,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. @@ -5203,21 +5066,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:5207: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 +echo "configure:5070: 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:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* case $host_os in hpux9* | hpux10* | hpux11*) @@ -5269,7 +5132,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:5273: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 +echo "configure:5136: 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 @@ -5277,14 +5140,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:5151: \"$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 @@ -5311,7 +5174,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:5315: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo "configure:5178: 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 @@ -5330,7 +5193,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:5334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:5197: \"$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 @@ -5359,7 +5222,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:5363: checking if $compiler supports -c -o file.lo" >&5 +echo "configure:5226: 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 @@ -5370,14 +5233,14 @@ else save_objext="$ac_objext" ac_objext=lo cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5244: \"$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 @@ -5408,7 +5271,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:5412: checking if we can lock with hard links" >&5 +echo "configure:5275: 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 @@ -5427,20 +5290,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:5431: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo "configure:5294: 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:5307: \"$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 @@ -5467,7 +5330,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:5471: checking whether the linker ($LD) supports shared libraries" >&5 +echo "configure:5334: checking whether the linker ($LD) supports shared libraries" >&5 allow_undefined_flag= no_undefined_flag= @@ -5970,6 +5833,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 @@ -6166,7 +6035,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:6170: checking how to hardcode library paths into programs" >&5 +echo "configure:6039: checking how to hardcode library paths into programs" >&5 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then @@ -6194,7 +6063,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:6198: checking whether stripping libraries is possible" >&5 +echo "configure:6067: 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" @@ -6208,7 +6077,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:6212: checking dynamic linker characteristics" >&5 +echo "configure:6081: checking dynamic linker characteristics" >&5 library_names_spec= libname_spec='lib$name' soname_spec= @@ -6510,6 +6379,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 @@ -6619,11 +6499,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:6623: checking if libtool supports shared libraries" >&5 +echo "configure:6503: 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:6627: checking whether to build shared libraries" >&5 +echo "configure:6507: 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 @@ -6646,7 +6526,7 @@ esac echo "$ac_t""$enable_shared" 1>&6 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 -echo "configure:6650: checking whether to build static libraries" >&5 +echo "configure:6530: 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 @@ -6686,21 +6566,21 @@ else ;; *) - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "configure:6691: 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:6571: 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() { @@ -6708,53 +6588,100 @@ 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:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6600: \"$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:6738: 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:6618: 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 < 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() { -shl_load() -; return 0; } -EOF -if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* + +/* 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:6647: \"$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:6665: 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 + rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 @@ -6772,12 +6699,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:6776: checking for dlopen" >&5 +echo "configure:6703: 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:6732: \"$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 @@ -6819,7 +6746,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:6823: checking for dlopen in -ldl" >&5 +echo "configure:6750: 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 @@ -6827,7 +6754,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:6769: \"$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 @@ -6857,7 +6784,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:6861: checking for dlopen in -lsvld" >&5 +echo "configure:6788: 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 @@ -6865,7 +6792,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:6807: \"$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 @@ -6895,7 +6822,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:6899: checking for dld_link in -ldld" >&5 +echo "configure:6826: 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 @@ -6903,7 +6830,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:6845: \"$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 @@ -6947,6 +6874,9 @@ fi fi +fi + + fi ;; @@ -6970,7 +6900,7 @@ fi LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "configure:6974: checking whether a program can dlopen itself" >&5 +echo "configure:6904: 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 @@ -6980,7 +6910,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:6975: \"$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 @@ -7064,7 +6994,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:7068: checking whether a statically linked program can dlopen itself" >&5 +echo "configure:6998: 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 @@ -7074,7 +7004,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:7069: \"$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 @@ -7184,14 +7114,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:7188: checking whether -lc should be explicitly linked in" >&5 +echo "configure:7118: 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:7195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -7204,7 +7134,7 @@ else libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo configure:7208: \"$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:7138: \"$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 @@ -7789,58 +7719,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -# test for ln hardlink support -echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:7795: 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:7818: 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:7844: checking for $ac_word" >&5 +echo "configure:7728: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7881,17 +7765,19 @@ fi else PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" - if test x"$ol_with_perl_module" = "xstatic" ; then - SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + 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="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + 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:7895: checking how to run the C preprocessor" >&5 +echo "configure:7781: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -7906,13 +7792,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:7916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7802: \"$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 : @@ -7923,13 +7809,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:7933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7819: \"$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 : @@ -7940,13 +7826,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:7950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7836: \"$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 : @@ -7971,26 +7857,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:7989: checking for Cygwin environment" >&5 +echo "configure:7863: 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:7879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -8017,19 +7891,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:8021: checking for mingw32 environment" >&5 +echo "configure:7895: 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:7907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -8048,7 +7922,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:8052: checking for executable suffix" >&5 +echo "configure:7926: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8058,7 +7932,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -8079,13 +7953,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:8083: checking for object suffix" >&5 +echo "configure:7957: 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:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -8109,7 +7983,7 @@ EOF echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 -echo "configure:8113: checking for be_app in -lbe" >&5 +echo "configure:7987: 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 @@ -8117,7 +7991,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:8006: \"$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 @@ -8154,7 +8028,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:8158: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:8032: 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 @@ -8171,7 +8045,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 @@ -8208,7 +8082,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:8212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -8242,7 +8116,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:8246: checking for ${OL_MKDEP} depend flag" >&5 +echo "configure:8120: 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 @@ -8252,7 +8126,7 @@ else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } \ + if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8130: \"$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 @@ -8285,7 +8159,7 @@ if test "${ol_cv_mkdep}" = no ; then fi echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6 -echo "configure:8289: checking for afopen in -ls" >&5 +echo "configure:8163: 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 @@ -8293,7 +8167,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:8182: \"$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 @@ -8342,22 +8216,23 @@ EOF esac ol_link_modules=no +WITH_MODULES_ENABLED=no if test $ol_enable_modules != no ; then for ac_hdr in ltdl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8351: checking for $ac_hdr" >&5 +echo "configure:8226: 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:8361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8236: \"$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* @@ -8389,7 +8264,7 @@ done fi echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 -echo "configure:8393: checking for lt_dlinit in -lltdl" >&5 +echo "configure:8268: 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 @@ -8397,7 +8272,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:8287: \"$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 @@ -8439,30 +8314,34 @@ fi { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; } fi ol_link_modules=yes + WITH_MODULES_ENABLED=yes + else - ol_with_bdb_module=static - ol_with_dnssrv_module=static - ol_with_ldap_module=static - ol_with_ldbm_module=static - ol_with_meta_module=static - ol_with_monitor_module=static - ol_with_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:8460: checking for EBCDIC" >&5 +echo "configure:8339: 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:8354: \"$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* @@ -8495,12 +8374,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8499: checking for ANSI C header files" >&5 +echo "configure:8378: 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 @@ -8508,7 +8387,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8391: \"$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* @@ -8525,7 +8404,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 @@ -8543,7 +8422,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 @@ -8564,7 +8443,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #ifndef HAVE_EBCDIC @@ -8582,7 +8461,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:8586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -8616,12 +8495,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:8620: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8499: 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> @@ -8629,7 +8508,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8654,7 +8533,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:8658: checking for opendir in -ldir" >&5 +echo "configure:8537: 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 @@ -8662,7 +8541,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:8556: \"$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 @@ -8695,7 +8574,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8699: checking for opendir in -lx" >&5 +echo "configure:8578: 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 @@ -8703,7 +8582,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:8597: \"$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 @@ -8737,12 +8616,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:8741: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:8620: 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 @@ -8758,7 +8637,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:8762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -8779,12 +8658,12 @@ EOF fi echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:8783: checking POSIX termios" >&5 +echo "configure:8662: 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 @@ -8794,7 +8673,7 @@ int main() { tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:8798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8677: \"$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 @@ -8810,7 +8689,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:8814: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +echo "configure:8693: 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 @@ -8819,7 +8698,7 @@ else gwinsz_in_termios_h=no if test $am_cv_sys_posix_termios = yes; then cat > conftest.$ac_ext < # include @@ -8839,7 +8718,7 @@ rm -f conftest* if test $gwinsz_in_termios_h = no; then cat > conftest.$ac_ext < # include @@ -8878,6 +8757,7 @@ for ac_hdr in \ arpa/inet.h \ arpa/nameser.h \ assert.h \ + bits/types.h \ conio.h \ crypt.h \ direct.h \ @@ -8926,17 +8806,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:8930: checking for $ac_hdr" >&5 +echo "configure:8810: 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:8940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8820: \"$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* @@ -8964,22 +8844,23 @@ done - -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:8970: checking for dlopen" >&5 -if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then +for ac_func in sigaction sigset +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8851: 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 dlopen(); +char $ac_func(); char (*f)(); int main() { @@ -8987,83 +8868,42 @@ 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) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = dlopen; +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:8999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_dlopen=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_dlopen=no" + eval "ac_cv_func_$ac_func=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:9017: 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 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = 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/'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi - -fi +done -echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:9067: checking for sigset in -lV3" >&5 +if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then + echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:8907: 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 @@ -9071,7 +8911,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:8926: \"$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 @@ -9109,42 +8949,43 @@ else echo "$ac_t""no" 1>&6 fi +fi +if test "$ac_cv_header_winsock_h" = yes; then echo $ac_n "checking for winsock""... $ac_c" 1>&6 -echo "configure:9115: checking for winsock" >&5 -save_LIBS="$LIBS" +echo "configure:8957: 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:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8978: \"$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 @@ -9154,7 +8995,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 @@ -9164,16 +9005,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:9172: checking for socket" >&5 +echo "configure:9016: 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:9045: \"$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 @@ -9216,7 +9060,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:9220: checking for main in -lsocket" >&5 +echo "configure:9064: 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 @@ -9224,14 +9068,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:9079: \"$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 @@ -9259,7 +9103,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:9263: checking for main in -lnet" >&5 +echo "configure:9107: 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 @@ -9267,14 +9111,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:9122: \"$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 @@ -9302,7 +9146,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:9306: checking for main in -lnsl_s" >&5 +echo "configure:9150: 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 @@ -9310,14 +9154,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:9165: \"$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 @@ -9345,7 +9189,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:9349: checking for main in -lnsl" >&5 +echo "configure:9193: 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 @@ -9353,14 +9197,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:9208: \"$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 @@ -9388,7 +9232,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:9392: checking for socket in -linet" >&5 +echo "configure:9236: 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 @@ -9396,7 +9240,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:9255: \"$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 @@ -9435,7 +9279,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:9439: checking for main in -lgen" >&5 +echo "configure:9283: 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 @@ -9443,14 +9287,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:9298: \"$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 @@ -9482,12 +9326,12 @@ fi echo $ac_n "checking for select""... $ac_c" 1>&6 -echo "configure:9486: checking for select" >&5 +echo "configure:9330: 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:9359: \"$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 @@ -9534,7 +9378,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:9538: checking types of arguments for select()" >&5 +echo "configure:9382: 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 @@ -9548,7 +9392,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 < @@ -9567,7 +9411,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_not_found=no ; break 3 else @@ -9608,21 +9452,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:9459: 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:9488: \"$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:9616: checking for $ac_hdr" >&5 +echo "configure:9516: 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:9626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9526: \"$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* @@ -9648,300 +9548,174 @@ 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:9657: 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:9557: 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 < conftest.$ac_ext < EOF -if { (eval echo configure:9675: \"$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:9567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - ac_cv_search_regfree="none required" + 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* -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_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&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 + echo "$ac_t""no" 1>&6 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:9720: 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 +if test "${ac_cv_header_sys_epoll_h}" = yes; then +echo $ac_n "checking for epoll system call""... $ac_c" 1>&6 +echo "configure:9595: checking for epoll system call" >&5 +if test "$cross_compiling" = yes; then + echo "$ac_t""no" 1>&6 else cat > conftest.$ac_ext < -#include -static char *pattern, *string; -main() +int main(int argc, char *argv) { - 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; + int epfd = epoll_create(256); + exit (epfd == -1 ? 1 : 0); } EOF -if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9608: \"$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 + 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* - ol_cv_c_posix_regex=no + echo "$ac_t""no" 1>&6 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:9781: checking for $ac_hdr" >&5 -if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then +# strerror checks +echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 +echo "configure:9628: 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 < conftest.$ac_ext < + +#include +#include +#include +#ifdef WINNT +#include +#endif +int main() { +char *c = (char *) *sys_errlist +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9791: \"$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:9647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ol_cv_dcl_sys_errlist=yes + ol_cv_have_sys_errlist=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_dcl_sys_errlist=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 +# +# 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 - -else - echo "$ac_t""no" 1>&6 -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:9821: checking for library containing uuid_to_str" >&5 -if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then + + echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 +echo "configure:9670: 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_func_search_save_LIBS="$LIBS" -ac_cv_search_uuid_to_str="no" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -uuid_to_str() +char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_search_uuid_to_str="none required" + ol_cv_have_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 -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 <&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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + ol_cv_have_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 : - : +echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 fi - LIBS="$save_LIBS" - - if test have_uuid = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_UUID_TO_STR 1 +if test $ol_cv_have_sys_errlist = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_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:9896: 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:9932: checking for res_query" >&5 -if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then + for ac_func in strerror strerror_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9706: 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() { @@ -9949,460 +9723,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:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9735: \"$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:9982: 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:9762: 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:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9795: \"$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:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +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:10035: 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:9847: 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:10054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9866: \"$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:10086: 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:9889: 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:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9902: \"$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:10137: 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:9930: 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:10156: \"$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:9940: \"$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:10188: 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:9971: 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:9989: \"$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 <&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 "$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 - ac_cv_func_res_query=$ac_cv_lib_resolv___res_query +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 -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:10255: 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:10284: \"$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 - -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:10316: checking INET6_ADDRSTRLEN" >&5 -if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then +echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 +echo "configure:10034: 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 < -# ifdef INET6_ADDRSTRLEN - __has_inet6_addrstrlen__; -# endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then - rm -rf conftest* - ol_cv_inet6_addrstrlen=yes -else - rm -rf conftest* - ol_cv_inet6_addrstrlen=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6 - - - echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6 -echo "configure:10347: checking struct sockaddr_storage" >&5 -if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "$cross_compiling" = yes; then + ol_cv_c_posix_regex=cross 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:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_struct_sockaddr_storage=yes +if { (eval echo configure:10069: \"$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 -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:10396: checking for $ac_hdr" >&5 +echo "configure:10095: 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:10406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10105: \"$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* @@ -10428,129 +10127,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:10453: 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:10135: 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:10463: \"$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:10153: \"$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 <&6 -fi -done - - - 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:10495: 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 < +/* 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:10505: \"$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:10175: \"$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="-l$ac_lib" +break 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* +done +LIBS="$ac_func_search_save_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 +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 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:10210: 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:10246: 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:10275: \"$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 +if test $ac_cv_func_res_query = no ; then + echo $ac_n "checking for __res_query""... $ac_c" 1>&6 +echo "configure:10296: 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)(); - if test $krb5_impl = mit; then - echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6 -echo "configure:10539: checking for main in -lk5crypto" >&5 -ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'` +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:10325: \"$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 + + ac_cv_func_res_query=$ac_cv_func___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:10349: 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:10368: \"$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 @@ -10565,30 +10379,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:10577: 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:10400: 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:10419: \"$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 @@ -10603,32 +10430,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:10617: 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:10451: 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:10470: \"$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 @@ -10643,30 +10481,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:10655: 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:10502: 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:10521: \"$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 @@ -10681,83 +10532,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 - - - else - have_krb5=no - echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2 - fi +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:10553: 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 <&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:10733: 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:10620: 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:10743: \"$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:10649: \"$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:10773: 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:10677: 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:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10706: \"$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:10813: 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:10738: 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:10828: \"$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:10870: 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:10769: 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:10891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10787: \"$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 - - LIBS="$save_LIBS" - fi - fi -fi +echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6 -if test $ol_link_krb5 = yes ; then - ol_with_kerberos=found + 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_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:10930: checking for $ac_hdr" >&5 +echo "configure:10818: 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:10940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10828: \"$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* @@ -10963,104 +10851,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:10969: 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:10874: 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:10984: \"$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:10884: \"$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:11054: checking for $ac_hdr" >&5 +echo "configure:10916: 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:11064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10926: \"$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* @@ -11086,30 +10948,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:11094: 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:10960: 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:10975: \"$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 @@ -11124,36 +10986,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:11138: 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:10998: 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:11013: \"$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 @@ -11168,37 +11024,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:11183: 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:11038: 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:11053: \"$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 @@ -11213,169 +11064,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:11076: 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:11091: \"$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 -if test $ol_link_tls = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TLS 1 + cat >> confdefs.h <<\EOF +#define HAVE_KRB5 1 EOF -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 +fi - cat >> confdefs.h <<\EOF -#define SLAPD_LMHASH 1 -EOF +if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \ + $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then + for ac_hdr in 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:11150: 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:11160: \"$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 -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:11284: checking for _beginthread" >&5 -if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + if test $krb5_impl = mit; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:11190: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -/* 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() { +main() +; return 0; } +EOF +if { (eval echo configure:11205: \"$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" -/* 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 +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k425=yes + KRB4_LIBS="-lkrb4 -ldes425" +else + echo "$ac_t""no" 1>&6 +have_k425=no +fi + + + elif test $krb5_impl = heimdal; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:11230: 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 +if { (eval echo configure:11245: \"$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* -fi +LIBS="$ac_save_LIBS" -if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then +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:11287: 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:11308: \"$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:11369: checking for $ac_hdr" >&5 +echo "configure:11347: 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:11379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11357: \"$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* @@ -11402,202 +11380,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:11408: 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:11386: 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:11425: \"$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:11401: \"$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 - -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* + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_krb4=yes -fi + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF -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:11525: 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:11557: 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:11591: checking for $ac_hdr" >&5 +echo "configure:11468: 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:11601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11478: \"$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* @@ -11623,112 +11500,1074 @@ else fi done - fi - - echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 -echo "configure:11631: 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:11508: 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() { - - /* 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; - +SSLeay_add_ssl_algorithms() ; return 0; } EOF -if { (eval echo configure:11705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11527: \"$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 <&6 +have_ssleay=no +fi + + + if test $have_ssleay = no ; then + echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 +echo "configure:11552: 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 < -#if HAVE_PTHREADS < 7 -#include -#endif -#ifndef NULL -#define NULL (void*)0 -#endif +/* 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 SSL_library_init(); -static void *task(p) - void *p; -{ - return (void *) (p == NULL); -} +int main() { +SSL_library_init() +; return 0; } +EOF +if { (eval echo configure:11571: \"$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_ssleay=yes + need_rsaref=no +else + 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:11597: 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:11661: 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:11744: 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:11773: \"$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:11829: 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:11839: \"$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:11868: 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:11885: \"$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:11985: 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:12017: 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:12051: 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:12061: \"$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:12091: 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:12165: \"$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:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_create=yes +else + 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:12274: 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:12352: \"$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:12436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_kthread=yes +else + 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:12466: 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:12544: \"$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 +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} int main(argc, argv) @@ -11785,43 +12624,240 @@ int main(argc, argv) } EOF -if { (eval echo configure:11789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_create=yes + 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:11814: 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:12658: 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:12736: \"$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:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_pthreads=yes +else + 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:12850: 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 < @@ -11888,19 +12924,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12928: \"$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 < @@ -11972,14 +13008,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:11976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_kthread=yes + 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 @@ -11990,30 +13026,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:12006: 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:13042: 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 < @@ -12080,19 +13116,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13120: \"$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 < @@ -12164,14 +13200,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_pthread=yes + 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 @@ -12182,30 +13218,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:12198: 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:13235: 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 < @@ -12272,19 +13309,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13313: \"$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 < @@ -12356,14 +13393,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_pthreads=yes + 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 @@ -12374,30 +13411,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:12390: 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:13427: 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 < @@ -12464,19 +13501,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13505: \"$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 < @@ -12548,14 +13585,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_mthreads=yes + 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 @@ -12566,30 +13603,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:12582: 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:13620: 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 < @@ -12656,19 +13694,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13698: \"$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 < @@ -12740,14 +13778,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_thread=yes + 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 @@ -12758,31 +13796,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:12775: 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:13813: 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 < @@ -12849,19 +13887,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13891: \"$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 < @@ -12933,14 +13971,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:12937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes + 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 @@ -12951,30 +13989,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:12967: 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:14005: 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 < @@ -13041,19 +14079,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14083: \"$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 < @@ -13125,14 +14163,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lpthread_lmach_lexc=yes + 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 @@ -13143,31 +14181,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:13160: 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:14198: 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 < @@ -13234,19 +14272,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14276: \"$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 < @@ -13318,14 +14356,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lib_lpthread_woff=yes + 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 @@ -13336,31 +14374,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:13353: 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:14391: 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 < @@ -13427,19 +14465,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14469: \"$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 < @@ -13511,14 +14549,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lpthread=yes + 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 @@ -13529,30 +14567,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:13545: 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:14583: 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 < @@ -13619,19 +14657,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14661: \"$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 < @@ -13703,14 +14741,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lc_r=yes + 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 @@ -13721,31 +14759,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:13738: 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:14775: 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 < @@ -13812,19 +14849,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14853: \"$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 < @@ -13896,14 +14933,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:13900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_threads=yes + 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 @@ -13914,31 +14951,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:13931: 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:14968: 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 < @@ -14005,19 +15042,19 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15046: \"$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 < @@ -14089,14 +15126,14 @@ int main(argc, argv) } EOF -if { (eval echo configure:14093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes + 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 @@ -14107,301 +15144,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:14123: 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:15167: 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:15196: \"$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:15225: 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:15280: 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:15309: \"$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:15335: 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:14201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15353: \"$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:15385: 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:14285: \"$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:15414: \"$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:14315: 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:15443: 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:15472: \"$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:15497: 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:15510: 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:14393: \"$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:15535: 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 < @@ -14473,282 +15612,507 @@ int main(argc, argv) } EOF -if { (eval echo configure:14477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ol_cv_pthread_lpthreads_lexc=yes + 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:14508: 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:15638: 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:15724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_select_yields=no +else + 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:15768: 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:15778: \"$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:15808: 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:15837: \"$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:15859: 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:14586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15876: \"$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:15906: 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:15935: \"$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:15985: 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:14670: \"$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:15995: \"$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:16024: 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:14707: 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:16088: 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:14736: \"$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:16098: \"$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:14765: 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:16126: 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:16145: \"$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 @@ -14795,33 +16156,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:14820: checking for $ac_func" >&5 +echo "configure:16185: 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:16214: \"$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 @@ -14869,104 +16234,152 @@ else fi done + fi + fi - echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 -echo "configure:14875: 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:16245: 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:16255: \"$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:16283: 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:16302: \"$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:14925: 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:16355: 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:14954: \"$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:16365: \"$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:14983: checking for $ac_func" >&5 +echo "configure:16394: 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:15037: 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:15050: 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:15075: 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:15156: \"$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:15178: 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:15264: \"$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:16423: \"$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:16449: 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:16484: 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:16494: \"$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:16524: 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:16534: \"$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:15308: checking for $ac_hdr" >&5 +echo "configure:16564: 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:15318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16574: \"$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* @@ -15334,30 +16590,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:16633: 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:16646: \"$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:16662: 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:16675: \"$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:15348: 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:16728: 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() { @@ -15365,276 +16745,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:15377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16757: \"$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:15399: 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:16786: 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:15416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16798: \"$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:15446: 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:15475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16817: \"$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:15525: 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:16857: 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:15535: \"$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:16876: \"$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:16903: \"$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:16944: 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:16965: \"$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:15564: 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:15583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16995: \"$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:15628: checking for $ac_hdr" >&5 +echo "configure:17045: 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:15638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:17055: \"$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* @@ -15660,1019 +17077,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:15666: 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:17083: 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:15685: \"$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:15725: 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:17126: 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:15754: \"$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:15785: 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:15795: \"$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:17183: \"$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:15823: 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:17207: 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:15842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17264: \"$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:17288: 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:15895: 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:15905: \"$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:17345: \"$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:15934: 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:17369: 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:15963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17426: \"$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:15989: 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:17450: 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:16024: 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:16034: \"$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:17507: \"$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:16064: 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:17531: 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:16074: \"$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:17588: \"$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:16104: 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:17612: 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:16114: \"$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:17669: \"$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:17693: 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:16173: 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:16186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17750: \"$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:16202: 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:17774: 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:16215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17831: \"$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:17855: 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:16268: 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:16297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17912: \"$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:16326: 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:17936: 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:16338: \"$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:16357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17993: \"$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:18017: 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:16397: 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:16416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18074: \"$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:18098: 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:16443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18155: \"$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:16484: 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:18179: 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:16505: \"$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:16535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18236: \"$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:18260: 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:16585: 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:16595: \"$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:18317: \"$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:16623: 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:18341: 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:18398: \"$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:16666: 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:18422: 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:18479: \"$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* @@ -16734,26 +18490,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:16747: 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:18503: 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:18560: \"$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* @@ -16815,26 +18571,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:16828: 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:18584: 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:18641: \"$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* @@ -16896,26 +18652,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:16909: 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:18665: 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:18722: \"$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* @@ -16977,26 +18733,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:16990: 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:18746: 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:18803: \"$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* @@ -17058,26 +18814,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:17071: 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:18827: 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:18884: \"$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* @@ -17139,26 +18895,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:18919: 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:18929: \"$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:17152: 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:18959: 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:19016: \"$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* @@ -17220,26 +19027,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:17233: 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:19040: 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:19097: \"$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* @@ -17301,26 +19108,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:17314: 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:19121: 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:19178: \"$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* @@ -17382,26 +19189,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:17395: 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:19202: 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:19259: \"$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* @@ -17463,26 +19270,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:17476: 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:19283: 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:19340: \"$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* @@ -17544,26 +19351,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:17557: 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:19364: 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:19421: \"$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* @@ -17625,26 +19432,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:17638: 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:19445: 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:19502: \"$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* @@ -17706,26 +19513,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:17719: 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:19526: 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:19583: \"$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* @@ -17787,77 +19594,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:17811: 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:17821: \"$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:17851: 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:19607: 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:19664: \"$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* @@ -17919,26 +19675,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:17932: 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:19688: 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:19745: \"$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* @@ -18000,26 +19756,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:18013: 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:19769: 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:19826: \"$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* @@ -18081,26 +19837,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:18094: 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:19850: 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:19907: \"$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* @@ -18162,26 +19918,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:18175: 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:19931: 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:19988: \"$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* @@ -18243,26 +19999,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:18256: 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:20012: 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:20069: \"$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* @@ -18324,26 +20080,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:18337: 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:20093: 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:20150: \"$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* @@ -18405,26 +20161,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:18418: 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:20174: 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:20231: \"$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* @@ -18486,16 +20242,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:18499: checking for Berkeley DB link (-ldb3)" >&5 +echo "configure:20255: 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 @@ -18505,7 +20261,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:20312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db3=yes else @@ -18576,7 +20332,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:18580: checking for Berkeley DB link (-ldb-3)" >&5 +echo "configure:20336: 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 @@ -18586,7 +20342,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:20393: \"$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 @@ -18657,7 +20413,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:18661: checking for Berkeley DB link (-ldb2)" >&5 +echo "configure:20417: 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 @@ -18667,7 +20423,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:20474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db2=yes else @@ -18738,7 +20494,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:18742: checking for Berkeley DB link (-ldb-2)" >&5 +echo "configure:20498: 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 @@ -18748,7 +20504,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:20555: \"$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 @@ -18819,7 +20575,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:18823: checking for Berkeley DB link (-ldb1)" >&5 +echo "configure:20579: 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 @@ -18829,7 +20585,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:20636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_db_db1=yes else @@ -18900,7 +20656,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:18904: checking for Berkeley DB link (-ldb-1)" >&5 +echo "configure:20660: 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 @@ -18910,7 +20666,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:20743: 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 || + patch != DB_VERSION_PATCH ) + { + printf("Berkeley DB version mismatch\n" + "\theader: %s\n\tlibrary: %s\n", + DB_VERSION_STRING, version); + return 1; + } +#endif + + return 0; +} EOF -if { (eval echo configure:18961: \"$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:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +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 -f conftest* +rm -fr conftest* +fi + 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:18987: checking for Berkeley DB thread support" >&5 +echo "configure:20818: 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 @@ -18998,7 +20829,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:20900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_berkeley_db_thread=yes else @@ -19123,17 +20954,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:19131: 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:20963: 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 < @@ -19146,8 +20978,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 @@ -19167,12 +20999,9 @@ 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 @@ -19183,18 +21012,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:19187: checking for MDBM library" >&5 +echo "configure:21016: 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:19193: checking for mdbm_set_chain" >&5 +echo "configure:21022: 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:21051: \"$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 @@ -19237,7 +21066,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 -echo "configure:19241: checking for mdbm_set_chain in -lmdbm" >&5 +echo "configure:21070: 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 @@ -19245,7 +21074,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:21089: \"$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 @@ -19291,17 +21120,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:19295: checking for $ac_hdr" >&5 +echo "configure:21124: 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:19305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21134: \"$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* @@ -19328,7 +21157,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19332: checking for db" >&5 +echo "configure:21161: checking for db" >&5 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19361,18 +21190,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:19365: checking for GDBM library" >&5 +echo "configure:21194: 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:19371: checking for gdbm_open" >&5 +echo "configure:21200: 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:21229: \"$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 @@ -19415,7 +21244,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:19419: checking for gdbm_open in -lgdbm" >&5 +echo "configure:21248: 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 @@ -19423,7 +21252,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:21267: \"$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 @@ -19469,17 +21298,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:19473: checking for $ac_hdr" >&5 +echo "configure:21302: 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:19483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21312: \"$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* @@ -19506,7 +21335,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19510: checking for db" >&5 +echo "configure:21339: checking for db" >&5 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19540,18 +21369,18 @@ fi if test $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:19544: checking for NDBM library" >&5 +echo "configure:21373: 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:19550: checking for dbm_open" >&5 +echo "configure:21379: 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:21408: \"$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 @@ -19594,7 +21423,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:19598: checking for dbm_open in -lndbm" >&5 +echo "configure:21427: 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 @@ -19602,7 +21431,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:21446: \"$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 @@ -19633,7 +21462,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:19637: checking for dbm_open in -ldbm" >&5 +echo "configure:21466: 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 @@ -19641,7 +21470,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:21485: \"$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 @@ -19689,17 +21518,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:19693: checking for $ac_hdr" >&5 +echo "configure:21522: 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:19703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21532: \"$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* @@ -19726,7 +21555,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:19730: checking for db" >&5 +echo "configure:21559: checking for db" >&5 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19759,13 +21588,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 @@ -19786,17 +21615,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:19790: checking for $ac_hdr" >&5 +echo "configure:21619: 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:19800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21629: \"$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* @@ -19818,11 +21647,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:19822: checking for TCP wrappers library" >&5 +echo "configure:21651: checking for TCP wrappers library" >&5 save_LIBS="$LIBS" LIBS="$LIBS -lwrap" cat > conftest.$ac_ext < @@ -19837,7 +21666,7 @@ hosts_access(req) ; return 0; } EOF -if { (eval echo configure:19841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21670: \"$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 @@ -19849,376 +21678,133 @@ else LIBS="$LIBS -lnsl" cat > conftest.$ac_ext < -int allow_severity = 0; -int deny_severity = 0; - -struct request_info *req; - -int main() { - -hosts_access(req) - -; return 0; } -EOF -if { (eval echo configure:19868: \"$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 - LIBS="$save_LIBS -lnsl" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - have_wrappers=no - LIBS=$save_LIBS -fi -rm -f conftest* -fi -rm -f conftest* -else - echo "$ac_t""no" 1>&6 -have_wrappers=no -fi -done - - - if test $have_wrappers = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TCPD 1 -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; } - 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:19908: 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:19937: \"$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:19969: 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:19979: \"$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:20009: 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:20053: 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 +#line 21682 "configure" +#include "confdefs.h" - if test $ol_link_sql != no ; then - SLAPD_SQL_LIBS="$ol_link_sql" +#include +int allow_severity = 0; +int deny_severity = 0; - elif test $ol_enable_sql != auto ; then - { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; } - fi -fi +struct request_info *req; + +int main() { -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:20111: 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 < +hosts_access(req) + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:20121: \"$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:21697: \"$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" + echo "$ac_t""-lwrap -lnsl" 1>&6 + have_wrappers=yes + LIBS="$save_LIBS -lnsl" 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" + + echo "$ac_t""no" 1>&6 + have_wrappers=no + LIBS=$save_LIBS 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 +have_wrappers=no fi done - if test $ac_cv_header_tcl_h != yes ; then - have_tcl=no + if test $have_wrappers = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + + WRAP_LIBS="-lwrap" + elif test $ol_enable_wrappers = yes ; then + { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; } 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:20153: checking for main in -l$lib" >&5 -ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo "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:21737: 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:20168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21766: \"$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:20212: checking for $ac_hdr" >&5 +echo "configure:21798: 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:20222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21808: \"$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* @@ -20241,32 +21827,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:20251: 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:21838: 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:21857: \"$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 @@ -20281,44 +21868,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:20303: 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:21882: 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:21901: \"$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 @@ -20333,30 +21912,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 @@ -20364,17 +21939,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:20368: checking for $ac_hdr" >&5 +echo "configure:21943: 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:20378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21953: \"$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* @@ -20403,7 +21978,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:20407: checking for sasl_client_init in -lsasl2" >&5 +echo "configure:21982: 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 @@ -20411,7 +21986,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:22001: \"$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 @@ -20441,7 +22016,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:20445: checking for sasl_client_init in -lsasl" >&5 +echo "configure:22020: 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 @@ -20449,7 +22024,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:22039: \"$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 @@ -20496,13 +22071,13 @@ fi fi else echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6 -echo "configure:20500: checking Cyrus SASL library version" >&5 +echo "configure:22075: 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 */ -#if SASL_VERSION_MAJOR == 1 && SASL_VERSION_MINOR >= 5 - char *__sasl_compat = "1.5.x okay"; -#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1 - __sasl_compat "2.2+ or better okay (we guess)"; +/* 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 - __sasl_compat = "2.1.3+ or better okay"; + && SASL_VERSION_STEP >=15 + char *__sasl_compat = "2.1.15+ or better okay"; #endif EOF @@ -20538,7 +22111,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 @@ -20553,12 +22126,12 @@ EOF ac_save_LIBS="$LIBS" LIBS="$LIBS $ol_link_sasl" echo $ac_n "checking for sasl_version""... $ac_c" 1>&6 -echo "configure:20557: checking for sasl_version" >&5 +echo "configure:22130: 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:22159: \"$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 @@ -20605,207 +22178,103 @@ else fi LIBS="$ac_save_LIBS" - fi - -else - echo "configure: warning: SASL authentication not supported!" 1>&2 - if test $ol_link_tls = no ; then - echo "configure: warning: Strong authentication not supported!" 1>&2 - fi -fi - -if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then - dev=no - if test -r /dev/urandom ; then - dev="/dev/urandom"; - elif test -r /idev/urandom ; then - dev="/idev/urandom"; - elif test -r /dev/srandom ; then - dev="/dev/srandom"; - elif test -r /dev/random ; then - dev="/dev/random"; - elif test -r /idev/random ; then - dev="/idev/random"; - fi - - if test $dev != no ; then - cat >> confdefs.h <&6 -echo "configure:20645: 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 < -#include -#include -int main() { -struct url *u = fetchParseURL("file:///"); -; return 0; } -EOF -if { (eval echo configure:20661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ol_cv_lib_fetch=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_lib_fetch=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ol_cv_lib_fetch" 1>&6 -LIBS=$ol_LIBS -if test $ol_cv_lib_fetch != no ; then - ol_link_fetch="-lfetch -lcom_err" - cat >> confdefs.h <<\EOF -#define HAVE_FETCH 1 -EOF - -fi - - - if test $ol_cv_lib_fetch != no ; then - LDIF_LIBS="$LDIF_LIBS $ol_link_fetch" - ol_link_fetch=freebsd - - elif test $ol_with_fetch != auto ; then - { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; } - fi -fi - -ol_link_readline=no -if test $ol_with_readline != no ; then - for ac_hdr in readline/readline.h readline/history.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20699: 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:20709: \"$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: warning: SASL authentication not supported!" 1>&2 + if test $ol_link_tls = no ; then + echo "configure: warning: Strong authentication not supported!" 1>&2 + fi fi -done +if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then + dev=no + if test -r /dev/urandom ; then + dev="/dev/urandom"; + elif test -r /idev/urandom ; then + dev="/idev/urandom"; + elif test -r /dev/srandom ; then + dev="/dev/srandom"; + elif test -r /dev/random ; then + dev="/dev/random"; + elif test -r /idev/random ; then + dev="/idev/random"; + fi + + if test $dev != no ; then + cat >> confdefs.h <&6 -echo "configure:20740: checking for readline in -lreadline" >&5 -ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'` -if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then +ol_link_fetch=no +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:22220: checking fetch(3) library" >&5 +if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lreadline $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include int main() { -readline() +struct url *u = fetchParseURL("file:///"); ; return 0; } EOF -if { (eval echo configure:20759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22236: \"$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_lib_fetch=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_lib_fetch=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_readline=yes -else - echo "$ac_t""no" 1>&6 -have_readline=no -fi - - LIBS="$save_LIBS" - - if test $have_readline = yes ; then - ol_with_readline=found - ol_link_readline=yes - - READLINE_LIBS="-lreadline" - fi - fi fi -if test $ol_link_readline = yes ; then +echo "$ac_t""$ol_cv_lib_fetch" 1>&6 +LIBS=$ol_LIBS +if test $ol_cv_lib_fetch != no ; then + ol_link_fetch="-lfetch -lcom_err" cat >> confdefs.h <<\EOF -#define HAVE_READLINE 1 +#define HAVE_FETCH 1 EOF fi + if test $ol_cv_lib_fetch != no ; then + LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch" + ol_link_fetch=freebsd + + elif test $ol_with_fetch != auto ; then + { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; } + fi +fi + if test $ol_enable_crypt != no ; then save_LIBS="$LIBS" LIBS="$TLS_LIBS $LIBS" echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:20804: checking for crypt" >&5 +echo "configure:22273: 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:22302: \"$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 @@ -20849,7 +22318,7 @@ else LIBS="$save_LIBS" echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:20853: checking for crypt in -lcrypt" >&5 +echo "configure:22322: 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 @@ -20857,7 +22326,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:22341: \"$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 @@ -20903,7 +22372,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 @@ -20913,12 +22382,12 @@ fi if test $ol_enable_proctitle != no ; then echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 -echo "configure:20917: checking for setproctitle" >&5 +echo "configure:22386: 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:22415: \"$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 @@ -20961,76 +22430,256 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:20965: checking for setproctitle in -lutil" >&5 +echo "configure:22434: 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 < 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:22493: 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:22503: \"$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:22532: 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:22593: 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:22603: \"$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 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:22633: 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:20984: \"$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:22643: \"$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:21024: checking for $ac_hdr" >&5 +echo "configure:22673: 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:21034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:22683: \"$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* @@ -21057,28 +22706,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:21063: 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:22732: 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:22751: \"$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 @@ -21093,32 +22762,117 @@ 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:22778: 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 + + 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:22837: 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 + rm -rf conftest* + ol_cv_type_long_long=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_type_long_long=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_type_long_long" 1>&6 +if test $ol_cv_type_long_long = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LONG_LONG 1 +EOF - elif test $ol_enable_slp = yes ; then - { echo "configure: error: SLP not found" 1>&2; exit 1; } - fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:21117: checking for ANSI C header files" >&5 +echo "configure:22871: 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 @@ -21126,7 +22880,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:21130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:22884: \"$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* @@ -21143,7 +22897,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 @@ -21161,7 +22915,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 @@ -21182,7 +22936,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #if ((' ' & 0x0FF) == 0x020) @@ -21200,7 +22954,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:21204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:22958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -21224,12 +22978,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:21228: checking for mode_t" >&5 +echo "configure:22982: 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 @@ -21260,12 +23014,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:21264: checking for off_t" >&5 +echo "configure:23018: 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 @@ -21296,12 +23050,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:21300: checking for pid_t" >&5 +echo "configure:23054: 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 @@ -21332,19 +23086,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:21336: checking for ptrdiff_t" >&5 +echo "configure:23090: 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:21348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -21365,12 +23119,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:21369: checking return type of signal handlers" >&5 +echo "configure:23123: 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 @@ -21387,7 +23141,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:21391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -21406,12 +23160,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:21410: checking for size_t" >&5 +echo "configure:23164: 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 @@ -21443,12 +23197,12 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:21447: checking for ssize_t" >&5 +echo "configure:23201: 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 @@ -21479,12 +23233,12 @@ EOF fi echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 -echo "configure:21483: checking for caddr_t" >&5 +echo "configure:23237: 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 @@ -21516,12 +23270,12 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:21520: checking for socklen_t" >&5 +echo "configure:23274: 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:23293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_socklen_t=yes else @@ -21556,12 +23310,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:21560: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:23314: 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 @@ -21569,7 +23323,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:21573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -21591,12 +23345,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:21595: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:23349: 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 @@ -21605,7 +23359,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:21609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -21626,12 +23380,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:21630: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:23384: 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 @@ -21639,7 +23393,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:21643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -21660,12 +23414,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:21664: checking for uid_t in sys/types.h" >&5 +echo "configure:23418: 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 @@ -21694,19 +23448,19 @@ EOF fi echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 -echo "configure:21698: checking for sig_atomic_t" >&5 +echo "configure:23452: 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:21710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_sig_atomic_t=yes else @@ -21730,13 +23484,13 @@ EOF # test for pw_gecos in struct passwd echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 -echo "configure:21734: checking struct passwd for pw_gecos" >&5 +echo "configure:23488: 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() { @@ -21746,7 +23500,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:21750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -21768,13 +23522,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:21772: checking struct passwd for pw_passwd" >&5 +echo "configure:23526: 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() { @@ -21784,7 +23538,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:21788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -21806,7 +23560,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:21810: checking if toupper() requires islower()" >&5 +echo "configure:23564: 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 @@ -21815,7 +23569,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -21827,7 +23581,7 @@ main() exit(1); } EOF -if { (eval echo configure:21831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:23585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -21850,12 +23604,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:21854: checking for working const" >&5 +echo "configure:23608: 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:23662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -21925,12 +23679,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:21929: checking if compiler understands volatile" >&5 +echo "configure:23683: 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:23697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -21963,20 +23717,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:21973: checking whether byte ordering is bigendian" >&5 +echo "configure:23728: 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 @@ -21987,11 +23742,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:21991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23746: \"$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 @@ -22002,7 +23757,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:22006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -22022,7 +23777,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:23794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -22061,15 +23816,16 @@ fi fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:22065: checking size of short" >&5 +echo "configure:23820: 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 @@ -22077,7 +23833,7 @@ int main() { switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:22081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else @@ -22100,15 +23856,16 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:22104: checking size of int" >&5 +echo "configure:23860: 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 @@ -22116,7 +23873,7 @@ int main() { switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:22120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else @@ -22139,15 +23896,16 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:22143: checking size of long" >&5 +echo "configure:23900: 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 @@ -22155,7 +23913,7 @@ int main() { switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:22159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:23917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else @@ -22177,6 +23935,46 @@ cat >> confdefs.h <&6 +echo "configure:23940: 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:23957: \"$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 @@ -22206,7 +24004,7 @@ EOF echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:22210: checking for 8-bit clean memcmp" >&5 +echo "configure:24008: 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 @@ -22214,7 +24012,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:24026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -22241,13 +24039,21 @@ fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + +if test $ac_cv_func_memcmp_clean = no ; then + cat >> confdefs.h <<\EOF +#define NEED_MEMCMP_REPLACEMENT 1 +EOF + +fi + echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:22246: checking for strftime" >&5 +echo "configure:24052: 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:24081: \"$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 @@ -22293,7 +24099,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:22297: checking for strftime in -lintl" >&5 +echo "configure:24103: 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 @@ -22301,7 +24107,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:24122: \"$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 @@ -22340,12 +24146,12 @@ fi echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 -echo "configure:22344: checking for inet_aton()" >&5 +echo "configure:24150: 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:24177: \"$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 @@ -22389,12 +24195,12 @@ EOF echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 -echo "configure:22393: checking for _spawnlp" >&5 +echo "configure:24199: 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:24228: \"$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 @@ -22442,12 +24248,12 @@ fi echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 -echo "configure:22446: checking for _snprintf" >&5 +echo "configure:24252: 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:24281: \"$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 @@ -22497,12 +24303,12 @@ fi echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 -echo "configure:22501: checking for _vsnprintf" >&5 +echo "configure:24307: 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:24336: \"$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 @@ -22552,12 +24358,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:22556: checking for vprintf" >&5 +echo "configure:24362: 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:24391: \"$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 @@ -22605,12 +24411,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:22609: checking for _doprnt" >&5 +echo "configure:24415: 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:24444: \"$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 @@ -22663,12 +24469,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:22667: checking for $ac_func" >&5 +echo "configure:24473: 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:24502: \"$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 @@ -22752,17 +24558,17 @@ for ac_func in \ setsid \ setuid \ seteuid \ - sigaction \ signal \ - sigset \ strdup \ - strerror \ strpbrk \ strrchr \ strsep \ strstr \ strtol \ strtoul \ + strtoq \ + strtouq \ + strtoll \ strspn \ sysconf \ usleep \ @@ -22775,12 +24581,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:22779: checking for $ac_func" >&5 +echo "configure:24585: 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:24614: \"$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 @@ -22832,12 +24638,12 @@ done for ac_func in getopt getpeereid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:22836: checking for $ac_func" >&5 +echo "configure:24642: 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:24671: \"$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 @@ -22888,139 +24694,60 @@ 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:22897: 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:22909: \"$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:22949: 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:22968: \"$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 - - - echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:22991: 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:24703: 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:23004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:24715: \"$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 @@ -23028,17 +24755,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:23032: checking for $ac_hdr" >&5 +echo "configure:24759: 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:23042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:24769: \"$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* @@ -23069,7 +24796,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:23073: checking for lt_dlinit in -lltdl" >&5 +echo "configure:24800: 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 @@ -23077,7 +24804,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:24819: \"$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 @@ -23105,7 +24832,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 SLAPI_LIBS=-lltdl - LIBSLAPI=./libslapi.a + LIBSLAPI=libslapi.a LIBSLAPITOOLS=../libslapi.a cat >> confdefs.h <<\EOF #define HAVE_LIBLTDL 1 @@ -23177,12 +24904,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 @@ -23195,12 +24916,6 @@ if test "$ol_enable_multimaster" != no ; then #define SLAPD_MULTIMASTER 1 EOF -fi -if test "$ol_enable_phonetic" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_PHONETIC 1 -EOF - fi if test "$ol_enable_rlookups" != no ; then cat >> confdefs.h <<\EOF @@ -23224,255 +24939,380 @@ 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 -fi - -if test "$ol_enable_ldap" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_LDAP 1 + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_LDAP_DYNAMIC 1 + 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 <> 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_LDAP=yes + BUILD_META=$ol_enable_meta BUILD_REWRITE=yes - if test "$ol_with_meta_module" != static ; then - cat >> confdefs.h <<\EOF -#define SLAPD_META_DYNAMIC 1 -EOF - - BUILD_META=mod - BUILD_META_DYNAMIC=shared + 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 <<\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_glue" != no ; then + BUILD_GLUE=$ol_enable_glue + if test "$ol_enable_glue" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_SQL 1 +if test "$ol_enable_ppolicy" != no ; then + BUILD_PPOLICY=$ol_enable_ppolicy + if test "$ol_enable_ppolicy" = mod ; then + MFLAG=SLAPD_MOD_DYNAMIC + SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la" + else + MFLAG=SLAPD_MOD_STATIC + fi + cat >> confdefs.h <> confdefs.h <<\EOF -#define SLAPD_SQL_DYNAMIC 1 +fi + +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 <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +chmod +x tests/run date > stamp-h +BACKENDSC="servers/slapd/backends.c" +echo "Making $BACKENDSC" +rm -f $BACKENDSC +cat > $BACKENDSC << ENDX +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2005 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. */ + +#include "portable.h" +#include "slap.h" + +ENDX +if test "${STATIC_BACKENDS}"; then + for b in config ${STATIC_BACKENDS}; do + bb=`echo "${b}" | sed -e 's/back-//'` + cat >> $BACKENDSC << ENDX +extern BI_init ${bb}_back_initialize; +ENDX + done + + cat >> $BACKENDSC << ENDX + +BackendInfo slap_binfo[] = { +ENDX + + for b in config ${STATIC_BACKENDS}; do + bb=`echo "${b}" | sed -e 's/back-//'` + echo " Add ${bb} ..." + cat >> $BACKENDSC << ENDX + { "${bb}", ${bb}_back_initialize }, +ENDX + done + + cat >> $BACKENDSC << ENDX + { NULL, NULL }, +}; + +/* end of generated file */ +ENDX +fi + echo Please run \"make depend\" to build dependencies exit 0