X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=4029558bca8c6f8f86f4b3e7d595a3d7f01ac9fe;hb=fbe44c195d9b5fee1e891793f4bf1cc196ba96ca;hp=0c12cb51e08f9497023903b9e94e5d9b51c91cb8;hpb=5f2850931190f82de4095c933bd4b5a630d1e465;p=openldap diff --git a/configure b/configure index 0c12cb51e0..4029558bca 100755 --- a/configure +++ b/configure @@ -1,7 +1,19 @@ #! /bin/sh +# $OpenLDAP$ +# from OpenLDAP: pkg/ldap/configure.in,v 1.278 1999/11/17 01:18:04 kdz Exp + +# Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved. +# +# Redistribution and use in source and binary forms are permitted only +# as authorized by the OpenLDAP Public License. A copy of this +# license is available at http://www.OpenLDAP.org/license.html or +# in file LICENSE in the top-level directory of the distribution. + +echo "Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved." +echo "Copying restrictions apply, see COPYRIGHT file." # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -23,7 +35,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-cache enable caching (yes)" ac_help="$ac_help - --enable-dns enable V2 DNS extension (no)" + --enable-dns enable V2 DX Referrals extension (no)" ac_help="$ac_help --enable-referrals enable V2 Referrals extension (yes)" ac_help="$ac_help @@ -32,38 +44,50 @@ ac_help="$ac_help --enable-x-compile enable cross compiling (no)" ac_help="$ac_help --enable-dmalloc enable debug malloc support (no)" +ac_help="$ac_help + --with-cyrus-sasl with Cyrus SASL support (auto)" +ac_help="$ac_help + --with-fetch with fetch URL support (auto)" ac_help="$ac_help --with-kerberos with Kerberos support (auto)" ac_help="$ac_help - --with-readline with readline support (auto)" + --with-readline with readline support (auto)" ac_help="$ac_help --with-threads use threads (auto)" ac_help="$ac_help - --with-tls with TLS/SSL support (auto)" + --with-tls with TLS/SSL support (auto)" ac_help="$ac_help --with-yielding-select with implicitly yielding select (auto)" ac_help="$ac_help -LDAPD Options:" +LDAPD (X.500-to-LDAP Gateway) Options:" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" ac_help="$ac_help -SLAPD Options:" +SLAPD (Standalone LDAP Daemon) Options:" ac_help="$ac_help --enable-slapd enable building slapd (yes)" -ac_help="$ac_help - --enable-aclgroups enable ACL group support (auto)" ac_help="$ac_help --enable-cleartext enable cleartext passwords (yes)" ac_help="$ac_help --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help --enable-modules enable dynamic module support (no)" +ac_help="$ac_help + --enable-multimaster enable multimaster replication (no)" ac_help="$ac_help --enable-phonetic enable phonetic/soundex (no)" +ac_help="$ac_help + --enable-quipu build quipu migration tools (no)" ac_help="$ac_help --enable-rlookups enable reverse lookups (auto)" +ac_help="$ac_help + --enable-aci enable per-object ACIs (no)" +ac_help="$ac_help + --enable-discreteaci enable discrete rights in ACIs (no)" ac_help="$ac_help --enable-wrappers enable tcp wrapper support (no)" +ac_help="$ac_help + --enable-dynamic enable linking built binaries with dynamic libs (no)" ac_help="$ac_help --enable-bdb2 enable bdb2 backend (no)" ac_help="$ac_help @@ -74,10 +98,10 @@ ac_help="$ac_help --with-ldap-module module type (static)" ac_help="$ac_help --enable-ldbm enable ldbm backend (yes)" -ac_help="$ac_help - --with-ldbm-module module type (static)" ac_help="$ac_help --with-ldbm-api use LDBM API (auto)" +ac_help="$ac_help + --with-ldbm-module module type (static)" ac_help="$ac_help --with-ldbm-type use LDBM type (auto)" ac_help="$ac_help @@ -97,21 +121,21 @@ ac_help="$ac_help ac_help="$ac_help --with-tcl-module module type (static)" ac_help="$ac_help -SLURPD Options:" +SLURPD (Replication Daemon) Options:" ac_help="$ac_help --enable-slurpd enable building slurpd (auto)" ac_help="$ac_help Library Generation & Linking Options" ac_help="$ac_help - --enable-static build static libraries [default=yes] - --enable-static=PKGS only build shared libraries if the current package - appears as an element in the PKGS list" + --enable-static[=PKGS] build static libraries [default=yes]" ac_help="$ac_help - --enable-shared build shared libraries [default=yes] - --enable-shared=PKGS only build shared libraries if the current package - appears as an element in the PKGS list" + --enable-shared[=PKGS] build shared libraries [default=yes]" +ac_help="$ac_help + --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" +ac_help="$ac_help + --disable-libtool-lock avoid locking (might break parallel builds)" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -434,7 +458,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -629,15 +653,138 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. OL_VERSION=`cat $ac_aux_dir/version` if test -z "$OL_VERSION"; then { echo "configure: error: could not determine version" 1>&2; exit 1; } fi +echo "Configuring OpenLDAP $OL_VERSION ..." + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:670: 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. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:711: checking target system type" >&5 +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. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:751: checking build system type" >&5 +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. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + + # Do some error checking and defaulting for the host and target type. # The inputs are: @@ -659,69 +806,6 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:670: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:691: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:709: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -740,9 +824,9 @@ 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:744: checking for a BSD compatible install" >&5 +echo "configure:828: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; 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=":" @@ -760,6 +844,10 @@ else 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 @@ -788,12 +876,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +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:797: checking whether build environment is sane" >&5 +echo "configure:885: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -841,18 +929,52 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," +for ac_prog in mawk gawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:946: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:976: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -877,6 +999,7 @@ else fi + PACKAGE=OpenLDAP VERSION=$OL_VERSION @@ -889,7 +1012,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:893: checking for working aclocal" >&5 +echo "configure:1016: 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. @@ -902,7 +1025,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:906: checking for working autoconf" >&5 +echo "configure:1029: 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. @@ -915,7 +1038,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:919: checking for working automake" >&5 +echo "configure:1042: 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. @@ -928,7 +1051,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:932: checking for working autoheader" >&5 +echo "configure:1055: 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. @@ -941,7 +1064,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:945: checking for working makeinfo" >&5 +echo "configure:1068: 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. @@ -953,6 +1076,51 @@ else echo "$ac_t""missing" 1>&6 fi +install_sh="$missing_dir/install-sh" +test -f "$install_sh" || install_sh="$missing_dir/install.sh" + +for ac_prog in gnutar gtar tar +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1088: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AMTAR"; then + ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AMTAR="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AMTAR="$ac_cv_prog_AMTAR" +if test -n "$AMTAR"; then + echo "$ac_t""$AMTAR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AMTAR" && break +done + + +AMTARFLAGS= +if test -n "$AMTAR"; then + if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then + AMTARFLAGS=o + fi +fi + cat >> confdefs.h <&6 -echo "configure:971: checking configure arguments" >&5 +echo "configure:1139: checking configure arguments" >&5 top_builddir=`pwd` -cat >> confdefs.h <<\EOF -#define HAVE_MKVERSION 1 -EOF - - -ldap_subdir="openldap" +ldap_subdir="/openldap" # Check whether --with-subdir or --without-subdir was given. if test "${with_subdir+set}" = set; then withval="$with_subdir" - - if test "$withval" = "no"; then - ldap_subdir="" - elif test "$withval" != "yes"; then + case "$withval" in + no) ldap_subdir="" + ;; + yes) + ;; + /*|\\*) ldap_subdir="$withval" - fi + ;; + *) + ldap_subdir="/$withval" + ;; +esac fi @@ -1174,13 +1343,55 @@ else fi # end --enable-dmalloc +# OpenLDAP --with-cyrus_sasl + # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given. +if test "${with_cyrus_sasl+set}" = set; then + withval="$with_cyrus_sasl" + + 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-cyrus_sasl" 1>&2; exit 1; } + fi + ol_with_cyrus_sasl="$ol_arg" + +else + ol_with_cyrus_sasl="auto" +fi +# end --with-cyrus_sasl + +# OpenLDAP --with-fetch + # Check whether --with-fetch or --without-fetch was given. +if test "${with_fetch+set}" = set; then + withval="$with_fetch" + + 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-fetch" 1>&2; exit 1; } + fi + ol_with_fetch="$ol_arg" + +else + ol_with_fetch="auto" +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 k4 afs yes no ; do + for ol_val in auto k5 kth k4 afs yes no ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1222,7 +1433,7 @@ if test "${with_threads+set}" = set; then withval="$with_threads" ol_arg=invalid - for ol_val in auto posix mach lwp yes no manual ; do + for ol_val in auto nt posix mach pth lwp yes no manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1280,7 +1491,6 @@ fi # end --with-yielding_select - # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given. if test "${with_xxldapdoptions+set}" = set; then withval="$with_xxldapdoptions" @@ -1334,26 +1544,6 @@ else ol_enable_slapd="yes" fi # end --enable-slapd -# OpenLDAP --enable-aclgroups - # Check whether --enable-aclgroups or --disable-aclgroups was given. -if test "${enable_aclgroups+set}" = set; then - enableval="$enable_aclgroups" - - 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-aclgroups" 1>&2; exit 1; } - fi - ol_enable_aclgroups="$ol_arg" - -else - ol_enable_aclgroups="auto" -fi -# end --enable-aclgroups # OpenLDAP --enable-cleartext # Check whether --enable-cleartext or --disable-cleartext was given. if test "${enable_cleartext+set}" = set; then @@ -1414,6 +1604,26 @@ else ol_enable_modules="no" fi # end --enable-modules +# OpenLDAP --enable-multimaster + # Check whether --enable-multimaster or --disable-multimaster was given. +if test "${enable_multimaster+set}" = set; then + enableval="$enable_multimaster" + + 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-multimaster" 1>&2; exit 1; } + fi + ol_enable_multimaster="$ol_arg" + +else + ol_enable_multimaster="no" +fi +# end --enable-multimaster # OpenLDAP --enable-phonetic # Check whether --enable-phonetic or --disable-phonetic was given. if test "${enable_phonetic+set}" = set; then @@ -1434,6 +1644,26 @@ else ol_enable_phonetic="no" fi # end --enable-phonetic +# OpenLDAP --enable-quipu + # Check whether --enable-quipu or --disable-quipu was given. +if test "${enable_quipu+set}" = set; then + enableval="$enable_quipu" + + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; } + fi + ol_enable_quipu="$ol_arg" + +else + ol_enable_quipu="no" +fi +# end --enable-quipu # OpenLDAP --enable-rlookups # Check whether --enable-rlookups or --disable-rlookups was given. if test "${enable_rlookups+set}" = set; then @@ -1454,10 +1684,10 @@ else ol_enable_rlookups="auto" fi # end --enable-rlookups -# OpenLDAP --enable-wrappers - # Check whether --enable-wrappers or --disable-wrappers was given. -if test "${enable_wrappers+set}" = set; then - enableval="$enable_wrappers" +# OpenLDAP --enable-aci + # Check whether --enable-aci or --disable-aci was given. +if test "${enable_aci+set}" = set; then + enableval="$enable_aci" ol_arg=invalid for ol_val in auto yes no ; do @@ -1466,19 +1696,18 @@ if test "${enable_wrappers+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; } fi - ol_enable_wrappers="$ol_arg" + ol_enable_aci="$ol_arg" else - ol_enable_wrappers="no" + ol_enable_aci="no" fi -# end --enable-wrappers - -# OpenLDAP --enable-bdb2 - # Check whether --enable-bdb2 or --disable-bdb2 was given. -if test "${enable_bdb2+set}" = set; then - enableval="$enable_bdb2" +# end --enable-aci +# OpenLDAP --enable-discreteaci + # Check whether --enable-discreteaci or --disable-discreteaci was given. +if test "${enable_discreteaci+set}" = set; then + enableval="$enable_discreteaci" ol_arg=invalid for ol_val in auto yes no ; do @@ -1487,22 +1716,83 @@ if test "${enable_bdb2+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; } fi - ol_enable_bdb2="$ol_arg" + ol_enable_discreteaci="$ol_arg" else - ol_enable_bdb2="no" + ol_enable_discreteaci="no" fi -# end --enable-bdb2 -# OpenLDAP --with-bdb2_module - # Check whether --with-bdb2_module or --without-bdb2_module was given. -if test "${with_bdb2_module+set}" = set; then - withval="$with_bdb2_module" +# end --enable-discreteaci +# OpenLDAP --enable-wrappers + # Check whether --enable-wrappers or --disable-wrappers was given. +if test "${enable_wrappers+set}" = set; then + enableval="$enable_wrappers" ol_arg=invalid - for ol_val in static dynamic ; do - if test "$withval" = "$ol_val" ; then + 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-wrappers" 1>&2; exit 1; } + fi + ol_enable_wrappers="$ol_arg" + +else + ol_enable_wrappers="no" +fi +# end --enable-wrappers +# OpenLDAP --enable-dynamic + # Check whether --enable-dynamic or --disable-dynamic was given. +if test "${enable_dynamic+set}" = set; then + enableval="$enable_dynamic" + + 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-dynamic" 1>&2; exit 1; } + fi + ol_enable_dynamic="$ol_arg" + +else + ol_enable_dynamic="no" +fi +# end --enable-dynamic + +# OpenLDAP --enable-bdb2 + # Check whether --enable-bdb2 or --disable-bdb2 was given. +if test "${enable_bdb2+set}" = set; then + enableval="$enable_bdb2" + + 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-bdb2" 1>&2; exit 1; } + fi + ol_enable_bdb2="$ol_arg" + +else + ol_enable_bdb2="no" +fi +# end --enable-bdb2 +# OpenLDAP --with-bdb2_module + # Check whether --with-bdb2_module or --without-bdb2_module was given. +if test "${with_bdb2_module+set}" = set; then + withval="$with_bdb2_module" + + ol_arg=invalid + for ol_val in static dynamic ; do + if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi done @@ -1577,47 +1867,47 @@ else ol_enable_ldbm="yes" fi # end --enable-ldbm -# 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" +# OpenLDAP --with-ldbm_api + # Check whether --with-ldbm_api or --without-ldbm_api was given. +if test "${with_ldbm_api+set}" = set; then + withval="$with_ldbm_api" ol_arg=invalid - for ol_val in static dynamic ; do + for ol_val in auto db2 db mdbm gdbm ndbm manual ; 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; } + { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; } fi - ol_with_ldbm_module="$ol_arg" + ol_with_ldbm_api="$ol_arg" else - ol_with_ldbm_module="static" + ol_with_ldbm_api="auto" fi -# end --with-ldbm_module +# end --with-ldbm_api -# OpenLDAP --with-ldbm_api - # Check whether --with-ldbm_api or --without-ldbm_api was given. -if test "${with_ldbm_api+set}" = set; then - withval="$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 auto db2 db mdbm gdbm ndbm manual ; do + 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_api" 1>&2; exit 1; } + { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; } fi - ol_with_ldbm_api="$ol_arg" + ol_with_ldbm_module="$ol_arg" else - ol_with_ldbm_api="auto" + ol_with_ldbm_module="static" fi -# end --with-ldbm_api +# end --with-ldbm_module # OpenLDAP --with-ldbm_type # Check whether --with-ldbm_type or --without-ldbm_type was given. @@ -1886,6 +2176,7 @@ else fi + # validate options if test $ol_enable_dns = yes ; then if test $ol_enable_referrals = no ; then @@ -1919,21 +2210,30 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_tcl = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2 fi - if test $ol_enable_aclgroups = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable-aclgroups argument" 1>&2 - fi if test $ol_enable_modules = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2 fi + if test $ol_enable_multimaster = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2 + fi if test $ol_enable_wrappers = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2 fi if test $ol_enable_phonetic = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2 fi + if test $ol_enable_quipu = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2 + fi if test $ol_enable_rlookups = yes ; then echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2 fi + if test $ol_enable_aci = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2 + fi + if test $ol_enable_discreteaci = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2 + fi if test $ol_with_ldbm_api != auto ; then echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2 fi @@ -1974,11 +2274,15 @@ if test $ol_enable_slapd = no ; then ol_enable_shell=no ol_enable_tcl=no - ol_enable_aclgroups=no ol_enable_modules=no + ol_enable_multimaster=no ol_enable_phonetic=no + ol_enable_quipu=no ol_enable_rlookups=no + ol_enable_aci=no + ol_enable_discreteaci=no ol_enable_wrappers=no + ol_enable_dynamic=no ol_with_ldbm_api=no ol_with_ldbm_type=no @@ -2065,8 +2369,8 @@ fi echo "$ac_t""done" 1>&6 -## Initialize vars LDAP_LIBS= +LDIF_LIBS= LDBM_LIBS= LTHREAD_LIBS= LUTIL_LIBS= @@ -2084,35 +2388,47 @@ BUILD_LDAP=no BUILD_LDBM=no BUILD_PASSWD=no BUILD_PERL=no +BUILD_QUIPU=no BUILD_SHELL=no BUILD_TCL=no BUILD_THREAD=no -BUILD_BDB2_DYNAMIC=no -BUILD_LDAP_DYNAMIC=no -BUILD_LDBM_DYNAMIC=no -BUILD_PASSWD_DYNAMIC=no -BUILD_PERL_DYNAMIC=no -BUILD_SHELL_DYNAMIC=no -BUILD_TCL_DYNAMIC=no +BUILD_BDB2_DYNAMIC=static +BUILD_LDAP_DYNAMIC=static +BUILD_LDBM_DYNAMIC=static +BUILD_PASSWD_DYNAMIC=static +BUILD_PERL_DYNAMIC=static +BUILD_SHELL_DYNAMIC=static +BUILD_TCL_DYNAMIC=static SLAPD_MODULES_LDFLAGS= SLAPD_MODULES_CPPFLAGS= +SLAPD_MODULES_LIST= SLAPD_PERL_LDFLAGS= -SLAPD_PERL_CPPFLAGS= +MOD_PERL_LDFLAGS= +PERL_CPPFLAGS= +MOD_TCL_LIB= KRB_LIBS= READLINE_LIBS= +SASL_LIBS= TERMCAP_LIBS= TLS_LIBS= +MODULES_LIBS= + + + +cat >> confdefs.h <<\EOF +#define HAVE_MKVERSION 1 +EOF ol_aix_threads=no case "$target" in -*-*-aix*) if test -z "CC" ; then +*-*-aix*) if test -z "$CC" ; then case "$ol_with_threads" in auto | yes | posix) ol_aix_threads=yes ;; esac @@ -2127,8 +2443,8 @@ 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:2131: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2447: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2179,8 +2495,8 @@ 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:2183: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2499: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2211,11 +2527,36 @@ done fi + + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_fast_install=yes ;; +no) enable_fast_install=no ;; +*) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_fast_install=yes +fi + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2218: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:2559: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -2244,8 +2585,8 @@ 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:2248: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2589: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2274,8 +2615,8 @@ 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:2278: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2619: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2321,12 +2662,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # 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:2329: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2670: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2356,8 +2697,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2361: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2702: 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. @@ -2368,12 +2709,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2372 "configure" +#line 2713 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2718: \"$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 @@ -2398,14 +2739,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2403: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2744: 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:2408: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2749: 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 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2758: \"$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 @@ -2432,8 +2773,8 @@ 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:2436: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2777: 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 echo 'void f(){}' > conftest.c @@ -2471,18 +2812,23 @@ else with_gnu_ld=no fi - ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:2480: checking for ld used by GCC" >&5 +echo "configure:2820: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in - # Accept absolute paths. - /* | A-Za-z:\\*) - test -z "$LD" && LD="$ac_prog" - ;; + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld @@ -2494,19 +2840,19 @@ echo "configure:2480: 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:2498: checking for GNU ld" >&5 +echo "configure:2844: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2501: checking for non-GNU ld" >&5 +echo "configure:2847: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. @@ -2514,7 +2860,7 @@ else if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else - test "$with_gnu_ld" != yes && break + test "$with_gnu_ld" != yes && break fi fi done @@ -2533,8 +2879,8 @@ 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:2537: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:2883: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -2549,36 +2895,36 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2553: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:2899: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$NM" in -/* | A-Za-z:\\*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. - ;; -*) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm; then + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" + ac_cv_path_NM="$ac_dir/nm -B" + break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" + ac_cv_path_NM="$ac_dir/nm -p" + break else - ac_cv_path_NM="$ac_dir/nm" + ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags fi - break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm - ;; -esac +fi fi NM="$ac_cv_path_NM" @@ -2586,8 +2932,8 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2590: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:2936: 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 @@ -2606,24 +2952,38 @@ else echo "$ac_t""no" 1>&6 fi -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + # Check for any special flags to pass to ltconfig. -libtool_flags= +libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$silent" = yes && libtool_flags="$libtool_flags --silent" +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" +libtool_flags="$libtool_flags --enable-dlopen" +libtool_flags="$libtool_flags --enable-win32-dll" +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + : +fi + +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2626 "configure"' > conftest.$ac_ext - if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2986 "configure"' > conftest.$ac_ext + if { (eval echo configure:2987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2641,187 +3001,406 @@ case "$host" in *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - ;; -esac + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +echo "configure:3008: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&2; exit 1; } +int main() { +; return 0; } +EOF +if { (eval echo configure:3020: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + lt_cv_cc_needs_belf=no +fi +rm -f conftest* +fi -for ac_prog in mawk gawk nawk awk -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 +echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + +*-*-cygwin* | *-*-mingw*) + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2662: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then +echo "configure:3043: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$ac_prog" + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" break fi done IFS="$ac_save_ifs" fi fi -AWK="$ac_cv_prog_AWK" -if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 else echo "$ac_t""no" 1>&6 fi -test -n "$AWK" && break -done -# test for ln hardlink support -echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:2693: checking whether ln works" >&5 -if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then +if test -z "$ac_cv_prog_DLLTOOL"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3075: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - rm -f conftest.src conftest.dst -echo "conftest" > conftest.src -if ln conftest.src conftest.dst 2>/dev/null -then - ol_cv_prog_LN_H="ln" + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else - ol_cv_prog_LN_H="cp" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="dlltool" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" fi -rm -f conftest.src conftest.dst - fi -LN_H="$ol_cv_prog_LN_H" -if test "$ol_cv_prog_LN_H" = "ln"; then - echo "$ac_t""yes" 1>&6 +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 else - echo "$ac_t""no" 1>&6 + echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2716: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +else + DLLTOOL="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3110: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+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" + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. else - ac_cv_prog_LN_S=ln + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="${ac_tool_prefix}as" + break + fi + done + IFS="$ac_save_ifs" fi fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 else echo "$ac_t""no" 1>&6 fi -if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then - LN_S="$LN_H" -fi - -# Extract the first word of "sendmail", so it can be a program name with args. -set dummy sendmail; ac_word=$2 +if test -z "$ac_cv_prog_AS"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2744: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then +echo "configure:3142: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$SENDMAIL" in - /*) - ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path. - ;; - *) + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc" - for ac_dir in $ac_dummy; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_SENDMAIL="$ac_dir/$ac_word" + ac_cv_prog_AS="as" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" - ;; -esac + test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" fi -SENDMAIL="$ac_cv_path_SENDMAIL" -if test -n "$SENDMAIL"; then - echo "$ac_t""$SENDMAIL" 1>&6 +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 else echo "$ac_t""no" 1>&6 fi -# Extract the first word of "vi", so it can be a program name with args. -set dummy vi; ac_word=$2 +else + AS="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2780: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then +echo "configure:3177: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$EDITOR" in + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_OBJDUMP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3209: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="objdump" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + OBJDUMP="false" +fi +fi + + ;; + +esac + + +# Save cache, so that ltconfig can load it + + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + +# Reload cache, that may have been modified by ltconfig + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log + + +for ac_prog in mawk gawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3277: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + +# test for ln hardlink support +echo $ac_n "checking whether ln works""... $ac_c" 1>&6 +echo "configure:3308: 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:3331: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then + LN_S="$LN_H" +fi + +# Extract the first word of "sendmail", so it can be a program name with args. +set dummy sendmail; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3359: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SENDMAIL" in /*) - ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path. + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH:/usr/ucb" + ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_EDITOR="$ac_dir/$ac_word" + ac_cv_path_SENDMAIL="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" + test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" ;; esac fi -EDITOR="$ac_cv_path_EDITOR" -if test -n "$EDITOR"; then - echo "$ac_t""$EDITOR" 1>&6 +SENDMAIL="$ac_cv_path_SENDMAIL" +if test -n "$SENDMAIL"; then + echo "$ac_t""$SENDMAIL" 1>&6 else echo "$ac_t""no" 1>&6 fi -# Extract the first word of "finger", so it can be a program name with args. -set dummy finger; ac_word=$2 +# Extract the first word of "vi", so it can be a program name with args. +set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2816: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then +echo "configure:3395: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$FINGER" in + case "$EDITOR" in /*) - ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. + ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path. + ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -2829,90 +3408,66 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_FINGER="$ac_dir/$ac_word" + ac_cv_path_EDITOR="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" + test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" ;; esac fi -FINGER="$ac_cv_path_FINGER" -if test -n "$FINGER"; then - echo "$ac_t""$FINGER" 1>&6 +EDITOR="$ac_cv_path_EDITOR" +if test -n "$EDITOR"; then + echo "$ac_t""$EDITOR" 1>&6 else echo "$ac_t""no" 1>&6 fi - -ol_link_modules=no -if test $ol_enable_modules != no ; then - # Extract the first word of "glib-config", so it can be a program name with args. -set dummy glib-config; ac_word=$2 +# Extract the first word of "finger", so it can be a program name with args. +set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2855: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then +echo "configure:3431: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$GLIBCONFIG" in + case "$FINGER" in /*) - ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path. + ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path. + ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" + ac_dummy="$PATH:/usr/ucb" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word" + ac_cv_path_FINGER="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" + test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" ;; esac fi -GLIBCONFIG="$ac_cv_path_GLIBCONFIG" -if test -n "$GLIBCONFIG"; then - echo "$ac_t""$GLIBCONFIG" 1>&6 +FINGER="$ac_cv_path_FINGER" +if test -n "$FINGER"; then + echo "$ac_t""$FINGER" 1>&6 else echo "$ac_t""no" 1>&6 fi - if test "no$GLIBCONFIG" = "no" ; then - if test $ol_enable_modules = yes ; then - { echo "configure: error: could not locate glib-config" 1>&2; exit 1; } - fi - - else - SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`" - SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`" - SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`" - - ol_link_modules=yes - fi -else - ol_with_bdb2_module=static - ol_with_ldap_module=static - ol_with_ldbm_module=static - ol_with_passwd_module=static - ol_with_perl_module=static - ol_with_shell_module=static - ol_with_tcl_module=static -fi - 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:2915: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then +echo "configure:3470: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERLBIN" in @@ -2951,21 +3506,24 @@ fi fi else - SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" - SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" - + PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" + if test x"$ol_with_perl_module" = "xstatic" ; then + SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + else + MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + fi ol_link_perl=yes fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2963: checking how to run the C preprocessor" >&5 +echo "configure:3521: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2974,13 +3532,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:2984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3542: \"$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 : @@ -2991,13 +3549,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:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3559: \"$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 : @@ -3008,13 +3566,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:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3576: \"$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 : @@ -3052,9 +3610,9 @@ elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:3056: checking for AIX" >&5 +echo "configure:3614: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3080: checking for POSIXized ISC" >&5 +echo "configure:3638: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -3098,17 +3656,17 @@ fi ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:3102: checking for minix/config.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3660: checking for minix/config.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3670: \"$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* @@ -3146,55 +3704,13 @@ EOF fi -echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 -echo "configure:3151: checking for be_app in -lbe" >&5 -ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -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 - 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 - LIBS="$LIBS -lbe -lroot -lnet" -else - echo "$ac_t""no" 1>&6 -: -fi - - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3193: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:3709: 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:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -3215,26 +3731,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi 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:3226: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:3741: 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:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3244,29 +3759,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3257: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:3769: 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 - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:3800: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then + ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -3284,13 +3827,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:3288: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then +echo "configure:3831: 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:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -3313,12 +3856,54 @@ cat >> confdefs.h <&6 +echo "configure:3861: 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 +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 + 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 + LIBS="$LIBS -lbe -lroot -lnet" +else + echo "$ac_t""no" 1>&6 +: +fi + + echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:3321: checking for ${CC-cc} option to accept ANSI C" >&5 -if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then +echo "configure:3906: 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 am_cv_prog_cc_stdc=no @@ -3327,13 +3912,14 @@ ac_save_CC="$CC" # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -3370,7 +3956,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -3397,7 +3983,6 @@ if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; } fi - # test for make depend flag OL_MKDEP= OL_MKDEP_FLAGS= @@ -3405,8 +3990,8 @@ 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:3409: checking for ${OL_MKDEP} depend flag" >&5 -if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then +echo "configure:3994: 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 @@ -3415,7 +4000,7 @@ else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } \ + if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4004: \"$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 @@ -3447,72 +4032,74 @@ if test "${ol_cv_mkdep}" = no ; then echo "configure: warning: do not know how to generate dependencies" 1>&2 fi - - -echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:3454: checking for socket" >&5 -if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then +ol_link_modules=no +if test $ol_enable_modules != no ; then + for ac_hdr in ltdl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4042: 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 socket(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_socket) || defined (__stub___socket) -choke me -#else -socket(); -#endif - -; return 0; } +#include <$ac_hdr> EOF -if { (eval echo configure:3482: \"$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:4052: \"$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_socket=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_socket=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then +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_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:3501: checking for main in -lsocket" >&5 -ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +fi +done + + + if test $ac_cv_header_ltdl_h = no ; then + { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; } + fi + + echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6 +echo "configure:4084: checking for lt_dlinit in -lltdl" >&5 +ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" +LIBS="-lltdl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4103: \"$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 @@ -3527,215 +4114,252 @@ 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 socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_LIBLTDL 1 EOF - LIBS="-lsocket $LIBS" - + else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:3544: checking for main in -lnet" >&5 -ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then + { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; } + fi + ol_link_modules=yes +else + ol_with_bdb2_module=static + ol_with_ldap_module=static + ol_with_ldbm_module=static + ol_with_passwd_module=static + ol_with_perl_module=static + ol_with_shell_module=static + ol_with_tcl_module=static +fi + +# test for EBCDIC +echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 +echo "configure:4146: checking for EBCDIC" >&5 +if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lnet $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#endif + EOF -if { (eval echo configure:3559: \"$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:4161: \"$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" + ol_cv_cpp_ebcdic=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" + ol_cv_cpp_ebcdic=no fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +if test $ol_cv_cpp_ebcdic = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_EBCDIC 1 +EOF -else - echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 -echo "configure:3587: checking for socket in -lnet" >&5 -ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:4185: 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 - ac_save_LIBS="$LIBS" -LIBS="-lnet $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include EOF -if { (eval echo configure:3606: \"$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:4198: \"$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" + ol_cv_header_stdc=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" + ol_cv_header_stdc=no fi rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h < conftest.$ac_ext < EOF - - LIBS="-lnet $LIBS" - +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : else - echo "$ac_t""no" 1>&6 + rm -rf conftest* + ol_cv_header_stdc=no fi +rm -f conftest* - echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:3634: checking for main in -lnsl_s" >&5 -ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl_s $LIBS" +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 -if { (eval echo configure:3649: \"$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" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : 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_stdc=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 nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h < conftest.$ac_ext < +#ifndef HAVE_EBCDIC +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } +EOF +if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_header_stdc=no +fi +rm -fr conftest* fi - echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3677: checking for main in -lnsl" >&5 -ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +fi +fi + +echo "$ac_t""$ol_cv_header_stdc" 1>&6 +if test $ol_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi +ac_cv_header_stdc=disable + + +if test $ol_cv_header_stdc != yes; then + echo "configure: warning: could not locate Standard C compliant headers" 1>&2 +fi + +ac_header_dirent=no +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:4306: 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 - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include <$ac_hdr> int main() { -main() +DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_dirent_$ac_safe=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_header_dirent_$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_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | 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 - - echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:3720: checking for socket in -linet" >&5 -ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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:4344: 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 else ac_save_LIBS="$LIBS" -LIBS="-linet $LIBS" +LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4363: \"$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 @@ -3750,35 +4374,33 @@ 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 inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 fi - echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:3767: checking for main in -lgen" >&5 -ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:4385: 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 else ac_save_LIBS="$LIBS" -LIBS="-lgen $LIBS" +LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4404: \"$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 @@ -3793,250 +4415,210 @@ 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 gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 fi - fi - -for ac_func in res_search -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3816: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:4427: 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 < -/* 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(); - -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 -$ac_func(); +#include +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif - +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ac_cv_header_sys_wait_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + ac_cv_header_sys_wait_h=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 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 EOF - -else - echo "$ac_t""no" 1>&6 + fi -done -if test $ac_cv_func_res_search = "no" ; then - echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 -echo "configure:3870: checking for res_search in -lbind" >&5 -ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 +echo "configure:4469: checking POSIX termios" >&5 +if eval "test \"\${am_cv_sys_posix_termios+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 int main() { -res_search() +/* SunOS 4.0.3 has termios.h but not the library calls. */ + tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4484: \"$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" + am_cv_sys_posix_termios=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + am_cv_sys_posix_termios=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""$am_cv_sys_posix_termios" 1>&6 - if test "$ac_cv_lib_bind_res_search" = "yes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_RES_SEARCH 1 -EOF - else - echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 -echo "configure:3923: checking for res_search in -lresolv" >&5 -ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6 +echo "configure:4500: 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 - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +# include +# ifdef TIOCGWINSZ + yes +# endif + EOF -if { (eval echo configure:3942: \"$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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + gwinsz_in_termios_h=yes 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 resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - if test "$ac_cv_lib_resolv_res_search" = "yes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_RES_SEARCH 1 -EOF - - fi - fi -fi + fi -echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:3979: checking for sigset in -lV3" >&5 -ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lV3 $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +# include +# ifdef TIOCGWINSZ + yes +# endif + EOF -if { (eval echo configure:3998: \"$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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes fi rm -f conftest* -LIBS="$ac_save_LIBS" + fi + fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 + if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then + cat >> confdefs.h <<\EOF +#define GWINSZ_IN_SYS_IOCTL 1 EOF - LIBS="-lV3 $LIBS" + fi + +if test $am_cv_sys_posix_termios = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_POSIX_TERMIOS 1 +EOF -else - echo "$ac_t""no" 1>&6 fi +for ac_hdr in \ + arpa/inet.h \ + arpa/nameser.h \ + assert.h \ + conio.h \ + crypt.h \ + direct.h \ + errno.h \ + fcntl.h \ + filio.h \ + getopt.h \ + grp.h \ + io.h \ + libutil.h \ + limits.h \ + locale.h \ + netinet/tcp.h \ + malloc.h \ + memory.h \ + psap.h \ + pwd.h \ + process.h \ + resolv.h \ + sgtty.h \ + shadow.h \ + stddef.h \ + string.h \ + strings.h \ + sysexits.h \ + sys/file.h \ + sys/filio.h \ + sys/errno.h \ + sys/ioctl.h \ + sys/param.h \ + sys/resource.h \ + sys/select.h \ + sys/socket.h \ + sys/syslog.h \ + sys/time.h \ + sys/types.h \ + syslog.h \ + termios.h \ + unistd.h \ + winsock.h \ -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:4030: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4612: 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:4040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4622: \"$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* @@ -4062,261 +4644,211 @@ 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 regfree""... $ac_c" 1>&6 -echo "configure:4070: checking for regfree" >&5 -if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then + + + +echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:4652: checking for sigset in -lV3" >&5 +ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char regfree(); +char sigset(); int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_regfree) || defined (__stub___regfree) -choke me -#else -regfree(); -#endif - +sigset() ; return 0; } EOF -if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_regfree=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_regfree=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_'regfree`\" = yes"; then +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -{ echo "configure: error: POSIX regex required." 1>&2; exit 1; } fi - -echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 -echo "configure:4121: checking for compatible POSIX regex" >&5 -if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then +if test $ac_cv_header_winsock_h = yes; then + echo $ac_n "checking for winsock""... $ac_c" 1>&6 +echo "configure:4701: checking for winsock" >&5 +if eval "test \"\${ol_cv_winsock+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - if test "$cross_compiling" = yes; then - ol_cv_c_posix_regex=cross -else cat > conftest.$ac_ext < +int main() { -#include -#include -static char *pattern, *string; -main() -{ - int rc; - regex_t re; - - pattern = "^A"; - - if(regcomp(&re, pattern, 0)) { - return -1; - } - - string = "ALL MATCH"; - - rc = regexec(&re, string, 0, (void*)0, 0); - - regfree(&re); - - return rc; -} + socket(0,0,0); + select(0,NULL,NULL,NULL,NULL); + closesocket(0); + gethostname(NULL,0); + +; return 0; } EOF -if { (eval echo configure:4156: \"$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 +if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_winsock=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ol_cv_c_posix_regex=no + rm -rf conftest* + ol_cv_winsock=no fi -rm -fr conftest* +rm -f conftest*] fi -fi +echo "$ac_t""$ol_cv_winsock" 1>&6 -echo "$ac_t""$ol_cv_c_posix_regex" 1>&6 + if test $ol_cv_winsock = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_WINSOCK 1 +EOF -if test "$ol_cv_c_posix_regex" = no ; then - { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; } + ac_cv_func_socket=yes + ac_cv_func_select=yes + ac_cv_func_closesocket=yes + ac_cv_func_gethostname=yes + fi fi -echo $ac_n "checking for select""... $ac_c" 1>&6 -echo "configure:4177: checking for select" >&5 -if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then + +echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:4746: 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 < /* 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 select(); +char socket(); +char (*f)(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_select) || defined (__stub___select) +#if defined (__stub_socket) || defined (__stub___socket) choke me #else -select(); +f = socket; #endif ; return 0; } EOF -if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_select=yes" + eval "ac_cv_func_socket=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_select=no" + eval "ac_cv_func_socket=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 -{ echo "configure: error: select() required." 1>&2; exit 1; } -fi - - -echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 -echo "configure:4227: checking types of arguments for select()" >&5 - if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then + + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +echo "configure:4794: checking for main in -lsocket" >&5 +ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do - 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 < conftest.$ac_ext < -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5); -int main() { +int main() { +main() ; return 0; } EOF -if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_not_found=no ; break 3 + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_not_found=yes + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - done - done - done - +LIBS="$ac_save_LIBS" + fi - -fi - -fi - if test "$ac_not_found" = yes; then - ac_cv_func_select_arg1=int - ac_cv_func_select_arg234='int *' - ac_cv_func_select_arg5='struct timeval *' - fi - echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6 - cat >> confdefs.h <> confdefs.h <> confdefs.h <&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi -# ISODE tests -ol_link_isode=no -if test $ol_enable_ldapd != no ; then - echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2 - - echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 -echo "configure:4305: checking for main in -lxtpp" >&5 -ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 +echo "configure:4837: checking for main in -lnet" >&5 +ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS" +LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4852: \"$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 @@ -4331,36 +4863,39 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_XTPP 1 + ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: fi - echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 -echo "configure:4349: checking for main in -ldsap" >&5 -ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 +echo "configure:4880: checking for socket in -lnet" >&5 +ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldsap -lisode $LIBS" +LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4899: \"$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 @@ -4375,36 +4910,35 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_DSAP 1 + ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: fi - echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 -echo "configure:4393: checking for main in -lisode" >&5 -ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 +echo "configure:4927: 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 else ac_save_LIBS="$LIBS" -LIBS="-lisode $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:4942: \"$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 @@ -4419,39 +4953,35 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_ISODE 1 + ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: -fi - fi -if test $ol_link_isode != no; then - echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 -echo "configure:4440: checking for main in -lpp" >&5 -ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:4970: 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 else ac_save_LIBS="$LIBS" -LIBS="-lpp $LIBS" +LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4985: \"$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 @@ -4466,118 +4996,82 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define HAVE_PP 1 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -: -fi - + LIBS="-lnsl $LIBS" - # Extract the first word of "pepsy", so it can be a program name with args. -set dummy pepsy; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4486: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PEPSY" in - /*) - ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PEPSY="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -PEPSY="$ac_cv_path_PEPSY" -if test -n "$PEPSY"; then - echo "$ac_t""$PEPSY" 1>&6 else echo "$ac_t""no" 1>&6 fi -fi - -ol_link_kerberos=no - -if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then - for ac_hdr in kerberosIV/krb.h kerberosIV/des.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4527: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 +echo "configure:5013: 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 else - cat > conftest.$ac_ext < conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket(); + +int main() { +socket() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4537: \"$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:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi -done - - if test $ac_cv_header_kerberosIV_krb_h = yes ; then - echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:4566: checking for main in -lkrb4" >&5 -ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 +echo "configure:5060: 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 else ac_save_LIBS="$LIBS" -LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5075: \"$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 @@ -4592,87 +5086,164 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_k5=yes + ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -have_k5=no fi - if test $have_k5 = yes ; then - ol_with_kerberos=found - ol_link_kerberos=yes - - KRB_LIBS="-lkrb4 -lkrb5 -ldes425" +fi - LIBS="$KRB_LIBS $LIBS" - echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 -echo "configure:4612: checking for des_debug in Kerberos libraries" >&5 -if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then +echo $ac_n "checking for select""... $ac_c" 1>&6 +echo "configure:5107: checking for select" >&5 +if eval "test \"\${ac_cv_func_select+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - save_LIBS="$LIBS" - LIBS="$KRB_LIBS $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < -#include -extern int des_debug; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char select(); 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 select(); +char (*f)(); int main() { -des_debug = 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_select) || defined (__stub___select) +choke me +#else +f = select; +#endif ; return 0; } EOF -if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_var_des_debug=yes + eval "ac_cv_func_select=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_var_des_debug=no + eval "ac_cv_func_select=no" fi rm -f conftest* - LIBS="$save_LIBS" - fi -echo "$ac_t""$ol_cv_var_des_debug" 1>&6 +if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: select() required." 1>&2; exit 1; } +fi - if test $ol_cv_var_des_debug = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_DES_DEBUG 1 -EOF - 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:5159: 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 + if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do + 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 < +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5); +int main() { + +; return 0; } +EOF +if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_not_found=no ; break 3 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_not_found=yes +fi +rm -f conftest* + done + done + done + +fi + +fi + +fi + if test "$ac_not_found" = yes; then + ac_cv_func_select_arg1=int + ac_cv_func_select_arg234='int *' + ac_cv_func_select_arg5='struct timeval *' + fi + echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6 + cat >> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:4666: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5237: 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:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5247: \"$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* @@ -4698,128 +5269,188 @@ else 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:4705: checking for main in -lkrb" >&5 -ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if test "$ac_cv_header_regex_h" != yes ; then + { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; } +fi +echo $ac_n "checking for regfree""... $ac_c" 1>&6 +echo "configure:5277: checking for regfree" >&5 +if eval "test \"\${ac_cv_func_regfree+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 < +/* 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 regfree(); +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_regfree) || defined (__stub___regfree) +choke me +#else +f = regfree; +#endif + ; return 0; } EOF -if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5306: \"$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_regfree=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_regfree=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_'regfree`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_k4=yes + : else echo "$ac_t""no" 1>&6 -have_k4=no +{ echo "configure: error: POSIX regex required." 1>&2; exit 1; } fi - if test $have_k4 = yes ; then - ol_with_kerberos=found - ol_link_kerberos=yes - KRB_LIBS="-lkrb -ldes" - fi - fi -fi +echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6 +echo "configure:5329: checking for compatible POSIX regex" >&5 +if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + ol_cv_c_posix_regex=cross +else + cat > conftest.$ac_ext <> confdefs.h <<\EOF -#define HAVE_KERBEROS 1 +#include +#include +static char *pattern, *string; +main() +{ + int rc; + regex_t re; + + pattern = "^A"; + + if(regcomp(&re, pattern, 0)) { + return -1; + } + + string = "ALL MATCH"; + + rc = regexec(&re, string, 0, (void*)0, 0); + + regfree(&re); + + return rc; +} EOF +if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_c_posix_regex=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_c_posix_regex=no +fi +rm -fr conftest* +fi fi -ol_link_tls=no -if test $ol_with_tls != no ; then - - for ac_hdr in ssl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4765: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +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 + +echo $ac_n "checking for res_search""... $ac_c" 1>&6 +echo "configure:5385: checking for res_search" >&5 +if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char res_search(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char res_search(); +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_search) || defined (__stub___res_search) +choke me +#else +f = res_search; +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4775: \"$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:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_func_res_search=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "ac_cv_func_res_search=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'res_search`\" = 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_ssl_h = yes ; then - echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6 -echo "configure:4804: checking for SSLeay_add_ssl_algorithms in -lssl" >&5 -ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if test $ac_cv_func_res_search = no ; then + echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 +echo "configure:5435: checking for res_search in -lbind" >&5 +ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lssl -lcrypto $LIBS" +LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5454: \"$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 @@ -4834,36 +5465,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_ssleay=yes - need_rsaref=no + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -have_ssleay=no fi - - if test $have_ssleay = no ; then - echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 -echo "configure:4848: checking for ssl3_accept in -lssl" >&5 -ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + ac_cv_func_res_search=$ac_cv_lib_bind_res_search +fi + +if test $ac_cv_func_res_search = no ; then + echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6 +echo "configure:5486: checking for __res_search in -lbind" >&5 +ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" +LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5505: \"$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 @@ -4878,340 +5516,320 @@ 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 + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&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 + ac_cv_func_res_search=$ac_cv_lib_bind___res_search +fi - - 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 - fi -fi - -if test $ol_link_tls = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TLS 1 -EOF - -fi - -for ac_func in \ - ctime_r \ - gethostbyname_r gethostbyaddr_r \ - -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4927: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +if test $ac_cv_func_res_search = no ; then + echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 +echo "configure:5537: checking for res_search in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_search | 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 $ac_func(); +char res_search(); 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 -$ac_func(); -#endif - +res_search() ; return 0; } EOF -if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=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_$ac_func=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_'$ac_func`\" = yes"; then +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi -done + ac_cv_func_res_search=$ac_cv_lib_resolv_res_search +fi -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:4984: checking number of arguments of ctime_r" >&5 -if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -time_t ti; char *buffer; ctime_r(&ti,buffer,32); -; return 0; } +if test "$ac_cv_func_res_search" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_RES_SEARCH 1 EOF -if { (eval echo configure:4996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_ctime_r_nargs=3 + +elif test $ol_enable_dns = yes ; then + { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; } +elif test $ol_enable_dns != no ; then + echo "configure: warning: no res_search, disabling DNS support" 1>&2 +fi + + +ol_link_isode=no +if test $ol_enable_ldapd != no ; then + echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2 + + echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 +echo "configure:5603: checking for main in -lxtpp" >&5 +ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < + int main() { -time_t ti; char *buffer; ctime_r(&ti,buffer); +main() ; return 0; } EOF -if { (eval echo configure:5011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_ctime_r_nargs=2 + 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_ctime_r_nargs=0 -fi -rm -f conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -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 <&6 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_XTPP 1 EOF - fi - + LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi" + +else + echo "$ac_t""no" 1>&6 +: fi -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:5037: checking number of arguments of gethostbyname_r" >&5 -if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then + echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 +echo "configure:5647: checking for main in -ldsap" >&5 +ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then 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); -; return 0; } -EOF -if { (eval echo configure:5056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs=5 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < 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); +main() ; return 0; } EOF -if { (eval echo configure:5079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyname_r_nargs=6 + 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_gethostbyname_r_nargs=0 -fi -rm -f conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -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 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_DSAP 1 EOF - fi - + LDAPD_LIBS="$LDAPD_LIBS -ldsap" + else - ol_cv_func_gethostbyname_r_nargs=0 + echo "$ac_t""no" 1>&6 +: fi - -if test "$ac_cv_func_gethostbyaddr_r" = yes ; then - echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6 -echo "configure:5107: checking number of arguments of gethostbyaddr_r" >&5 -if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then + + echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 +echo "configure:5691: checking for main in -lisode" >&5 +ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < 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); +main() ; return 0; } EOF -if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs=7 + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cat > conftest.$ac_ext <&6 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_ISODE 1 +EOF + + LDAPD_LIBS="$LDAPD_LIBS -lisode" + +else + echo "$ac_t""no" 1>&6 +: +fi + +fi + +if test $ol_link_isode != no; then + echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 +echo "configure:5738: checking for main in -lpp" >&5 +ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpp $LIBS" +cat > conftest.$ac_ext < -#include -#include -#include -#define BUFSIZE (sizeof(struct hostent)+10) + int main() { -struct hostent hent; - struct hostent *rhent; char buffer[BUFSIZE]; - struct in_addr add; - size_t alen=sizeof(struct in_addr); - int bufsize=BUFSIZE;int h_errno; - (void)gethostbyaddr_r( (void *)&(add.s_addr), - alen, AF_INET, &hent, buffer, bufsize, - &rhent, &h_errno); +main() ; return 0; } EOF -if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_func_gethostbyaddr_r_nargs=8 + 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_gethostbyaddr_r_nargs=0 -fi -rm -f conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -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 + + cat >> confdefs.h <<\EOF +#define HAVE_PP 1 EOF - fi - + LDAPD_LIBS="-lpp $LDAPD_LIBS" + else - ol_cv_func_gethostbyaddr_r_nargs=0 + echo "$ac_t""no" 1>&6 +: fi -if test "$ac_cv_func_ctime_r" = yes \ - -a "$ol_cv_func_ctime_r_nargs" -ge 2 \ - -a "$ol_cv_func_ctime_r_nargs" -le 3 \ - -a "$ac_cv_func_gethostbyname_r" = yes \ - -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \ - -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \ - -a "$ac_cv_func_gethostbyaddr_r" = yes \ - -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \ - -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \ - ; then - - cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1 -EOF + # Extract the first word of "pepsy", so it can be a program name with args. +set dummy pepsy; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5784: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PEPSY" in + /*) + ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PEPSY="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +PEPSY="$ac_cv_path_PEPSY" +if test -n "$PEPSY"; then + echo "$ac_t""$PEPSY" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -ol_link_threads=no -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = posix ; then +fi - for ac_hdr in pthread.h sched.h +if test $ol_enable_quipu != no ; then + for ac_hdr in quipu/commonarg.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5205: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5823: 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:5215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5833: \"$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* @@ -5238,1207 +5856,1119 @@ fi done - if test $ac_cv_header_pthread_h = yes ; then - echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:5244: checking POSIX thread version" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then + if test $ac_cv_header_quipu_commonarg_h = yes ; then + BUILD_QUIPU=yes + elif test $ol_enable_quipu = auto ; then + echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2 + else + { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; } + fi +fi + +ol_link_kerberos=no + +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then + for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5876: 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 < - /* this check could be improved */ -# ifdef PTHREAD_ONCE_INIT - pthread_version_final -# endif - +#include <$ac_hdr> EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_version_final" >/dev/null 2>&1; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5886: \"$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* - ol_pthread_final=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* - ol_pthread_final=no + 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 - cat > conftest.$ac_ext <&6 +echo "configure:5915: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +cat > conftest.$ac_ext < - /* this check could be improved */ -# ifdef pthread_once_init - pthread_version_draft4 -# endif - +int main() { +main() +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_version_draft4" >/dev/null 2>&1; then +if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_pthread_draft4=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_pthread_draft4=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_k5=yes +else + echo "$ac_t""no" 1>&6 +have_k5=no +fi - if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then - ol_cv_pthread_version=final - elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then - ol_cv_pthread_version=draft4 - else - ol_cv_pthread_version=unknown - fi -fi + if test $have_k5 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes -echo "$ac_t""$ol_cv_pthread_version" 1>&6 + KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + LIBS="$KRB_LIBS $LIBS" - if test $ol_cv_pthread_version = final ; then - cat >> confdefs.h <<\EOF -#define HAVE_PTHREADS_FINAL 1 + echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 +echo "configure:5961: checking for des_debug in Kerberos libraries" >&5 +if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save_LIBS="$LIBS" + LIBS="$KRB_LIBS $LIBS" + cat > conftest.$ac_ext < +#include +extern int des_debug; + +int main() { + +des_debug = 1; + +; return 0; } EOF +if { (eval echo configure:5982: \"$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 - elif test $ol_cv_pthread_version = draft4 ; then - cat >> confdefs.h <<\EOF -#define HAVE_PTHREADS_D4 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 - else - { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi + + LIBS="$save_LIBS" fi + fi +fi - # consider threads found - ol_with_threads=found +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \ + -o $ol_with_kerberos = kth ; then - - echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 -echo "configure:5325: checking for LinuxThreads pthread.h" >&5 -if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; 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:6017: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:6027: \"$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* - ol_cv_header_linux_threads=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* - ol_cv_header_linux_threads=no + eval "ac_cv_header_$ac_safe=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 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done - - echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 -echo "configure:5358: checking for pthread_create in default libraries" >&5 - if eval "test \"`echo '$''{'ol_cv_pthread_create'+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:6056: 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 - - if test "$cross_compiling" = yes; then - ol_cv_pthread_create=yes -else - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif + ac_save_LIBS="$LIBS" +LIBS="-lkrb -ldes $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + 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" -int main(argc, argv) - int argc; - char **argv; -{ - pthread_t t; - int status; +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k4=yes +else + echo "$ac_t""no" 1>&6 +have_k4=no +fi - /* make sure pthread_create() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_create(&t, pthread_attr_default, task, NULL); -#else - status = pthread_create(&t, NULL, task, NULL); -#endif - if( status ) return status; + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes - /* make sure pthread_detach() isn't just a stub */ -#if HAVE_PTHREADS_D4 - status = pthread_detach( &t ); -#else - status = pthread_detach( t ); -#endif + KRB_LIBS="-lkrb -ldes" - if( status ) return status; + if test $ac_cv_header_krb_archaeology_h = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_KTH_KERBEROS 1 +EOF - return status; -} + fi + fi + fi +fi +if test $ol_link_kerberos = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 EOF -if { (eval echo configure:5410: \"$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 + + +elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then + { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; } +fi + +ol_link_tls=no +if test $ol_with_tls != no ; then + + for ac_hdr in openssl/ssl.h ssl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:6126: 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:6136: \"$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_create=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 - 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: -mt (ol_cv_pthread_mt) - if test "$ol_link_threads" = no ; then - # try -mt - echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6 -echo "configure:5435: checking for pthread link with -mt" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_mt'+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:6165: 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 - - # save the flags - ol_LIBS="$LIBS" - LIBS="-mt $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#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 SSLeay_add_ssl_algorithms(); int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +SSLeay_add_ssl_algorithms() ; return 0; } EOF -if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_mt=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_mt=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" - # restore the LIBS - LIBS="$ol_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 -echo "$ac_t""$ol_cv_pthread_mt" 1>&6 - - if test $ol_cv_pthread_mt = yes ; then - ol_link_pthreads="-mt" - ol_link_threads=posix - fi - 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:5498: checking for pthread link with -kthread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then + + if test $have_ssleay = no ; then + echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6 +echo "configure:6209: 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 - - # save the flags - ol_LIBS="$LIBS" - LIBS="-kthread $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#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(); int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +SSL_library_init() ; return 0; } EOF -if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_kthread=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_kthread=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" - # restore the LIBS - LIBS="$ol_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 -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:5561: checking for pthread link with -pthread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then + if test $have_ssleay = no ; then + echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6 +echo "configure:6254: 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 - - # save the flags - ol_LIBS="$LIBS" - LIBS="-pthread $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#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 ssl3_accept(); int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +ssl3_accept() ; return 0; } EOF -if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_pthread=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_pthread=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" - # restore the LIBS - LIBS="$ol_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 -echo "$ac_t""$ol_cv_pthread_pthread" 1>&6 - - 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 -pthreads - echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6 -echo "configure:5624: checking for pthread link with -pthreads" >&5 -if eval "test \"`echo '$''{'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" - - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif + cat >> confdefs.h <<\EOF +#define HAVE_SSLEAY 1 +EOF -int main() { - pthread_t t; + if test $need_rsaref = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_RSAREF 1 +EOF -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif -; return 0; } -EOF -if { (eval echo configure:5659: \"$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 + TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" + else + TLS_LIBS="-lssl -lcrypto" + fi + fi + fi fi -rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi +if test $ol_link_tls = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TLS 1 +EOF -echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6 +fi - if test $ol_cv_pthread_pthreads = yes ; then - ol_link_pthreads="-pthreads" - ol_link_threads=posix - fi - fi +for ac_func in \ + ctime_r \ + gethostbyname_r gethostbyaddr_r \ - # Pthread try link: -thread (ol_cv_pthread_thread) - if test "$ol_link_threads" = no ; then - # try -thread - echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6 -echo "configure:5687: checking for pthread link with -thread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6333: 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="-thread $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif +/* 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_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); +/* 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 - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_pthread_thread=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_thread=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - - # restore the LIBS - LIBS="$ol_LIBS" - fi -echo "$ac_t""$ol_cv_pthread_thread" 1>&6 - - if test $ol_cv_pthread_thread = yes ; then - ol_link_pthreads="-thread" - ol_link_threads=posix - fi - 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 - # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) - 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:5751: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+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:6391: 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 the flags - ol_LIBS="$LIBS" - LIBS="-lpthread -lmach -lexc -lc_r $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - +#include int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } EOF -if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_lpthread_lmach_lexc_lc_r=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_pthread_lpthread_lmach_lexc_lc_r=no + ol_cv_func_ctime_r_nargs3=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi - -echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6 - - 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: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) - 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:5814: checking for pthread link with -lpthread -lmach -lexc" >&5 -if eval "test \"`echo '$''{'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="-lpthread -lmach -lexc $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - +#include int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } EOF -if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_lpthread_lmach_lexc=yes + ol_cv_func_ctime_r_nargs2=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_func_ctime_r_nargs2=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi + if test $ol_cv_func_ctime_r_nargs3 = yes -a \ + $ol_cv_func_ctime_r_nargs2 = no ; then -echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6 + ol_cv_func_ctime_r_nargs=3 - if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then - ol_link_pthreads="-lpthread -lmach -lexc" - ol_link_threads=posix - fi - fi + elif test $ol_cv_func_ctime_r_nargs3 = no -a \ + $ol_cv_func_ctime_r_nargs2 = yes ; then + ol_cv_func_ctime_r_nargs=2 - # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) - 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:5878: checking for pthread link with -lpthread -Wl,-woff,85" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else + else + ol_cv_func_ctime_r_nargs=0 + fi - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthread -Wl,-woff,85 $LIBS" - - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif +echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6 -int main() { + if test $ol_cv_func_ctime_r_nargs -gt 1 ; then + cat >> confdefs.h <&6 +echo "configure:6462: 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); ; return 0; } EOF -if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_lib_lpthread_woff=yes + ol_cv_func_gethostbyname_r_nargs5=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_func_gethostbyname_r_nargs5=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - + 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:6508: \"$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* -echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6 + if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \ + $ol_cv_func_gethostbyname_r_nargs6 = no ; then - if test $ol_cv_pthread_lib_lpthread_woff = yes ; then - ol_link_pthreads="-lpthread -Wl,-woff,85" - ol_link_threads=posix - fi - fi + 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 - # Pthread try link: -lpthread (ol_cv_pthread_lpthread) - if test "$ol_link_threads" = no ; then - # try -lpthread - echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6 -echo "configure:5942: checking for pthread link with -lpthread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthread $LIBS" + ol_cv_func_gethostbyname_r_nargs=6 - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - -int main() { + else + ol_cv_func_gethostbyname_r_nargs=0 + fi + +fi - pthread_t t; +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:6549: 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:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_lpthread=yes + ol_cv_func_gethostbyaddr_r_nargs7=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthread=no + ol_cv_func_gethostbyaddr_r_nargs7=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi - -echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6 - - if test $ol_cv_pthread_lpthread = yes ; then - ol_link_pthreads="-lpthread" - ol_link_threads=posix - fi - fi - - # Pthread try link: -lc_r (ol_cv_pthread_lc_r) - 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:6005: checking for pthread link with -lc_r" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - # save the flags - ol_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { - - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif - +struct hostent hent; + struct hostent *rhent; char buffer[BUFSIZE]; + struct in_addr add; + size_t alen=sizeof(struct in_addr); + int bufsize=BUFSIZE;int h_errno; + (void)gethostbyaddr_r( (void *)&(add.s_addr), + alen, AF_INET, &hent, buffer, bufsize, + &rhent, &h_errno); ; return 0; } EOF -if { (eval echo configure:6040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_lc_r=yes + ol_cv_func_gethostbyaddr_r_nargs8=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lc_r=no + ol_cv_func_gethostbyaddr_r_nargs8=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi + if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \ + $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then -echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6 + ol_cv_func_gethostbyaddr_r_nargs=7 - if test $ol_cv_pthread_lc_r = yes ; then - ol_link_pthreads="-lc_r" - ol_link_threads=posix - fi - fi + elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \ + $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then + ol_cv_func_gethostbyaddr_r_nargs=8 - # Pthread try link: -threads (ol_cv_pthread_threads) - if test "$ol_link_threads" = no ; then - # try -threads - echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6 -echo "configure:6069: checking for pthread link with -threads" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else + else + ol_cv_func_gethostbyaddr_r_nargs=0 + fi - # save the flags - ol_LIBS="$LIBS" - LIBS="-threads $LIBS" - - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - -int main() { +fi - pthread_t t; +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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ol_cv_pthread_threads=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_pthread_threads=no + ol_cv_func_gethostbyaddr_r_nargs=0 fi -rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" - -fi +if test "$ac_cv_func_ctime_r" = yes \ + -a "$ol_cv_func_ctime_r_nargs" -ge 2 \ + -a "$ol_cv_func_ctime_r_nargs" -le 3 \ + -a "$ac_cv_func_gethostbyname_r" = yes \ + -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \ + -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \ + -a "$ac_cv_func_gethostbyaddr_r" = yes \ + -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \ + -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \ + ; then + + cat >> confdefs.h <<\EOF +#define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1 +EOF -echo "$ac_t""$ol_cv_pthread_threads" 1>&6 +fi - if test $ol_cv_pthread_threads = yes ; then - ol_link_pthreads="-threads" - ol_link_threads=posix - fi - fi +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = nt ; then - # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) - 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:6133: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then + + echo $ac_n "checking for NT Threads""... $ac_c" 1>&6 +echo "configure:6663: checking for NT Threads" >&5 +if eval "test \"\${ol_cv_nt_threads+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" - - cat > conftest.$ac_ext <&6 +echo "configure:6669: 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 < -#ifndef NULL -#define NULL (void*)0 -#endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _beginthread(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _beginthread(); +char (*f)(); int main() { - pthread_t t; - -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); +/* 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 - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); +f = _beginthread; #endif ; return 0; } EOF -if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6698: \"$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 + eval "ac_cv_func__beginthread=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 + eval "ac_cv_func__beginthread=no" fi rm -f conftest* +fi - # restore the LIBS - LIBS="$ol_LIBS" - +if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_nt_threads=yes +else + echo "$ac_t""no" 1>&6 +ol_cv_nt_threads=no fi -echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6 + +fi + +echo "$ac_t""$ol_cv_nt_threads" 1>&6 + + if test $ol_cv_nt_threads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NT_THREADS 1 +EOF - 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: -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:6196: checking for pthread link with -lpthreads -lmach -lexc" >&5 -if eval "test \"`echo '$''{'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="-lpthreads -lmach -lexc $LIBS" - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif + cat >> confdefs.h <<\EOF +#define HAVE_NT_SERVICE_MANAGER 1 +EOF -int main() { + cat >> confdefs.h <<\EOF +#define HAVE_NT_EVENT_LOG 1 +EOF - pthread_t t; + fi -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif + if test $ol_with_threads = nt ; then + { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; } + fi +fi -; return 0; } +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:6758: 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:6231: \"$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:6768: \"$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* - ol_cv_pthread_lpthreads_lmach_lexc=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* - ol_cv_pthread_lpthreads_lmach_lexc=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - - # restore the LIBS - 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_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:6259: checking for pthread link with -lpthreads -lexc" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then + if test $ac_cv_header_pthread_h = yes ; then + echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 +echo "configure:6797: checking POSIX thread version" >&5 +if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - # save the flags - ol_LIBS="$LIBS" - LIBS="-lpthreads -lexc $LIBS" - - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif - -int main() { +# include + /* this check could be improved */ +# ifdef PTHREAD_ONCE_INIT + pthread_version_final; +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_version_final" >/dev/null 2>&1; then + rm -rf conftest* + ol_pthread_final=yes +else + rm -rf conftest* + ol_pthread_final=no +fi +rm -f conftest* - pthread_t t; -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif + cat > conftest.$ac_ext < + /* this check could be improved */ +# ifdef pthread_once_init + pthread_version_draft4; +# endif + EOF -if { (eval echo configure:6294: \"$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 "pthread_version_draft4" >/dev/null 2>&1; then rm -rf conftest* - ol_cv_pthread_lpthreads_lexc=yes + ol_pthread_draft4=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lpthreads_lexc=no + ol_pthread_draft4=no fi rm -f conftest* - # 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 + if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then + ol_cv_pthread_version=final + elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then + ol_cv_pthread_version=draft4 + else + ol_cv_pthread_version=unknown fi +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:6323: checking for pthread link with -lpthreads" >&5 -if eval "test \"`echo '$''{'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 $LIBS" +echo "$ac_t""$ol_cv_pthread_version" 1>&6 - cat > conftest.$ac_ext < -#ifndef NULL -#define NULL (void*)0 -#endif + if test $ol_cv_pthread_version = final ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_FINAL 1 +EOF -int main() { + elif test $ol_cv_pthread_version = draft4 ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_D4 1 +EOF - pthread_t t; + else + { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi -#if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, NULL, NULL); - pthread_detach( &t ); -#else - pthread_create(&t, NULL, NULL, NULL); - pthread_detach( t ); -#endif -#ifdef HAVE_LINUX_THREADS - pthread_kill_other_threads_np(); -#endif + # consider threads found + ol_with_threads=found -; return 0; } + + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:6878: 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 echo configure:6358: \"$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 "pthread_kill_other_threads_np" >/dev/null 2>&1; then rm -rf conftest* - ol_cv_pthread_lib_lpthreads=yes + ol_cv_header_linux_threads=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_lib_lpthreads=no + ol_cv_header_linux_threads=no fi rm -f conftest* - # restore the LIBS - LIBS="$ol_LIBS" fi -echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6 +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 - if test $ol_cv_pthread_lib_lpthreads = yes ; then - ol_link_pthreads="-lpthreads" - ol_link_threads=posix - fi fi + + echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6 +echo "configure:6910: 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 - if test $ol_link_threads != no ; then - cat >> confdefs.h <<\EOF -#define HAVE_PTHREADS 1 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 - LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" +echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6 - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - LIBS="$LTHREAD_LIBS $LIBS" - for ac_func in sched_yield pthread_yield + if test $ol_cv_header_gnu_pth_pthread_h = no ; then + for ac_hdr in sched.h do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6398: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'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:6944: 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(); - -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 -$ac_func(); -#endif - -; return 0; } +#include <$ac_hdr> EOF -if { (eval echo configure:6426: \"$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:6954: \"$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:6454: checking for sched_yield in -lrt" >&5 -ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 +echo "configure:6984: 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 - ac_save_LIBS="$LIBS" -LIBS="-lrt $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} int main() { -sched_yield() + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + ; return 0; } EOF -if { (eval echo configure:6473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7035: \"$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_pthread_create=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_pthread_create=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 - LTHREAD_LIBS="$LTHREAD_LIBS -lrt" - cat >> confdefs.h <<\EOF -#define HAVE_SCHED_YIELD 1 +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7096: \"$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:7121: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7176: \"$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 < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7237: \"$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:7267: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7322: \"$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 < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_pthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_pthread=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_pthread" 1>&6 + + 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 -pthreads + echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6 +echo "configure:7413: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7468: \"$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 < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7529: \"$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:7559: 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="-mthreads $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_mthreads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_mthreads=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_mthreads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_mthreads=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6 + + if test $ol_cv_pthread_mthreads = yes ; then + ol_link_pthreads="-mthreads" + ol_link_threads=posix + fi +fi + + # Pthread try link: -thread (ol_cv_pthread_thread) +if test "$ol_link_threads" = no ; then + # try -thread + echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6 +echo "configure:7705: 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="-thread $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_thread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_thread=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_thread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_thread=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_thread" 1>&6 + + if test $ol_cv_pthread_thread = yes ; then + ol_link_pthreads="-thread" + ol_link_threads=posix + fi +fi + + + # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r) +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:7852: 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="-lpthread -lmach -lexc -lc_r $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lpthread_lmach_lexc_lc_r=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lpthread_lmach_lexc_lc_r=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6 + + 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: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc) +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:7998: 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="-lpthread -lmach -lexc $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:8053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lpthread_lmach_lexc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lpthread_lmach_lexc=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthread_lmach_lexc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lpthread_lmach_lexc=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6 + + 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: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff) +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:8145: 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="-lpthread -Wl,-woff,85 $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lib_lpthread_woff=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lib_lpthread_woff=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lib_lpthread_woff=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lib_lpthread_woff=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6 + + 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 (ol_cv_pthread_lpthread) +if test "$ol_link_threads" = no ; then + # try -lpthread + echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6 +echo "configure:8292: 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 $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lpthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lpthread=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lpthread=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6 + + if test $ol_cv_pthread_lpthread = yes ; then + ol_link_pthreads="-lpthread" + ol_link_threads=posix + fi +fi + + # Pthread try link: -lc_r (ol_cv_pthread_lc_r) +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:8438: 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="-lc_r $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lc_r=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lc_r=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lc_r=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lc_r=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6 + + if test $ol_cv_pthread_lc_r = yes ; then + ol_link_pthreads="-lc_r" + ol_link_threads=posix + fi +fi + + + # Pthread try link: -threads (ol_cv_pthread_threads) +if test "$ol_link_threads" = no ; then + # try -threads + echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6 +echo "configure:8585: 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="-threads $LIBS" + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main() { + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +; return 0; } +EOF +if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_threads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_threads=no +fi +rm -f conftest* +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + EOF +if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_threads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_threads=no +fi +rm -fr conftest* +fi + + + # restore the LIBS + LIBS="$ol_LIBS" + +fi - ac_cv_func_sched_yield=yes -else - echo "$ac_t""no" 1>&6 -ac_cv_func_sched_yield=no +echo "$ac_t""$ol_cv_pthread_threads" 1>&6 + + if test $ol_cv_pthread_threads = yes ; then + ol_link_pthreads="-threads" + ol_link_threads=posix + fi fi - fi - if test $ac_cv_func_sched_yield = no -a \ - $ac_cv_func_pthread_yield = no ; then - for ac_func in thr_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6505: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + + # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r) +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:8732: 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="-lpthreads -lmach -lexc -lc_r $LIBS" + + if test "$cross_compiling" = yes; then 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(); +/* pthread test headers */ +#include +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} 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 + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); #else -$ac_func(); + status = pthread_detach( t ); #endif +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + ; return 0; } EOF -if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8787: \"$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_pthread_lpthreads_lmach_lexc_lc_r=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_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -f conftest* -fi +else + cat > conftest.$ac_ext < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no +fi +rm -fr conftest* fi -done - 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 - for ac_func in pthread_kill -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6567: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + # restore the LIBS + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6 + + 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: -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:8878: 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="-lpthreads -lmach -lexc $LIBS" + + if test "$cross_compiling" = yes; then 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(); +/* pthread test headers */ +#include +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} 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 + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); #else -$ac_func(); + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); #endif + exit( status ); + ; return 0; } EOF -if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8933: \"$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_pthread_lpthreads_lmach_lexc=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_pthread_lpthreads_lmach_lexc=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 pthread_detach with ""... $ac_c" 1>&6 -echo "configure:6621: checking for pthread_detach with " >&5 -if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < #ifndef NULL #define NULL (void*)0 #endif -int main() { -pthread_detach(NULL); -; return 0; } +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + EOF -if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ol_cv_func_pthread_detach=yes +if { (eval echo configure:8994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthreads_lmach_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ol_cv_func_pthread_detach=no + rm -fr conftest* + ol_cv_pthread_lpthreads_lmach_lexc=no fi -rm -f conftest* - +rm -fr conftest* 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; } - fi + # restore the LIBS + LIBS="$ol_LIBS" + +fi - cat >> confdefs.h <<\EOF -#define HAVE_PTHREAD_DETACH 1 -EOF +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 - 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:6671: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + # 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:9024: 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="-lpthreads -lexc $LIBS" + + if test "$cross_compiling" = yes; then 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(); +/* pthread test headers */ +#include +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} 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 + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); #else -$ac_func(); + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); #endif + exit( status ); + ; return 0; } EOF -if { (eval echo configure:6699: \"$ac_link\") 1>&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_func_$ac_func=yes" + ol_cv_pthread_lpthreads_lexc=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_pthread_lpthreads_lexc=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 pthread_kill_other_threads_np""... $ac_c" 1>&6 -echo "configure:6726: checking for pthread_kill_other_threads_np" >&5 -if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_kill_other_threads_np(); +/* pthread test headers */ +#include +#ifndef NULL +#define NULL (void*)0 +#endif -int main() { +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np) -choke me + +int main(argc, argv) + int argc; + char **argv; +{ + + /* pthread test function */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); #else -pthread_kill_other_threads_np(); + status = pthread_create(&t, NULL, task, NULL); #endif -; return 0; } + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + EOF -if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_kill_other_threads_np=yes" +if { (eval echo configure:9140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_lpthreads_lexc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_pthread_kill_other_threads_np=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 + rm -fr conftest* + ol_cv_pthread_lpthreads_lexc=no fi - - echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 -echo "configure:6774: checking for LinuxThreads implementation" >&5 -if eval "test \"`echo '$''{'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 +rm -fr conftest* fi -echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 - - - - echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 -echo "configure:6787: checking for LinuxThreads consistency" >&5 -if eval "test \"`echo '$''{'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 + # restore the LIBS + LIBS="$ol_LIBS" fi -echo "$ac_t""$ol_cv_linux_threads" 1>&6 +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 - 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:6812: checking if pthread_create() works" >&5 - if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then + # 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:9171: 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 - if test "$cross_compiling" = yes; then - ol_cv_pthread_create_works=yes -else + # save the flags + ol_LIBS="$LIBS" + LIBS="-lpthreads $LIBS" + + if test "$cross_compiling" = yes; then cat > conftest.$ac_ext < #ifndef NULL #define NULL (void*)0 @@ -6831,196 +9192,185 @@ static void *task(p) return (void *) (p == NULL); } -int main(argc, argv) - int argc; - char **argv; -{ +int main() { + + /* pthread test function */ pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ #if HAVE_PTHREADS_D4 - exit(pthread_create(&t, pthread_attr_default, task, NULL)); + status = pthread_create(&t, pthread_attr_default, task, NULL); #else - exit(pthread_create(&t, NULL, task, NULL)); + status = pthread_create(&t, NULL, task, NULL); #endif -} -EOF -if { (eval echo configure:6848: \"$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 + if( status ) exit( status ); -fi + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif - echo "$ac_t""$ol_cv_pthread_create_works" 1>&6 +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif - 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 + exit( status ); - if test $ol_with_yielding_select = auto ; then - echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6 -echo "configure:6870: checking if select yields when using pthreads" >&5 - if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test "$cross_compiling" = yes; then - - { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; } +; return 0; } +EOF +if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ol_cv_pthread_lib_lpthreads=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_lib_lpthreads=no +fi +rm -f conftest* else cat > conftest.$ac_ext < -#include -#include +/* pthread test headers */ #include #ifndef NULL -#define NULL (void*) 0 +#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 */ + return (void *) (p == NULL); } + int main(argc, argv) int argc; char **argv; { - pthread_t t; - /* create a pipe to select */ - if(pipe(&fildes[0])) { - perror("select"); - exit(1); - } + /* pthread test function */ + pthread_t t; + int status; -#ifdef HAVE_PTHREAD_SETCONCURRENCY - (void) pthread_setconcurrency(2); + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); #else -#ifdef HAVE_THR_SETCONCURRENCY - /* Set Solaris LWP concurrency to 2 */ - thr_setconcurrency(2); -#endif + status = pthread_create(&t, NULL, task, NULL); #endif + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ #if HAVE_PTHREADS_D4 - pthread_create(&t, pthread_attr_default, task, NULL); + status = pthread_detach( &t ); #else - pthread_create(&t, NULL, task, NULL); + status = pthread_detach( t ); #endif -#if HAVE_SCHED_YIELD - sched_yield(); /* make sure task runs first */ -#else -#ifdef HAVE_PTHREAD_YIELD - pthread_yield(); /* make sure task runs first */ -#endif +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); #endif - exit(2); + exit( status ); + } + EOF -if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9287: \"$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 + ol_cv_pthread_lib_lpthreads=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_cv_pthread_select_yields=yes + ol_cv_pthread_lib_lpthreads=no fi rm -fr conftest* fi -fi - - echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 - if test $ol_cv_pthread_select_yields = yes ; then - ol_with_yielding_select=yes - fi - fi + # restore the LIBS + LIBS="$ol_LIBS" + +fi - CPPFLAGS="$save_CPPFLAGS" - LIBS="$save_LIBS" - else - { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } - fi - fi +echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6 - if test $ol_with_threads = posix ; then - { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } + if test $ol_cv_pthread_lib_lpthreads = yes ; then + ol_link_pthreads="-lpthreads" + ol_link_threads=posix 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 + if test $ol_link_threads != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS 1 +EOF + + + 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 do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6996: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9329: 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:7006: \"$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:9358: \"$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:7036: checking for cthread_fork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 +echo "configure:9386: 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 - 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 sched_yield(); 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 -cthread_fork(); -#endif - +sched_yield() ; return 0; } EOF -if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9405: \"$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_lib_$ac_lib_var=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_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + LTHREAD_LIBS="$LTHREAD_LIBS -lrt" + cat >> confdefs.h <<\EOF +#define HAVE_SCHED_YIELD 1 +EOF + + ac_cv_func_sched_yield=yes else echo "$ac_t""no" 1>&6 +ac_cv_func_sched_yield=no fi - - if test $ol_link_threads = no ; then - echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 -echo "configure:7086: checking for cthread_fork with -all_load" >&5 -if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then + fi + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + for ac_func in thr_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9437: 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_LIBS="$LIBS" - LIBS="-all_load $LIBS" - cat > conftest.$ac_ext < 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() { - cthread_fork((void *)0, (void *)0); - +/* 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:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_cthread_all_load=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_cthread_all_load=no + eval "ac_cv_func_$ac_func=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 - fi - fi - - if test $ol_link_threads != no ; then - : check for cthread specific functionality here - cat >> confdefs.h <<\EOF -#define HAVE_MACH_CTHREADS 1 +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 <&2; exit 1; } - fi - fi - - if test $ol_with_threads = mach ; then - { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; } - fi + +else + echo "$ac_t""no" 1>&6 fi +done -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = lwp ; then + 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 - for ac_hdr in thread.h synch.h + for ac_func in pthread_kill do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7148: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9500: 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:7158: \"$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:9529: \"$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:7186: checking for thr_create in -lthread" >&5 -ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 +echo "configure:9555: 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 - ac_save_LIBS="$LIBS" -LIBS="-lthread $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -thr_create() +pthread_detach(NULL); ; return 0; } EOF -if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9573: \"$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_func_pthread_detach=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_pthread_detach=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 +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 - if test $have_thr = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_THR 1 +#define HAVE_PTHREAD_DETACH 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_setconcurrency \ + pthread_getconcurrency \ thr_setconcurrency \ thr_getconcurrency \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7245: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:9605: 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:9634: \"$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 @@ -7293,134 +9654,316 @@ else fi done - fi - fi - 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:7304: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + + echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6 +echo "configure:9661: checking for pthread_kill_other_threads_np" >&5 +if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+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 pthread_kill_other_threads_np(); 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 pthread_kill_other_threads_np(); +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_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np) +choke me +#else +f = pthread_kill_other_threads_np; +#endif + +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7314: \"$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:9690: \"$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_pthread_kill_other_threads_np=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_pthread_kill_other_threads_np=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = 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_lwp_lwp_h = yes ; then - echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:7342: checking for lwp_create in -llwp" >&5 -ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 +echo "configure:9710: 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:9723: 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:9748: 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 < +#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 */ + pthread_t t; + int status; + + /* make sure pthread_create() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_create(&t, pthread_attr_default, task, NULL); +#else + status = pthread_create(&t, NULL, task, NULL); +#endif + + if( status ) exit( status ); + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + +#ifdef HAVE_LINUX_THREADS + pthread_kill_other_threads_np(); +#endif + + exit( status ); + +} + +EOF +if { (eval echo configure:9806: \"$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:9828: 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 - ac_save_LIBS="$LIBS" -LIBS="-llwp $LIBS" -cat > conftest.$ac_ext < 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_D4 + pthread_create(&t, pthread_attr_default, task, NULL); +#else + pthread_create(&t, NULL, task, NULL); +#endif + +#if HAVE_SCHED_YIELD + sched_yield(); /* make sure task runs first */ +#else +#ifdef HAVE_PTHREAD_YIELD + pthread_yield(); /* make sure task runs first */ +#endif +#endif + + exit(2); +} EOF -if { (eval echo configure:7361: \"$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" +if { (eval echo configure:9913: \"$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 -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - + rm -fr conftest* + ol_cv_pthread_select_yields=yes 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 +rm -fr conftest* fi +fi - if test $have_lwp = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_LWP 1 -EOF +echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 - LTHREAD_LIBS="$LTHREAD_LIBS -llwp" - ol_link_threads=lwp + 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_with_yielding_select = auto ; then - ol_with_yielding_select=no + 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 link with POSIX Threads" 1>&2; exit 1; } fi fi -fi - -if test $ol_with_yielding_select = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_YIELDING_SELECT 1 -EOF + 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 = manual ; then - ol_link_threads=yes - - echo "configure: warning: thread defines and link options must be set manually" 1>&2 +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = mach ; then - for ac_hdr in pthread.h sched.h + 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:7414: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:9957: 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:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9967: \"$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* @@ -7446,109 +9989,134 @@ else fi done - for ac_func in sched_yield pthread_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7453: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + 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:9997: 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 $ac_func(); +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_$ac_func) || defined (__stub___$ac_func) +#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) choke me #else -$ac_func(); +f = cthread_fork; #endif ; return 0; } EOF -if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10026: \"$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" + 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_$ac_func=no" + eval "ac_cv_func_cthread_fork=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = 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 pthread.h""... $ac_c" 1>&6 -echo "configure:7507: checking for LinuxThreads pthread.h" >&5 -if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then + + if test $ol_link_threads = no ; then + echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 +echo "configure:10048: 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 - cat > conftest.$ac_ext < conftest.$ac_ext < +#include +int main() { + + cthread_fork((void *)0, (void *)0); + +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then +if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_header_linux_threads=yes + ol_cv_cthread_all_load=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_header_linux_threads=no + ol_cv_cthread_all_load=no fi rm -f conftest* - - + LIBS="$save_LIBS" + 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 +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 + fi + fi + + if test $ol_link_threads != no ; then + : check for cthread specific functionality here + cat >> confdefs.h <<\EOF +#define HAVE_MACH_CTHREADS 1 EOF + else + { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; } + fi + fi + + if test $ol_with_threads = mach ; then + { echo "configure: error: could not locate 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 mach/cthreads.h + 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:7542: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10110: 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:7552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10120: \"$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* @@ -7574,61 +10142,83 @@ else 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:7582: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + + if test $ac_cv_header_pth_h = yes ; then + echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6 +echo "configure:10149: 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 - 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 pth_version(); + +int main() { +pth_version() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7592: \"$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:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +have_pth=no +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 + + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes + fi + fi + fi fi -done - for ac_hdr in thread.h synch.h +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = lwp ; then + + 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:7622: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10212: 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:7632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10222: \"$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* @@ -7654,199 +10244,138 @@ else fi done -fi - -if test $ol_link_threads != no ; 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:7691: checking for thread specific errno" >&5 -if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then + 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:10250: 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 - - 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 thr_create(); + int main() { -errno = 0; +thr_create() ; return 0; } EOF -if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_errno_thread_specific=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_errno_thread_specific=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - -fi - -echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 +LIBS="$ac_save_LIBS" - echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6 -echo "configure:7720: checking for thread specific h_errno" >&5 -if eval "test \"`echo '$''{'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:7733: \"$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* - +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 -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 + if test $have_thr = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_THR 1 EOF -fi + LTHREAD_LIBS="$LTHREAD_LIBS -lthread" + ol_link_threads=thr + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes + fi -ol_link_ldbm=no -if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then - echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:7784: checking for DB2 library" >&5 -if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ol_LIBS="$LIBS" - echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:7790: checking for db_open in -ldb" >&5 -ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + for ac_func in \ + thr_setconcurrency \ + thr_getconcurrency \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10309: 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="-ldb $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 db_open(); +char $ac_func(); +char (*f)(); int main() { -db_open() + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + ; return 0; } EOF -if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10338: \"$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 - ol_cv_lib_db2=-ldb + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 -ol_cv_lib_db2=no -fi - - LIBS="$ol_LIBS" - fi +done -echo "$ac_t""$ol_cv_lib_db2" 1>&6 + fi + fi -for ac_hdr in db.h + 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:7840: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10369: 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:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10379: \"$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* @@ -7872,117 +10401,91 @@ else fi done -if test $ac_cv_header_db_h = yes ; then - echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:7878: checking if db.h is DB2" >&5 -if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then + 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:10407: 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 - - cat > conftest.$ac_ext < conftest.$ac_ext < - /* this check could be improved */ -# ifdef DB_VERSION_MAJOR -# if DB_VERSION_MAJOR == 2 - __db_version_2 -# endif -# endif - +int main() { +lwp_create() +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "__db_version_2" >/dev/null 2>&1; then +if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_header_db2=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_header_db2=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" -fi - -echo "$ac_t""$ol_cv_header_db2" 1>&6 -else - ol_cv_header_db2=no -fi - - - - echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:7916: checking for Berkeley DB2" >&5 -if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then - ol_cv_berkeley_db2=no - else - ol_cv_berkeley_db2=yes - fi - -fi - -echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 - if test $ol_cv_berkeley_db2 = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_BERKELEY_DB2 1 -EOF - - fi - - - if test $ol_cv_berkeley_db2 = yes ; then - ol_link_ldbm=db2 - ol_with_ldbm_api=db2 - - if test $ol_with_ldbm_type = hash ; then - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBHASH 1 -EOF +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 - else + + if test $have_lwp = yes ; then cat >> confdefs.h <<\EOF -#define LDBM_USE_DBBTREE 1 +#define HAVE_LWP 1 EOF - fi + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + ol_link_threads=lwp - if test $ol_cv_lib_db2 != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=no + fi fi fi fi -ol_link_bdb2=no -if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then - ol_link_bdb2=yes +if test $ol_with_yielding_select = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_YIELDING_SELECT 1 +EOF + fi -if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then - echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:7967: checking for Berkeley DB library" >&5 -if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - for ac_hdr in db1/db.h +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 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7976: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10479: 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:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10489: \"$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* @@ -8008,162 +10511,190 @@ else fi done - ol_LIBS="$LIBS" - echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:8014: checking for dbopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then + for ac_func in sched_yield pthread_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10518: 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 dbopen(); +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_dbopen) || defined (__stub___dbopen) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -dbopen(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_dbopen=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_dbopen=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=yes + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done - echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6 -echo "configure:8061: checking for dbopen in -ldb1" >&5 -ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:10573: 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 - ac_save_LIBS="$LIBS" -LIBS="-ldb1 $LIBS" -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* -int main() { -dbopen() -; return 0; } + +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 + + + 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:10608: 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:8080: \"$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:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=-ldb1 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done - echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:8100: checking for dbopen in -ldb" >&5 -ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+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:10648: 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="-ldb $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:8119: \"$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:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_db=-ldb + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -ol_cv_lib_db=no -fi - - -fi - - -fi - - LIBS="$ol_LIBS" - fi +done -echo "$ac_t""$ol_cv_lib_db" 1>&6 - - -for ac_hdr in db_185.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:8157: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10688: 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:8167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10698: \"$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* @@ -8189,187 +10720,158 @@ else fi done -if test "$ol_cv_header_db2" = yes ; then - - ol_cv_header_db=$ac_cv_header_db_185_h -else - ol_cv_header_db=$ac_cv_header_db_h fi +if test $ol_link_threads != no -a $ol_link_threads != nt ; then + cat >> confdefs.h <<\EOF +#define REENTRANT 1 +EOF - - echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:8203: checking for Berkeley DB" >&5 -if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then - ol_cv_berkeley_db=no - else - ol_cv_berkeley_db=yes - fi - -fi - -echo "$ac_t""$ol_cv_berkeley_db" 1>&6 - if test $ol_cv_berkeley_db = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_BERKELEY_DB 1 +#define _REENTRANT 1 EOF - fi - - - if test $ol_cv_berkeley_db = yes ; then - ol_link_ldbm=db - ol_with_ldbm_api=db - - if test $ol_with_ldbm_type = hash ; then - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBHASH 1 + cat >> confdefs.h <<\EOF +#define THREAD_SAFE 1 EOF - else - cat >> confdefs.h <<\EOF -#define LDBM_USE_DBBTREE 1 + cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 EOF - fi + cat >> confdefs.h <<\EOF +#define THREADSAFE 1 +EOF - if test $ol_cv_lib_db != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" - fi - fi -fi + cat >> confdefs.h <<\EOF +#define _THREADSAFE 1 +EOF -if test $ol_with_ldbm_api = manual ; then - ol_link_ldbm=yes + cat >> confdefs.h <<\EOF +#define _SGI_MP_SOURCE 1 +EOF - echo "configure: warning: LDBM defines and link options must be set manually" 1>&2 - for ac_hdr in db.h db_185.h gdbm.h ndbm.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8256: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 +echo "configure:10757: 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 < conftest.$ac_ext < +#include +int main() { +errno = 0; +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8266: \"$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:10770: \"$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_errno_thread_specific=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_errno_thread_specific=no fi rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - + fi -if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then - echo "configure: warning: Could not find LDBM with BTREE support" 1>&2 - ol_with_ldbm_api=none -fi +echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 -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:8301: checking for MDBM library" >&5 -if eval "test \"`echo '$''{'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:8307: checking for mdbm_set_chain" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then + echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6 +echo "configure:10786: 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 < 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 mdbm_set_chain(); - +#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_mdbm_set_chain) || defined (__stub___mdbm_set_chain) -choke me -#else -mdbm_set_chain(); -#endif - +h_errno = 0; ; return 0; } EOF -if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10799: \"$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" + ol_cv_h_errno_thread_specific=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_mdbm_set_chain=no" + ol_cv_h_errno_thread_specific=no fi rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_mdbm=yes -else - echo "$ac_t""no" 1>&6 +echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6 - echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 -echo "configure:8354: checking for mdbm_set_chain in -lmdbm" >&5 -ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + 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 + + +ol_link_ldbm=no +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then + echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 +echo "configure:10850: checking for DB2 library" >&5 +if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ol_LIBS="$LIBS" + echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6 +echo "configure:10856: checking for db_appexit in -ldb" >&5 +ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lmdbm $LIBS" +LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10875: \"$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 @@ -8384,37 +10886,33 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_mdbm=-lmdbm + ol_cv_lib_db2=-ldb else echo "$ac_t""no" 1>&6 -ol_cv_lib_mdbm=no -fi - - +ol_cv_lib_db2=no fi LIBS="$ol_LIBS" fi -echo "$ac_t""$ol_cv_lib_mdbm" 1>&6 - +echo "$ac_t""$ol_cv_lib_db2" 1>&6 - for ac_hdr in mdbm.h +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:8408: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:10906: 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:8418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10916: \"$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* @@ -8440,158 +10938,186 @@ else fi done - echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:8445: checking for db" >&5 -if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then +if test $ac_cv_header_db_h = yes ; then + echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 +echo "configure:10944: checking if db.h is DB2" >&5 +if eval "test \"\${ol_cv_header_db2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then - ol_cv_mdbm=no + cat > conftest.$ac_ext < + /* this check could be improved */ +# ifdef DB_VERSION_MAJOR +# if DB_VERSION_MAJOR == 2 + __db_version_2; +# endif +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__db_version_2" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_db2=yes +else + rm -rf conftest* + ol_cv_header_db2=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ol_cv_header_db2" 1>&6 +else + ol_cv_header_db2=no +fi + + + + echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 +echo "configure:10982: checking for Berkeley DB2" >&5 +if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then + ol_cv_berkeley_db2=no else - ol_cv_mdbm=yes + ol_cv_berkeley_db2=yes fi fi -echo "$ac_t""$ol_cv_mdbm" 1>&6 - if test $ol_cv_mdbm = yes ; then +echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 + if test $ol_cv_berkeley_db2 = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_MDBM 1 +#define HAVE_BERKELEY_DB2 1 EOF fi - if test $ol_cv_mdbm = yes ; then - ol_link_ldbm=mdbm - ol_with_ldbm_api=mdbm - if test $ol_cv_lib_mdbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm" + if test $ol_cv_berkeley_db2 = yes ; then + ol_link_ldbm=db2 + ol_with_ldbm_api=db2 + + if test $ol_with_ldbm_type = hash ; then + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 +EOF + + else + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 +EOF + fi - fi -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:8478: checking for GDBM library" >&5 -if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then + echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6 +echo "configure:11021: checking for DB_THREAD support" >&5 +if eval "test \"\${ol_cv_berkeley_db2_db_thread+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:8484: checking for gdbm_open" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + ol_LIBS="$LIBS" + if test $ol_cv_lib_db2 != yes ; then + LIBS="$ol_cv_lib_db2" + fi + + if test "$cross_compiling" = yes; then + ol_cv_berkeley_db2_db_thread=cross 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 gdbm_open(); - -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_gdbm_open) || defined (__stub___gdbm_open) -choke me -#else -gdbm_open(); +#include +#ifndef NULL +#define NULL ((void *)0) #endif +main() +{ + int rc; + DB_ENV env; + u_int32_t flags = DB_CREATE | DB_THREAD; -; return 0; } -EOF -if { (eval echo configure:8512: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gdbm_open=no" -fi -rm -f conftest* -fi + memset( &env, '\0', sizeof(env) ); -if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_gdbm=yes -else - echo "$ac_t""no" 1>&6 + rc = db_appinit( NULL, NULL, &env, flags ); - echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:8531: checking for gdbm_open in -lgdbm" >&5 -ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgdbm $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" +if { (eval echo configure:11059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ol_cv_berkeley_db2_db_thread=yes 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" - + rm -fr conftest* + ol_cv_berkeley_db2_db_thread=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ol_cv_lib_gdbm=-lgdbm -else - echo "$ac_t""no" 1>&6 -ol_cv_lib_gdbm=no +rm -fr conftest* fi - -fi LIBS="$ol_LIBS" + if test $ol_cv_berkeley_db2_db_thread != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB2_DB_THREAD 1 +EOF + + fi + fi -echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 +echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6 + + if test $ol_cv_lib_db2 != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2" + fi + fi +fi +ol_link_bdb2=no +if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then + if test $ol_cv_berkeley_db2_db_thread != no ; then + ol_link_bdb2=yes + else + echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2 + fi +fi - for ac_hdr in gdbm.h +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then + echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 +echo "configure:11102: checking for Berkeley DB library" >&5 +if eval "test \"\${ol_cv_lib_db+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + for ac_hdr in db1/db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8585: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:11111: 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:8595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11121: \"$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* @@ -8617,116 +11143,76 @@ else fi done - echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:8622: checking for db" >&5 -if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then - ol_cv_gdbm=no - else - ol_cv_gdbm=yes - fi - -fi - -echo "$ac_t""$ol_cv_gdbm" 1>&6 - if test $ol_cv_gdbm = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_GDBM 1 -EOF - - fi - - - if test $ol_cv_gdbm = yes ; then - ol_link_ldbm=gdbm - ol_with_ldbm_api=gdbm - - if test $ol_cv_lib_gdbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" - fi - fi -fi - -if test $ol_with_ldbm_api = auto ; then - echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2 -elif test $ol_with_ldbm_api = ndbm ; then - echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:8658: checking for NDBM library" >&5 -if eval "test \"`echo '$''{'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:8664: checking for dbm_open" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then + ol_LIBS="$LIBS" + echo $ac_n "checking for dbopen""... $ac_c" 1>&6 +echo "configure:11149: checking for dbopen" >&5 +if eval "test \"\${ac_cv_func_dbopen+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 dbm_open(); +char dbopen(); +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_dbm_open) || defined (__stub___dbm_open) +#if defined (__stub_dbopen) || defined (__stub___dbopen) choke me #else -dbm_open(); +f = dbopen; #endif ; return 0; } EOF -if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11178: \"$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" + eval "ac_cv_func_dbopen=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_dbm_open=no" + eval "ac_cv_func_dbopen=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_ndbm=yes + ol_cv_lib_db=yes else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:8711: checking for dbm_open in -lndbm" >&5 -ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6 +echo "configure:11197: checking for dbopen in -ldb1" >&5 +ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lndbm $LIBS" +LIBS="-ldb1 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11216: \"$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 @@ -8741,31 +11227,31 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_ndbm=-lndbm + ol_cv_lib_db=-ldb1 else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:8750: checking for dbm_open in -ldbm" >&5 -ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 +echo "configure:11236: checking for dbopen in -ldb" >&5 +ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldbm $LIBS" +LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11255: \"$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 @@ -8780,11 +11266,12 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_cv_lib_ndbm=-ldbm + ol_cv_lib_db=-ldb else echo "$ac_t""no" 1>&6 -ol_cv_lib_ndbm=no +ol_cv_lib_db=no fi + fi @@ -8795,24 +11282,24 @@ fi fi -echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 +echo "$ac_t""$ol_cv_lib_db" 1>&6 - for ac_hdr in ndbm.h +for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8806: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:11293: 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:8816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11303: \"$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* @@ -8838,311 +11325,188 @@ else fi done - echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:8843: checking for db" >&5 -if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then +if test "$ol_cv_header_db2" = yes ; then + + ol_cv_header_db=$ac_cv_header_db_185_h +else + ol_cv_header_db=$ac_cv_header_db_h +fi + + + + echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 +echo "configure:11339: checking for Berkeley DB" >&5 +if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then - ol_cv_ndbm=no + if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then + ol_cv_berkeley_db=no else - ol_cv_ndbm=yes + ol_cv_berkeley_db=yes fi fi -echo "$ac_t""$ol_cv_ndbm" 1>&6 - if test $ol_cv_ndbm = yes ; then +echo "$ac_t""$ol_cv_berkeley_db" 1>&6 + if test $ol_cv_berkeley_db = yes ; then cat >> confdefs.h <<\EOF -#define HAVE_NDBM 1 +#define HAVE_BERKELEY_DB 1 EOF fi - if test $ol_cv_ndbm = yes ; then - ol_link_ldbm=ndbm - ol_with_ldbm_api=ndbm - - if test $ol_cv_lib_ndbm != yes ; then - LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" - fi - fi -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: warning: disabling LDBM" 1>&2 - ol_enable_ldbm=no -fi + if test $ol_cv_berkeley_db = yes ; then + ol_link_ldbm=db + ol_with_ldbm_api=db -if test $ol_enable_wrappers != no ; then - for ac_hdr in tcpd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8890: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'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:8900: \"$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 <> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - - if test $ac_cv_header_tcpd_h != yes ; then - have_wrappers=no - else - echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6 -echo "configure:8931: checking for main in -lwrap" >&5 -ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lwrap $LIBS" -cat > conftest.$ac_ext <> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 EOF -if { (eval echo configure:8946: \"$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_wrappers=yes -else - echo "$ac_t""no" 1>&6 -have_wrappers=no -fi + fi + if test $ol_cv_lib_db != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db" + fi fi +fi - if test $have_wrappers = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TCPD 1 -EOF +if test $ol_with_ldbm_api = manual ; then + ol_link_ldbm=yes - SLAPD_LIBS="$SLAPD_LIBS -lwrap" + echo "configure: warning: LDBM defines and link options must be set manually" 1>&2 - echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:8977: checking for main in -lnsl" >&5 -ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + for ac_hdr in db.h db_185.h gdbm.h ndbm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:11392: 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="-lnsl $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:8992: \"$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:11402: \"$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 nsl | 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 - else - echo "configure: warning: could not find -lwrap" 1>&2 - if test $ol_enable_wrappers = yes ; then - { echo "configure: error: could not find wrappers" 1>&2; exit 1; } - fi +fi - echo "configure: warning: disabling wrappers support" 1>&2 - ol_enable_wrappers=no - fi +if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then + echo "configure: warning: Could not find LDBM with BTREE support" 1>&2 + ol_with_ldbm_api=none fi -if test $ol_enable_syslog != no ; then - echo $ac_n "checking for openlog""... $ac_c" 1>&6 -echo "configure:9032: checking for openlog" >&5 -if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then +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:11437: 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:11443: 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 < /* 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 mdbm_set_chain(); +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) +#if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain) choke me #else -openlog(); +f = mdbm_set_chain; #endif ; return 0; } EOF -if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_openlog=yes" + eval "ac_cv_func_mdbm_set_chain=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_openlog=no" + eval "ac_cv_func_mdbm_set_chain=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 - -if test $ol_enable_dmalloc != no ; then - for ac_hdr in dmalloc.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9090: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'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:9100: \"$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 +if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6 -echo "configure:9127: checking for dmalloc_shutdown in -ldmalloc" >&5 -ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 +echo "configure:11491: 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 else ac_save_LIBS="$LIBS" -LIBS="-ldmalloc $LIBS" +LIBS="-lmdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11510: \"$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 @@ -9157,36 +11521,37 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +ol_cv_lib_mdbm=no fi + fi -if test $ol_enable_tcl != no ; then - for ac_hdr in tcl.h + LIBS="$ol_LIBS" + +fi + +echo "$ac_t""$ol_cv_lib_mdbm" 1>&6 + + + for ac_hdr in mdbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9180: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:11545: 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:9190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11555: \"$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* @@ -9212,106 +11577,114 @@ else fi done - - if test $ac_cv_header_tcl_h != yes ; then - have_tcl=no - else - echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6 -echo "configure:9221: checking for main in -ltcl" >&5 -ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:11582: checking for db" >&5 +if eval "test \"\${ol_cv_mdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ltcl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl" -else - echo "$ac_t""no" 1>&6 -have_tcl=no -fi +echo "$ac_t""$ol_cv_mdbm" 1>&6 + if test $ol_cv_mdbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_MDBM 1 +EOF + fi + + + if test $ol_cv_mdbm = yes ; then + ol_link_ldbm=mdbm + ol_with_ldbm_api=mdbm + if test $ol_cv_lib_mdbm != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm" + fi + fi +fi - if test $have_tcl != yes; then - echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6 -echo "configure:9260: checking for main in -ltcl7.6" >&5 -ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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:11615: checking for GDBM library" >&5 +if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ltcl7.6 $LIBS" -cat > conftest.$ac_ext <&6 +echo "configure:11621: 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 < +/* 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 gdbm_open(); +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_gdbm_open) || defined (__stub___gdbm_open) +choke me +#else +f = gdbm_open; +#endif + ; return 0; } EOF -if { (eval echo configure:9275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11650: \"$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_gdbm_open=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_gdbm_open=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_'gdbm_open`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6" + ol_cv_lib_gdbm=yes else echo "$ac_t""no" 1>&6 -have_tcl=no -fi - - fi - if test $have_tcl != yes; then - echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6 -echo "configure:9300: checking for main in -ltcl8.0" >&5 -ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 +echo "configure:11669: 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 else ac_save_LIBS="$LIBS" -LIBS="-ltcl8.0 $LIBS" +LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11688: \"$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 @@ -9326,42 +11699,37 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0" + ol_cv_lib_gdbm=-lgdbm else echo "$ac_t""no" 1>&6 -have_tcl=no +ol_cv_lib_gdbm=no fi - fi - fi + +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 + LIBS="$ol_LIBS" - ol_enable_tcl=no - fi fi -# ud needs termcap (should insert check here) -ol_link_termcap=no -for ac_hdr in termcap.h ncurses.h +echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 + + + for ac_hdr in gdbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9355: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:11723: 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:9365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11733: \"$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* @@ -9387,29 +11755,117 @@ else fi done + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:11760: checking for db" >&5 +if eval "test \"\${ol_cv_gdbm+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then + ol_cv_gdbm=no + else + ol_cv_gdbm=yes + fi + +fi -if test $ol_link_termcap = no ; then - echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:9394: checking for tputs in -ltermcap" >&5 -ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "$ac_t""$ol_cv_gdbm" 1>&6 + if test $ol_cv_gdbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_GDBM 1 +EOF + + fi + + + if test $ol_cv_gdbm = yes ; then + ol_link_ldbm=gdbm + ol_with_ldbm_api=gdbm + + if test $ol_cv_lib_gdbm != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" + fi + fi +fi + +if test $ol_with_ldbm_api = auto ; then + echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2 +elif test $ol_with_ldbm_api = ndbm ; then + echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 +echo "configure:11796: 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:11802: 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 < +/* 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 dbm_open(); +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_dbm_open) || defined (__stub___dbm_open) +choke me +#else +f = dbm_open; +#endif + +; return 0; } +EOF +if { (eval echo configure:11831: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dbm_open=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_ndbm=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 +echo "configure:11850: 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 else ac_save_LIBS="$LIBS" -LIBS="-ltermcap $LIBS" +LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11869: \"$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 @@ -9424,44 +11880,31 @@ 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 + ol_cv_lib_ndbm=-lndbm 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 -fi -if test $ol_link_termcap = no ; then - echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:9446: checking for initscr in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 +echo "configure:11889: 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 else ac_save_LIBS="$LIBS" -LIBS="-lncurses $LIBS" +LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11908: \"$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 @@ -9476,47 +11919,39 @@ 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 + ol_cv_lib_ndbm=-ldbm else echo "$ac_t""no" 1>&6 -have_ncurses=no +ol_cv_lib_ndbm=no +fi + fi - if test $have_ncurses = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_NCURSES 1 -EOF - - ol_link_termcap=yes - TERMCAP_LIBS=-lncurses - fi + fi -if test $ol_link_termcap = no ; then - cat >> confdefs.h <<\EOF -#define NO_TERMCAP 1 -EOF + LIBS="$ol_LIBS" - TERMCAP_LIBS= fi -ol_link_readline=no -if test $ol_with_readline != no ; then - for ac_hdr in readline/readline.h readline/history.h +echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 + + + for ac_hdr in ndbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9510: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:11945: 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:9520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11955: \"$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* @@ -9542,140 +11977,147 @@ else fi done - - if test $ac_cv_header_readline_readline_h = yes ; then - save_LIBS="$LIBS" - LIBS="$TERMCAP_LIBS $LIBS" - echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:9551: checking for readline in -lreadline" >&5 -ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:11982: checking for db" >&5 +if eval "test \"\${ol_cv_ndbm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lreadline $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_readline=yes -else - echo "$ac_t""no" 1>&6 -have_readline=no -fi +echo "$ac_t""$ol_cv_ndbm" 1>&6 + if test $ol_cv_ndbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NDBM 1 +EOF - LIBS="$save_LIBS" - - if test $have_readline = yes ; then - ol_with_readline=found - ol_link_readline=yes + fi - READLINE_LIBS="-lreadline" + + if test $ol_cv_ndbm = yes ; then + ol_link_ldbm=ndbm + ol_with_ldbm_api=ndbm + + if test $ol_cv_lib_ndbm != yes ; then + LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi fi fi -if test $ol_link_readline = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_READLINE 1 -EOF +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: warning: disabling LDBM" 1>&2 + ol_enable_ldbm=no fi +if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then + LINK_BINS_DYNAMIC="yes" +else + LINK_BINS_DYNAMIC="no" +fi -# FreeBSD (and others) have crypt(3) in -lcrypt -if test $ol_enable_crypt != no ; then - echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:9613: checking for crypt" >&5 -if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then +if test $ol_enable_wrappers != no ; then + for ac_hdr in tcpd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:12035: 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 crypt(); +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:12045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done -int main() { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_crypt) || defined (__stub___crypt) -choke me -#else -crypt(); -#endif + if test $ac_cv_header_tcpd_h != yes ; then + have_wrappers=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_crypt=yes" + have_wrappers=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_crypt=no" + have_wrappers=no fi rm -f conftest* -fi + fi -if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then - echo "$ac_t""yes" 1>&6 - have_crypt=yes -else - echo "$ac_t""no" 1>&6 + if test $have_wrappers = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:9660: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + WRAP_LIBS="-lwrap" + + echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:12106: 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 else ac_save_LIBS="$LIBS" -LIBS="-lcrypt $LIBS" +LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12121: \"$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 @@ -9690,355 +12132,341 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LUTIL_LIBS="$LUTIL_LIBS -lcrypt" - have_crypt=yes + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 -have_crypt=no fi -fi - - - if test $have_crypt = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_CRYPT 1 -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: warning: could not find -lwrap" 1>&2 + if test $ol_enable_wrappers = yes ; then + { echo "configure: error: could not find wrappers" 1>&2; exit 1; } fi - echo "configure: warning: disabling crypt support" 1>&2 - ol_enable_crypt=no + echo "configure: warning: disabling wrappers support" 1>&2 + ol_enable_wrappers=no + WRAP_LIBS="" fi fi -# FreeBSD (and others) have setproctitle(3) in -lutil -if test $ol_enable_proctitle != no ; then - echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 -echo "configure:9723: checking for setproctitle" >&5 -if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then +if test $ol_enable_syslog != no ; then + echo $ac_n "checking for openlog""... $ac_c" 1>&6 +echo "configure:12162: 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 setproctitle(); +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_setproctitle) || defined (__stub___setproctitle) +#if defined (__stub_openlog) || defined (__stub___openlog) choke me #else -setproctitle(); +f = openlog; #endif ; return 0; } EOF -if { (eval echo configure:9751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_setproctitle=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_func_setproctitle=no" + eval "ac_cv_func_openlog=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_setproctitle=yes + : else echo "$ac_t""no" 1>&6 +fi - echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:9770: checking for setproctitle in -lutil" >&5 -ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + 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 + +if test $ol_enable_dmalloc != no ; then + for ac_hdr in dmalloc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:12221: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lutil $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:9789: \"$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:12231: \"$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" -fi - -fi - - - if test $have_setproctitle = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_SETPROCTITLE 1 -EOF - - fi fi +done -# test for EBCDIC -echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 -echo "configure:9825: checking for EBCDIC" >&5 -if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then + echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6 +echo "configure:12258: checking for dmalloc_shutdown in -ldmalloc" >&5 +ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | 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 < -#endif - +int main() { +dmalloc_shutdown() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9840: \"$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:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_cpp_ebcdic=yes + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_cpp_ebcdic=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6 -if test $ol_cv_cpp_ebcdic = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_EBCDIC 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 dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 fi -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:9864: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then +fi + +if test $ol_enable_tcl != no ; then + for ac_hdr in tcl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:12311: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#include -#include -#include +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12321: \"$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* - ol_cv_header_stdc=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* - ol_cv_header_stdc=no -fi -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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ol_cv_header_stdc=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - 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 < +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 <&5 | - egrep "free" >/dev/null 2>&1; then - : + else - rm -rf conftest* - ol_cv_header_stdc=no + echo "$ac_t""no" 1>&6 fi -rm -f conftest* +done -fi -if test $ol_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : + if test $ac_cv_header_tcl_h != yes ; then + have_tcl=no + else + for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do + echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6 +echo "configure:12353: checking for main in -l$lib" >&5 +ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -#ifndef HAVE_EBCDIC -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +int main() { +main() +; return 0; } EOF -if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : +if { (eval echo configure:12368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ol_cv_header_stdc=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_tcl=yes + 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 -echo "$ac_t""$ol_cv_header_stdc" 1>&6 -if test $ol_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi -ac_cv_header_stdc=disable + 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 -if test $ol_cv_header_stdc != yes; then - echo "configure: warning: could not locate Standard C compliant headers" 1>&2 + ol_enable_tcl=no + fi fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +ol_link_termcap=no +for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:9985: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:12412: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } EOF -if { (eval echo configure:9998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:12422: \"$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_dirent_$ac_safe=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_header_dirent_$ac_safe=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then +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 -# 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:10023: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + +if test $ol_link_termcap = no ; then + echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 +echo "configure:12451: checking for tputs in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" +LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12470: \"$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 @@ -10053,33 +12481,44 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" + have_termcap=yes else echo "$ac_t""no" 1>&6 +have_termcap=no fi -else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:10064: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + if test $have_termcap = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TERMCAP 1 +EOF + + ol_link_termcap=yes + TERMCAP_LIBS=-ltermcap + fi +fi + +if test $ol_link_termcap = no ; then + echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 +echo "configure:12503: checking for initscr in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" +LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10094,205 +12533,216 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" + have_ncurses=yes else echo "$ac_t""no" 1>&6 +have_ncurses=no fi + if test $have_ncurses = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES 1 +EOF + + ol_link_termcap=yes + TERMCAP_LIBS=-lncurses + fi fi -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:10106: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then +if test $ol_link_termcap = no ; then + cat >> confdefs.h <<\EOF +#define NO_TERMCAP 1 +EOF + + TERMCAP_LIBS= +fi + +ol_link_sasl=no +if test $ol_with_cyrus_sasl != no ; then + ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sasl.h""... $ac_c" 1>&6 +echo "configure:12565: checking for sasl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } +#include EOF -if { (eval echo configure:10127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:12575: \"$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_header_sys_wait_h=yes + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_header_sys_wait_h=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 -if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF - +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:10148: checking POSIX termios" >&5 -if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then + + if test $ac_cv_header_sasl_h = yes ; then + echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6 +echo "configure:12599: 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 else - cat > conftest.$ac_ext < conftest.$ac_ext < -#include -#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 sasl_client_init(); + int main() { -/* SunOS 4.0.3 has termios.h but not the library calls. */ - tcgetattr(0, 0); +sasl_client_init() ; return 0; } EOF -if { (eval echo configure:10163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - am_cv_sys_posix_termios=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - am_cv_sys_posix_termios=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_cyrus_sasl=yes +else + echo "$ac_t""no" 1>&6 +have_cyrus_sasl=no fi -echo "$ac_t""$am_cv_sys_posix_termios" 1>&6 + if test $have_cyrus_sasl != no ; then + SASL_LIBS="-lsasl" + cat >> confdefs.h <<\EOF +#define HAVE_CYRUS_SASL 1 +EOF - echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:10179: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 -if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no + ol_link_sasl=yes + fi + fi - gwinsz_in_termios_h=no - if test $am_cv_sys_posix_termios = yes; then - cat > conftest.$ac_ext < -# include -# ifdef TIOCGWINSZ - yes -# endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - gwinsz_in_termios_h=yes + if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then + { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; } + fi fi -rm -f conftest* - fi +if test $cross_compiling != yes ; then + dev=no + if test -r /dev/urandom ; then + dev="/dev/urandom"; + elif test -r /idev/urandom ; then + dev="/idev/urandom"; + elif test -r /dev/srandom ; then + dev="/dev/srandom"; + elif test -r /dev/random ; then + dev="/dev/random"; + elif test -r /idev/random ; then + dev="/idev/random"; + fi - if test $gwinsz_in_termios_h = no; then - cat > conftest.$ac_ext < -# include -# ifdef TIOCGWINSZ - yes -# endif - + if test $dev != no ; then + cat >> confdefs.h <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes + + fi fi -rm -f conftest* - fi +ol_link_fetch=no +if test $ol_with_fetch != no ; then + ol=$LIBS +LIBS="-lfetch -lcom_err $LIBS" +echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6 +echo "configure:12682: checking fetch(3) library" >&5 +if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else -fi + cat > conftest.$ac_ext <&6 - if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then - cat >> confdefs.h <<\EOF -#define GWINSZ_IN_SYS_IOCTL 1 +#include +#include +#include +int main() { +struct url *u = fetchParseURL("file:///"); +; return 0; } EOF +if { (eval echo configure:12698: \"$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 - fi - -if test $am_cv_sys_posix_termios = 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_POSIX_TERMIOS 1 +#define HAVE_FETCH 1 EOF fi -for ac_hdr in \ - arpa/inet.h \ - arpa/nameser.h \ - assert.h \ - crypt.h \ - errno.h \ - fcntl.h \ - filio.h \ - getopt.h \ - grp.h \ - libutil.h \ - limits.h \ - locale.h \ - malloc.h \ - memory.h \ - psap.h \ - pwd.h \ - resolv.h \ - sgtty.h \ - shadow.h \ - stdarg.h \ - stddef.h \ - string.h \ - strings.h \ - sysexits.h \ - sys/file.h \ - sys/filio.h \ - sys/errno.h \ - sys/ioctl.h \ - sys/param.h \ - sys/resource.h \ - sys/select.h \ - sys/socket.h \ - sys/syslog.h \ - sys/time.h \ - sys/types.h \ - syslog.h \ - termios.h \ - unistd.h \ + 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:10286: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:12736: 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:10296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12746: \"$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* @@ -10319,117 +12769,290 @@ fi done -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:10324: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + if test $ac_cv_header_readline_readline_h = yes ; then + save_LIBS="$LIBS" + LIBS="$TERMCAP_LIBS $LIBS" + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:12777: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 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 readline(); + +int main() { +readline() +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then +if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_type_uid_t=yes + eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_type_uid_t=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_readline=yes +else + echo "$ac_t""no" 1>&6 +have_readline=no fi -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF + LIBS="$save_LIBS" + + if test $have_readline = yes ; then + ol_with_readline=found + ol_link_readline=yes - cat >> confdefs.h <<\EOF -#define gid_t int + READLINE_LIBS="-lreadline" + fi + fi +fi + +if test $ol_link_readline = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_READLINE 1 EOF fi -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:10358: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then + +if test $ol_enable_crypt != no ; then + echo $ac_n "checking for crypt""... $ac_c" 1>&6 +echo "configure:12838: checking for crypt" >&5 +if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross + 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 crypt(); +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_crypt) || defined (__stub___crypt) +choke me +#else +f = crypt; +#endif + +; return 0; } +EOF +if { (eval echo configure:12867: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_crypt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_crypt=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:12886: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt $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 + LUTIL_LIBS="$LUTIL_LIBS -lcrypt" + have_crypt=yes +else + echo "$ac_t""no" 1>&6 +have_crypt=no +fi + +fi + + + if test $have_crypt = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +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; } + fi + + echo "configure: warning: disabling crypt support" 1>&2 + ol_enable_crypt=no + fi +fi + +if test $ol_enable_proctitle != no ; then + echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 +echo "configure:12948: 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 < +/* 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 setproctitle(); +char (*f)(); -/* Thanks to Mike Rendell for this test. */ -#include -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} +int main() { + +/* 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_setproctitle) || defined (__stub___setproctitle) +choke me +#else +f = setproctitle; +#endif + +; return 0; } +EOF +if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_setproctitle=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setproctitle=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_setproctitle=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 +echo "configure:12996: checking for setproctitle in -lutil" >&5 +ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lutil $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t +if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int -fi -rm -fr conftest* -fi - -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_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 -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_SETPROCTITLE 1 EOF - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:10428: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + fi +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:13051: 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 @@ -10437,7 +13060,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13064: \"$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* @@ -10454,7 +13077,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 @@ -10472,7 +13095,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 @@ -10493,7 +13116,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -10504,7 +13127,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:10508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -10528,12 +13151,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:10532: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then +echo "configure:13155: 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 @@ -10544,29 +13167,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_mode_t=yes + eval "ac_cv_type_mode_t=yes" else rm -rf conftest* - ac_cv_type_mode_t=no + eval "ac_cv_type_mode_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:10565: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:13190: 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 @@ -10577,29 +13202,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:10598: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then +echo "configure:13225: 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 @@ -10610,36 +13237,38 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_pid_t=yes + eval "ac_cv_type_pid_t=yes" else rm -rf conftest* - ac_cv_type_pid_t=no + eval "ac_cv_type_pid_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:10631: checking for ptrdiff_t" >&5 -if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then +echo "configure:13260: 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:10643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -10660,12 +13289,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:10664: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then +echo "configure:13293: 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 @@ -10682,7 +13311,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:10686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -10700,46 +13329,84 @@ cat >> confdefs.h <&6 -echo "configure:10705: checking for sig_atomic_t" >&5 -if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:13334: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -int main() { -sig_atomic_t atomic; -; return 0; } +#include +#if STDC_HEADERS +#include +#include +#endif EOF -if { (eval echo configure:10717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ol_cv_type_sig_atomic_t=yes + eval "ac_cv_type_size_t=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_type_sig_atomic_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* + fi +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 - if test $ol_cv_type_sig_atomic_t = no; then - cat >> confdefs.h <<\EOF -#define sig_atomic_t int +fi + + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:13370: checking for ssize_t" >&5 +if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval "ac_cv_type_ssize_t=yes" +else + rm -rf conftest* + eval "ac_cv_type_ssize_t=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:10738: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +fi + +echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 +echo "configure:13405: 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 @@ -10748,52 +13415,96 @@ else #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_caddr_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_caddr_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned +if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:10771: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + +echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 +echo "configure:13441: 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 < +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +int main() { +socklen_t len; +; return 0; } +EOF +if { (eval echo configure:13460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_type_socklen_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_type_socklen_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_type_socklen_t" 1>&6 + if test $ol_cv_type_socklen_t = no; then + cat >> confdefs.h <<\EOF +#define socklen_t int +EOF + + fi + +echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 +echo "configure:13481: 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 int main() { -struct stat s; s.st_blksize; +struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:10784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_blksize=yes + ac_cv_c_struct_member_st_blksize=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_blksize=no + ac_cv_c_struct_member_st_blksize=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then +echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6 +st_blksize="$ac_cv_c_struct_member_st_blksize" +if test $ac_cv_c_struct_member_st_blksize = yes; then cat >> confdefs.h <<\EOF #define HAVE_ST_BLKSIZE 1 EOF @@ -10801,12 +13512,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:10805: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo "configure:13516: 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 @@ -10815,7 +13526,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:10819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -10836,12 +13547,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:10840: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then +echo "configure:13551: 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 @@ -10849,7 +13560,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:10853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -10869,15 +13580,84 @@ EOF fi +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:13585: checking for uid_t in sys/types.h" >&5 +if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 +echo "configure:13619: 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:13631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_type_sig_atomic_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_type_sig_atomic_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6 + if test $ol_cv_type_sig_atomic_t = no; then + cat >> confdefs.h <<\EOF +#define sig_atomic_t int +EOF + + fi + + + # test for pw_gecos in struct passwd echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 -echo "configure:10875: checking struct passwd for pw_gecos" >&5 -if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then +echo "configure:13655: 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() { @@ -10887,7 +13667,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -10909,13 +13689,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:10913: checking struct passwd for pw_passwd" >&5 -if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then +echo "configure:13693: 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() { @@ -10925,7 +13705,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -10946,10 +13726,9 @@ EOF fi - echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:10952: checking if toupper() requires islower()" >&5 -if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then +echo "configure:13731: 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 @@ -10957,7 +13736,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -10969,7 +13748,7 @@ main() exit(1); } EOF -if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13752: \"$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 @@ -10992,12 +13771,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:10996: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:13775: 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:13829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -11067,12 +13846,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:11071: checking if compiler understands volatile" >&5 -if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then +echo "configure:13850: 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:13864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -11109,30 +13888,16 @@ if test $cross_compiling = yes ; then #define CROSS_COMPILING 1 EOF - - cat >> confdefs.h <<\EOF -#define LBER_INT_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_SOCKET_T int -EOF - - else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:11129: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then +echo "configure:13894: 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 @@ -11143,11 +13908,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:11147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13912: \"$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 @@ -11158,7 +13923,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:11162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -11178,7 +13943,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:13960: \"$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 @@ -11214,170 +13979,163 @@ EOF fi - echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:11219: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then +fi + +echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:13986: checking size of short" >&5 +if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (short) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:11238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +if { (eval echo configure:14002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_short=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_short != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 + +if test x$ac_cv_sizeof_short = x ; then + { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 -echo "configure:11258: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + +echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:14025: checking size of int" >&5 +if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (int) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +if { (eval echo configure:14041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_int=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_int != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 + +if test x$ac_cv_sizeof_int = x ; then + { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:11297: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + +echo $ac_n "checking size of long""... $ac_c" 1>&6 +echo "configure:14064: checking size of long" >&5 +if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} +#include "confdefs.h" +#include + + +int main() { +switch (0) case 0: case (sizeof (long) == $ac_size):; +; return 0; } EOF -if { (eval echo configure:11316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` +if { (eval echo configure:14080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sizeof_long=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* fi +rm -f conftest* + if test x$ac_cv_sizeof_long != x ; then break; fi +done fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 + +if test x$ac_cv_sizeof_long = x ; then + { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } +fi +echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&2 - if test "$ac_cv_sizeof_int" -lt 4 ; then - echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2 - - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define LBER_INT_T long EOF - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long -EOF - - cat >> confdefs.h <<\EOF -#define LBER_SOCKET_T int -EOF - - else - cat >> confdefs.h <<\EOF +else + cat >> confdefs.h <<\EOF #define LBER_INT_T int EOF - cat >> confdefs.h <<\EOF -#define LBER_TAG_T long +fi + +cat >> confdefs.h <<\EOF +#define LBER_LEN_T long EOF - cat >> confdefs.h <<\EOF +cat >> confdefs.h <<\EOF #define LBER_SOCKET_T int EOF - fi -fi - cat >> confdefs.h <<\EOF -#define LBER_LEN_T long +#define LBER_TAG_T long EOF echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:11373: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then +echo "configure:14131: 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 if test "$cross_compiling" = yes; then 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:14149: \"$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 @@ -11405,12 +14163,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:11409: checking for strftime" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then +echo "configure:14167: 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:14196: \"$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 @@ -11455,15 +14214,15 @@ 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:11459: checking for strftime in -lintl" >&5 -ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:14218: 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 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:14237: \"$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 @@ -11501,13 +14260,225 @@ fi fi +echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 +echo "configure:14265: 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 < +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +# ifdef HAVE_SYS_SELECT_H +# include +# endif +# include +# ifdef HAVE_ARPA_INET_H +# include +# endif +#endif + +int main() { +struct in_addr in; +int rc = inet_aton( "255.255.255.255", &in ); +; return 0; } +EOF +if { (eval echo configure:14292: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_func_inet_aton=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_func_inet_aton" 1>&6 + if test $ol_cv_func_inet_aton != no; then + cat >> confdefs.h <<\EOF +#define HAVE_INET_ATON 1 +EOF + + fi + + +echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 +echo "configure:14314: checking for _spawnlp" >&5 +if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _spawnlp(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__spawnlp) || defined (__stub____spawnlp) +choke me +#else +f = _spawnlp; +#endif + +; return 0; } +EOF +if { (eval echo configure:14343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__spawnlp=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__spawnlp=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SPAWNLP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 +echo "configure:14367: checking for _snprintf" >&5 +if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _snprintf(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__snprintf) || defined (__stub____snprintf) +choke me +#else +f = _snprintf; +#endif + +; return 0; } +EOF +if { (eval echo configure:14396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__snprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__snprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_func_snprintf=yes + cat >> confdefs.h <<\EOF +#define snprintf _snprintf +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 +echo "configure:14422: checking for _vsnprintf" >&5 +if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _vsnprintf(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__vsnprintf) || defined (__stub____vsnprintf) +choke me +#else +f = _vsnprintf; +#endif + +; return 0; } +EOF +if { (eval echo configure:14451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__vsnprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__vsnprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_func_vsnprintf=yes + cat >> confdefs.h <<\EOF +#define vsnprintf _vsnprintf +EOF + + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:11506: checking for vprintf" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then +echo "configure:14477: 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:14506: \"$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 @@ -11554,12 +14526,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:11558: checking for _doprnt" >&5 -if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then +echo "configure:14530: 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:14559: \"$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 @@ -11611,12 +14584,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in vsnprintf vsprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11615: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:14588: 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:14617: \"$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 @@ -11684,6 +14658,7 @@ for ac_func in \ memcpy \ memmove \ mkstemp \ + pipe \ read \ recv \ recvfrom \ @@ -11693,6 +14668,7 @@ for ac_func in \ setsid \ setuid \ seteuid \ + sigaction \ signal \ sigset \ snprintf \ @@ -11714,12 +14690,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11718: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:14694: 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:14723: \"$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 @@ -11770,12 +14747,12 @@ done for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11774: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:14751: 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:14780: \"$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 @@ -11825,28 +14803,39 @@ done -# Check Configuration +if test "$ac_cv_func_getopt" != yes; then + LIBSRCS="$LIBSRCS getopt.c" +fi + +if test "$ac_cv_func_tempnam" != yes; then + LIBSRCS="$LIBSRCS tempnam.c" +fi +# Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:11832: checking declaration of sys_errlist" >&5 -if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then +echo "configure:14817: checking declaration of sys_errlist" >&5 +if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include -#include +#include +#ifdef WINNT +#include +#endif int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:11848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14836: \"$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 @@ -11857,27 +14846,29 @@ 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:11868: checking existence of sys_errlist" >&5 - if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then +echo "configure:14859: checking existence of sys_errlist" >&5 +if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -11889,13 +14880,13 @@ fi rm -f conftest* fi - echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 - if test $ol_cv_have_sys_errlist = yes ; then - cat >> confdefs.h <<\EOF +echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6 +fi +if test $ol_cv_have_sys_errlist = yes ; then + cat >> confdefs.h <<\EOF #define HAVE_SYS_ERRLIST 1 EOF - fi fi @@ -11949,12 +14940,6 @@ EOF fi -if test "$ol_enable_aclgroups" != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_ACLGROUPS 1 -EOF - -fi if test "$ol_enable_crypt" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_CRYPT 1 @@ -11966,6 +14951,12 @@ if test "$ol_enable_cleartext" != no ; then #define SLAPD_CLEARTEXT 1 EOF +fi +if test "$ol_enable_multimaster" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MULTIMASTER 1 +EOF + fi if test "$ol_enable_phonetic" != no ; then cat >> confdefs.h <<\EOF @@ -11978,6 +14969,18 @@ if test "$ol_enable_rlookups" != no ; then #define SLAPD_RLOOKUPS 1 EOF +fi +if test "$ol_enable_aci" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_ACI_ENABLED 1 +EOF + +fi +if test "$ol_enable_discreteaci" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_ACI_DISCRETE_RIGHTS 1 +EOF + fi if test "$ol_link_modules" != no ; then @@ -11986,6 +14989,7 @@ if test "$ol_link_modules" != no ; then EOF BUILD_SLAPD=yes + SLAPD_MODULES_LDFLAGS="-dlopen self" fi if test "$ol_link_bdb2" != no ; then @@ -12000,7 +15004,9 @@ EOF #define SLAPD_BDB2_DYNAMIC 1 EOF - BUILD_BDB2_DYNAMIC=yes + BUILD_BDB2=mod + BUILD_BDB2_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la" fi fi @@ -12016,7 +15022,9 @@ EOF #define SLAPD_LDAP_DYNAMIC 1 EOF - BUILD_LDAP_DYNAMIC=yes + BUILD_LDAP=mod + BUILD_LDAP_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la" fi fi @@ -12032,7 +15040,9 @@ EOF #define SLAPD_LDBM_DYNAMIC 1 EOF - BUILD_LDBM_DYNAMIC=yes + BUILD_LDBM=mod + BUILD_LDBM_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la" fi fi @@ -12048,7 +15058,9 @@ EOF #define SLAPD_PASSWD_DYNAMIC 1 EOF - BUILD_PASSWD_DYNAMIC=yes + BUILD_PASSWD=mod + BUILD_PASSWD_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la" fi fi @@ -12064,7 +15076,9 @@ EOF #define SLAPD_PERL_DYNAMIC 1 EOF - BUILD_PERL_DYNAMIC=yes + BUILD_PERL=mod + BUILD_PERL_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la" fi fi @@ -12080,7 +15094,9 @@ EOF #define SLAPD_SHELL_DYNAMIC 1 EOF - BUILD_SHELL_DYNAMIC=yes + BUILD_SHELL=mod + BUILD_SHELL_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la" fi fi @@ -12096,7 +15112,9 @@ EOF #define SLAPD_TCL_DYNAMIC 1 EOF - BUILD_TCL_DYNAMIC=yes + BUILD_TCL=mod + BUILD_TCL_DYNAMIC=shared + SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la" fi fi @@ -12110,8 +15128,32 @@ if test "$ol_link_isode" != no ; then fi +if test "$LINK_BINS_DYNAMIC" = yes; then + LIB_LINKAGE=DYN + LT_LIB_LINKAGE=shared +else + LIB_LINKAGE=STAT + LT_LIB_LINKAGE=static +fi + +if test "$ac_cv_mingw32" = yes ; then + PLAT=NT + DYN_EXT=dll +else + PLAT=UNIX + DYN_EXT=so +fi + + + + + + + + + @@ -12139,6 +15181,14 @@ fi + + + + + + + + @@ -12192,7 +15242,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -12231,13 +15281,13 @@ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/li servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ -servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \ -servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \ -servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ -servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ -servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \ -servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ -servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \ +servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \ +servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \ +servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \ +servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \ +servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \ +servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \ +servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \ servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ @@ -12303,6 +15353,10 @@ s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g +s%@install_sh@%$install_sh%g +s%@AMTAR@%$AMTAR%g +s%@AWK@%$AWK%g +s%@AMTARFLAGS@%$AMTARFLAGS%g s%@SET_MAKE@%$SET_MAKE%g s%@top_builddir@%$top_builddir%g s%@ldap_subdir@%$ldap_subdir%g @@ -12311,13 +15365,14 @@ s%@RANLIB@%$RANLIB%g s%@LD@%$LD%g s%@NM@%$NM%g s%@LN_S@%$LN_S%g +s%@DLLTOOL@%$DLLTOOL%g +s%@AS@%$AS%g +s%@OBJDUMP@%$OBJDUMP%g s%@LIBTOOL@%$LIBTOOL%g -s%@AWK@%$AWK%g s%@LN_H@%$LN_H%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g -s%@GLIBCONFIG@%$GLIBCONFIG%g s%@PERLBIN@%$PERLBIN%g s%@CPP@%$CPP%g s%@EXEEXT@%$EXEEXT%g @@ -12326,6 +15381,11 @@ s%@OL_MKDEP@%$OL_MKDEP%g s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g s%@PEPSY@%$PEPSY%g s%@LIBOBJS@%$LIBOBJS%g +s%@LIBSRCS@%$LIBSRCS%g +s%@PLAT@%$PLAT%g +s%@LIB_LINKAGE@%$LIB_LINKAGE%g +s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g +s%@DYN_EXT@%$DYN_EXT%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g s%@BUILD_BDB2@%$BUILD_BDB2%g @@ -12333,6 +15393,7 @@ s%@BUILD_LDAP@%$BUILD_LDAP%g s%@BUILD_LDBM@%$BUILD_LDBM%g s%@BUILD_PASSWD@%$BUILD_PASSWD%g s%@BUILD_PERL@%$BUILD_PERL%g +s%@BUILD_QUIPU@%$BUILD_QUIPU%g s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_TCL@%$BUILD_TCL%g s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g @@ -12345,19 +15406,27 @@ s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g s%@LDAP_LIBS@%$LDAP_LIBS%g s%@LDAPD_LIBS@%$LDAPD_LIBS%g +s%@LDIF_LIBS@%$LDIF_LIBS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g s%@LDBM_LIBS@%$LDBM_LIBS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g +s%@WRAP_LIBS@%$WRAP_LIBS%g +s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g +s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g -s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g +s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g +s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g +s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g s%@KRB_LIBS@%$KRB_LIBS%g s%@READLINE_LIBS@%$READLINE_LIBS%g +s%@SASL_LIBS@%$SASL_LIBS%g s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g s%@TLS_LIBS@%$TLS_LIBS%g +s%@MODULES_LIBS@%$MODULES_LIBS%g CEOF EOF @@ -12427,13 +15496,13 @@ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/li servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ -servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \ -servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \ -servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ -servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ -servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \ -servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ -servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \ +servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \ +servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \ +servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \ +servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \ +servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \ +servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \ +servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \ servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ @@ -12621,5 +15690,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1