X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure;h=caa8830d0abb5fccabeb12b490994c325129b12a;hb=3e390a807424ea4043fc218995dddb2995245970;hp=fe61ebbcb4bb1793b1269a7dd1739e1ca2274736;hpb=b8d552b9b31149a648eb7149395ac7b081f9aa10;p=openldap diff --git a/configure b/configure index fe61ebbcb4..caa8830d0a 100755 --- a/configure +++ b/configure @@ -13,7 +13,9 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr/local ac_help="$ac_help - --enable-debug enable debugging (yes)" + --with-subdir=DIR change default subdirectory used for installs" +ac_help="$ac_help + --enable-debug enable debugging (yes)" ac_help="$ac_help --enable-proctitle enable proctitle support (yes)" ac_help="$ac_help @@ -28,24 +30,28 @@ ac_help="$ac_help --enable-cldap enable connectionless ldap (no)" ac_help="$ac_help --enable-x-compile enable cross compiling (no)" +ac_help="$ac_help + --enable-dmalloc enable debug malloc support (no)" ac_help="$ac_help --with-kerberos use Kerberos (auto)" ac_help="$ac_help --with-threads use threads (auto)" ac_help="$ac_help - --with-preemptive thread implementation is preemptive (auto)" + --with-yielding-select with implicitly yielding select (auto)" +ac_help="$ac_help +LDAPD Options:" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" +ac_help="$ac_help +SLAPD Options:" ac_help="$ac_help --enable-slapd enable building slapd (yes)" ac_help="$ac_help --enable-aclgroups enable ACL group support (auto)" ac_help="$ac_help - --enable-crypt enable crypt(3) passwords (auto)" -ac_help="$ac_help - --enable-md5 enable MD5 passwords (auto)" + --enable-cleartext enable cleartext passwords (yes)" ac_help="$ac_help - --enable-sha1 enable SHA1 passwords (auto)" + --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help --enable-wrappers enable tcp wrapper support (no)" ac_help="$ac_help @@ -62,8 +68,22 @@ ac_help="$ac_help --enable-passwd enable passwd backend (no)" ac_help="$ac_help --enable-shell enable shell backend (no)" +ac_help="$ac_help +SLURPD Options:" ac_help="$ac_help --enable-slurpd enable building slurpd (auto)" +ac_help="$ac_help +Library Generation & Linking Options" +ac_help="$ac_help + --enable-static build static libraries [default=yes] + --enable-static=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --enable-shared build shared libraries [default=yes] + --enable-shared=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -570,7 +590,6 @@ else ac_n= ac_c='\c' ac_t= fi - ac_aux_dir= for ac_dir in build $srcdir/build; do if test -f $ac_dir/install-sh; then @@ -589,9 +608,252 @@ 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. +# 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 +# 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:623: 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="${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. + for ac_prog in ginstall installbsd 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. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:676: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +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:733: 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 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=OpenLDAP + +VERSION=2.0-devel + +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; } +fi + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +echo "configure:772: 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. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:785: 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. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:798: 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. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:811: 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. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:824: 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. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + echo $ac_n "checking configure arguments""... $ac_c" 1>&6 -echo "configure:595: checking configure arguments" >&5 +echo "configure:840: checking configure arguments" >&5 + + +top_builddir=`pwd` + +ldap_subdir="openldap" + +# Check whether --with-subdir or --without-subdir was given. +if test "${with_subdir+set}" = set; then + withval="$with_subdir" + + if test "$withval" = "no"; then + ldap_subdir="" + elif test "$withval" != "yes"; then + ldap_subdir="$withval" + fi + +fi # OpenLDAP --enable-debug @@ -755,6 +1017,28 @@ 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 + enableval="$enable_dmalloc" + + 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-dmalloc" 1>&2; exit 1; } + fi + ol_enable_dmalloc="$ol_arg" + +else + ol_enable_dmalloc="no" +fi +# end --enable-dmalloc + # OpenLDAP --with-kerberos # Check whether --with-kerberos or --without-kerberos was given. if test "${with_kerberos+set}" = set; then @@ -797,10 +1081,10 @@ else fi # end --with-threads -# OpenLDAP --with-preemptive - # Check whether --with-preemptive or --without-preemptive was given. -if test "${with_preemptive+set}" = set; then - withval="$with_preemptive" +# OpenLDAP --with-yielding_select + # Check whether --with-yielding_select or --without-yielding_select was given. +if test "${with_yielding_select+set}" = set; then + withval="$with_yielding_select" ol_arg=invalid for ol_val in auto yes no manual ; do @@ -809,17 +1093,23 @@ if test "${with_preemptive+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $withval for --with-preemptive" 1>&2; exit 1; } + { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; } fi - ol_with_preemptive="$ol_arg" + ol_with_yielding_select="$ol_arg" else - ol_with_preemptive="auto" + ol_with_yielding_select="auto" fi -# end --with-preemptive +# end --with-yielding_select +# Check whether --with-xxldapdoptions or --without-xxldapdoptions was given. +if test "${with_xxldapdoptions+set}" = set; then + withval="$with_xxldapdoptions" + : +fi + # OpenLDAP --enable-ldapd # Check whether --enable-ldapd or --disable-ldapd was given. if test "${enable_ldapd+set}" = set; then @@ -841,6 +1131,12 @@ else fi # end --enable-ldapd +# Check whether --with-xxslapdoptions or --without-xxslapdoptions was given. +if test "${with_xxslapdoptions+set}" = set; then + withval="$with_xxslapdoptions" + : +fi + # OpenLDAP --enable-slapd # Check whether --enable-slapd or --disable-slapd was given. if test "${enable_slapd+set}" = set; then @@ -881,10 +1177,10 @@ else ol_enable_aclgroups="auto" fi # end --enable-aclgroups -# OpenLDAP --enable-crypt - # Check whether --enable-crypt or --disable-crypt was given. -if test "${enable_crypt+set}" = set; then - enableval="$enable_crypt" +# OpenLDAP --enable-cleartext + # Check whether --enable-cleartext or --disable-cleartext was given. +if test "${enable_cleartext+set}" = set; then + enableval="$enable_cleartext" ol_arg=invalid for ol_val in auto yes no ; do @@ -893,38 +1189,18 @@ if test "${enable_crypt+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; } - fi - ol_enable_crypt="$ol_arg" - -else - ol_enable_crypt="auto" -fi -# end --enable-crypt -# OpenLDAP --enable-md5 - # Check whether --enable-md5 or --disable-md5 was given. -if test "${enable_md5+set}" = set; then - enableval="$enable_md5" - - 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-md5" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; } fi - ol_enable_md5="$ol_arg" + ol_enable_cleartext="$ol_arg" else - ol_enable_md5="auto" + ol_enable_cleartext="yes" fi -# end --enable-md5 -# OpenLDAP --enable-sha1 - # Check whether --enable-sha1 or --disable-sha1 was given. -if test "${enable_sha1+set}" = set; then - enableval="$enable_sha1" +# end --enable-cleartext +# OpenLDAP --enable-crypt + # Check whether --enable-crypt or --disable-crypt was given. +if test "${enable_crypt+set}" = set; then + enableval="$enable_crypt" ol_arg=invalid for ol_val in auto yes no ; do @@ -933,14 +1209,14 @@ if test "${enable_sha1+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-sha1" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; } fi - ol_enable_sha1="$ol_arg" + ol_enable_crypt="$ol_arg" else - ol_enable_sha1="auto" + ol_enable_crypt="auto" fi -# end --enable-sha1 +# end --enable-crypt # OpenLDAP --enable-wrappers # Check whether --enable-wrappers or --disable-wrappers was given. if test "${enable_wrappers+set}" = set; then @@ -1106,6 +1382,12 @@ else fi # end --enable-shell +# Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given. +if test "${with_xxslurpdoptions+set}" = set; then + withval="$with_xxslurpdoptions" + : +fi + # OpenLDAP --enable-slurpd # Check whether --enable-slurpd or --disable-slurpd was given. if test "${enable_slurpd+set}" = set; then @@ -1127,6 +1409,59 @@ else fi # end --enable-slurpd +# Check whether --with-xxliboptions or --without-xxliboptions was given. +if test "${with_xxliboptions+set}" = set; then + withval="$with_xxliboptions" + : +fi + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=yes +fi + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_shared=yes +fi + + # validate options if test $ol_enable_referrals = no ; then if test $ol_enable_dns = yes ; then @@ -1148,15 +1483,6 @@ if test $ol_enable_slapd = no ; then if test $ol_enable_aclgroups = yes ; then echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2 fi - if test $ol_enable_crypt = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2 - fi - if test $ol_enable_md5 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2 - fi - if test $ol_enable_sha1 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2 - fi if test $ol_enable_wrappers = yes ; then echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2 fi @@ -1181,9 +1507,6 @@ if test $ol_enable_slapd = no ; then ol_enable_shell=no ol_enable_passwd=no ol_enable_aclgroups=no - ol_enable_crypt=no - ol_enable_md5=no - ol_enable_sha1=no ol_enable_wrappers=no ol_enable_phonetic=no ol_enable_rlookups=no @@ -1228,6 +1551,34 @@ fi echo "$ac_t""done" 1>&6 + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1562: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$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=`$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= @@ -1251,27 +1602,6 @@ KRB_LIBS= TERMCAP_LIBS= -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1256: 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 - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - # 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: @@ -1283,7 +1613,7 @@ fi # 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:1287: checking for a BSD compatible install" >&5 +echo "configure:1617: 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 @@ -1335,7 +1665,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # 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:1339: checking for $ac_word" >&5 +echo "configure:1669: 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 @@ -1361,140 +1691,15 @@ else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1366: 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 +# 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:1698: 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 - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -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:1396: 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 - case "$SENDMAIL" in - /*) - ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_SENDMAIL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" - ;; -esac -fi -SENDMAIL="$ac_cv_path_SENDMAIL" -if test -n "$SENDMAIL"; then - echo "$ac_t""$SENDMAIL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "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:1428: 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 - case "$EDITOR" in - /*) - ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/ucb$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_EDITOR="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" - ;; -esac -fi -EDITOR="$ac_cv_path_EDITOR" -if test -n "$EDITOR"; then - echo "$ac_t""$EDITOR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "finger", so it can be a program name with args. -set dummy finger; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1460: 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 - case "$FINGER" in - /*) - ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/ucb$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_FINGER="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" - ;; -esac -fi -FINGER="$ac_cv_path_FINGER" -if test -n "$FINGER"; then - echo "$ac_t""$FINGER" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:1493: 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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do @@ -1518,7 +1723,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:1522: checking for $ac_word" >&5 +echo "configure:1727: 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 @@ -1566,7 +1771,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1570: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1775: 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. @@ -1576,11 +1781,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -1600,12 +1805,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:1604: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1809: 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:1609: checking whether we are using GNU C" >&5 +echo "configure:1814: 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 @@ -1614,7 +1819,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1618: \"$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:1823: \"$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 @@ -1629,7 +1834,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1633: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1838: 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 @@ -1656,9 +1861,296 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + + +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1878: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /* | A-Za-z:\\*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:1896: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1899: 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 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$ac_cv_path_LD" +if test -n "$LD"; then + echo "$ac_t""$LD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1935: 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 + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1951: 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 + case "$NM" in +/* | A-Za-z:\\*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; +*) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + else + ac_cv_path_NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + ;; +esac +fi + +NM="$ac_cv_path_NM" +echo "$ac_t""$NM" 1>&6 + + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1988: 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 + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Check for any special flags to pass to ltconfig. +libtool_flags= +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$silent" = yes && libtool_flags="$libtool_flags --silent" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$host" in +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 2024 "configure"' > conftest.$ac_ext + if { (eval echo configure:2025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + CFLAGS="$CFLAGS -belf" + ;; +esac + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + + +# 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:2058: 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 + case "$SENDMAIL" in + /*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_SENDMAIL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" + ;; +esac +fi +SENDMAIL="$ac_cv_path_SENDMAIL" +if test -n "$SENDMAIL"; then + echo "$ac_t""$SENDMAIL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "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:2090: 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 + case "$EDITOR" in + /*) + ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_EDITOR="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" + ;; +esac +fi +EDITOR="$ac_cv_path_EDITOR" +if test -n "$EDITOR"; then + echo "$ac_t""$EDITOR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "finger", so it can be a program name with args. +set dummy finger; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2122: 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 + case "$FINGER" in + /*) + ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_FINGER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" + ;; +esac +fi +FINGER="$ac_cv_path_FINGER" +if test -n "$FINGER"; then + echo "$ac_t""$FINGER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then - echo "configure: warning: cross compiling.... go for it" 1>&2 + echo "configure: warning: cross compiling.... some functionality will be removed." 1>&2 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then echo "configure: warning: programs compiled here do run here..." 1>&2 @@ -1670,7 +2162,7 @@ elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1674: checking how to run the C preprocessor" >&5 +echo "configure:2166: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1685,13 +2177,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1702,13 +2194,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:1712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1731,11 +2223,10 @@ fi echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1737: checking for AIX" >&5 +echo "configure:2228: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1761: checking for POSIXized ISC" >&5 +echo "configure:2252: 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 @@ -1779,17 +2270,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:1783: checking for minix/config.h" >&5 +echo "configure:2274: 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:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1829,13 +2320,98 @@ fi + +echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 +echo "configure:2326: 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 + am_cv_prog_cc_stdc=no +ac_save_CC="$CC" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +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 +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; + +int main() { + +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + +; return 0; } +EOF +if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_prog_cc_stdc="$ac_arg"; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done +CC="$ac_save_CC" + +fi + +if test -z "$am_cv_prog_cc_stdc"; then + echo "$ac_t""none needed" 1>&6 +else + echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 +fi +case "x$am_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $am_cv_prog_cc_stdc" ;; +esac + +if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then + { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; } +fi + + + + echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1834: checking for socket" >&5 +echo "configure:2410: 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; then +if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1872,12 +2448,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:1881: checking for main in -lsocket" >&5 +echo "configure:2457: 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 @@ -1885,14 +2461,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1920,7 +2496,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:1924: checking for main in -lnet" >&5 +echo "configure:2500: 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 @@ -1928,14 +2504,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1963,7 +2539,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:1967: checking for main in -lnsl_s" >&5 +echo "configure:2543: 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 @@ -1971,14 +2547,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2006,7 +2582,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:2010: checking for main in -lnsl" >&5 +echo "configure:2586: 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 @@ -2014,14 +2590,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2049,7 +2625,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:2053: checking for socket in -linet" >&5 +echo "configure:2629: 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 @@ -2057,7 +2633,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2096,7 +2672,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:2100: checking for main in -lgen" >&5 +echo "configure:2676: 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 @@ -2104,14 +2680,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2143,7 +2719,7 @@ fi echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 -echo "configure:2147: checking for res_search in -lresolv" >&5 +echo "configure:2723: 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 @@ -2151,7 +2727,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2191,7 +2767,7 @@ fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:2195: checking for sigset in -lV3" >&5 +echo "configure:2771: 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 @@ -2199,7 +2775,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2242,7 +2818,7 @@ fi 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:2246: checking for main in -lxtpp" >&5 +echo "configure:2822: 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 @@ -2250,14 +2826,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2286,7 +2862,7 @@ else fi echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6 -echo "configure:2290: checking for main in -ldsap" >&5 +echo "configure:2866: 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 @@ -2294,14 +2870,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldsap -lisode $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2330,7 +2906,7 @@ else fi echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6 -echo "configure:2334: checking for main in -lisode" >&5 +echo "configure:2910: 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 @@ -2338,14 +2914,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lisode $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2377,7 +2953,7 @@ fi if test $ol_link_isode != no; then echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6 -echo "configure:2381: checking for main in -lpp" >&5 +echo "configure:2957: 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 @@ -2385,14 +2961,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2423,7 +2999,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:2427: checking for $ac_word" >&5 +echo "configure:3003: 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 @@ -2453,22 +3029,24 @@ fi fi +ol_link_kerberos=no + if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then for ac_hdr in kerberosIV/krb.h kerberosIV/des.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2462: checking for $ac_hdr" >&5 +echo "configure:3040: 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:2472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2497,7 +3075,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:2501: checking for main in -lkrb4" >&5 +echo "configure:3079: 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 @@ -2505,14 +3083,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2542,27 +3120,27 @@ fi #define HAVE_KERBEROS 1 EOF - KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi fi fi + if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then for ac_hdr in krb.h des.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2556: checking for $ac_hdr" >&5 +echo "configure:3134: 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:2566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2591,7 +3169,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:2595: checking for main in -lkrb" >&5 +echo "configure:3173: 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 @@ -2599,14 +3177,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2636,29 +3214,31 @@ fi #define HAVE_KERBEROS 1 EOF - KRB_LIBS="-lkrb -ldes" fi fi fi + ol_link_threads=no -if test $ol_with_threads = auto -o $ol_with_threads = posix ; then +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:2652: checking for $ac_hdr" >&5 +echo "configure:3232: 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:2662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2687,24 +3267,24 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2691: checking POSIX thread version" >&5 +echo "configure:3271: 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 cat > conftest.$ac_ext < /* this check could be improved */ # ifdef PTHREAD_ONCE_INIT - final + pthread_version_final # endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "final" >/dev/null 2>&1; then + egrep "pthread_version_final" >/dev/null 2>&1; then rm -rf conftest* ol_pthread_final=yes else @@ -2715,18 +3295,18 @@ rm -f conftest* cat > conftest.$ac_ext < /* this check could be improved */ # ifdef pthread_once_init - draft4 + pthread_version_draft4 # endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "draft4" >/dev/null 2>&1; then + egrep "pthread_version_draft4" >/dev/null 2>&1; then rm -rf conftest* ol_pthread_draft4=yes else @@ -2768,7 +3348,7 @@ EOF echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2772: checking for LinuxThreads" >&5 +echo "configure:3352: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2794,12 +3374,12 @@ EOF echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2798: checking for pthread_create" >&5 +echo "configure:3378: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+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; then +if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2844,7 +3424,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2848: checking for pthread_create with -pthread" >&5 +echo "configure:3428: 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 @@ -2852,7 +3432,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2883,9 +3463,50 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 fi fi + if test $ol_link_threads = no ; then + echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6 +echo "configure:3469: checking for pthread_create with -pthreads" >&5 +if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save_LIBS="$LIBS" + LIBS="-pthreads $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ol_cv_pthreads_flag=yes +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:2889: checking for pthread_create with -thread" >&5 +echo "configure:3510: 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 @@ -2893,7 +3514,7 @@ else save_LIBS="$LIBS" LIBS="-thread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_thread_flag=yes else @@ -2927,7 +3548,7 @@ echo "$ac_t""$ol_cv_thread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6 -echo "configure:2931: checking for pthread_join in -lpthread" >&5 +echo "configure:3552: checking for pthread_join in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2935,7 +3556,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread -lexc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2964,8 +3585,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc" - if test $ol_with_preemptive = auto ; then - ol_with_preemptive=yes + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes fi else @@ -2978,7 +3599,7 @@ 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:2982: checking for pthread_join in -lpthreads" >&5 +echo "configure:3603: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -2986,7 +3607,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads -lmach -lexc -lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3015,8 +3636,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r" - if test $ol_with_preemptive = auto ; then - ol_with_preemptive=yes + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes fi else @@ -3029,7 +3650,7 @@ 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:3033: checking for pthread_create in -lpthread" >&5 +echo "configure:3654: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3037,7 +3658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3076,7 +3697,7 @@ 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:3080: checking for pthread_create in -lc_r" >&5 +echo "configure:3701: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -3084,7 +3705,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3120,6 +3741,53 @@ fi LIBS="$save_LIBS" 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:3748: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthreads $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_threads=posix + LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads" +else + echo "$ac_t""no" 1>&6 +fi + + LIBS="$save_LIBS" + fi + if test $ol_link_threads != no ; then cat >> confdefs.h <<\EOF #define HAVE_PTHREADS 1 @@ -3133,12 +3801,12 @@ EOF for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3137: checking for $ac_func" >&5 +echo "configure:3805: 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; then +if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3189,7 +3857,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:3193: checking for sched_yield in -lrt" >&5 +echo "configure:3861: 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 @@ -3197,7 +3865,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3238,7 +3906,7 @@ fi if test $ac_cv_func_sched_yield = no -a \ $ac_cv_func_pthread_yield = no ; then echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 -echo "configure:3242: checking for sched_yield in -lposix4" >&5 +echo "configure:3910: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'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 @@ -3246,7 +3914,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3293,12 +3961,12 @@ fi for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3297: checking for $ac_func" >&5 +echo "configure:3965: 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; then +if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3352,12 +4020,12 @@ done do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3356: checking for $ac_func" >&5 +echo "configure:4024: 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; then +if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3411,12 +4079,12 @@ done do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3415: checking for $ac_func" >&5 +echo "configure:4083: 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; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6 +echo "configure:4137: 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 + + if test "$cross_compiling" = yes; then + ol_cv_pthread_create_works=yes +else + cat > conftest.$ac_ext < +#ifndef NULL +#define NULL (void*)0 +#endif + +static void *task(p) + void *p; +{ + return (void *) (p == NULL); +} + +int main(argc, argv) + int argc; + char **argv; +{ + pthread_t t; + exit(pthread_create(&t, NULL, task, NULL)); +} + EOF -if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +if { (eval echo configure:4169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ol_cv_pthread_create_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + rm -fr conftest* + ol_cv_pthread_create_works=no fi -rm -f conftest* +rm -fr conftest* fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi -done + echo "$ac_t""$ol_cv_pthread_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; } + fi - if test $ol_with_preemptive = auto ; then - echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 -echo "configure:3470: checking for preemptive Pthread implementation" >&5 + if test $ol_with_yielding_select = auto ; then + echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6 +echo "configure:4191: checking if select yields when using pthreads" >&5 + if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then - { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; } + { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -3480,33 +4205,48 @@ else #include #include #ifndef NULL -#define NULL 0 +#define NULL (void*) 0 #endif -int task(arg) - int *arg; +static int fildes[2]; + +static void *task(p) + void *p; { int i; struct timeval tv; - tv.tv_sec=5; + fd_set rfds; + + tv.tv_sec=10; tv.tv_usec=0; + FD_ZERO(&rfds); + FD_SET(fildes[0], &rfds); + /* we're not interested in any fds */ - i = select(FD_SETSIZE, NULL, NULL, NULL, &tv); + i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv); if(i < 0) { perror("select"); + exit(10); } - exit(1); /* if we exit here, the select blocked the whole process */ + exit(0); /* if we exit here, the select blocked the whole process */ } -main(argc, argv) -int argc; char **argv; +int main(argc, argv) + int argc; + char **argv; { pthread_t t; + /* create a pipe to select */ + if(pipe(&fildes[0])) { + perror("select"); + exit(1); + } + #ifdef HAVE_PTHREAD_SETCONCURRENCY (void) pthread_setconcurrency(2); #else @@ -3516,7 +4256,7 @@ int argc; char **argv; #endif #endif - pthread_create(&t, NULL, (void *) task, NULL); + pthread_create(&t, NULL, task, NULL); #if HAVE_SCHED_YIELD sched_yield(); /* make sure task runs first */ @@ -3525,34 +4265,31 @@ int argc; char **argv; pthread_yield(); /* make sure task runs first */ #endif #endif - exit(0); + + exit(2); } - EOF -if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then - ol_pthread_preemptive=yes + ol_cv_pthread_select_yields=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ol_pthread_preemptive=no + ol_cv_pthread_select_yields=yes fi rm -fr conftest* fi - echo "$ac_t""$ol_pthread_preemptive" 1>&6 +fi - if test $ol_pthread_preemptive = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_PREEMPTIVE_PTHREADS 1 -EOF + echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6 - ol_with_preemptive=yes + if test $ol_cv_pthread_select_yields = yes ; then + ol_with_yielding_select=yes fi fi - CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else @@ -3565,22 +4302,24 @@ EOF fi fi -if test $ol_with_threads = auto -o $ol_with_threads = mach ; then +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = mach ; then + 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:3574: checking for $ac_hdr" >&5 +echo "configure:4313: 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:3584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3610,12 +4349,12 @@ done ol_with_threads=found echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 -echo "configure:3614: checking for cthread_fork" >&5 +echo "configure:4353: 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; then +if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_cthread_fork=yes" else @@ -3660,7 +4399,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:3664: checking for cthread_fork with -all_load" >&5 +echo "configure:4403: 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 @@ -3668,7 +4407,7 @@ else save_LIBS="$LIBS" LIBS="-all_load $LIBS" cat > conftest.$ac_ext < int main() { @@ -3677,7 +4416,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_cthread_all_load=yes else @@ -3715,22 +4454,24 @@ EOF fi fi -if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then +if test $ol_with_threads = auto -o $ol_with_threads = yes \ + -o $ol_with_threads = lwp ; then + for ac_hdr in thread.h synch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3724: checking for $ac_hdr" >&5 +echo "configure:4465: 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:3734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3758,7 +4499,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:3762: checking for thr_create in -lthread" >&5 +echo "configure:4503: 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 @@ -3766,7 +4507,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3792,22 +4533,23 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_lwp=yes + have_thr=yes else echo "$ac_t""no" 1>&6 -have_lwp=no +have_thr=no fi - if test $have_lwp = yes ; then + if test $have_thr = yes ; then cat >> confdefs.h <<\EOF #define HAVE_THR 1 EOF - LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + LTHREAD_LIBS="$LTHREAD_LIBS -lthread" + ol_link_threads=thr - if test $ol_with_preemptive = auto ; then - ol_with_preemptive=yes + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=yes fi fi fi @@ -3816,17 +4558,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3820: checking for $ac_hdr" >&5 +echo "configure:4562: 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:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3854,7 +4596,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:3858: checking for lwp_create in -llwp" >&5 +echo "configure:4600: 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 @@ -3862,7 +4604,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3901,17 +4643,18 @@ fi EOF LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + ol_link_threads=lwp - if test $ol_with_preemptive = auto ; then - ol_with_preemptive=no + if test $ol_with_yielding_select = auto ; then + ol_with_yielding_select=no fi fi fi fi -if test $ol_with_preemptive = yes ; then +if test $ol_with_yielding_select = yes ; then cat >> confdefs.h <<\EOF -#define PREEMPTIVE_THREADS 1 +#define HAVE_YIELDING_SELECT 1 EOF fi @@ -3925,17 +4668,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:3929: checking for $ac_hdr" >&5 +echo "configure:4672: 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:3939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3964,12 +4707,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3968: checking for $ac_func" >&5 +echo "configure:4711: 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; then +if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4018,7 +4761,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:4022: checking for LinuxThreads" >&5 +echo "configure:4765: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4039,17 +4782,17 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4043: checking for $ac_hdr" >&5 +echo "configure:4786: 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:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4079,17 +4822,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4083: checking for $ac_hdr" >&5 +echo "configure:4826: 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:4093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4119,17 +4862,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4123: checking for $ac_hdr" >&5 +echo "configure:4866: 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:4133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4157,13 +4900,25 @@ done fi -if test $ol_with_threads != no ; then +if test $ol_link_threads != no ; then cat >> confdefs.h <<\EOF +#define REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF #define _REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF +#define THREAD_SAFE 1 EOF cat >> confdefs.h <<\EOF #define _THREAD_SAFE 1 +EOF + + cat >> confdefs.h <<\EOF +#define THREADSAFE 1 EOF cat >> confdefs.h <<\EOF @@ -4172,13 +4927,13 @@ EOF echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6 -echo "configure:4176: checking for thread specific errno" >&5 +echo "configure:4931: 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 < @@ -4189,7 +4944,7 @@ int x = errno; ; return 0; } EOF -if { (eval echo configure:4193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_errno_thread_specific=yes else @@ -4208,6 +4963,7 @@ echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6 LIBS="$LTHREAD_LIBS $LIBS" LTHREAD_LIBS="" fi + fi @@ -4223,10 +4979,6 @@ if test $ol_link_threads = no ; then cat >> confdefs.h <<\EOF #define NO_THREADS 1 -EOF - - cat >> confdefs.h <<\EOF -#define PREEMPTIVE_THREADS 1 EOF LTHREAD_LIBS="" @@ -4235,13 +4987,13 @@ 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:4239: checking for DB2 library" >&5 +echo "configure:4991: 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:4245: checking for db_open in -ldb" >&5 +echo "configure:4997: 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 @@ -4249,7 +5001,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4291,17 +5043,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:4295: checking for $ac_hdr" >&5 +echo "configure:5047: 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:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4329,13 +5081,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:4333: checking if db.h is DB2" >&5 +echo "configure:5085: 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 < @@ -4367,7 +5119,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:4371: checking for Berkeley DB2" >&5 +echo "configure:5123: 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 @@ -4413,18 +5165,18 @@ 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:4417: checking for Berkeley DB library" >&5 +echo "configure:5169: 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" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:4423: checking for dbopen" >&5 +echo "configure:5175: 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; then +if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -4466,7 +5218,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:4470: checking for dbopen in -ldb" >&5 +echo "configure:5222: 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 @@ -4474,7 +5226,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4520,17 +5272,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:4524: checking for $ac_hdr" >&5 +echo "configure:5276: 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:4534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4566,7 +5318,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:4570: checking for Berkeley DB" >&5 +echo "configure:5322: 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 @@ -4619,17 +5371,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:4623: checking for $ac_hdr" >&5 +echo "configure:5375: 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:4633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4664,18 +5416,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:4668: checking for GDBM library" >&5 +echo "configure:5420: 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:4674: checking for gdbm_open" >&5 +echo "configure:5426: 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; then +if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -4717,7 +5469,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:4721: checking for gdbm_open in -lgdbm" >&5 +echo "configure:5473: 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 @@ -4725,7 +5477,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4771,17 +5523,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:4775: checking for $ac_hdr" >&5 +echo "configure:5527: 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:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4808,7 +5560,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:4812: checking for db" >&5 +echo "configure:5564: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4840,20 +5592,22 @@ EOF fi fi -if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then +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:4846: checking for NDBM library" >&5 +echo "configure:5600: 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:4852: checking for dbm_open" >&5 +echo "configure:5606: 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; then +if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -4895,7 +5649,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:4899: checking for dbm_open in -lndbm" >&5 +echo "configure:5653: 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 @@ -4903,7 +5657,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4934,7 +5688,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:4938: checking for dbm_open in -ldbm" >&5 +echo "configure:5692: 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 @@ -4942,7 +5696,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4990,17 +5744,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:4994: checking for $ac_hdr" >&5 +echo "configure:5748: 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:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5027,7 +5781,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:5031: checking for db" >&5 +echo "configure:5785: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5053,10 +5807,6 @@ EOF ol_link_ldbm=ndbm ol_with_ldbm_api=ndbm - if test $ol_with_ldbm_api = ndbm ; then - echo "configure: warning: Attempting to use NDBM. Functionality will be limited." 1>&2 - fi - if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi @@ -5074,27 +5824,23 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then fi if test $ol_enable_wrappers = yes ; then - echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:5079: checking for hosts_access in -lwrap" >&5 -ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` + echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6 +echo "configure:5829: checking for main in -lwrap" >&5 +ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5134,23 +5880,113 @@ EOF fi +if test $ol_enable_dmalloc != no ; then + for ac_hdr in dmalloc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5889: 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:5899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +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 dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6 +echo "configure:5926: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-ldmalloc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + # ud needs termcap (should insert check here) ol_link_termcap=no for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5144: checking for $ac_hdr" >&5 +echo "configure:5980: 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:5154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5179,7 +6015,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:5183: checking for tputs in -ltermcap" >&5 +echo "configure:6019: 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 @@ -5187,7 +6023,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5231,7 +6067,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:5235: checking for initscr in -lncurses" >&5 +echo "configure:6071: 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 @@ -5239,7 +6075,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5292,12 +6128,12 @@ 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:5296: checking for crypt" >&5 +echo "configure:6132: 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; then +if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -5339,7 +6175,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:5343: checking for crypt in -lcrypt" >&5 +echo "configure:6179: 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 @@ -5347,7 +6183,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5402,12 +6238,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:5406: checking for setproctitle" >&5 +echo "configure:6242: 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; then +if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setproctitle=yes" else @@ -5449,7 +6285,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 -echo "configure:5453: checking for setproctitle in -lutil" >&5 +echo "configure:6289: 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 @@ -5457,7 +6293,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5503,12 +6339,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5507: checking for ANSI C header files" >&5 +echo "configure:6343: 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 @@ -5516,7 +6352,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5533,7 +6369,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5551,7 +6387,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5572,7 +6408,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5583,7 +6419,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -5608,7 +6444,7 @@ fi if test $ac_cv_header_stdc != yes; then - echo "configure: warning: could not locate Standard C headers" 1>&2 + echo "configure: warning: could not Standard C compliant headers" 1>&2 fi ac_header_dirent=no @@ -5616,12 +6452,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:5620: checking for $ac_hdr that defines DIR" >&5 +echo "configure:6456: 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> @@ -5629,7 +6465,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5654,7 +6490,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:5658: checking for opendir in -ldir" >&5 +echo "configure:6494: 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 @@ -5662,7 +6498,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5695,7 +6531,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5699: checking for opendir in -lx" >&5 +echo "configure:6535: 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 @@ -5703,7 +6539,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5737,12 +6573,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:5741: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:6577: 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 @@ -5758,7 +6594,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:5762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -5778,9 +6614,104 @@ EOF fi +echo $ac_n "checking POSIX termios""... $ac_c" 1>&6 +echo "configure:6619: 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 +#include +int main() { +/* SunOS 4.0.3 has termios.h but not the library calls. */ + tcgetattr(0, 0); +; return 0; } +EOF +if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + am_cv_sys_posix_termios=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_sys_posix_termios=no +fi +rm -f conftest* +fi + +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:6650: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5 +if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no + + gwinsz_in_termios_h=no + if test $am_cv_sys_posix_termios = yes; then + cat > conftest.$ac_ext < +# include +# ifdef TIOCGWINSZ + yes +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + gwinsz_in_termios_h=yes +fi +rm -f conftest* + + fi + + if test $gwinsz_in_termios_h = no; then + cat > conftest.$ac_ext < +# include +# ifdef TIOCGWINSZ + yes +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes +fi +rm -f conftest* + + fi + +fi + +echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6 + if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then + cat >> confdefs.h <<\EOF +#define GWINSZ_IN_SYS_IOCTL 1 +EOF + + fi + +if test $am_cv_sys_posix_termios = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_POSIX_TERMIOS 1 +EOF + +fi + for ac_hdr in \ - stdarg.h \ - stddef.h \ + crypt.h \ errno.h \ fcntl.h \ filio.h \ @@ -5788,9 +6719,15 @@ for ac_hdr in \ libutil.h \ limits.h \ malloc.h \ + memory.h \ regex.h \ + psap.h \ pwd.h \ sgtty.h \ + stdarg.h \ + stddef.h \ + string.h \ + strings.h \ sys/file.h \ sys/filio.h \ sys/errno.h \ @@ -5808,17 +6745,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:5812: checking for $ac_hdr" >&5 +echo "configure:6749: 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:5822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5846,12 +6783,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5850: checking for uid_t in sys/types.h" >&5 +echo "configure:6787: 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 @@ -5880,7 +6817,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5884: checking type of array argument to getgroups" >&5 +echo "configure:6821: 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 @@ -5888,7 +6825,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5927,7 +6864,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -5949,14 +6886,13 @@ cat >> confdefs.h <&6 -echo "configure:5955: checking for mode_t" >&5 + echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:6891: 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 @@ -5984,12 +6920,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5988: checking for off_t" >&5 +echo "configure:6924: 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 @@ -6017,12 +6953,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:6021: checking for pid_t" >&5 +echo "configure:6957: 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 @@ -6049,13 +6985,46 @@ EOF fi +echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 +echo "configure:6990: 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:7002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_type_ptrdiff_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_type_ptrdiff_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6 + if test $am_cv_type_ptrdiff_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PTRDIFF_T 1 +EOF + + fi + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:6054: checking return type of signal handlers" >&5 +echo "configure:7023: 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 @@ -6072,7 +7041,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:6076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -6090,80 +7059,79 @@ cat >> confdefs.h <&6 -echo "configure:6095: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 +echo "configure:7064: 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 < -#if STDC_HEADERS -#include -#include -#endif +#include +int main() { +sig_atomic_t atomic; +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then +if { (eval echo configure:7076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_type_size_t=yes + ol_cv_type_sig_atomic_t=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_type_size_t=no + ol_cv_type_sig_atomic_t=no fi rm -f conftest* - fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF -fi +echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6 + if test $ol_cv_type_sig_atomic_t = no; then + cat >> confdefs.h <<\EOF +#define sig_atomic_t int +EOF -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:6128: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:7097: 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 +#include +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_uid_t=yes + ac_cv_type_size_t=yes else rm -rf conftest* - ac_cv_type_uid_t=no + ac_cv_type_size_t=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF -#define gid_t int +#define size_t unsigned EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:6162: checking for st_blksize in struct stat" >&5 +echo "configure:7130: 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 @@ -6171,7 +7139,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:6175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -6192,12 +7160,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:6196: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:7164: 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 @@ -6206,7 +7174,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:6210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -6227,12 +7195,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:6231: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:7199: 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 @@ -6240,7 +7208,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:6244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -6263,7 +7231,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:6267: checking if toupper() requires islower()" >&5 +echo "configure:7235: 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 @@ -6272,7 +7240,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -6284,7 +7252,7 @@ main() exit(1); } EOF -if { (eval echo configure:6288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -6307,12 +7275,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:6311: checking for working const" >&5 +echo "configure:7279: 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:7333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -6381,10 +7349,261 @@ EOF fi +echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 +echo "configure:7354: 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 + rm -rf conftest* + ol_cv_c_volatile=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_c_volatile=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_c_volatile" 1>&6 + if test $ol_cv_c_volatile = yes; then + : + else + cat >> confdefs.h <<\EOF +#define volatile +EOF + + fi + + +if test $cross_compiling = yes ; then + cat >> confdefs.h <<\EOF +#define CROSS_COMPILING 1 +EOF + +else + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:7398: 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 +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:7416: \"$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 +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +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 && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + + echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:7488: 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 + 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 < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(short)); + exit(0); +} +EOF +if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_short=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_short=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 +cat >> confdefs.h <&6 +echo "configure:7527: 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 + 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 < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); + exit(0); +} +EOF +if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:7566: 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 + 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 < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); + exit(0); +} +EOF +if { (eval echo configure:7585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long" 1>&6 +cat >> confdefs.h <&6 -echo "configure:6388: checking for 8-bit clean memcmp" >&5 +echo "configure:7607: 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 @@ -6392,7 +7611,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -6420,12 +7639,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:6424: checking for strftime" >&5 +echo "configure:7643: 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; then +if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -6470,7 +7689,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:6474: checking for strftime in -lintl" >&5 +echo "configure:7693: 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 @@ -6478,7 +7697,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6516,12 +7735,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:6520: checking for vprintf" >&5 +echo "configure:7739: 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; then +if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -6568,12 +7787,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:6572: checking for _doprnt" >&5 +echo "configure:7791: 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; then +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -6625,12 +7844,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6629: checking for $ac_func" >&5 +echo "configure:7848: 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; then +if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6680,7 +7899,7 @@ done fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:6684: checking for wait3 that fills in rusage" >&5 +echo "configure:7903: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6688,7 +7907,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -6719,7 +7938,7 @@ main() { } } EOF -if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -6744,17 +7963,15 @@ fi for ac_func in \ bcopy \ - getopt \ flock \ - gethostname \ - gettimeofday \ getdtablesize \ + gethostname \ getpwuid \ + gettimeofday \ lockf \ memcpy \ memmove \ mkstemp \ - mktime \ res_search \ select \ setpwfile \ @@ -6764,24 +7981,86 @@ for ac_func in \ snprintf \ socket \ strerror \ - strstr \ + strpbrk \ strrchr \ strsep \ - strtod \ + strstr \ + strtok \ strtol \ strtoul \ sysconf \ - tempnam \ waitpid \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6780: checking for $ac_func" >&5 +echo "configure:7997: 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:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 \ + strtok_r \ + ctime_r \ + gethostbyaddr_r \ + gethostbyname_r \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8059: 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; then +if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6829,15 +8108,34 @@ fi done +if test $ac_cv_func_strtok_r = yes \ + -a $ac_cv_func_ctime_r = yes \ + -a $ac_cv_func_gethostbyaddr_r = yes \ + -a $ac_cv_func_gethostbyname_r = yes \ + ; then + + cat >> 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 strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6836: checking for $ac_func" >&5 +echo "configure:8134: 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; then +if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6890,13 +8188,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:6894: checking declaration of sys_errlist" >&5 +echo "configure:8192: 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 < @@ -6906,7 +8204,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:6910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -6927,20 +8225,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:6931: checking existence of sys_errlist" >&5 +echo "configure:8229: 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:6944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -6977,7 +8275,7 @@ EOF fi if test $ol_enable_dns != no ; then cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_API_VENDOR_VERSION +#define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS 1 EOF fi @@ -6989,7 +8287,7 @@ EOF fi if test $ol_enable_referrals != no ; then cat >> confdefs.h <<\EOF -#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_API_VENDOR_VERSION +#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS 1 EOF fi @@ -7012,15 +8310,9 @@ if test $ol_enable_crypt != no ; then EOF fi -if test $ol_enable_md5 != no ; then - cat >> confdefs.h <<\EOF -#define SLAPD_MD5 1 -EOF - -fi -if test $ol_enable_sha1 != no ; then +if test $ol_enable_cleartext != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_SHA1 1 +#define SLAPD_CLEARTEXT 1 EOF fi @@ -7213,13 +8505,14 @@ clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ -libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ -libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ -libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ -libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ -libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ -libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ -libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ +libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \ 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 \ @@ -7260,15 +8553,33 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@LN_S@%$LN_S%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@RANLIB@%$RANLIB%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g +s%@top_builddir@%$top_builddir%g +s%@ldap_subdir@%$ldap_subdir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@RANLIB@%$RANLIB%g +s%@CC@%$CC%g +s%@LD@%$LD%g +s%@NM@%$NM%g +s%@LN_S@%$LN_S%g +s%@LIBTOOL@%$LIBTOOL%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g -s%@CC@%$CC%g s%@CPP@%$CPP%g s%@PEPSY@%$PEPSY%g s%@LIBOBJS@%$LIBOBJS%g @@ -7346,13 +8657,14 @@ clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \ clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \ include/Makefile:build/top.mk:include/Makefile.in \ libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \ -libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \ -libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \ -libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \ -libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \ -libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \ -libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ -libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ +libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \ +libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk \ +libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \ 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 \