X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=faa9dd5acdcc3baea02f4106392220f2b2c44166;hb=417e2d59fcb8f258f706a28275acf83075cc20a8;hp=4361158c11de59142f200cec83b5be594332f9db;hpb=2889c67adf7e0f88d6b8c704bea3c4a9e46ba61c;p=openldap diff --git a/configure b/configure index 4361158c11..faa9dd5acd 100755 --- a/configure +++ b/configure @@ -16,6 +16,8 @@ ac_help="$ac_help --with-subdir=DIR change default subdirectory used for installs" ac_help="$ac_help --enable-debug enable debugging (yes)" +ac_help="$ac_help + --enable-syslog enable syslog support (auto)" ac_help="$ac_help --enable-proctitle enable proctitle support (yes)" ac_help="$ac_help @@ -31,9 +33,13 @@ ac_help="$ac_help ac_help="$ac_help --enable-dmalloc enable debug malloc support (no)" ac_help="$ac_help - --with-kerberos use Kerberos (auto)" + --with-kerberos with Kerberos support (auto)" +ac_help="$ac_help + --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)" ac_help="$ac_help --with-yielding-select with implicitly yielding select (auto)" ac_help="$ac_help @@ -51,13 +57,17 @@ ac_help="$ac_help ac_help="$ac_help --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help - --enable-wrappers enable tcp wrapper support (no)" + --enable-modules enable dynamic module support (no)" ac_help="$ac_help --enable-phonetic enable phonetic/soundex (no)" ac_help="$ac_help --enable-rlookups enable reverse lookups (auto)" +ac_help="$ac_help + --enable-wrappers enable tcp wrapper support (no)" ac_help="$ac_help --enable-bdb2 enable bdb2 backend (no)" +ac_help="$ac_help + --enable-ldap enable ldap backend (no)" ac_help="$ac_help --enable-ldbm enable ldbm backend (yes)" ac_help="$ac_help @@ -528,7 +538,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=include/ldap.h +ac_unique_file=build/version # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -568,13 +578,6 @@ for ac_site_file in $CONFIG_SITE; do fi done -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -615,6 +618,12 @@ 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. + +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 + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -627,7 +636,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # 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:631: checking for a BSD compatible install" >&5 +echo "configure:640: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -680,7 +689,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:684: checking whether build environment is sane" >&5 +echo "configure:693: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -737,7 +746,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:741: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:750: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -766,7 +775,7 @@ fi PACKAGE=OpenLDAP -VERSION=2.0-devel +VERSION=$OL_VERSION if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -776,7 +785,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:780: checking for working aclocal" >&5 +echo "configure:789: 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. @@ -789,7 +798,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:793: checking for working autoconf" >&5 +echo "configure:802: 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. @@ -802,7 +811,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:806: checking for working automake" >&5 +echo "configure:815: 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. @@ -815,7 +824,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:819: checking for working autoheader" >&5 +echo "configure:828: 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. @@ -828,7 +837,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:832: checking for working makeinfo" >&5 +echo "configure:841: 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. @@ -842,13 +851,28 @@ fi +cat >> confdefs.h <> confdefs.h <&6 -echo "configure:848: checking configure arguments" >&5 +echo "configure:867: checking configure arguments" >&5 top_builddir=`pwd` +cat >> confdefs.h <<\EOF +#define HAVE_MKVERSION 1 +EOF + + ldap_subdir="openldap" # Check whether --with-subdir or --without-subdir was given. @@ -884,7 +908,26 @@ else ol_enable_debug="yes" fi # end --enable-debug -ol_enable_syslog=no +# OpenLDAP --enable-syslog + # Check whether --enable-syslog or --disable-syslog was given. +if test "${enable_syslog+set}" = set; then + enableval="$enable_syslog" + + 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-syslog" 1>&2; exit 1; } + fi + ol_enable_syslog="$ol_arg" + +else + ol_enable_syslog="auto" +fi +# end --enable-syslog # OpenLDAP --enable-proctitle # Check whether --enable-proctitle or --disable-proctitle was given. if test "${enable_proctitle+set}" = set; then @@ -1006,7 +1049,6 @@ else fi # end --enable-x_compile - # OpenLDAP --enable-dmalloc # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then @@ -1049,6 +1091,27 @@ else fi # end --with-kerberos +# OpenLDAP --with-readline + # Check whether --with-readline or --without-readline was given. +if test "${with_readline+set}" = set; then + withval="$with_readline" + + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; } + fi + ol_with_readline="$ol_arg" + +else + ol_with_readline="auto" +fi +# end --with-readline + # OpenLDAP --with-threads # Check whether --with-threads or --without-threads was given. if test "${with_threads+set}" = set; then @@ -1070,6 +1133,27 @@ else fi # end --with-threads +# OpenLDAP --with-tls + # Check whether --with-tls or --without-tls was given. +if test "${with_tls+set}" = set; then + withval="$with_tls" + + ol_arg=invalid + for ol_val in auto ssleay openssl 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-tls" 1>&2; exit 1; } + fi + ol_with_tls="$ol_arg" + +else + ol_with_tls="auto" +fi +# end --with-tls + # OpenLDAP --with-yielding_select # Check whether --with-yielding_select or --without-yielding_select was given. if test "${with_yielding_select+set}" = set; then @@ -1206,10 +1290,10 @@ else ol_enable_crypt="auto" fi # end --enable-crypt -# OpenLDAP --enable-wrappers - # Check whether --enable-wrappers or --disable-wrappers was given. -if test "${enable_wrappers+set}" = set; then - enableval="$enable_wrappers" +# OpenLDAP --enable-modules + # Check whether --enable-modules or --disable-modules was given. +if test "${enable_modules+set}" = set; then + enableval="$enable_modules" ol_arg=invalid for ol_val in auto yes no ; do @@ -1218,14 +1302,14 @@ 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-modules" 1>&2; exit 1; } fi - ol_enable_wrappers="$ol_arg" + ol_enable_modules="$ol_arg" else - ol_enable_wrappers="no" + ol_enable_modules="no" fi -# end --enable-wrappers +# end --enable-modules # OpenLDAP --enable-phonetic # Check whether --enable-phonetic or --disable-phonetic was given. if test "${enable_phonetic+set}" = set; then @@ -1266,6 +1350,26 @@ 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" + + 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-wrappers" 1>&2; exit 1; } + fi + ol_enable_wrappers="$ol_arg" + +else + ol_enable_wrappers="no" +fi +# end --enable-wrappers # OpenLDAP --enable-bdb2 # Check whether --enable-bdb2 or --disable-bdb2 was given. @@ -1287,6 +1391,26 @@ else ol_enable_bdb2="no" fi # end --enable-bdb2 +# OpenLDAP --enable-ldap + # Check whether --enable-ldap or --disable-ldap was given. +if test "${enable_ldap+set}" = set; then + enableval="$enable_ldap" + + ol_arg=invalid + for ol_val in auto yes no ; do + 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-ldap" 1>&2; exit 1; } + fi + ol_enable_ldap="$ol_arg" + +else + ol_enable_ldap="no" +fi +# end --enable-ldap # OpenLDAP --enable-ldbm # Check whether --enable-ldbm or --disable-ldbm was given. if test "${enable_ldbm+set}" = set; then @@ -1313,7 +1437,7 @@ if test "${with_ldbm_api+set}" = set; then withval="$with_ldbm_api" ol_arg=invalid - for ol_val in auto db2 db gdbm ndbm manual ; do + for ol_val in auto db2 db mdbm gdbm ndbm manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -1524,40 +1648,46 @@ fi if test $ol_enable_slapd = no ; then if test $ol_enable_bdb2 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2 + fi + if test $ol_enable_ldap = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2 fi if test $ol_enable_ldbm = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2 fi if test $ol_enable_passwd = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2 fi if test $ol_enable_perl = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2 fi if test $ol_enable_shell = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2 fi if test $ol_enable_tcl = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2 + 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 + 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_wrappers = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2 + 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 + echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2 fi if test $ol_enable_rlookups = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2 fi if test $ol_with_ldbm_api != auto ; then - echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2 fi if test $ol_with_ldbm_type != auto ; then - echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2 + echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2 fi if test $ol_enable_slurpd = yes ; then { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; } @@ -1565,34 +1695,41 @@ if test $ol_enable_slapd = no ; then # force settings to no ol_enable_bdb2=no + ol_enable_ldap=no ol_enable_ldbm=no ol_enable_passwd=no ol_enable_perl=no ol_enable_shell=no ol_enable_tcl=no + ol_enable_aclgroups=no - ol_enable_wrappers=no + ol_enable_modules=no ol_enable_phonetic=no ol_enable_rlookups=no + ol_enable_wrappers=no + ol_with_ldbm_api=no ol_with_ldbm_type=no + ol_enable_slurpd=no elif test $ol_enable_ldbm = no ; then if test $ol_with_ldbm_api != auto ; then - echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2 + echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2 fi if test $ol_with_ldbm_type != auto ; then - echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2 + echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2 fi if test $ol_enable_bdb2 = yes ; then { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; } fi - if test $ol_enable_passwd = no -a \ + if test $ol_enable_modules != yes -a \ + $ol_enable_ldap = no -a \ + $ol_enable_passwd = no -a \ $ol_enable_perl = no -a \ $ol_enable_shell = no -a \ $ol_enable_tcl = no ; then @@ -1625,6 +1762,10 @@ else $ol_with_ldbm_type = btree ; then { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; } fi + if test $ol_with_ldbm_api = mdbm -a \ + $ol_with_ldbm_type = btree ; then + { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; } + fi if test $ol_with_ldbm_api = ndbm -a \ $ol_with_ldbm_type = btree ; then { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; } @@ -1639,34 +1780,6 @@ fi echo "$ac_t""done" 1>&6 - -# 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:1650: 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 - - ## Initialize vars LDAP_LIBS= LDBM_LIBS= @@ -1682,6 +1795,7 @@ BUILD_SLAPD=no BUILD_SLURPD=no BUILD_BDB2=no +BUILD_LDAP=no BUILD_LDBM=no BUILD_PASSWD=no BUILD_PERL=no @@ -1689,81 +1803,54 @@ BUILD_SHELL=no BUILD_TCL=no BUILD_THREAD=no +SLAPD_MODULES_LDFLAGS= +SLAPD_MODULES_CPPFLAGS= + SLAPD_PERL_LDFLAGS= SLAPD_PERL_CPPFLAGS= KRB_LIBS= +READLINE_LIBS= TERMCAP_LIBS= +TLS_LIBS= -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1712: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" +if test "$host_os" != "cygwin" ; + CC=${CC-"cc"} fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi + + +# 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_t""$INSTALL" 1>&6 -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1831: checking host system type" >&5 -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +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 -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +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 # 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:1767: checking for $ac_word" >&5 +echo "configure:1854: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1793,7 +1880,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1797: checking for $ac_word" >&5 +echo "configure:1884: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1823,7 +1910,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1827: checking for $ac_word" >&5 +echo "configure:1914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1874,7 +1961,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1878: checking for $ac_word" >&5 +echo "configure:1965: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1906,7 +1993,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1917,12 +2004,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1921 "configure" +#line 2008 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2013: \"$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 @@ -1948,12 +2035,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1952: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2039: checking whether the C compiler ($CC $CFLAGS $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:1957: checking whether we are using GNU C" >&5 +echo "configure:2044: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1962,7 +2049,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2053: \"$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 @@ -1981,7 +2068,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1985: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2072: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2025,7 +2112,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:2029: checking for ld used by GCC" >&5 +echo "configure:2116: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -2043,10 +2130,10 @@ echo "configure:2029: 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:2047: checking for GNU ld" >&5 +echo "configure:2134: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2050: checking for non-GNU ld" >&5 +echo "configure:2137: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2082,7 +2169,7 @@ 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:2086: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:2173: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2098,7 +2185,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2102: checking for BSD-compatible nm" >&5 +echo "configure:2189: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2135,7 +2222,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2139: checking whether ln -s works" >&5 +echo "configure:2226: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2171,8 +2258,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2175 "configure"' > conftest.$ac_ext - if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2262 "configure"' > conftest.$ac_ext + if { (eval echo configure:2263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2207,7 +2294,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2211: checking for $ac_word" >&5 +echo "configure:2298: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2236,8 +2323,32 @@ fi test -n "$AWK" && break done +# test for ln hardlink support +echo $ac_n "checking whether ln works""... $ac_c" 1>&6 +echo "configure:2329: checking whether ln works" >&5 +if eval "test \"`echo '$''{'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:2241: checking whether ln -s works" >&5 +echo "configure:2352: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2258,10 +2369,14 @@ else 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:2265: checking for $ac_word" >&5 +echo "configure:2380: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2297,7 +2412,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2301: checking for $ac_word" >&5 +echo "configure:2416: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2333,7 +2448,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2337: checking for $ac_word" >&5 +echo "configure:2452: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2367,20 +2482,21 @@ else fi -if test $ol_enable_perl = yes ; then - # Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 +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 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2375: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then +echo "configure:2491: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$PERLBIN" in + case "$GLIBCONFIG" in /*) - ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path. + ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path. + ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -2388,54 +2504,111 @@ 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_PERLBIN="$ac_dir/$ac_word" + ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl" ;; esac fi -PERLBIN="$ac_cv_path_PERLBIN" -if test -n "$PERLBIN"; then - echo "$ac_t""$PERLBIN" 1>&6 +GLIBCONFIG="$ac_cv_path_GLIBCONFIG" +if test -n "$GLIBCONFIG"; then + echo "$ac_t""$GLIBCONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi - if test "no$PERLBIN" = "no" ; then - ol_enable_perl=no - 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 - SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" - SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`" -fi + else + SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`" + SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`" + SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`" -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2418: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= + ol_link_modules=yes + fi fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + +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:2543: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+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 + case "$PERLBIN" in + /*) + ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path. + ;; + *) + 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_PERLBIN="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl" + ;; +esac +fi +PERLBIN="$ac_cv_path_PERLBIN" +if test -n "$PERLBIN"; then + echo "$ac_t""$PERLBIN" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + if test "no$PERLBIN" = "no" ; then + if test $ol_enable_perl = yes ; then + { echo "configure: error: could not locate perl" 1>&2; exit 1; } + fi + + else + SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`" + SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`" + + ol_link_perl=yes + fi +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:2591: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # 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:2439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2612: \"$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 : @@ -2446,13 +2619,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:2456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2629: \"$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 : @@ -2463,13 +2636,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:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2646: \"$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 : @@ -2507,9 +2680,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:2511: checking for AIX" >&5 +echo "configure:2684: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2535: checking for POSIXized ISC" >&5 +echo "configure:2708: 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 @@ -2553,17 +2726,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:2557: checking for minix/config.h" >&5 +echo "configure:2730: checking for minix/config.h" >&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:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2740: \"$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* @@ -2601,13 +2774,55 @@ EOF fi +echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6 +echo "configure:2779: 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:2606: checking for Cygwin environment" >&5 +echo "configure:2821: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'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:2837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2635,19 +2850,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2639: checking for mingw32 environment" >&5 +echo "configure:2854: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'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:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2666,7 +2881,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2670: checking for executable suffix" >&5 +echo "configure:2885: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2676,7 +2891,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -2697,13 +2912,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:2701: checking for object suffix" >&5 +echo "configure:2916: checking for object suffix" >&5 if eval "test \"`echo '$''{'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:2707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -2721,11 +2936,16 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext +cat >> confdefs.h <&6 -echo "configure:2729: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:2949: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2741,7 +2961,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__ do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -2778,7 +2998,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -2809,12 +3029,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:2813: checking for socket" >&5 +echo "configure:3033: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -2851,12 +3071,12 @@ fi if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_socket=yes + : else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:2860: checking for main in -lsocket" >&5 +echo "configure:3080: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -2864,14 +3084,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3095: \"$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 @@ -2899,7 +3119,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:2903: checking for main in -lnet" >&5 +echo "configure:3123: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -2907,14 +3127,61 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3138: \"$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 + ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 +echo "configure:3166: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2942,7 +3209,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:2946: checking for main in -lnsl_s" >&5 +echo "configure:3213: 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 @@ -2950,14 +3217,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3228: \"$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 @@ -2985,7 +3252,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:2989: checking for main in -lnsl" >&5 +echo "configure:3256: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -2993,14 +3260,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3271: \"$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 @@ -3028,7 +3295,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:3032: checking for socket in -linet" >&5 +echo "configure:3299: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3036,7 +3303,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3318: \"$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 @@ -3075,7 +3342,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:3079: checking for main in -lgen" >&5 +echo "configure:3346: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3083,14 +3350,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3361: \"$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 @@ -3124,12 +3391,12 @@ fi for ac_func in res_search do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3128: checking for $ac_func" >&5 +echo "configure:3395: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:3423: \"$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 @@ -3178,7 +3445,7 @@ 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:3182: checking for res_search in -lbind" >&5 +echo "configure:3449: 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 "(cached) $ac_c" 1>&6 @@ -3186,7 +3453,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3468: \"$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 @@ -3231,7 +3498,7 @@ EOF else echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 -echo "configure:3235: checking for res_search in -lresolv" >&5 +echo "configure:3502: 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 "(cached) $ac_c" 1>&6 @@ -3239,7 +3506,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3521: \"$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 @@ -3287,7 +3554,7 @@ EOF fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:3291: checking for sigset in -lV3" >&5 +echo "configure:3558: 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 @@ -3295,7 +3562,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3577: \"$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 @@ -3334,161 +3601,379 @@ else fi -# ISODE tests -ol_link_isode=no -if test $ol_enable_ldapd != no ; then - echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 -echo "configure:3342: 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 +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:3609: 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 - ac_save_LIBS="$LIBS" -LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:3357: \"$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:3619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_XTPP 1 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -: fi +done - echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 -echo "configure:3386: 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 +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:3649: checking for regfree" >&5 +if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldsap -lisode $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +/* 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(); 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 +regfree(); +#endif + ; return 0; } EOF -if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3677: \"$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 - echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_DSAP 1 -EOF - LDAPD_LIBS="$LDAPD_LIBS -ldsap" - +if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : else echo "$ac_t""no" 1>&6 -: +{ echo "configure: error: POSIX regex required." 1>&2; exit 1; } fi - echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 -echo "configure:3430: 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 select""... $ac_c" 1>&6 +echo "configure:3699: checking for select" >&5 +if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lisode $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 select(); 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_select) || defined (__stub___select) +choke me +#else +select(); +#endif + ; return 0; } EOF -if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3727: \"$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_select=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_select=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_isode=yes - cat >> confdefs.h <<\EOF -#define HAVE_ISODE 1 -EOF - LDAPD_LIBS="$LDAPD_LIBS -lisode" - +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 -fi -if test $ol_link_isode != no; then - echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 -echo "configure:3477: 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 types of arguments for select()""... $ac_c" 1>&6 +echo "configure:3749: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpp $LIBS" -cat > conftest.$ac_ext <&6 +else + if eval "test \"`echo '$''{'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:3782: \"$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 <&2 + + echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6 +echo "configure:3827: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_XTPP 1 +EOF + + LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi" + +else + echo "$ac_t""no" 1>&6 +: +fi + + echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 +echo "configure:3871: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldsap -lisode $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_DSAP 1 +EOF + + LDAPD_LIBS="$LDAPD_LIBS -ldsap" + +else + echo "$ac_t""no" 1>&6 +: +fi + + echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 +echo "configure:3915: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lisode $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ol_link_isode=yes + cat >> confdefs.h <<\EOF +#define HAVE_ISODE 1 +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:3962: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpp $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3977: \"$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 @@ -3519,7 +4004,7 @@ fi # Extract the first word of "pepsy", so it can be a program name with args. set dummy pepsy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3523: checking for $ac_word" >&5 +echo "configure:4008: 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 @@ -3560,17 +4045,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3564: checking for $ac_hdr" >&5 +echo "configure:4049: 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:3574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4059: \"$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* @@ -3599,7 +4084,7 @@ 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:3603: checking for main in -lkrb4" >&5 +echo "configure:4088: 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 "(cached) $ac_c" 1>&6 @@ -3607,14 +4092,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $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 @@ -3645,7 +4130,7 @@ fi LIBS="$KRB_LIBS $LIBS" echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6 -echo "configure:3649: checking for des_debug in Kerberos libraries" >&5 +echo "configure:4134: checking for des_debug in Kerberos libraries" >&5 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3653,7 +4138,7 @@ else save_LIBS="$LIBS" LIBS="$KRB_LIBS $LIBS" cat > conftest.$ac_ext < @@ -3666,7 +4151,7 @@ des_debug = 1; ; return 0; } EOF -if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4155: \"$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 @@ -3682,7 +4167,7 @@ fi echo "$ac_t""$ol_cv_var_des_debug" 1>&6 - if test $ol_cv_var_des_debug= yes ; then + if test $ol_cv_var_des_debug = yes ; then cat >> confdefs.h <<\EOF #define HAVE_DES_DEBUG 1 EOF @@ -3699,17 +4184,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3703: checking for $ac_hdr" >&5 +echo "configure:4188: 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:3713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (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* @@ -3738,7 +4223,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:3742: checking for main in -lkrb" >&5 +echo "configure:4227: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3746,14 +4231,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4242: \"$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 @@ -3791,25 +4276,24 @@ EOF fi -ol_link_threads=no -if test $ol_with_threads = auto -o $ol_with_threads = yes \ - -o $ol_with_threads = posix ; then - - for ac_hdr in pthread.h sched.h +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:3803: checking for $ac_hdr" >&5 +echo "configure:4287: 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:3813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4297: \"$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* @@ -3835,904 +4319,1587 @@ else fi done - - if test $ac_cv_header_pthread_h = yes ; then - echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:3842: checking POSIX thread version" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then + + 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:4326: 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 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 - +int main() { +SSLeay_add_ssl_algorithms() +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pthread_version_final" >/dev/null 2>&1; then +if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_pthread_final=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_final=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_ssleay=yes + need_rsaref=no +else + echo "$ac_t""no" 1>&6 +have_ssleay=no +fi - cat > conftest.$ac_ext <&6 +echo "configure:4370: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS" +cat > conftest.$ac_ext < - /* this check could be improved */ -# ifdef pthread_once_init - pthread_version_draft4 -# endif - +int main() { +ssl3_accept() +; 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:4389: \"$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* - - - 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 +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_ssleay=yes + need_rsaref=yes +else + echo "$ac_t""no" 1>&6 +have_ssleay=no fi -echo "$ac_t""$ol_cv_pthread_version" 1>&6 - + fi - if test $ol_cv_pthread_version = final ; then - cat >> confdefs.h <<\EOF -#define HAVE_PTHREADS_FINAL 1 -EOF + if test $have_ssleay = yes ; then + ol_with_tls=found + ol_link_tls=yes - elif test $ol_cv_pthread_version = draft4 ; then cat >> confdefs.h <<\EOF -#define HAVE_PTHREADS_D4 1 +#define HAVE_SSLEAY 1 EOF - else - { echo "configure: error: unknown pthread version" 1>&2; exit 1; } - fi - # consider threads found - ol_with_threads=found + if test $need_rsaref = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_RSAREF 1 +EOF - -echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3923: checking for LinuxThreads" >&5 -if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - ol_cv_linux_threads=yes - else - ol_cv_linux_threads=no - fi + TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref" + else + TLS_LIBS="-lssl -lcrypto" + fi + fi + fi fi -echo "$ac_t""$ol_cv_linux_threads" 1>&6 - - - if test $ol_cv_linux_threads = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_LINUX_THREADS 1 +if test $ol_link_tls = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TLS 1 EOF - fi +fi - - echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:3949: checking for pthread_create" >&5 -if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then +for ac_func in \ + ctime_r \ + gethostbyname_r gethostbyaddr_r \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4449: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pthread_create(); +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_pthread_create) || defined (__stub___pthread_create) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -pthread_create(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_pthread_create=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_pthread_create=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ol_link_threads=yes + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done - if test $ol_link_threads = no ; then - echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6 -echo "configure:3999: checking for pthread_create with -kthread" >&5 -if eval "test \"`echo '$''{'ol_cv_kthread_flag'+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:4506: 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 - - save_LIBS="$LIBS" - LIBS="-kthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -pthread_create(NULL,NULL,NULL,NULL); +time_t ti; char *buffer; ctime_r(&ti,buffer,32); ; return 0; } EOF -if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_kthread_flag=yes + ol_cv_func_ctime_r_nargs=3 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_kthread_flag=no -fi -rm -f conftest* - LIBS="$save_LIBS" - -fi - -echo "$ac_t""$ol_cv_kthread_flag" 1>&6 - - if test $ol_cv_kthread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -kthread" - ol_link_threads=posix - fi - fi - - if test $ol_link_threads = no ; then - echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:4038: checking for pthread_create with -pthread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - save_LIBS="$LIBS" - LIBS="-pthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -pthread_create(NULL,NULL,NULL,NULL); +time_t ti; char *buffer; ctime_r(&ti,buffer); ; return 0; } EOF -if { (eval echo configure:4053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthread_flag=yes + ol_cv_func_ctime_r_nargs=2 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_flag=no + ol_cv_func_ctime_r_nargs=0 +fi +rm -f conftest* fi rm -f conftest* - LIBS="$save_LIBS" - fi -echo "$ac_t""$ol_cv_pthread_flag" 1>&6 +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 -echo "configure:4077: checking for pthread_create with -pthreads" >&5 -if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then +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:4559: checking number of arguments of gethostbyname_r" >&5 +if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - save_LIBS="$LIBS" - LIBS="-pthreads $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { -pthread_create(NULL,NULL,NULL,NULL); +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:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_pthreads_flag=yes + ol_cv_func_gethostbyname_r_nargs=5 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthreads_flag=no -fi -rm -f conftest* - LIBS="$save_LIBS" - -fi - -echo "$ac_t""$ol_cv_pthreads_flag" 1>&6 - - if test $ol_cv_pthreads_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -pthreads" - ol_link_threads=posix - fi - fi - - if test $ol_link_threads = no ; then - echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6 -echo "configure:4116: checking for pthread_create with -thread" >&5 -if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - save_LIBS="$LIBS" - LIBS="-thread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { -pthread_create(); +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:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_thread_flag=yes + ol_cv_func_gethostbyname_r_nargs=6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_thread_flag=no + ol_cv_func_gethostbyname_r_nargs=0 +fi +rm -f conftest* fi rm -f conftest* - LIBS="$save_LIBS" - fi -echo "$ac_t""$ol_cv_thread_flag" 1>&6 +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:4155: checking for pthread_create with -mt" >&5 -if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then +else + ol_cv_func_gethostbyname_r_nargs=0 +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:4629: checking number of arguments of gethostbyaddr_r" >&5 +if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - save_LIBS="$LIBS" - LIBS="-mt $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { -pthread_create(); +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:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ol_cv_thread_flag=yes + ol_cv_func_gethostbyaddr_r_nargs=7 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_thread_flag=no -fi -rm -f conftest* - LIBS="$save_LIBS" - -fi - -echo "$ac_t""$ol_cv_thread_flag" 1>&6 - - if test $ol_cv_thread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -mt" - ol_link_threads=posix - fi - fi - - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6 -echo "configure:4195: checking for pthread_mutex_unlock in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_mutex_unlock | 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="-lpthread -lmach -lexc -lc_r $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#define BUFSIZE (sizeof(struct hostent)+10) int main() { -pthread_mutex_unlock() +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:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ol_cv_func_gethostbyaddr_r_nargs=8 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ol_cv_func_gethostbyaddr_r_nargs=0 fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6 + if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then + cat >> confdefs.h <&6 -: + ol_cv_func_gethostbyaddr_r_nargs=0 fi - LIBS="$save_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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6 -echo "configure:4247: checking for pthread_mutex_lock in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +fi + +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = posix ; then + + 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:4727: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpthread -lmach -lexc $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:4266: \"$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:4737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -: fi +done - LIBS="$save_LIBS" - fi - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_trylock in -lpthread""... $ac_c" 1>&6 -echo "configure:4299: checking for pthread_mutex_trylock in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+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:4766: checking POSIX thread version" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lpthread -lexc $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < + /* 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* + + + cat > conftest.$ac_ext < + /* this check could be improved */ +# ifdef pthread_once_init + pthread_version_draft4 +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_version_draft4" >/dev/null 2>&1; then + rm -rf conftest* + ol_pthread_draft4=yes +else + rm -rf conftest* + ol_pthread_draft4=no +fi +rm -f conftest* + + + 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 + +echo "$ac_t""$ol_cv_pthread_version" 1>&6 + + + if test $ol_cv_pthread_version = final ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_FINAL 1 +EOF + + elif test $ol_cv_pthread_version = draft4 ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_D4 1 +EOF + + else + { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi + + # consider threads found + ol_with_threads=found + + + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:4847: checking for LinuxThreads pthread.h" >&5 +if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_linux_threads=yes +else + rm -rf conftest* + ol_cv_header_linux_threads=no +fi +rm -f conftest* + + +fi + +echo "$ac_t""$ol_cv_header_linux_threads" 1>&6 + if test $ol_cv_header_linux_threads = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF + + fi + + + + echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6 +echo "configure:4880: checking for pthread_create in default libraries" >&5 + if eval "test \"`echo '$''{'ol_cv_pthread_create'+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 + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main(argc, argv) + int argc; + char **argv; +{ + 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 ) return status; + + /* make sure pthread_detach() isn't just a stub */ +#if HAVE_PTHREADS_D4 + status = pthread_detach( &t ); +#else + status = pthread_detach( t ); +#endif + + if( status ) return status; + + return status; +} + +EOF +if { (eval echo configure:4932: \"$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: -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:4957: checking for pthread link with -mt" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_mt'+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 < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + ; return 0; } EOF -if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4992: \"$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_mt=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_mt=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 + +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:5020: checking for pthread link with -kthread" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - + # save the flags + ol_LIBS="$LIBS" + LIBS="-kthread $LIBS" + + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5055: \"$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 "$ac_t""no" 1>&6 -: + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_kthread=no fi +rm -f conftest* - LIBS="$save_LIBS" + # 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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4351: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + # 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:5083: checking for pthread link with -pthread" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_create() + + 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 + ; return 0; } EOF -if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5118: \"$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_pthread=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_pthread=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 + +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:5146: 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 - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" + # save the flags + ol_LIBS="$LIBS" + LIBS="-pthreads $LIBS" + + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5181: \"$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 "$ac_t""no" 1>&6 -: + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_pthreads=no fi +rm -f conftest* - LIBS="$save_LIBS" + # 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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:4399: checking for pthread_create in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + # 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:5209: checking for pthread link with -thread" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_create() + + 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 + ; return 0; } EOF -if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5244: \"$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_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" + ol_cv_pthread_thread=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 + +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:5273: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" + # save the flags + ol_LIBS="$LIBS" + LIBS="-lpthread -lmach -lexc -lc_r $LIBS" + + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5308: \"$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 "$ac_t""no" 1>&6 -: + 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* - LIBS="$save_LIBS" + # 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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4447: checking for pthread_create in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + # 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:5336: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpthreads $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_create() + + 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 + ; return 0; } EOF -if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5371: \"$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_lpthread_lmach_lexc=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_lpthread_lmach_lexc=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 + +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:5400: 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 - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads" + # save the flags + ol_LIBS="$LIBS" + LIBS="-lpthread -Wl,-woff,85 $LIBS" + + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5435: \"$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 "$ac_t""no" 1>&6 -: + 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* - LIBS="$save_LIBS" + # 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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6 -echo "configure:4495: checking for pthread_join in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; 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:5464: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpthreads -Wl,-woff,85 $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5499: \"$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* + + # 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:5527: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif + +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 + +; return 0; } +EOF +if { (eval echo configure:5562: \"$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* + + # 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:5591: 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 + + # save the flags + ol_LIBS="$LIBS" + LIBS="-threads $LIBS" + + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_join() + + 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 + ; return 0; } EOF -if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5626: \"$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_threads=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_threads=no fi rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads" - -else - echo "$ac_t""no" 1>&6 -: + # restore the LIBS + LIBS="$ol_LIBS" + fi - LIBS="$save_LIBS" +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 - if test $ol_link_threads = no ; then - echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6 -echo "configure:4543: checking for pthread_create with -threads" >&5 -if eval "test \"`echo '$''{'ol_cv_thread_flag'+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:5655: 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 "(cached) $ac_c" 1>&6 else - save_LIBS="$LIBS" - LIBS="-threads $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + int main() { - pthread_create(); - + 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 + ; return 0; } EOF -if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ol_cv_thread_flag=yes + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_thread_flag=no + ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no fi rm -f conftest* - LIBS="$save_LIBS" - + + # restore the LIBS + LIBS="$ol_LIBS" + fi -echo "$ac_t""$ol_cv_thread_flag" 1>&6 +echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6 - if test $ol_cv_thread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -threads" - ol_link_threads=posix - fi + 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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6 -echo "configure:4585: checking for pthread_mutex_unlock in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + # 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:5718: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_mutex_unlock() + + 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 + ; return 0; } EOF -if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5753: \"$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_lpthreads_lmach_lexc=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_lpthreads_lmach_lexc=no fi rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - -else - echo "$ac_t""no" 1>&6 -: + # restore the LIBS + LIBS="$ol_LIBS" + fi - LIBS="$save_LIBS" +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 - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6 -echo "configure:4637: checking for pthread_mutex_lock in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+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:5781: checking for pthread link with -lpthreads -lexc" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lpthreads -lmach -lexc $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_mutex_lock() + + 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 + ; return 0; } EOF -if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5816: \"$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_lpthreads_lexc=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_lpthreads_lexc=no fi rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - -else - echo "$ac_t""no" 1>&6 -: + # restore the LIBS + LIBS="$ol_LIBS" + fi - LIBS="$save_LIBS" +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_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_mutex_trylock in -lpthreads""... $ac_c" 1>&6 -echo "configure:4689: checking for pthread_mutex_trylock in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_mutex_trylock | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+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:5845: 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 - ac_save_LIBS="$LIBS" -LIBS="-lpthreads -lexc $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif int main() { -pthread_mutex_trylock() + + 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 + ; return 0; } EOF -if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5880: \"$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_lib_lpthreads=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_lib_lpthreads=no fi rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc" - if test $ol_with_yielding_select = auto ; then - ol_with_yielding_select=yes - fi - -else - echo "$ac_t""no" 1>&6 -: + # restore the LIBS + LIBS="$ol_LIBS" + fi - LIBS="$save_LIBS" +echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6 + + if test $ol_cv_pthread_lib_lpthreads = yes ; then + ol_link_pthreads="-lpthreads" + ol_link_threads=posix fi + fi + if test $ol_link_threads != no ; then cat >> confdefs.h <<\EOF @@ -4740,6 +5907,8 @@ fi EOF + LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads" + save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" LIBS="$LTHREAD_LIBS $LIBS" @@ -4747,12 +5916,12 @@ EOF for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4751: checking for $ac_func" >&5 +echo "configure:5920: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:5948: \"$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 @@ -4803,7 +5972,7 @@ done if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 -echo "configure:4807: checking for sched_yield in -lrt" >&5 +echo "configure:5976: 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 "(cached) $ac_c" 1>&6 @@ -4811,7 +5980,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5995: \"$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 @@ -4854,12 +6023,12 @@ fi for ac_func in thr_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4858: checking for $ac_func" >&5 +echo "configure:6027: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:6055: \"$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 @@ -4916,12 +6085,12 @@ done for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4920: checking for $ac_func" >&5 +echo "configure:6089: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:6117: \"$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 @@ -4970,20 +6139,25 @@ done echo $ac_n "checking for pthread_detach with ""... $ac_c" 1>&6 -echo "configure:4974: checking for pthread_detach with " >&5 +echo "configure:6143: 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 < +#ifndef NULL +#define NULL (void*)0 +#endif + int main() { pthread_detach(NULL); ; return 0; } EOF -if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_func_pthread_detach=yes else @@ -5015,12 +6189,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5019: checking for $ac_func" >&5 +echo "configure:6193: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:6221: \"$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 @@ -5068,8 +6242,95 @@ fi done + + echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6 +echo "configure:6248: 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(); + +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 +pthread_kill_other_threads_np(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6276: \"$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" +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 +fi + + echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6 +echo "configure:6296: 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 +fi + +echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6 + + + + + echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6 +echo "configure:6309: 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 + +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:5073: checking if pthread_create() works" >&5 +echo "configure:6334: checking if pthread_create() works" >&5 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5078,7 +6339,7 @@ else ol_cv_pthread_create_works=yes else cat > conftest.$ac_ext < @@ -5097,11 +6358,15 @@ int main(argc, argv) char **argv; { pthread_t t; +#if HAVE_PTHREADS_D4 + exit(pthread_create(&t, pthread_attr_default, task, NULL)); +#else exit(pthread_create(&t, NULL, task, NULL)); +#endif } EOF -if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6370: \"$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 @@ -5118,12 +6383,12 @@ fi echo "$ac_t""$ol_cv_pthread_create_works" 1>&6 if test $ol_cv_pthread_create_works = no ; then - { echo "configure: error: pthread.h and pthread_create are not compatible" 1>&2; exit 1; } + { 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:5127: checking if select yields when using pthreads" >&5 +echo "configure:6392: 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 @@ -5133,7 +6398,7 @@ else { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -5192,7 +6457,11 @@ int main(argc, argv) #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 */ @@ -5205,7 +6474,7 @@ int main(argc, argv) exit(2); } EOF -if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6478: \"$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 @@ -5245,17 +6514,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5249: checking for $ac_hdr" >&5 +echo "configure:6518: 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:5259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6528: \"$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* @@ -5285,12 +6554,12 @@ done ol_with_threads=found echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:5289: checking for cthread_fork" >&5 +echo "configure:6558: checking for cthread_fork" >&5 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_cthread_fork=yes" else @@ -5335,7 +6604,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 -echo "configure:5339: checking for cthread_fork with -all_load" >&5 +echo "configure:6608: checking for cthread_fork with -all_load" >&5 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5343,7 +6612,7 @@ else save_LIBS="$LIBS" LIBS="-all_load $LIBS" cat > conftest.$ac_ext < int main() { @@ -5352,7 +6621,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_cthread_all_load=yes else @@ -5397,17 +6666,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5401: checking for $ac_hdr" >&5 +echo "configure:6670: 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:5411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6680: \"$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* @@ -5435,7 +6704,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:5439: checking for thr_create in -lthread" >&5 +echo "configure:6708: 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 "(cached) $ac_c" 1>&6 @@ -5443,7 +6712,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6727: \"$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 @@ -5494,12 +6763,12 @@ EOF do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5498: checking for $ac_func" >&5 +echo "configure:6767: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:6795: \"$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 @@ -5553,17 +6822,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5557: checking for $ac_hdr" >&5 +echo "configure:6826: 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:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6836: \"$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* @@ -5591,7 +6860,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:5595: checking for lwp_create in -llwp" >&5 +echo "configure:6864: 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 "(cached) $ac_c" 1>&6 @@ -5599,7 +6868,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6883: \"$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 @@ -5663,17 +6932,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5667: checking for $ac_hdr" >&5 +echo "configure:6936: 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:5677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6946: \"$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* @@ -5702,12 +6971,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5706: checking for $ac_func" >&5 +echo "configure:6975: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:7003: \"$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 @@ -5755,39 +7024,53 @@ fi done -echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:5760: checking for LinuxThreads" >&5 -if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then + echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6 +echo "configure:7029: checking for LinuxThreads pthread.h" >&5 +if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - ol_cv_linux_threads=yes - else - ol_cv_linux_threads=no - fi + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then + rm -rf conftest* + ol_cv_header_linux_threads=yes +else + rm -rf conftest* + ol_cv_header_linux_threads=no +fi +rm -f conftest* + fi -echo "$ac_t""$ol_cv_linux_threads" 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 + + 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:5781: checking for $ac_hdr" >&5 +echo "configure:7064: 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:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7074: \"$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* @@ -5817,17 +7100,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5821: checking for $ac_hdr" >&5 +echo "configure:7104: 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:5831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7114: \"$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* @@ -5857,17 +7140,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5861: checking for $ac_hdr" >&5 +echo "configure:7144: 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:5871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7154: \"$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* @@ -5921,21 +7204,21 @@ EOF EOF - echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 -echo "configure:5926: checking for thread specific errno" >&5 + echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 +echo "configure:7209: checking for thread specific errno" >&5 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { -int x = errno; +errno = 0; ; return 0; } EOF -if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_errno_thread_specific=yes else @@ -5957,7 +7240,6 @@ echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 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; } @@ -5975,16 +7257,24 @@ 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:5982: checking for DB2 library" >&5 +echo "configure:7272: 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:5988: checking for db_open in -ldb" >&5 +echo "configure:7278: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -5992,7 +7282,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7297: \"$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 @@ -6034,17 +7324,17 @@ 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:6038: checking for $ac_hdr" >&5 +echo "configure:7328: 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:6048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7338: \"$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* @@ -6072,13 +7362,13 @@ 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:6076: checking if db.h is DB2" >&5 +echo "configure:7366: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6110,7 +7400,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:6114: checking for Berkeley DB2" >&5 +echo "configure:7404: 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 @@ -6161,18 +7451,59 @@ 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:6165: checking for Berkeley DB library" >&5 +echo "configure:7455: 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 - ol_LIBS="$LIBS" + + 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:7464: 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:7474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:6171: checking for dbopen" >&5 +echo "configure:7502: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+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:7530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -6213,8 +7544,47 @@ if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:6218: checking for dbopen in -ldb" >&5 + echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6 +echo "configure:7549: 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 "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldb1 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_db=-ldb1 +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 +echo "configure:7588: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -6222,7 +7592,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7607: \"$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 @@ -6254,6 +7624,9 @@ else ol_cv_lib_db=no fi + +fi + fi @@ -6268,17 +7641,17 @@ 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:6272: checking for $ac_hdr" >&5 +echo "configure:7645: 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:6282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7655: \"$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* @@ -6314,7 +7687,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:6318: checking for Berkeley DB" >&5 +echo "configure:7691: 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 @@ -6367,17 +7740,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6371: checking for $ac_hdr" >&5 +echo "configure:7744: 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:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7754: \"$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* @@ -6410,20 +7783,197 @@ if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then ol_with_ldbm_api=none fi +if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then + echo $ac_n "checking for MDBM library""... $ac_c" 1>&6 +echo "configure:7789: 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:7795: checking for mdbm_set_chain" >&5 +if eval "test \"`echo '$''{'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 mdbm_set_chain(); + +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 + +; return 0; } +EOF +if { (eval echo configure:7823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_mdbm_set_chain=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_mdbm_set_chain=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_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6 +echo "configure:7842: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmdbm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_cv_lib_mdbm=-lmdbm +else + echo "$ac_t""no" 1>&6 +ol_cv_lib_mdbm=no +fi + + +fi + + 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:7896: 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:7906: \"$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 + + echo $ac_n "checking for db""... $ac_c" 1>&6 +echo "configure:7933: checking for db" >&5 +if eval "test \"`echo '$''{'ol_cv_mdbm'+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 + else + ol_cv_mdbm=yes + fi + +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 $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:6416: checking for GDBM library" >&5 +echo "configure:7966: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:6422: checking for gdbm_open" >&5 +echo "configure:7972: 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 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8000: \"$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 @@ -6465,7 +8015,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:6469: checking for gdbm_open in -lgdbm" >&5 +echo "configure:8019: 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 @@ -6473,7 +8023,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8038: \"$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 @@ -6519,17 +8069,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6523: checking for $ac_hdr" >&5 +echo "configure:8073: 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:6533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8083: \"$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* @@ -6556,7 +8106,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:6560: checking for db" >&5 +echo "configure:8110: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6592,18 +8142,18 @@ 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:6596: checking for NDBM library" >&5 +echo "configure:8146: 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:6602: checking for dbm_open" >&5 +echo "configure:8152: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8180: \"$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 @@ -6645,7 +8195,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:6649: checking for dbm_open in -lndbm" >&5 +echo "configure:8199: 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 "(cached) $ac_c" 1>&6 @@ -6653,7 +8203,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8218: \"$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 @@ -6684,7 +8234,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:6688: checking for dbm_open in -ldbm" >&5 +echo "configure:8238: 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 "(cached) $ac_c" 1>&6 @@ -6692,7 +8242,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8257: \"$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 @@ -6740,17 +8290,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6744: checking for $ac_hdr" >&5 +echo "configure:8294: 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:6754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8304: \"$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* @@ -6777,7 +8327,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:6781: checking for db" >&5 +echo "configure:8331: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6824,17 +8374,17 @@ if test $ol_enable_wrappers != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6828: checking for $ac_hdr" >&5 +echo "configure:8378: 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:6838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8388: \"$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* @@ -6865,7 +8415,7 @@ done have_wrappers=no else echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6 -echo "configure:6869: checking for main in -lwrap" >&5 +echo "configure:8419: 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 @@ -6873,14 +8423,60 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $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_wrappers=yes +else + echo "$ac_t""no" 1>&6 +have_wrappers=no +fi + + fi + + if test $have_wrappers = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + + SLAPD_LIBS="$SLAPD_LIBS -lwrap" + + echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:8465: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6895,20 +8491,18 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_wrappers=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_wrappers=no fi - fi - - if test $have_wrappers = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_TCPD 1 -EOF - - SLAPD_LIBS="$SLAPD_LIBS -lwrap" else echo "configure: warning: could not find -lwrap" 1>&2 if test $ol_enable_wrappers = yes ; then @@ -6922,12 +8516,12 @@ fi if test $ol_enable_syslog != no ; then echo $ac_n "checking for openlog""... $ac_c" 1>&6 -echo "configure:6926: checking for openlog" >&5 +echo "configure:8520: checking for openlog" >&5 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_openlog=yes" else @@ -6980,17 +8574,17 @@ if test $ol_enable_dmalloc != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6984: checking for $ac_hdr" >&5 +echo "configure:8578: 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:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8588: \"$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* @@ -7017,7 +8611,7 @@ fi done echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6 -echo "configure:7021: checking for dmalloc_shutdown in -ldmalloc" >&5 +echo "configure:8615: 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 "(cached) $ac_c" 1>&6 @@ -7025,7 +8619,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8634: \"$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 @@ -7070,17 +8664,17 @@ if test $ol_enable_tcl != no ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7074: checking for $ac_hdr" >&5 +echo "configure:8668: 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:7084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8678: \"$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* @@ -7111,7 +8705,7 @@ done have_tcl=no else echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6 -echo "configure:7115: checking for main in -ltcl" >&5 +echo "configure:8709: 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 "(cached) $ac_c" 1>&6 @@ -7119,14 +8713,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ltcl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8724: \"$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 @@ -7150,7 +8744,7 @@ fi if test $have_tcl != yes; then echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6 -echo "configure:7154: checking for main in -ltcl7.6" >&5 +echo "configure:8748: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -7158,14 +8752,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ltcl7.6 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8763: \"$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 @@ -7190,7 +8784,7 @@ fi if test $have_tcl != yes; then echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6 -echo "configure:7194: checking for main in -ltcl8.0" >&5 +echo "configure:8788: 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 "(cached) $ac_c" 1>&6 @@ -7198,14 +8792,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ltcl8.0 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8803: \"$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 @@ -7245,17 +8839,17 @@ for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7249: checking for $ac_hdr" >&5 +echo "configure:8843: 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:7259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8853: \"$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* @@ -7284,7 +8878,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:7288: checking for tputs in -ltermcap" >&5 +echo "configure:8882: 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_n "(cached) $ac_c" 1>&6 @@ -7292,7 +8886,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8901: \"$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 @@ -7336,7 +8930,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:7340: checking for initscr in -lncurses" >&5 +echo "configure:8934: 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 "(cached) $ac_c" 1>&6 @@ -7344,7 +8938,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8953: \"$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 @@ -7394,15 +8988,121 @@ EOF TERMCAP_LIBS= 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:8998: 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:9008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_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:9039: 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 "(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 + + LIBS="$save_LIBS" + + if test $have_readline = yes ; then + ol_with_readline=found + ol_link_readline=yes + + READLINE_LIBS="-lreadline" + fi + fi +fi + +if test $ol_link_readline = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_READLINE 1 +EOF + +fi + + # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:7401: checking for crypt" >&5 +echo "configure:9101: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9129: \"$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 @@ -7444,7 +9144,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7448: checking for crypt in -lcrypt" >&5 +echo "configure:9148: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -7452,7 +9152,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9167: \"$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 @@ -7507,12 +9207,12 @@ 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:7511: checking for setproctitle" >&5 +echo "configure:9211: checking for setproctitle" >&5 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9239: \"$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 @@ -7554,7 +9254,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:7558: checking for setproctitle in -lutil" >&5 +echo "configure:9258: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -7562,7 +9262,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9277: \"$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 @@ -7607,13 +9307,53 @@ EOF fi fi +# test for EBCDIC +echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6 +echo "configure:9313: checking for EBCDIC" >&5 +if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#endif + +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:9328: \"$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_cpp_ebcdic=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 +fi +rm -f conftest* +fi + +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 +EOF + +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7612: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:9352: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7621,24 +9361,24 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9365: \"$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_stdc=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* - ac_cv_header_stdc=no + ol_cv_header_stdc=no fi rm -f conftest* -if test $ac_cv_header_stdc = yes; then +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 @@ -7647,16 +9387,16 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | : else rm -rf conftest* - ac_cv_header_stdc=no + ol_cv_header_stdc=no fi rm -f conftest* fi -if test $ac_cv_header_stdc = yes; then +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 @@ -7665,37 +9405,44 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | : else rm -rf conftest* - ac_cv_header_stdc=no + ol_cv_header_stdc=no fi rm -f conftest* fi -if test $ac_cv_header_stdc = yes; then +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 : else cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#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:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_header_stdc=no + ol_cv_header_stdc=no fi rm -fr conftest* fi @@ -7703,17 +9450,18 @@ fi fi fi -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then +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 $ac_cv_header_stdc != yes; then - echo "configure: warning: could not Standard C compliant headers" 1>&2 +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 @@ -7721,12 +9469,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:7725: checking for $ac_hdr that defines DIR" >&5 +echo "configure:9473: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -7734,7 +9482,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:7738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -7759,7 +9507,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:7763: checking for opendir in -ldir" >&5 +echo "configure:9511: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -7767,7 +9515,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9530: \"$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 @@ -7800,7 +9548,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:7804: checking for opendir in -lx" >&5 +echo "configure:9552: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -7808,7 +9556,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9571: \"$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 @@ -7842,12 +9590,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:7846: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:9594: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7863,7 +9611,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:7867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -7884,12 +9632,12 @@ EOF fi echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 -echo "configure:7888: checking POSIX termios" >&5 +echo "configure:9636: checking POSIX termios" >&5 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7899,7 +9647,7 @@ int main() { tcgetattr(0, 0); ; return 0; } EOF -if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_sys_posix_termios=yes else @@ -7915,7 +9663,7 @@ echo "$ac_t""$am_cv_sys_posix_termios" 1>&6 echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:7919: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +echo "configure:9667: 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 @@ -7924,7 +9672,7 @@ else gwinsz_in_termios_h=no if test $am_cv_sys_posix_termios = yes; then cat > conftest.$ac_ext < # include @@ -7944,7 +9692,7 @@ rm -f conftest* if test $gwinsz_in_termios_h = no; then cat > conftest.$ac_ext < # include @@ -7980,17 +9728,20 @@ 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 \ - regex.h \ psap.h \ pwd.h \ resolv.h \ @@ -8006,6 +9757,7 @@ for ac_hdr in \ sys/ioctl.h \ sys/param.h \ sys/resource.h \ + sys/select.h \ sys/socket.h \ sys/syslog.h \ sys/time.h \ @@ -8017,17 +9769,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8021: checking for $ac_hdr" >&5 +echo "configure:9773: 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:8031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9783: \"$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* @@ -8055,12 +9807,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8059: checking for uid_t in sys/types.h" >&5 +echo "configure:9811: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -8088,83 +9840,187 @@ EOF fi -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:8093: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross +echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 +echo "configure:9845: checking type of array argument to getgroups" >&5 +if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat > conftest.$ac_ext < +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +} + +EOF +if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_type_getgroups=gid_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_getgroups=int +fi +rm -fr conftest* +fi + +if test $ac_cv_type_getgroups = cross; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_getgroups=gid_t +else + rm -rf conftest* + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi + +echo "$ac_t""$ac_cv_type_getgroups" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9915: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:9928: \"$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_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_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 + : else cat > conftest.$ac_ext < -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} +#include +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#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:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - ac_cv_type_getgroups=gid_t + : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_type_getgroups=int + ac_cv_header_stdc=no fi rm -fr conftest* fi -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int -fi -rm -f conftest* - fi fi -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 EOF - echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:8163: checking for mode_t" >&5 +fi + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:10019: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8192,12 +10048,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:8196: checking for off_t" >&5 +echo "configure:10052: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8225,12 +10081,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:8229: checking for pid_t" >&5 +echo "configure:10085: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8258,19 +10114,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:8262: checking for ptrdiff_t" >&5 +echo "configure:10118: checking for ptrdiff_t" >&5 if eval "test \"`echo '$''{'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:8274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -8291,12 +10147,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:8295: checking return type of signal handlers" >&5 +echo "configure:10151: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8313,7 +10169,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:8317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -8332,19 +10188,19 @@ EOF echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 -echo "configure:8336: checking for sig_atomic_t" >&5 +echo "configure:10192: checking for sig_atomic_t" >&5 if eval "test \"`echo '$''{'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:8348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_sig_atomic_t=yes else @@ -8365,12 +10221,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:8369: checking for size_t" >&5 +echo "configure:10225: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8398,12 +10254,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:8402: checking for st_blksize in struct stat" >&5 +echo "configure:10258: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8411,7 +10267,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:8415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -8432,12 +10288,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:8436: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:10292: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8446,7 +10302,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:8450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -8467,12 +10323,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:8471: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:10327: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8480,7 +10336,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:8484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -8500,10 +10356,48 @@ EOF fi +# test for pw_gecos in struct passwd +echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 +echo "configure:10362: checking struct passwd for pw_gecos" >&5 +if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { + + struct passwd pwd; + pwd.pw_gecos = pwd.pw_name; + +; return 0; } +EOF +if { (eval echo configure:10378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_struct_passwd_pw_gecos=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_struct_passwd_pw_gecos=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6 +if test $ol_cv_struct_passwd_pw_gecos = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_PW_GECOS 1 +EOF + +fi + echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:8507: checking if toupper() requires islower()" >&5 +echo "configure:10401: checking if toupper() requires islower()" >&5 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8512,7 +10406,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -8524,7 +10418,7 @@ main() exit(1); } EOF -if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10422: \"$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 @@ -8547,12 +10441,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:8551: checking for working const" >&5 +echo "configure:10445: checking for working const" >&5 if eval "test \"`echo '$''{'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:10499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -8622,12 +10516,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:8626: checking if compiler understands volatile" >&5 +echo "configure:10520: checking if compiler understands volatile" >&5 if eval "test \"`echo '$''{'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:10534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -8666,14 +10560,14 @@ EOF else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:8670: checking whether byte ordering is bigendian" >&5 +echo "configure:10564: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 @@ -8684,11 +10578,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10582: \"$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 @@ -8699,7 +10593,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:8703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -8719,7 +10613,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:10630: \"$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 @@ -8756,7 +10650,7 @@ EOF fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:8760: checking size of short" >&5 +echo "configure:10654: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8764,7 +10658,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8775,7 +10669,7 @@ main() exit(0); } EOF -if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10673: \"$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` else @@ -8795,7 +10689,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:8799: checking size of int" >&5 +echo "configure:10693: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8803,7 +10697,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8814,7 +10708,7 @@ main() exit(0); } EOF -if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10712: \"$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` else @@ -8834,7 +10728,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:8838: checking size of long" >&5 +echo "configure:10732: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8842,7 +10736,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8853,7 +10747,7 @@ main() exit(0); } EOF -if { (eval echo configure:8857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10751: \"$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` else @@ -8875,7 +10769,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:8879: checking for 8-bit clean memcmp" >&5 +echo "configure:10773: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8883,7 +10777,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10791: \"$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 @@ -8911,12 +10805,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:8915: checking for strftime" >&5 +echo "configure:10809: checking for strftime" >&5 if eval "test \"`echo '$''{'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:10837: \"$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 @@ -8961,7 +10855,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:8965: checking for strftime in -lintl" >&5 +echo "configure:10859: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -8969,7 +10863,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10878: \"$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 @@ -9006,13 +10900,14 @@ fi fi + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:9011: checking for vprintf" >&5 +echo "configure:10906: checking for vprintf" >&5 if eval "test \"`echo '$''{'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:10934: \"$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 @@ -9059,12 +10954,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:9063: checking for _doprnt" >&5 +echo "configure:10958: checking for _doprnt" >&5 if eval "test \"`echo '$''{'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:10986: \"$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 @@ -9116,12 +11011,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:9120: checking for $ac_func" >&5 +echo "configure:11015: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:11043: \"$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 @@ -9172,22 +11067,31 @@ fi for ac_func in \ bcopy \ + endgrent \ + endpwent \ flock \ getdtablesize \ + getgrgid \ gethostname \ + getpass \ getpwuid \ gettimeofday \ + initgroups \ lockf \ memcpy \ memmove \ mkstemp \ - select \ + recv \ + recvfrom \ setpwfile \ + setgid \ + setegid \ setsid \ + setuid \ + seteuid \ signal \ sigset \ snprintf \ - socket \ strdup \ strerror \ strpbrk \ @@ -9199,76 +11103,16 @@ for ac_func in \ strspn \ sysconf \ waitpid \ + wait4 \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9206: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -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; } -EOF -if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -# these functions are required to build a thread_safe -lldap -for ac_func in \ - ctime_r \ - gethostbyaddr_r \ - gethostbyname_r \ - -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9267: checking for $ac_func" >&5 +echo "configure:11111: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:11139: \"$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 @@ -9316,94 +11160,15 @@ fi done -if test "$ac_cv_func_ctime_r" = yes ; then - echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6 -echo "configure:9322: 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; } -EOF -if { (eval echo configure:9334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_ctime_r_nargs=3 -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* - if test $ol_cv_func_ctime_r_nargs = 0 ; then - cat > conftest.$ac_ext < -int main() { -time_t ti; char *buffer; - ctime_r(&ti,buffer); -; return 0; } -EOF -if { (eval echo configure:9354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ol_cv_func_ctime_r_nargs=2 -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* - fi - -fi - -echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6 - if test $ol_cv_func_ctime_r_nargs -gt 1 ; then - cat >> confdefs.h <> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1 -EOF - -fi - -if test $ol_link_threads != no ; then - cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 -EOF - -fi - for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9402: checking for $ac_func" >&5 +echo "configure:11167: checking for $ac_func" >&5 if eval "test \"`echo '$''{'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:11195: \"$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 @@ -9456,13 +11221,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:9460: checking declaration of sys_errlist" >&5 +echo "configure:11225: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -9472,7 +11237,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -9485,7 +11250,6 @@ 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 @@ -9493,20 +11257,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:9497: checking existence of sys_errlist" >&5 +echo "configure:11261: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'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:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11274: \"$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 @@ -9519,6 +11283,12 @@ 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 +#define HAVE_SYS_ERRLIST 1 +EOF + + fi fi @@ -9603,6 +11373,14 @@ EOF fi +if test "$ol_link_modules" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MODULES 1 +EOF + + BUILD_SLAPD=yes +fi + if test "$ol_link_bdb2" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_BDB2 1 @@ -9612,6 +11390,15 @@ EOF BUILD_BDB2=yes fi +if test "$ol_enable_ldap" != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_LDAP 1 +EOF + + BUILD_SLAPD=yes + BUILD_LDAP=yes +fi + if test "$ol_link_ldbm" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_LDBM 1 @@ -9630,7 +11417,7 @@ EOF BUILD_PASSWD=yes fi -if test "$ol_enable_perl" != no ; then +if test "$ol_link_perl" != no ; then cat >> confdefs.h <<\EOF #define SLAPD_PERL 1 EOF @@ -9675,6 +11462,12 @@ fi + + + + + + @@ -9693,52 +11486,6 @@ fi trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -9822,6 +11569,7 @@ 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 \ @@ -9832,6 +11580,9 @@ servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \ tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \ +contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ +contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ +contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \ include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF