#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-shared[=PKGS]  build shared libraries [default=yes]"
ac_help="$ac_help
  --enable-static[=PKGS]  build static libraries [default=yes]"
ac_help="$ac_help
  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
ac_help="$ac_help
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
  --disable-libtool-lock  avoid locking (might break parallel builds)"
ac_help="$ac_help
  --enable-debug            Turn on debugging and compile time warnings"
ac_help="$ac_help
  --enable-maintainer-mode  Turn on debugging and compile time warnings"
ac_help="$ac_help
  --enable-threads        Enable threading support in APR."
ac_help="$ac_help
  --enable-shmem          Enable shared memory support in APR. "
ac_help="$ac_help
  --with-sendfile  Force sendfile to be on or off"
ac_help="$ac_help
  --enable-dso            Enable dso support "
ac_help="$ac_help
  --enable-other-child    Enable reliable child processes "

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=build/apr_common.m4

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
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
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.












































































































                                                                              




## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.

# serial 40 AC_PROG_LIBTOOL




# AC_LIBTOOL_DLOPEN - enable checks for dlopen support


# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's


# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
#   `yes'.


# AC_DISABLE_SHARED - set the default shared flag to --disable-shared


# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
#   `yes'.


# AC_DISABLE_STATIC - set the default static flag to --disable-static



# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
#   `yes'.


# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install


# AC_PROG_LD - find the path to the GNU or non-GNU linker




# AC_PROG_NM - find the path to a BSD-compatible name lister


# AC_CHECK_LIBM - check for math library


# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library, adds --enable-ltdl-convenience to
# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.


# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library, and adds --enable-ltdl-install to
# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.






  rm -f config.nice
  cat >config.nice<<EOF
#! /bin/sh
#
# Created by configure

EOF
  if test -n "$OPTIM"; then
    echo "OPTIM=\"$OPTIM\"; export OPTIM" >> config.nice
  fi

  for arg in $0 "$@"; do
    echo "\"$arg\" \\" >> config.nice
  done
  echo '"$@"' >> config.nice
  chmod +x config.nice



# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:825: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:846: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:864: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

echo "Configuring APR library"
OS=$host
echo "Platform: $OS"



if test "$DID_APR_PRELOAD" = "yes" ; then

  echo "APR hints file rules for $host already applied"

else

  DID_APR_PRELOAD="yes"; export DID_APR_PRELOAD

  echo "Applying APR hints file rules for $host"

  case "$host" in
    *mint)
	
  echo "  Adding \"-DMINT\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DMINT"; export CPPFLAGS

	
  echo "  Adding \"-lportlib -lsocket\" to LIBS"
  LIBS="$LIBS -lportlib -lsocket"; export LIBS

	;;
    *MPE/iX*)
	
  echo "  Adding \"-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lsvipc -lcurses\" to LIBS"
  LIBS="$LIBS -lsocket -lsvipc -lcurses"; export LIBS

	
  echo "  Adding \"-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\"\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\""; export LDFLAGS

	
  echo "  Forcing CAT to \"/bin/cat\""
  CAT="/bin/cat"; export CAT

	;;
    *-apple-aux3*)
        
  echo "  Forcing CC to \"gcc\""
  CC="gcc"; export CC

	
  echo "  Adding \"-DAUX3 -D_POSIX_SOURCE\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DAUX3 -D_POSIX_SOURCE"; export CPPFLAGS

	
  echo "  Adding \"-lposix -lbsd\" to LIBS"
  LIBS="$LIBS -lposix -lbsd"; export LIBS

	
  echo "  Adding \"-s\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -s"; export LDFLAGS

	
  echo "  Forcing SHELL to \"/bin/ksh\""
  SHELL="/bin/ksh"; export SHELL

	;;
    *-ibm-aix*)
        case $host in
        i386-ibm-aix*)
	    
  echo "  Adding \"-U__STR__ -DUSEBCOPY\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -U__STR__ -DUSEBCOPY"; export CPPFLAGS

	    ;;
        *-ibm-aix1-2.*)
	    
  echo "  Adding \"-DNEED_RLIM_T -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEED_RLIM_T -U__STR__"; export CPPFLAGS

	    ;;
        *-ibm-aix3.*)
	    
  echo "  Adding \"-DNEED_RLIM_T -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEED_RLIM_T -U__STR__"; export CPPFLAGS

	    ;;
        *-ibm-aix4.1)
	    
  echo "  Adding \"-DNEED_RLIM_T -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEED_RLIM_T -U__STR__"; export CPPFLAGS

	    ;;
        *-ibm-aix4.1.*)
            
  echo "  Adding \"-DNEED_RLIM_T -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEED_RLIM_T -U__STR__"; export CPPFLAGS

            ;;
        *-ibm-aix4.2)
	    
  echo "  Adding \"-U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -U__STR__"; export CPPFLAGS

	    ;;
        *-ibm-aix4.2.*)
            
  echo "  Adding \"-U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -U__STR__"; export CPPFLAGS

            ;;
        *-ibm-aix4.3)
	    
  echo "  Adding \"-D_USE_IRS -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -D_USE_IRS -U__STR__"; export CPPFLAGS

	    ;;
        *-ibm-aix4.3.*)
            
  echo "  Adding \"-D_USE_IRS -U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -D_USE_IRS -U__STR__"; export CPPFLAGS

            ;;
        *-ibm-aix*)
	    
  echo "  Adding \"-U__STR__\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -U__STR__"; export CPPFLAGS

	    ;;
        esac
                	# 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:1019: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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:1049: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1100: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1132: 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.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 1143 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1174: 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:1179: 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
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$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
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1207: 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
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

        if test "$GCC" != "yes"; then
          
  echo "  Adding \"-qHALT=E -qLANGLVL=extended\" to CFLAGS"
  CFLAGS="$CFLAGS -qHALT=E -qLANGLVL=extended"; export CFLAGS

        fi
	
  if test -z "$apr_iconv_inbuf_const"; then
    echo "  Setting apr_iconv_inbuf_const to \"1\""
    apr_iconv_inbuf_const="1"; export apr_iconv_inbuf_const
  fi

	
  echo "  Adding \"-D_THREAD_SAFE\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_THREAD_SAFE"; export THREAD_CPPFLAGS

        ;;
    *-apollo-*)
	
  echo "  Adding \"-DAPOLLO\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DAPOLLO"; export CPPFLAGS

	;;
    *-dg-dgux*)
	
  echo "  Adding \"-DDGUX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DDGUX"; export CPPFLAGS

	;;
    *os2_emx*)
	
  echo "  Forcing SHELL to \"sh\""
  SHELL="sh"; export SHELL

	;;
    *-hi-hiux)
	
  echo "  Adding \"-DHIUX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DHIUX"; export CPPFLAGS

	;;
    *-hp-hpux11.*)
	
  echo "  Adding \"-DHPUX11\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DHPUX11"; export CPPFLAGS

	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-hp-hpux10.*)
 	case $host in
 	  *-hp-hpux10.01)
	       
  echo "  Adding \"-DSELECT_NEEDS_CAST\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSELECT_NEEDS_CAST"; export CPPFLAGS

	       ;;	     
 	esac
	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-hp-hpux*)
	
  echo "  Adding \"-DHPUX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DHPUX"; export CPPFLAGS

	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-linux-*)
        case `uname -r` in
	    2.2* ) 
  echo "  Adding \"-DLINUX=2\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DLINUX=2"; export CPPFLAGS

	           ;;
	    2.0* ) 
  echo "  Adding \"-DLINUX=2\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DLINUX=2"; export CPPFLAGS

	           ;;
	    1.* )  
  echo "  Adding \"-DLINUX=1\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DLINUX=1"; export CPPFLAGS

	           ;;
	    * )
	           ;;
        esac
	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-GNU*)
	
  echo "  Adding \"-DHURD\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DHURD"; export CPPFLAGS

	
  echo "  Adding \"-lcrypt\" to LIBS"
  LIBS="$LIBS -lcrypt"; export LIBS

	;;
    *-lynx-lynxos)
	
  echo "  Adding \"-D__NO_INCLUDE_WARN__ -DLYNXOS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -D__NO_INCLUDE_WARN__ -DLYNXOS"; export CPPFLAGS

	
  echo "  Adding \"-lbsd -lcrypt\" to LIBS"
  LIBS="$LIBS -lbsd -lcrypt"; export LIBS

	;;
    *486-*-bsdi*)
	
  echo "  Adding \"-m486\" to CFLAGS"
  CFLAGS="$CFLAGS -m486"; export CFLAGS

	;;
    *-openbsd*)
	
  echo "  Adding \"-D_POSIX_THREADS\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_POSIX_THREADS"; export THREAD_CPPFLAGS

	;;
    *-netbsd*)
	
  echo "  Adding \"-DNETBSD\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNETBSD"; export CPPFLAGS

	
  echo "  Adding \"-lcrypt\" to LIBS"
  LIBS="$LIBS -lcrypt"; export LIBS

	;;
    *-freebsd*)
	case $host in
	    *freebsd2345*)
		
  echo "  Adding \"-funsigned-char\" to CFLAGS"
  CFLAGS="$CFLAGS -funsigned-char"; export CFLAGS

		;;
	esac
	
  echo "  Adding \"-lcrypt\" to LIBS"
  LIBS="$LIBS -lcrypt"; export LIBS

	
  if test -z "$enable_threads"; then
    echo "  Setting enable_threads to \"no\""
    enable_threads="no"; export enable_threads
  fi

	
  echo "  Adding \"-D_REENTRANT -D_THREAD_SAFE\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT -D_THREAD_SAFE"; export THREAD_CPPFLAGS

	;;
    *-next-nextstep*)
	
  if test -z "$OPTIM"; then
    echo "  Setting OPTIM to \"-O\""
    OPTIM="-O"; export OPTIM
  fi

	
  echo "  Adding \"-DNEXT\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEXT"; export CPPFLAGS

	;;
    *-next-openstep*)
	
  echo "  Forcing CC to \"cc\""
  CC="cc"; export CC

	
  if test -z "$OPTIM"; then
    echo "  Setting OPTIM to \"-O\""
    OPTIM="-O"; export OPTIM
  fi

	
  echo "  Adding \"-DNEXT\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEXT"; export CPPFLAGS

	;;
    *-apple-darwin*)
	
  echo "  Adding \"-DDARWIN\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DDARWIN"; export CPPFLAGS

	;;
    *-dec-osf*)
	
  echo "  Adding \"-DOSF1\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DOSF1"; export CPPFLAGS

	;;
    *-qnx)
	
  echo "  Adding \"-DQNX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DQNX"; export CPPFLAGS

	
  echo "  Adding \"-N128k -lsocket -lunix\" to LIBS"
  LIBS="$LIBS -N128k -lsocket -lunix"; export LIBS

	;;
    *-qnx32)
        
  echo "  Forcing CC to \"cc -F\""
  CC="cc -F"; export CC

	
  echo "  Adding \"-DQNX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DQNX"; export CPPFLAGS

	
  echo "  Adding \"-mf -3\" to CFLAGS"
  CFLAGS="$CFLAGS -mf -3"; export CFLAGS

	
  echo "  Adding \"-N128k -lsocket -lunix\" to LIBS"
  LIBS="$LIBS -N128k -lsocket -lunix"; export LIBS

	;;
    *-isc4*)
	
  echo "  Forcing CC to \"gcc\""
  CC="gcc"; export CC

	
  echo "  Adding \"-posix -DISC\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -posix -DISC"; export CPPFLAGS

	
  echo "  Adding \"-posix\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -posix"; export LDFLAGS

	
  echo "  Adding \"-linet\" to LIBS"
  LIBS="$LIBS -linet"; export LIBS

	;;
    *-sco3*)
	
  echo "  Adding \"-DSCO\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSCO"; export CPPFLAGS

	
  echo "  Adding \"-Oacgiltz\" to CFLAGS"
  CFLAGS="$CFLAGS -Oacgiltz"; export CFLAGS

	
  echo "  Adding \"-lPW -lsocket -lmalloc -lcrypt_i\" to LIBS"
  LIBS="$LIBS -lPW -lsocket -lmalloc -lcrypt_i"; export LIBS

	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-sco5*)
	
  echo "  Adding \"-DSCO5\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSCO5"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lmalloc -lprot -ltinfo -lx\" to LIBS"
  LIBS="$LIBS -lsocket -lmalloc -lprot -ltinfo -lx"; export LIBS

	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-sco_sv*|*-SCO_SV*)
	
  echo "  Adding \"-DSCO\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSCO"; export CPPFLAGS

	
  echo "  Adding \"-lPW -lsocket -lmalloc -lcrypt_i\" to LIBS"
  LIBS="$LIBS -lPW -lsocket -lmalloc -lcrypt_i"; export LIBS

	
  echo "  Adding \"-D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-solaris2*)
    	PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
	
  echo "  Adding \"-DSOLARIS2=$PLATOSVERS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSOLARIS2=$PLATOSVERS"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl"; export LIBS

	
  if test -z "$apr_iconv_inbuf_const"; then
    echo "  Setting apr_iconv_inbuf_const to \"1\""
    apr_iconv_inbuf_const="1"; export apr_iconv_inbuf_const
  fi

	
  echo "  Adding \"-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"; export THREAD_CPPFLAGS

	;;
    *-sunos4*)
	
  echo "  Adding \"-DSUNOS4 -DUSEBCOPY\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSUNOS4 -DUSEBCOPY"; export CPPFLAGS

	;;
    *-unixware1)
	
  echo "  Adding \"-DUW=100\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUW=100"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lcrypt\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lcrypt"; export LIBS

	;;
    *-unixware2)
	
  echo "  Adding \"-DUW=200\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUW=200"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lcrypt -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen"; export LIBS

	;;
    *-unixware211)
	
  echo "  Adding \"-DUW=211\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUW=211"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lcrypt -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen"; export LIBS

	;;
    *-unixware212)
	
  echo "  Adding \"-DUW=212\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUW=212"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lcrypt -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen"; export LIBS

	;;
    *-unixware7)
	
  echo "  Adding \"-DUW=700\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUW=700"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lcrypt -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen"; export LIBS

	;;
    maxion-*-sysv4*)
	
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc -lgen"; export LIBS

	;;
    *-*-powermax*)
	
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lgen\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lgen"; export LIBS

	;;
    TPF)
       
  echo "  Forcing CC to \"c89\""
  CC="c89"; export CC

       
  echo "  Adding \"-DTPF -D_POSIX_SOURCE\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DTPF -D_POSIX_SOURCE"; export CPPFLAGS

       ;;
    BS2000*-siemens-sysv4*)
	
  echo "  Forcing CC to \"c89 -XLLML -XLLMK -XL -Kno_integer_overflow\""
  CC="c89 -XLLML -XLLMK -XL -Kno_integer_overflow"; export CC

	
  echo "  Adding \"-DSVR4 -D_XPG_IV\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -D_XPG_IV"; export CPPFLAGS

	;;
    *-siemens-sysv4*)
	
  echo "  Adding \"-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT -DNEED_UNION_SEMUN\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT -DNEED_UNION_SEMUN"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    pyramid-pyramid-svr4)
	
  echo "  Adding \"-DSVR4 -DNO_LONG_DOUBLE\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -DNO_LONG_DOUBLE"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    DS/90\ 7000-*-sysv4*)
	
  echo "  Adding \"-DUXPDS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUXPDS"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl"; export LIBS

	;;
    *-tandem-sysv4*)
	
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl"; export LIBS

	;;
    *-ncr-sysv4)
	
  echo "  Adding \"-DSVR4 -DMPRAS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -DMPRAS"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc -L/usr/ucblib -lucb\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc -L/usr/ucblib -lucb"; export LIBS

	;;
    *-sysv4*)
	
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    88k-encore-sysv4)
	
  echo "  Adding \"-DSVR4 -DENCORE\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -DENCORE"; export CPPFLAGS

	
  echo "  Adding \"-lPW\" to LIBS"
  LIBS="$LIBS -lPW"; export LIBS

	;;
    *-uts*)
	PLATOSVERS=`echo $host | sed 's/^.*,//'`
	case $PLATOSVERS in
	    2*) 
  echo "  Adding \"-DUTS21 -DUSEBCOPY\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DUTS21 -DUSEBCOPY"; export CPPFLAGS

	        
  echo "  Adding \"-Xa -eft\" to CFLAGS"
  CFLAGS="$CFLAGS -Xa -eft"; export CFLAGS

	        
  echo "  Adding \"-lsocket -lbsd -la\" to LIBS"
  LIBS="$LIBS -lsocket -lbsd -la"; export LIBS

	        ;;
	    *)  
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	        
  echo "  Adding \"-Xa\" to CFLAGS"
  CFLAGS="$CFLAGS -Xa"; export CFLAGS

	        
  echo "  Adding \"-lsocket -lnsl\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl"; export LIBS

	        ;;
	esac
	;;
    *-ultrix)
	
  echo "  Adding \"-DULTRIX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DULTRIX"; export CPPFLAGS

	
  echo "  Forcing SHELL to \"/bin/sh5\""
  SHELL="/bin/sh5"; export SHELL

	;;
    *powerpc-tenon-machten*)
	
  echo "  Adding \"-Xlstack=0x14000 -Xldelcsect\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -Xlstack=0x14000 -Xldelcsect"; export LDFLAGS

	;;
    *-machten*)
	
  echo "  Adding \"-stack 0x14000\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -stack 0x14000"; export LDFLAGS

	;;
    *convex-v11*)
	
  echo "  Adding \"-DCONVEXOS11\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DCONVEXOS11"; export CPPFLAGS

	
  echo "  Adding \"-ext\" to CFLAGS"
  CFLAGS="$CFLAGS -ext"; export CFLAGS

	
  if test -z "$OPTIM"; then
    echo "  Setting OPTIM to \"-O1\""
    OPTIM="-O1"; export OPTIM
  fi

	
  echo "  Forcing CC to \"cc\""
  CC="cc"; export CC

	;;
    i860-intel-osf1)
	
  echo "  Adding \"-DPARAGON\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DPARAGON"; export CPPFLAGS

	;;
    *-sequent-ptx2.*.*)
	
  echo "  Adding \"-DSEQUENT=20\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=20"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -linet -lnsl -lc -lseq\" to LIBS"
  LIBS="$LIBS -lsocket -linet -lnsl -lc -lseq"; export LIBS

	;;
    *-sequent-ptx4.0.*)
	
  echo "  Adding \"-DSEQUENT=40\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=40"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -linet -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -linet -lnsl -lc"; export LIBS

	;;
    *-sequent-ptx4.123.*)
	
  echo "  Adding \"-DSEQUENT=41\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=41"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    *-sequent-ptx4.4.*)
	
  echo "  Adding \"-DSEQUENT=44\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=44"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    *-sequent-ptx4.5.*)
	
  echo "  Adding \"-DSEQUENT=45\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=45"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    *-sequent-ptx5.0.*)
	
  echo "  Adding \"-DSEQUENT=50\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSEQUENT=50"; export CPPFLAGS

	
  echo "  Adding \"-Wc,-pw\" to CFLAGS"
  CFLAGS="$CFLAGS -Wc,-pw"; export CFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc"; export LIBS

	;;
    *NEWS-OS*)
	
  echo "  Adding \"-DNEWSOS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DNEWSOS"; export CPPFLAGS

	;;
    *-riscix)
	
  echo "  Adding \"-DRISCIX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DRISCIX"; export CPPFLAGS

	
  if test -z "$OPTIM"; then
    echo "  Setting OPTIM to \"-O\""
    OPTIM="-O"; export OPTIM
  fi

	
  if test -z "$MAKE"; then
    echo "  Setting MAKE to \"make\""
    MAKE="make"; export MAKE
  fi

	;;
    *-irix*)
	
  echo "  Adding \"-D_POSIX_THREAD_SAFE_FUNCTIONS\" to THREAD_CPPFLAGS"
  THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_POSIX_THREAD_SAFE_FUNCTIONS"; export THREAD_CPPFLAGS

	;;
    *beos*)
        
  echo "  Adding \"-DBEOS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DBEOS"; export CPPFLAGS

        PLATOSVERS=`uname -r`
        case $PLATOSVERS in
            5.1)
                
  echo "  Adding \"-I/boot/develop/headers/bone\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -I/boot/develop/headers/bone"; export CPPFLAGS

                
  echo "  Adding \"-nodefaultlibs -L/boot/develop/lib/x86 -L/boot/beos/system/lib\" to LDFLAGS"
  LDFLAGS="$LDFLAGS -nodefaultlibs -L/boot/develop/lib/x86 -L/boot/beos/system/lib"; export LDFLAGS

                
  echo "  Adding \"-lbind -lsocket -lbe -lroot\" to EXTRA_LIBS"
  EXTRA_LIBS="$EXTRA_LIBS -lbind -lsocket -lbe -lroot"; export EXTRA_LIBS

                ;;
	esac
	;;
    4850-*.*)
	
  echo "  Adding \"-DSVR4 -DMPRAS\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4 -DMPRAS"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc -L/usr/ucblib -lucb\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc -L/usr/ucblib -lucb"; export LIBS

	;;
    drs6000*)
	
  echo "  Adding \"-DSVR4\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -DSVR4"; export CPPFLAGS

	
  echo "  Adding \"-lsocket -lnsl -lc -L/usr/ucblib -lucb\" to LIBS"
  LIBS="$LIBS -lsocket -lnsl -lc -L/usr/ucblib -lucb"; export LIBS

	;;
    m88k-*-CX/SX|CYBER)
	
  echo "  Adding \"-D_CX_SX\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -D_CX_SX"; export CPPFLAGS

	
  echo "  Adding \"-Xa\" to CFLAGS"
  CFLAGS="$CFLAGS -Xa"; export CFLAGS

	
  echo "  Forcing CC to \"cc\""
  CC="cc"; export CC

	;;
    *-tandem-oss)
	
  echo "  Adding \"-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"; export CPPFLAGS

	
  echo "  Forcing CC to \"c89\""
  CC="c89"; export CC

	;;
    *-ibm-os390)
       
  if test -z "$apr_lock_method"; then
    echo "  Setting apr_lock_method to \"USE_SYSVSEM_SERIALIZE\""
    apr_lock_method="USE_SYSVSEM_SERIALIZE"; export apr_lock_method
  fi

       
  if test -z "$apr_process_lock_is_global"; then
    echo "  Setting apr_process_lock_is_global to \"yes\""
    apr_process_lock_is_global="yes"; export apr_process_lock_is_global
  fi

       
  if test -z "$CC"; then
    echo "  Setting CC to \"cc\""
    CC="cc"; export CC
  fi

       
  echo "  Adding \"-U_NO_PROTO -DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO -DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1\" to CPPFLAGS"
  CPPFLAGS="$CPPFLAGS -U_NO_PROTO -DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO -DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1"; export CPPFLAGS

       ;;
  esac
  
  for i in CFLAGS CPPFLAGS LDFLAGS LIBS
  do
    eval APR_TMP=\$EXTRA_$i
    if test -n "$APR_TMP"; then
      eval $i=\"\$$i $APR_TMP\"
      eval export $i
      eval unset EXTRA_${i}
      eval export EXTRA_${i}
    fi
  done

fi


abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`

if test "$abs_builddir" != "$abs_srcdir"; then
  USE_VPATH=1
fi

top_builddir="$abs_builddir"


apr_buildout=$abs_builddir/build
apr_builders=$abs_srcdir/build


MKDIR=$apr_builders/mkdir.sh

# These added to allow default directories to be used...
DEFAULT_OSDIR="unix"
echo "(Default will be ${DEFAULT_OSDIR})"

apr_modules="file_io network_io threadproc misc locks time mmap shmem i18n user"

# 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:2048: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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:2078: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2129: 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.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2161: 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.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 2172 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2203: 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:2208: 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
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2217: \"$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
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2236: 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
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:2268: 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

for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2299: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ac_t""$AWK" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AWK" && break
done

# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2331: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RM"; then
  ac_cv_prog_RM="$RM" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RM="rm"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RM="$ac_cv_prog_RM"
if test -n "$RM"; then
  echo "$ac_t""$RM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi

# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2366: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="${ac_tool_prefix}ar"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_AR"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2398: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="ar"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  AR="ar"
fi
fi


# This macro needs to be here in case we are on an AIX box.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2433: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 2448 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 2465 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 2482 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:2513: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 2515 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*




  echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6
echo "configure:2539: checking whether system uses EBCDIC" >&5
if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_ebcdic="no"

else
  cat > conftest.$ac_ext <<EOF
#line 2550 "configure"
#include "confdefs.h"

int main(void) { 
  return (unsigned char)'A' != (unsigned char)0xC1; 
} 

EOF
if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
  ac_cv_ebcdic="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  ac_cv_ebcdic="no"

fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_ebcdic" 1>&6
  if test "$ac_cv_ebcdic" = "yes"; then
    apr_charset_ebcdic=1
  else
    apr_charset_ebcdic=0
  fi
  

 
# Use /bin/sh if it exists, otherwise go looking for sh in the path
if test ".$SH" = . -a -f /bin/sh; then
  SH="/bin/sh"
fi
# Extract the first word of "sh", so it can be a program name with args.
set dummy sh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2592: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SH'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$SH"; then
  ac_cv_prog_SH="$SH" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_SH="sh"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
SH="$ac_cv_prog_SH"
if test -n "$SH"; then
  echo "$ac_t""$SH" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


echo "performing libtool configuration..."

case "$host_alias" in
*os2*)
    # Use a custom-made libtool replacement
    echo "using aplibtool"
    LIBTOOL="$srcdir/build/aplibtool"
    gcc $CPPFLAGS $CFLAGS -o $LIBTOOL.exe $LIBTOOL.c
    ;;
*)  # 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

# 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-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
  enableval="$enable_fast_install"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
  enable_fast_install=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_fast_install=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_fast_install=yes
fi

# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2700: 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
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
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:2739: 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]:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # 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:2763: checking for GNU ld" >&5
else
  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:2766: 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}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      ac_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # 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:2801: 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 </dev/null | egrep '(GNU|with BFD)' 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:2817: 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
  if test -n "$NM"; then
  # Let the user override the test.
  ac_cv_path_NM="$NM"
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -B"
	break
      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -p"
	break
      else
	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
	continue # so that we can try to find one that supports BSD flags
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi
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:2853: 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


case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac

# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"


# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
  enableval="$enable_libtool_lock"
  :
fi

test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 2902 "configure"' > conftest.$ac_ext
  if { (eval echo configure:2903: \"$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.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2924: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2929 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  lt_cv_cc_needs_belf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  lt_cv_cc_needs_belf=no
fi
rm -f conftest*
fi

echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;


esac


# Save cache, so that ltconfig can load it
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache


# Actually configure libtool.  ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }

# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi


# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"

# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log

    ;;
esac

nl='
'
echo $ac_n "${nl}Check for compiler flags..."

# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  CFLAGS="$CFLAGS -g"; if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
fi


# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
  enableval="$enable_maintainer_mode"
  CFLAGS="$CFLAGS -g"; if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"; fi
fi


case "$OS:$CC" in
    *-hp-hpux*:cc )
	CFLAGS="$CFLAGS -Ae +DAportable +Z"
	;;
    powerpc-*-beos:mwcc* )
        CPP="mwcc -E"
        CC="mwcc"
        AR="ar"
        ;;
    mips-sni-sysv4:cc )
	CFLAGS="$CFLAGS -Kthread"
	;;
esac

case "$OS" in
   i386-ibm-aix* | *-ibm-aix1-2.* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
       OSDIR="aix"
       config_subdirs="shmem/unix/mm"
       USE_MM=yes
       eolstr="\\n"
       ;;
   *-os2*)
       CPPFLAGS="$CPPFLAGS -DOS2"
       CFLAGS="$CFLAGS -Zmt"
       OSDIR="os2"
       enable_threads="system_threads"
       eolstr="\\r\\n"
       file_as_socket="0"
       ;;
   *beos*)
       OSDIR="beos"
       CPPFLAGS="$CPPFLAGS -DBEOS"
       enable_threads="system_threads"
       config_subdirs="shmem/unix/mm"
       native_mmap_emul="1"
       USE_MM=yes
       
  echo $ac_n "checking for BONE_VERSION in sys/socket.h""... $ac_c" 1>&6
echo "configure:3096: checking for BONE_VERSION in sys/socket.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_BONE_VERSION'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 3102 "configure"
#include "confdefs.h"

    #include <sys/socket.h>
    #ifdef BONE_VERSION
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_BONE_VERSION=yes
else
  rm -rf conftest*
  ac_cv_define_BONE_VERSION=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_BONE_VERSION" 1>&6
  if test "$ac_cv_define_BONE_VERSION" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_BONE_VERSION 1
EOF

  fi

       eolstr="\\n"
       file_as_socket="0"
       ;;
   *os390)
       OSDIR="os390"
       config_subdirs="shmem/unix/mm"
       USE_MM=yes
       eolstr="\\n"
       ;;
   *)
       OSDIR="unix"
       config_subdirs="shmem/unix/mm"
       USE_MM=yes
       eolstr="\\n"
       ;;
esac



case "$OS" in
    *freebsd*)
        # 3.4-RELEASE: 340   4.1.1-RELEASE: 411
        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/' | sed -e 's/\(.\)\.\(.\)\-.*/\1\20/'`
        ;;
     *)
        os_version=OS_VERSION_IS_NOT_SET
        ;;
esac

echo $ac_n "${nl}Checking for Threads...${nl}"

if test -z "$enable_threads"; then
	# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval="$enable_threads"
   enable_threads=$enableval 
else
   
  if test "$GCC" = "yes"; then
    SAVE_FL="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -w"
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3177: 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
#line 3182 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
   enable_threads="pthread"    
else
  echo "$ac_t""no" 1>&6
enable_threads="no"    
fi
done

    CPPFLAGS="$SAVE_FL"
  else
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3220: 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
#line 3225 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
   enable_threads="pthread"    
else
  echo "$ac_t""no" 1>&6
enable_threads="no"    
fi
done

  fi
  
fi

fi

if test "$enable_threads" = "no"; then
echo "Don't enable threads"
    threads="0"
    pthreadh="0"
    pthreadser="0"
else
#
#   Play with CPPFLAGS given what was learned from APR_PRELOAD.
#
#   [Roy: I don't like this because it messes up an environment
#         variable that should remain pristine.  However, it is needed
#         for compatibility until all flag handling can be rewritten.]
#
    apr_save_cppflags="$CPPFLAGS"
    if test -n "$THREAD_CPPFLAGS"; then
        CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
    fi
    if test "$enable_threads" = "pthread"; then
# We have specified pthreads for our threading library, just make sure
# that we have everything we need
      
if test -n "$ac_cv_pthreads_lib"; then
  LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi

if test -n "$ac_cv_pthreads_cflags"; then
  CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
  THREAD_CFLAGS="$THREAD_CFLAGS $ac_cv_pthreads_cflags"
fi


if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3298 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi



echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
echo "configure:3335: checking for pthreads_cflags" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
  for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt; do 
    ac_save="$CFLAGS"
    CFLAGS="$CFLAGS $flag"
    
if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3350 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi


    if test "$pthreads_working" = "yes"; then
      ac_cv_pthreads_cflags="$flag"
            THREAD_CFLAGS="$THREAD_CFLAGS $ac_cv_pthreads_cflags"
      break
    fi
    CFLAGS="$ac_save"
  done
fi

fi

echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6


echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
echo "configure:3400: checking for pthreads_lib" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
  for lib in pthread pthreads c_r; do
    ac_save="$LIBS"
    LIBS="$LIBS -l$lib"
    
if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3415 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi


    if test "$pthreads_working" = "yes"; then
      ac_cv_pthreads_lib="$lib"
      break
    fi
    LIBS="$ac_save"
  done
fi

fi

echo "$ac_t""$ac_cv_pthreads_lib" 1>&6

if test "$pthreads_working" = "yes"; then
  threads_result="POSIX Threads found"
else
  threads_result="POSIX Threads not found"
fi

      
  if test "$GCC" = "yes"; then
    SAVE_FL="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -w"
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3476: 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
#line 3481 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
  
          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >> confdefs.h <<\EOF
#define USE_THREADS 1
EOF
   
else
  echo "$ac_t""no" 1>&6
threads="0"
          pthreadh="0"
          pthreadser="0"    
fi
done

    CPPFLAGS="$SAVE_FL"
  else
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3528: 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
#line 3533 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
  
          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >> confdefs.h <<\EOF
#define USE_THREADS 1
EOF
   
else
  echo "$ac_t""no" 1>&6
threads="0"
          pthreadh="0"
          pthreadser="0"    
fi
done

  fi

    elif test "$enable_threads" = "system_threads"; then
        threads="1"
        pthreadh="0"
        pthreadser="0"
    else
# We basically specified that we wanted threads, but not how to implement
# them.  In this case, just look for pthreads.  In the future, we can check
# for other threading libraries as well.
      
if test -n "$ac_cv_pthreads_lib"; then
  LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi

if test -n "$ac_cv_pthreads_cflags"; then
  CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
  THREAD_CFLAGS="$THREAD_CFLAGS $ac_cv_pthreads_cflags"
fi


if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3599 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi



echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
echo "configure:3636: checking for pthreads_cflags" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
  for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt; do 
    ac_save="$CFLAGS"
    CFLAGS="$CFLAGS $flag"
    
if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3651 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi


    if test "$pthreads_working" = "yes"; then
      ac_cv_pthreads_cflags="$flag"
            THREAD_CFLAGS="$THREAD_CFLAGS $ac_cv_pthreads_cflags"
      break
    fi
    CFLAGS="$ac_save"
  done
fi

fi

echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6


echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
echo "configure:3701: checking for pthreads_lib" >&5
if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
  for lib in pthread pthreads c_r; do
    ac_save="$LIBS"
    LIBS="$LIBS -l$lib"
    
if test "$cross_compiling" = yes; then
  pthreads_working="no" 
else
  cat > conftest.$ac_ext <<EOF
#line 3716 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
EOF
if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
   
  pthreads_working="yes"
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  pthreads_working="no"
  
fi
rm -fr conftest*
fi


    if test "$pthreads_working" = "yes"; then
      ac_cv_pthreads_lib="$lib"
      break
    fi
    LIBS="$ac_save"
  done
fi

fi

echo "$ac_t""$ac_cv_pthreads_lib" 1>&6

if test "$pthreads_working" = "yes"; then
  threads_result="POSIX Threads found"
else
  threads_result="POSIX Threads not found"
fi

      
  if test "$GCC" = "yes"; then
    SAVE_FL="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -w"
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3777: 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
#line 3782 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
  
          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >> confdefs.h <<\EOF
#define USE_THREADS 1
EOF
   
else
  echo "$ac_t""no" 1>&6
threads="0"
          pthreadser="0"
          pthreadh="0"
          CPPFLAGS="$apr_save_cppflags"    
fi
done

    CPPFLAGS="$SAVE_FL"
  else
    for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3830: 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
#line 3835 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
  
          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >> confdefs.h <<\EOF
#define USE_THREADS 1
EOF
   
else
  echo "$ac_t""no" 1>&6
threads="0"
          pthreadser="0"
          pthreadh="0"
          CPPFLAGS="$apr_save_cppflags"    
fi
done

  fi

    fi
    if test "$pthreadh" = "1"; then
        
echo $ac_n "checking whether pthread_getspecific takes two arguments""... $ac_c" 1>&6
echo "configure:3883: checking whether pthread_getspecific takes two arguments" >&5
if eval "test \"`echo '$''{'ac_cv_pthread_getspecific_two_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 3889 "configure"
#include "confdefs.h"

#include <pthread.h>

int main() {

pthread_key_t key;
void *tmp;
pthread_getspecific(key,&tmp);

; return 0; }
EOF
if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_pthread_getspecific_two_args=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_pthread_getspecific_two_args=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_pthread_getspecific_two_args" 1>&6

if test "$ac_cv_pthread_getspecific_two_args" = "yes"; then
  cat >> confdefs.h <<\EOF
#define PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS 1
EOF

fi

        
echo $ac_n "checking whether pthread_attr_getdetachstate takes one argument""... $ac_c" 1>&6
echo "configure:3930: checking whether pthread_attr_getdetachstate takes one argument" >&5
if eval "test \"`echo '$''{'ac_cv_pthread_attr_getdetachstate_one_arg'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 3936 "configure"
#include "confdefs.h"

#include <pthread.h>

int main() {

pthread_attr_t *attr;
pthread_attr_getdetachstate(attr);

; return 0; }
EOF
if { (eval echo configure:3948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_pthread_attr_getdetachstate_one_arg=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_pthread_attr_getdetachstate_one_arg=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_pthread_attr_getdetachstate_one_arg" 1>&6

if test "$ac_cv_pthread_attr_getdetachstate_one_arg" = "yes"; then
  cat >> confdefs.h <<\EOF
#define PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG 1
EOF

fi

        for ac_func in pthread_key_delete
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3977: 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 <<EOF
#line 3982 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    fi
fi

ac_cv_define_READDIR_IS_THREAD_SAFE=no
if test "$threads" = "1"; then
    echo "APR will use threads"
    echo $ac_n "checking for readdir in -lc_r""... $ac_c" 1>&6
echo "configure:4036: checking for readdir in -lc_r" >&5
ac_lib_var=`echo c_r'_'readdir | 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="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4044 "configure"
#include "confdefs.h"
/* 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 readdir();

int main() {
readdir()
; return 0; }
EOF
if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define READDIR_IS_THREAD_SAFE 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

else
    echo "APR will be non-threaded"
fi

for ac_func in sigwait
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4085: 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 <<EOF
#line 4090 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_sigwait="1" 
else
  echo "$ac_t""no" 1>&6
have_sigwait="0" 
fi
done
 
case "$OS" in
    *alpha*-dec-osf* )
        have_sigwait="1"
        ;;
esac




for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4150: 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 <<EOF
#line 4155 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


for ac_func in getpwnam_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4206: 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 <<EOF
#line 4211 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getpwuid_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4261: 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 <<EOF
#line 4266 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getgrgid_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4316: 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 <<EOF
#line 4321 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "${nl}Checking for Shared Memory Support...${nl}"

# run the MM config script regardless of whether we are going to use
# it or not.  When we have a much better idea of who is using MM, we can
# run this on a more conditional basis.
mm_dir=shmem/unix/mm

if test "$USE_MM" = "yes"; then
  if test -n "$USE_VPATH"; then
    test -d $mm_dir || $MKDIR $mm_dir

    for i in shtool config.guess config.sub fbtool ltconfig \
             ltmain.sh mm_vers.c; do
      test -r $mm_dir/$i || ln -s $abs_srcdir/$mm_dir/$i $mm_dir/$i
    done
  fi
  
  # save our work to this point; this allows the sub-package to use it
  cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache


  echo "configuring package in $config_subdirs now"
  ac_popdir=`pwd`
  ac_abs_srcdir=`(cd $srcdir/$config_subdirs && pwd)`
  apr_config_subdirs="$config_subdirs"
  test -d $config_subdirs || $MKDIR $config_subdirs
  cd $config_subdirs

      # A "../" for each directory in /$config_subdirs.
      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

  # Make the cache file name correct relative to the subdirectory.
  case "$cache_file" in
  /*) ac_sub_cache_file=$cache_file ;;
  *) # Relative path.
    ac_sub_cache_file="$ac_dots$cache_file" ;;
  esac

  # The eval makes quoting arguments work.
  if eval $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir 
  then :
    echo "$config_subdirs configured properly"
  else
    echo "configure failed for $config_subdirs"
    exit 1
  fi

  cd $ac_popdir

  # grab any updates from the sub-package
  if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi


fi

echo $ac_n "checking for Shared memory support""... $ac_c" 1>&6
echo "configure:4476: checking for Shared memory support" >&5
# Check whether --enable-shmem or --disable-shmem was given.
if test "${enable_shmem+set}" = set; then
  enableval="$enable_shmem"
   
else
  ac_cv_enable_shmem="mm" 
fi


sharedmem="0"
anonymous_shm="0"
filebased_shm="0"
keybased_shm="0"
if test "$ac_cv_enable_shmem" = "mm"; then
  sharedmem="1"
  anonymous_shm="1"
  echo "$ac_t""anonymous" 1>&6
  if test "$USE_MM" = "yes"; then
    LIBTOOL_LIBS="$abs_builddir/shmem/unix/mm/libmm.la"
  fi
elif test "$ac_cv_enable_shmem" = "file"; then
  sharedmem="1"
  filebased_shm="1"
  echo "$ac_t""file based" 1>&6
elif test "$ac_cv_enable_shmem" = "key"; then
  sharedmem="1"
  keybased_shm="1"
  echo "$ac_t""key based" 1>&6
else
  echo "$ac_t""no" 1>&6
fi






  echo $ac_n "checking for MM_SHMT_MMFILE in $srcdir/shmem/unix/mm/mm_conf.h""... $ac_c" 1>&6
echo "configure:4515: checking for MM_SHMT_MMFILE in $srcdir/shmem/unix/mm/mm_conf.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_MM_SHMT_MMFILE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 4521 "configure"
#include "confdefs.h"

    #include <$srcdir/shmem/unix/mm/mm_conf.h>
    #ifdef MM_SHMT_MMFILE
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_MM_SHMT_MMFILE=yes
else
  rm -rf conftest*
  ac_cv_define_MM_SHMT_MMFILE=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_MM_SHMT_MMFILE" 1>&6
  if test "$ac_cv_define_MM_SHMT_MMFILE" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_MM_SHMT_MMFILE 1
EOF

  fi
 

if test "$ac_cv_define_MM_SHMT_MMFILE" = "yes"; then
    file_based="1"
    mem_based="0"
else
    file_based="0"
    mem_based="1"
fi




if test ".$SYS_SW" = ".AIX"; then
    CPPFLAGS="$CPPFLAGS -U__STR__"
    case "$SYS_KV" in
        12*)
            cat >> confdefs.h <<\EOF
#define USEBCOPY 1
EOF

            OSDIR="aix"
            ;;
        3*)
            cat >> confdefs.h <<\EOF
#define NEED_RLIM_T 1
EOF

            OSDIR="aix"
            ;;
        41*)
            cat >> confdefs.h <<\EOF
#define NEED_RLIM_T 1
EOF

            OSDIR="aix"
            ;;
        42*)
            OSDIR="aix"
            ;;
    esac
fi

echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:4594: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4602 "configure"
#include "confdefs.h"
/* 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 gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lnsl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for library containing gethostname""... $ac_c" 1>&6
echo "configure:4642: checking for library containing gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostname="no"
cat > conftest.$ac_ext <<EOF
#line 4649 "configure"
#include "confdefs.h"
/* 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 gethostname();

int main() {
gethostname()
; return 0; }
EOF
if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_gethostname="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_gethostname" = "no" && for i in nsl; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 4671 "configure"
#include "confdefs.h"
/* 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 gethostname();

int main() {
gethostname()
; return 0; }
EOF
if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_gethostname="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_gethostname" 1>&6
if test "$ac_cv_search_gethostname" != "no"; then
  test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS"
  
else :
  
fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:4703: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4711 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
echo "configure:4751: checking for library containing crypt" >&5
if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_crypt="no"
cat > conftest.$ac_ext <<EOF
#line 4758 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int main() {
crypt()
; return 0; }
EOF
if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_crypt="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_crypt" = "no" && for i in crypt ufc; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 4780 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int main() {
crypt()
; return 0; }
EOF
if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_crypt="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_crypt" 1>&6
if test "$ac_cv_search_crypt" != "no"; then
  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
  
else :
  
fi
echo $ac_n "checking for main in -ltruerand""... $ac_c" 1>&6
echo "configure:4812: checking for main in -ltruerand" >&5
ac_lib_var=`echo truerand'_'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="-ltruerand  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4820 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo truerand | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ltruerand $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
echo "configure:4855: checking for iconv in -liconv" >&5
ac_lib_var=`echo iconv'_'iconv | 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="-liconv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4863 "configure"
#include "confdefs.h"
/* 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 iconv();

int main() {
iconv()
; return 0; }
EOF
if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-liconv $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6
echo "configure:4902: checking for modf in -lm" >&5
ac_lib_var=`echo m'_'modf | 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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4910 "configure"
#include "confdefs.h"
/* 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 modf();

int main() {
modf()
; return 0; }
EOF
if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


for ac_func in strcasecmp stricmp setsid nl_langinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4952: 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 <<EOF
#line 4957 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in setrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5007: 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 <<EOF
#line 5012 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_setrlimit="1" 
else
  echo "$ac_t""no" 1>&6
have_setrlimit="0" 
fi
done
 
for ac_func in getrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5063: 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 <<EOF
#line 5068 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_getrlimit="1" 
else
  echo "$ac_t""no" 1>&6
have_getrlimit="0" 
fi
done
 
for ac_func in writev
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5119: 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 <<EOF
#line 5124 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

sendfile="0"
for ac_func in sendfile send_file
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5175: 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 <<EOF
#line 5180 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  sendfile="1" 
else
  echo "$ac_t""no" 1>&6
fi
done



# Check whether --with-sendfile or --without-sendfile was given.
if test "${with_sendfile+set}" = set; then
  withval="$with_sendfile"
   if test "$withval" = "yes"; then
        sendfile="1"
    else
        sendfile="0"
    fi 
else
  
    orig_sendfile=$sendfile
    case "$OS" in
        *freebsd*)
            if test $os_version -le "410"; then
                if test "$threads" = "1"; then
                    sendfile="0"
                fi
            fi
            ;;
        *alpha*-dec-osf* )
            sendfile="0"
            ;;
        s390-*-linux-gnu)
            sendfile="0"
            ;;
    esac       
    if test "$orig_sendfile" != "$sendfile"; then
      echo "sendfile support disabled to avoid system problem"
    fi  
fi



for ac_func in sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5265: 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 <<EOF
#line 5270 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_sigaction="1" 
else
  echo "$ac_t""no" 1>&6
have_sigaction="0" 
fi
done
 
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
echo "configure:5319: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5324 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h.  */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
if { (eval echo configure:5336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_decl_sys_siglist=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_decl_sys_siglist=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
if test $ac_cv_decl_sys_siglist = yes; then
  cat >> confdefs.h <<\EOF
#define SYS_SIGLIST_DECLARED 1
EOF

fi


for ac_func in fork
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5360: 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 <<EOF
#line 5365 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  fork="1" 
else
  echo "$ac_t""no" 1>&6
fork="0" 
fi
done

for ac_func in getpass
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5416: 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 <<EOF
#line 5421 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for inet_addr""... $ac_c" 1>&6
echo "configure:5470: checking for inet_addr" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_addr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 5476 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

int main() {

inet_addr("127.0.0.1");

; return 0; }
EOF
if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_func_inet_addr=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_func_inet_addr=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_func_inet_addr" 1>&6

if test "$ac_cv_func_inet_addr" = "yes"; then
  have_inet_addr=1
else
  have_inet_addr=0
fi


echo $ac_n "checking for inet_network""... $ac_c" 1>&6
echo "configure:5519: checking for inet_network" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_network'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 5525 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

int main() {

inet_network("127.0.0.1");

; return 0; }
EOF
if { (eval echo configure:5541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_func_inet_network=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_func_inet_network=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_func_inet_network" 1>&6

if test "$ac_cv_func_inet_network" = "yes"; then
  have_inet_network=1
else
  have_inet_network=0
fi


echo $ac_n "checking for _getch""... $ac_c" 1>&6
echo "configure:5568: checking for _getch" >&5
if eval "test \"`echo '$''{'ac_cv_func__getch'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5573 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _getch(); below.  */
#include <assert.h>
/* 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 _getch();

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__getch) || defined (__stub____getch)
choke me
#else
_getch();
#endif

; return 0; }
EOF
if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func__getch=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func__getch=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'_getch`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

for ac_func in gmtime_r localtime_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5618: 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 <<EOF
#line 5623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in iconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5673: 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 <<EOF
#line 5678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  iconv="1" 
else
  echo "$ac_t""no" 1>&6
iconv="0" 
fi
done

if test "$iconv" = "1"; then
  
echo $ac_n "checking for type of inbuf parameter to iconv""... $ac_c" 1>&6
echo "configure:5729: checking for type of inbuf parameter to iconv" >&5
if test "x$apr_iconv_inbuf_const" = "x"; then
    if test "x$CFLAGS_WARN" = "x"; then
  apr_tcnw_flags=""
else
  apr_tcnw_flags=$CFLAGS_WARN
fi
if test "$GCC" = "yes"; then 
  apr_tcnw_flags="$apr_tcnw_flags -Werror"
fi

cat > conftest.$ac_ext <<EOTEST
#include "confdefs.h"

    #include <stddef.h>
    #include <iconv.h>
    
int main(int argc, const char * const argv[]) {

    iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
    
; return 0; }
EOTEST

if ${CC-cc} -c $CFLAGS $CPPFLAGS $apr_tcnw_flags conftest.$ac_ext 2>&5 ; then
  rm -rf conftest*
  apr_iconv_inbuf_const="0"
else
  echo "configure: failed or warning program:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  apr_iconv_inbuf_const="1"
fi
rm -f conftest*

fi
if test "$apr_iconv_inbuf_const" = "1"; then
    cat >> confdefs.h <<\EOF
#define APR_ICONV_INBUF_CONST 1
EOF

    msg="const char **"
else
    msg="char **"
fi
echo "$ac_t""$msg" 1>&6

fi
for ac_func in mmap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5780: 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 <<EOF
#line 5785 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  mmap="1" 
else
  echo "$ac_t""no" 1>&6
mmap="0" 
fi
done

if test "$native_mmap_emul" = "1"; then
    mmap="1"
fi
for ac_func in hstrerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5839: 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 <<EOF
#line 5844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5894: 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 <<EOF
#line 5899 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_memmove="1" 
else
  echo "$ac_t""no" 1>&6
have_memmove="0" 
fi
done

for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5950: 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 <<EOF
#line 5955 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done













  echo $ac_n "checking whether sigwait takes one argument""... $ac_c" 1>&6
echo "configure:6015: checking whether sigwait takes one argument" >&5
if eval "test \"`echo '$''{'ac_cv_sigwait_one_arg'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  cat > conftest.$ac_ext <<EOF
#line 6021 "configure"
#include "confdefs.h"

#ifdef __NETBSD__
    /* When using the unproven-pthreads package, we need to pull in this
     * header to get a prototype for sigwait().  Else things will fail later
     * on.  XXX Should probably be fixed in the unproven-pthreads package.
     */
#include <pthread.h>
#endif
#include <signal.h>

int main() {

  sigset_t set;
 
  sigwait(&set);

; return 0; }
EOF
if { (eval echo configure:6041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
  ac_cv_sigwait_one_arg=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
  ac_cv_sigwait_one_arg=no

fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_sigwait_one_arg" 1>&6
  if test "$ac_cv_sigwait_one_arg" = "yes"; then
    cat >> confdefs.h <<\EOF
#define SIGWAIT_TAKES_ONE_ARG 1
EOF

  fi


echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:6067: 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 <<EOF
#line 6072 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 6097 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 6115 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 6136 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi



for ac_hdr in ByteOrder.h		\
    conio.h		\
    crypt.h		\
    ctype.h		\
    dir.h		\
    dirent.h		\
    dl.h		\
    dlfcn.h		\
    errno.h		\
    fcntl.h		\
    grp.h		\
    iconv.h		\
    io.h		\
    langinfo.h		\
    limits.h		\
    malloc.h		\
    memory.h		\
    netdb.h		\
    osreldate.h		\
    poll.h		\
    process.h		\
    pwd.h		\
    signal.h		\
    stdarg.h		\
    stddef.h		\
    stdio.h		\
    stdlib.h		\
    string.h		\
    strings.h		\
    sysapi.h		\
    sysgtime.h		\
    termios.h		\
    time.h		\
    tpfeq.h		\
    tpfio.h		\
    unistd.h		\
    unix.h		\
    arpa/inet.h		\
    kernel/OS.h		\
    net/errno.h		\
    netinet/in.h	\
    sys/file.h		\
    sys/mman.h		\
    sys/poll.h		\
    sys/resource.h	\
    sys/select.h	\
    sys/sem.h		\
    sys/sendfile.h	\
    sys/signal.h	\
    sys/socket.h	\
    sys/stat.h		\
    sys/syslimits.h	\
    sys/time.h		\
    sys/types.h		\
    sys/uio.h		\
    sys/wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6231: 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
#line 6236 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for aprt_i in ByteOrder.h		\
    conio.h		\
    crypt.h		\
    ctype.h		\
    dir.h		\
    dirent.h		\
    dl.h		\
    dlfcn.h		\
    errno.h		\
    fcntl.h		\
    grp.h		\
    iconv.h		\
    io.h		\
    langinfo.h		\
    limits.h		\
    malloc.h		\
    memory.h		\
    netdb.h		\
    osreldate.h		\
    poll.h		\
    process.h		\
    pwd.h		\
    signal.h		\
    stdarg.h		\
    stddef.h		\
    stdio.h		\
    stdlib.h		\
    string.h		\
    strings.h		\
    sysapi.h		\
    sysgtime.h		\
    termios.h		\
    time.h		\
    tpfeq.h		\
    tpfio.h		\
    unistd.h		\
    unix.h		\
    arpa/inet.h		\
    kernel/OS.h		\
    net/errno.h		\
    netinet/in.h	\
    sys/file.h		\
    sys/mman.h		\
    sys/poll.h		\
    sys/resource.h	\
    sys/select.h	\
    sys/sem.h		\
    sys/sendfile.h	\
    sys/signal.h	\
    sys/socket.h	\
    sys/stat.h		\
    sys/syslimits.h	\
    sys/time.h		\
    sys/types.h		\
    sys/uio.h		\
    sys/wait.h
do
    ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
    aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g'`
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
       eval "$aprt_2=1"
    else
       eval "$aprt_2=0"
    fi
done


echo $ac_n "checking for netinet/tcp.h""... $ac_c" 1>&6
echo "configure:6335: checking for netinet/tcp.h" >&5
cat > conftest.$ac_ext <<EOF
#line 6337 "configure"
#include "confdefs.h"

#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <netinet/tcp.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  netinet_tcph="1"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  netinet_tcph="0"
fi
rm -f conftest*
if test $netinet_tcph = 1; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi






























if test "$netdbh" = "1"; then
  
  echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6
echo "configure:6398: checking for h_errno in netdb.h" >&5
  if eval "test \"`echo '$''{'ac_cv_h_errno_cppflags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    
  if test x != x; then
    CPPFLAGS="-D $CPPFLAGS"
  fi
  cat > conftest.$ac_ext <<EOF
#line 6408 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

int main() {

int h_e = h_errno;

; return 0; }
EOF
if { (eval echo configure:6424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
  if test x != x; then
    ac_cv_h_errno_cppflags=""
  else
    ac_cv_h_errno_cppflags=yes
  fi

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
  ac_cv_h_errno_cppflags=no

fi
rm -f conftest*
    if test "$ac_cv_h_errno_cppflags" = "no"; then
      ac_save="$CPPFLAGS"
      for flag in _XOPEN_SOURCE_EXTENDED; do
        
  if test x$flag != x; then
    CPPFLAGS="-D$flag $CPPFLAGS"
  fi
  cat > conftest.$ac_ext <<EOF
#line 6450 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

int main() {

int h_e = h_errno;

; return 0; }
EOF
if { (eval echo configure:6466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
  if test x$flag != x; then
    ac_cv_h_errno_cppflags="$flag"
  else
    ac_cv_h_errno_cppflags=yes
  fi

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
  ac_cv_h_errno_cppflags=no

fi
rm -f conftest*
        if test "$ac_cv_h_errno_cppflags" != "no"; then
          break
        fi
      done
      CPPFLAGS="$ac_save"
    fi
  
fi

  if test "$ac_cv_h_errno_cppflags" != "no"; then
    if test "$ac_cv_h_errno_cppflags" != "yes"; then
      CPPFLAGS="-D$ac_cv_h_errno_cppflags $CPPFLAGS"
      echo "$ac_t""yes, with -D$ac_cv_h_errno_cppflags" 1>&6
    else
      echo "$ac_t""$ac_cv_h_errno_cppflags" 1>&6
    fi
  else
    echo "$ac_t""$ac_cv_h_errno_cppflags" 1>&6
  fi

  if test "$ac_cv_h_errno_cflags" = "no"; then
    { echo "configure: error: can not find h_errno in netdb.h" 1>&2; exit 1; }
  fi
fi

echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:6510: 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 <<EOF
#line 6515 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.h <<\EOF
#define off_t long
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:6543: 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 <<EOF
#line 6548 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:6576: 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 <<EOF
#line 6581 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_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_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:6609: 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
#line 6614 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_type_uid_t" 1>&6
if test $ac_cv_type_uid_t = no; then
  cat >> confdefs.h <<\EOF
#define uid_t int
EOF

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi

echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
echo "configure:6643: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6648 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_ssize_t=yes
else
  rm -rf conftest*
  ac_cv_type_ssize_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
if test $ac_cv_type_ssize_t = no; then
  cat >> confdefs.h <<\EOF
#define ssize_t int
EOF

fi

echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:6676: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
#line 6683 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:6690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:6716: 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 <<EOF
#line 6721 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:6791: 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 <<EOF
#line 6796 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_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_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:6824: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 6832 "configure"
#include "confdefs.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

/*
 * If this system has a BSD-style setpgrp, which takes arguments, exit
 * successfully.
 */
main()
{
    if (setpgrp(1,1) == -1)
	exit(0);
    else
	exit(1);
}

EOF
if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_setpgrp_void=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_setpgrp_void=yes
fi
rm -fr conftest*
fi


fi

echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
if test $ac_cv_func_setpgrp_void = yes; then
  cat >> confdefs.h <<\EOF
#define SETPGRP_VOID 1
EOF

fi



echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
echo "configure:6878: checking for socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 6884 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

int main() {

socklen_t foo = (socklen_t) 0;

; return 0; }
EOF
if { (eval echo configure:6900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_socklen_t=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_socklen_t=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_socklen_t" 1>&6

if test "$ac_cv_socklen_t" = "yes"; then
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKLEN_T 1
EOF

fi



  echo $ac_n "checking whether system defines INADDR_NONE""... $ac_c" 1>&6
echo "configure:6929: checking whether system defines INADDR_NONE" >&5
if eval "test \"`echo '$''{'ac_cv_inaddr_none'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  cat > conftest.$ac_ext <<EOF
#line 6935 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

int main() {

unsigned long foo = INADDR_NONE;

; return 0; }
EOF
if { (eval echo configure:6957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_inaddr_none=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_inaddr_none=no

fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_inaddr_none" 1>&6
  if test "$ac_cv_inaddr_none" = "no"; then
    apr_inaddr_none="((unsigned int) 0xffffffff)"
  else
    apr_inaddr_none="INADDR_NONE"
  fi


echo $ac_n "checking size of char""... $ac_c" 1>&6
echo "configure:6982: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 6990 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(char));
  exit(0);
}
EOF
if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
EOF


echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:7021: 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
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 7029 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  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 <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:7060: 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
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 7068 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:7079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  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 <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:7099: 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
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 7107 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:7118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  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 <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:7138: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=12
else
  cat > conftest.$ac_ext <<EOF
#line 7146 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:7177: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 7185 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF



if test "$ac_cv_sizeof_short" = "2"; then
    short_value=short
fi
if test "$ac_cv_sizeof_int" = "4"; then
    int_value=int
fi
if test "$ac_cv_sizeof_long" = "8"; then
    long_value=long
fi
if test "$ac_cv_sizeof_long_double" = "8"; then
    long_value="long double"
fi
if test "$ac_cv_sizeof_long_long" = "8"; then
    if test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_long"; then
        long_value="long"
    else
        long_value="long long"
    fi
fi
if test "$ac_cv_sizeof_longlong" = "8"; then
    long_value="__int64"
fi

if test "$ac_cv_type_off_t" = "yes"; then
    off_t_value="off_t"
else
    off_t_value="apr_int32_t"
fi
if test "$ac_cv_type_size_t" = "yes"; then
    size_t_value="size_t"
else
    size_t_value="apr_int32_t"
fi
if test "$ac_cv_type_ssize_t" = "yes"; then
    ssize_t_value="ssize_t"
else
    ssize_t_value="apr_int32_t"
fi
if test "$ac_cv_socklen_t" = "yes"; then
    socklen_t_value="socklen_t"
else
    socklen_t_value="int"
fi

echo $ac_n "checking size of ssize_t""... $ac_c" 1>&6
echo "configure:7261: checking size of ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_ssize_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_ssize_t=8
else
  cat > conftest.$ac_ext <<EOF
#line 7269 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(ssize_t));
  exit(0);
}
EOF
if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_ssize_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_ssize_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
EOF



if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
    ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then
    ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
else
    ssize_t_fmt='#error Can not determine the proper size for ssize_t'
fi

echo $ac_n "checking size of size_t""... $ac_c" 1>&6
echo "configure:7310: checking size of size_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_size_t=8
else
  cat > conftest.$ac_ext <<EOF
#line 7318 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stddef.h>
main()
{
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(size_t));
  exit(0);
}
EOF
if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_size_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_size_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
EOF



if test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_int"; then
    size_t_fmt='#define APR_SIZE_T_FMT "d"'
elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long"; then
    size_t_fmt='#define APR_SIZE_T_FMT "ld"'
else
    size_t_fmt='#error Can not determine the proper size for size_t'
fi

echo $ac_n "checking size of off_t""... $ac_c" 1>&6
echo "configure:7359: checking size of off_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_off_t=8
else
  cat > conftest.$ac_ext <<EOF
#line 7367 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(off_t));
  exit(0);
}
EOF
if { (eval echo configure:7379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_off_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_off_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
EOF



if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
    off_t_fmt='#define APR_OFF_T_FMT "d"'
elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then
    off_t_fmt='#define APR_OFF_T_FMT "ld"'
elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
    off_t_fmt='#define APR_OFF_T_FMT "qd"'
else
    off_t_fmt='#error Can not determine the proper size for off_t'
fi

echo $ac_n "checking size of pid_t""... $ac_c" 1>&6
echo "configure:7410: checking size of pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_pid_t=8
else
  cat > conftest.$ac_ext <<EOF
#line 7418 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(pid_t));
  exit(0);
}
EOF
if { (eval echo configure:7430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_pid_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_pid_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_pid_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
EOF



if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then
    os_proc_t_fmt='#define APR_OS_PROC_T_FMT "d"'
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then
    os_proc_t_fmt='#define APR_OS_PROC_T_FMT "ld"'
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then
    os_proc_t_fmt='#define APR_OS_PROC_T_FMT "qd"'
else
    os_proc_t_fmt='#error Can not determine the proper size for pid_t'
fi

# Basically, we have tried to figure out the correct format strings
# for APR types which vary between platforms, but we don't always get 
# it right.  If you find that we don't get it right for your platform, 
# you can override our decision below.
case "$OS" in
   *linux* | *os2_emx)
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       ;;
   *-solaris*)
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       os_proc_t_fmt='#define APR_OS_PROC_T_FMT "ld"'
       ;;
   *aix4*)
       ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
       size_t_fmt='#define APR_SIZE_T_FMT "ld"'
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       ;;
    *beos*)
        ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
        size_t_fmt='#define APR_SIZE_T_FMT "ld"'
        ;;
esac








 

 


for ac_func in strnicmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7498: 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 <<EOF
#line 7503 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_strnicmp="1"
else
  echo "$ac_t""no" 1>&6
have_strnicmp="0"
fi
done

for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7554: 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 <<EOF
#line 7559 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_strncasecmp="1"
else
  echo "$ac_t""no" 1>&6
have_strncasecmp="0"
fi
done

for ac_func in stricmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7610: 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 <<EOF
#line 7615 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_stricmp="1"
else
  echo "$ac_t""no" 1>&6
have_stricmp="0"
fi
done

for ac_func in strcasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7666: 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 <<EOF
#line 7671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_strcasecmp="1"
else
  echo "$ac_t""no" 1>&6
have_strcasecmp="0"
fi
done

for ac_func in strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7722: 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 <<EOF
#line 7727 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_strdup="1"
else
  echo "$ac_t""no" 1>&6
have_strdup="0"
fi
done

for ac_func in strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7778: 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 <<EOF
#line 7783 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_strstr="1"
else
  echo "$ac_t""no" 1>&6
have_strstr="0"
fi
done









echo $ac_n "${nl}Checking for DSO...${nl}"
# Check whether --enable-dso or --disable-dso was given.
if test "${enable_dso+set}" = set; then
  enableval="$enable_dso"
   tempdso=$enableval
else
   
    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:7847: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | 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="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7855 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   tempdso="yes" LIBS="$LIBS -ldl" 
else
  echo "$ac_t""no" 1>&6
tempdso="no"
fi

    if test "$tempdso" = "no"; then
      for ac_func in dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7891: 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 <<EOF
#line 7896 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:7919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  tempdso="yes" 
else
  echo "$ac_t""no" 1>&6
tempdso="no" 
fi
done

    fi
    if test "$tempdso" = "no"; then
      echo $ac_n "checking for load_image in -lroot""... $ac_c" 1>&6
echo "configure:7947: checking for load_image in -lroot" >&5
ac_lib_var=`echo root'_'load_image | 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="-lroot  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7955 "configure"
#include "confdefs.h"
/* 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 load_image();

int main() {
load_image()
; return 0; }
EOF
if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  tempdso="yes"
else
  echo "$ac_t""no" 1>&6
tempdso="no"
fi

    fi
    if test "$tempdso" = "no"; then
      echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
echo "configure:7990: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | 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="-ldld  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7998 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shl_load();

int main() {
shl_load()
; return 0; }
EOF
if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   tempdso="yes" LIBS="$LIBS -ldld" 
else
  echo "$ac_t""no" 1>&6
tempdso="no"
fi

    fi
    if test "$tempdso" = "no"; then
        case $OS in
            *os390|*-os2*)
                tempdso="yes"
                ;;
        esac
    fi
  
fi


if test "$tempdso" = "no"; then
    aprdso="0"
else
    aprdso="1"
    apr_modules="$apr_modules dso"
fi



echo $ac_n "${nl}Checking for Processes...${nl}"

for ac_func in waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8056: 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 <<EOF
#line 8061 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# Check whether --enable-other-child or --disable-other-child was given.
if test "${enable_other_child+set}" = set; then
  enableval="$enable_other_child"
   if test "$enableval" = "yes"; then
        oc="1"
    else
        oc="0"
    fi 
else
   oc=1  
fi
 
  
 

echo $ac_n "checking struct rlimit""... $ac_c" 1>&6
echo "configure:8125: checking struct rlimit" >&5
if eval "test \"`echo '$''{'ac_cv_struct_rlimit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  
    ac_cv_struct_rlimit=no  
else
  cat > conftest.$ac_ext <<EOF
#line 8135 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
main()
{
    struct rlimit limit;
    limit.rlim_cur = 0;
    limit.rlim_max = 0;
    exit(0);
}
EOF
if { (eval echo configure:8149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
    ac_cv_struct_rlimit=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    ac_cv_struct_rlimit=no 
fi
rm -fr conftest*
fi
  
fi

echo "$ac_t""$ac_cv_struct_rlimit" 1>&6
struct_rlimit=0
test "x$ac_cv_struct_rlimit" = xyes && struct_rlimit=1


echo $ac_n "${nl}Checking for Locking...${nl}"

for ac_func in semget semctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8175: 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 <<EOF
#line 8180 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# It's stupid, but not all platforms have union semun, even those that need it.
echo $ac_n "checking for union semun in sys/sem.h""... $ac_c" 1>&6
echo "configure:8230: checking for union semun in sys/sem.h" >&5
cat > conftest.$ac_ext <<EOF
#line 8232 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>

int main() {

union semun arg;
semctl(0, 0, 0, arg);

; return 0; }
EOF
if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  have_union_semun="1" union_semun=yes 
msg=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
have_union_semun="0"
msg=no  
fi
rm -f conftest*
echo "$ac_t""$msg" 1>&6



  echo $ac_n "checking for LOCK_EX in sys/file.h""... $ac_c" 1>&6
echo "configure:8264: checking for LOCK_EX in sys/file.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_LOCK_EX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8270 "configure"
#include "confdefs.h"

    #include <sys/file.h>
    #ifdef LOCK_EX
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_LOCK_EX=yes
else
  rm -rf conftest*
  ac_cv_define_LOCK_EX=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_LOCK_EX" 1>&6
  if test "$ac_cv_define_LOCK_EX" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_LOCK_EX 1
EOF

  fi


  echo $ac_n "checking for F_SETLK in fcntl.h""... $ac_c" 1>&6
echo "configure:8302: checking for F_SETLK in fcntl.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_F_SETLK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8308 "configure"
#include "confdefs.h"

    #include <fcntl.h>
    #ifdef F_SETLK
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_F_SETLK=yes
else
  rm -rf conftest*
  ac_cv_define_F_SETLK=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_F_SETLK" 1>&6
  if test "$ac_cv_define_F_SETLK" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_F_SETLK 1
EOF

  fi


  echo $ac_n "checking for CODESET in langinfo.h""... $ac_c" 1>&6
echo "configure:8340: checking for CODESET in langinfo.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_CODESET'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8346 "configure"
#include "confdefs.h"

    #include <langinfo.h>
    #ifdef CODESET
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_CODESET=yes
else
  rm -rf conftest*
  ac_cv_define_CODESET=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_CODESET" 1>&6
  if test "$ac_cv_define_CODESET" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_CODESET 1
EOF

  fi


# We are assuming that if the platform doesn't have POLLIN, it doesn't have
# any POLL definitions.

  echo $ac_n "checking for POLLIN in poll.h sys/poll.h""... $ac_c" 1>&6
echo "configure:8381: checking for POLLIN in poll.h sys/poll.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_POLLIN'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    ac_cv_define_POLLIN=no
    for curhdr in poll.h sys/poll.h
    do
      cat > conftest.$ac_ext <<EOF
#line 8390 "configure"
#include "confdefs.h"

      #include <$curhdr>
      #ifdef POLLIN
      YES_IS_DEFINED
      #endif
      
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_POLLIN=yes
fi
rm -f conftest*

    done
  
fi

echo "$ac_t""$ac_cv_define_POLLIN" 1>&6
  if test "$ac_cv_define_POLLIN" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_POLLIN 1
EOF

  fi


if test "$threads" = "1"; then
    
  echo $ac_n "checking for PTHREAD_PROCESS_SHARED in pthread.h""... $ac_c" 1>&6
echo "configure:8422: checking for PTHREAD_PROCESS_SHARED in pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_PTHREAD_PROCESS_SHARED'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8428 "configure"
#include "confdefs.h"

    #include <pthread.h>
    #ifdef PTHREAD_PROCESS_SHARED
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_PTHREAD_PROCESS_SHARED=yes
else
  rm -rf conftest*
  ac_cv_define_PTHREAD_PROCESS_SHARED=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_PTHREAD_PROCESS_SHARED" 1>&6
  if test "$ac_cv_define_PTHREAD_PROCESS_SHARED" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_PTHREAD_PROCESS_SHARED 1
EOF

  fi

fi

# The last APR_DECIDE to execute sets the default
ac_decision_item='apr_lock implementation method'
ac_decision_msg='FAILED'
ac_decision=''

ac_rc=yes
for ac_spec in func:semget func:semctl; do
    ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
    ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
    case $ac_type in
        header )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_header_$ac_item"
            ;;
        file )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_file_$ac_item"
            ;;
        func )   ac_var="ac_cv_func_$ac_item"   ;;
        define ) ac_var="ac_cv_define_$ac_item" ;;
        custom ) ac_var="$ac_item" ;;
    esac
    eval "ac_val=\$$ac_var"
    if test ".$ac_val" != .yes; then
        ac_rc=no
        break
    fi
done
if test ".$ac_rc" = .yes; then
    :
    ac_decision='USE_SYSVSEM_SERIALIZE'
ac_decision_msg='SysV IPC semget()'
ac_decision_USE_SYSVSEM_SERIALIZE=yes
ac_decision_USE_SYSVSEM_SERIALIZE_msg='SysV IPC semget()'

else
    :
    
fi

ac_rc=yes
for ac_spec in header:sys/file.h define:LOCK_EX; do
    ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
    ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
    case $ac_type in
        header )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_header_$ac_item"
            ;;
        file )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_file_$ac_item"
            ;;
        func )   ac_var="ac_cv_func_$ac_item"   ;;
        define ) ac_var="ac_cv_define_$ac_item" ;;
        custom ) ac_var="$ac_item" ;;
    esac
    eval "ac_val=\$$ac_var"
    if test ".$ac_val" != .yes; then
        ac_rc=no
        break
    fi
done
if test ".$ac_rc" = .yes; then
    :
    ac_decision='USE_FLOCK_SERIALIZE'
ac_decision_msg='4.2BSD-style flock()'
ac_decision_USE_FLOCK_SERIALIZE=yes
ac_decision_USE_FLOCK_SERIALIZE_msg='4.2BSD-style flock()'

else
    :
    
fi

ac_rc=yes
for ac_spec in header:fcntl.h define:F_SETLK; do
    ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
    ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
    case $ac_type in
        header )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_header_$ac_item"
            ;;
        file )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_file_$ac_item"
            ;;
        func )   ac_var="ac_cv_func_$ac_item"   ;;
        define ) ac_var="ac_cv_define_$ac_item" ;;
        custom ) ac_var="$ac_item" ;;
    esac
    eval "ac_val=\$$ac_var"
    if test ".$ac_val" != .yes; then
        ac_rc=no
        break
    fi
done
if test ".$ac_rc" = .yes; then
    :
    ac_decision='USE_FCNTL_SERIALIZE'
ac_decision_msg='SVR4-style fcntl()'
ac_decision_USE_FCNTL_SERIALIZE=yes
ac_decision_USE_FCNTL_SERIALIZE_msg='SVR4-style fcntl()'

else
    :
    
fi

ac_rc=yes
for ac_spec in header:pthread.h define:PTHREAD_PROCESS_SHARED             custom:with_pthread_cross; do
    ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
    ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
    case $ac_type in
        header )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_header_$ac_item"
            ;;
        file )
            ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
            ac_var="ac_cv_file_$ac_item"
            ;;
        func )   ac_var="ac_cv_func_$ac_item"   ;;
        define ) ac_var="ac_cv_define_$ac_item" ;;
        custom ) ac_var="$ac_item" ;;
    esac
    eval "ac_val=\$$ac_var"
    if test ".$ac_val" != .yes; then
        ac_rc=no
        break
    fi
done
if test ".$ac_rc" = .yes; then
    :
    ac_decision='USE_PROC_PTHREAD_SERIALIZE'
ac_decision_msg='pthread mutex'
ac_decision_USE_PROC_PTHREAD_SERIALIZE=yes
ac_decision_USE_PROC_PTHREAD_SERIALIZE_msg='pthread mutex'

else
    :
    
fi

if test "x$apr_lock_method" != "x"; then
    ac_decision="$apr_lock_method"
eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""

fi
if test ".$ac_decision" = .; then
    echo "$0:Error: decision on $ac_decision_item failed" 1>&2
    exit 1
else
    if test ".$ac_decision_msg" = .; then
        ac_decision_msg="$ac_decision"
    fi
    cat >> confdefs.h <<EOF
#define ${ac_decision_item} 1
EOF

    echo "$ac_t""decision on $ac_decision_item... $ac_decision_msg" 1>&6
fi

cat >> confdefs.h <<EOF
#define $ac_decision 1
EOF


flockser="0"
sysvser="0"
procpthreadser="0"
fcntlser="0"
case $ac_decision in
    USE_FLOCK_SERIALIZE )
        flockser="1"
        ;;
    USE_SYSVSEM_SERIALIZE )
        sysvser="1"
        ;;
    USE_FCNTL_SERIALIZE )
        fcntlser="1"
        ;;
    USE_PROC_PTHREAD_SERIALIZE )
        procpthreadser="1"
        ;;
esac







echo $ac_n "checking if interprocess lock affects threads""... $ac_c" 1>&6
echo "configure:8655: checking if interprocess lock affects threads" >&5
if test "x$apr_process_lock_is_global" = "xyes"; then
    proclockglobal="1"
    echo "$ac_t""yes" 1>&6
else
    proclockglobal="0"
    echo "$ac_t""no" 1>&6
fi



echo $ac_n "checking for /dev/random""... $ac_c" 1>&6
echo "configure:8667: checking for /dev/random" >&5

if test -r "/dev/random"; then
    cat >> confdefs.h <<\EOF
#define DEV_RANDOM /dev/random
EOF

    echo "$ac_t""/dev/random" 1>&6
    rand="1"
elif test -r "/dev/urandom"; then
    cat >> confdefs.h <<\EOF
#define DEV_RANDOM /dev/urandom
EOF

    echo "$ac_t""/dev/urandom" 1>&6
    rand="1"
else
    echo "$ac_t""not found" 1>&6;

    case "$OS" in
        # we have built in support for OS/2
        *-os2*)
            rand="1"
            ;;
        # no other choice, try for truerand
        *)
            if test "$ac_cv_lib_truerand_main" = "yes"; then
                rand="1"
            else
                rand="0"
            fi
            ;;
    esac
fi


echo $ac_n "${nl}Checking for Time Support...${nl}"
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
echo "configure:8705: checking for tm_gmtoff in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8710 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
int main() {
struct tm tm; tm.tm_gmtoff;
; return 0; }
EOF
if { (eval echo configure:8718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm_gmtoff=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_tm_gmtoff=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_tm_gmtoff" 1>&6

if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_GMTOFF 1
EOF

fi

echo $ac_n "${nl}Checking for Networking support...${nl}"
echo $ac_n "checking for in_addr in netinet/in.h""... $ac_c" 1>&6
echo "configure:8741: checking for in_addr in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
#line 8743 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <netinet/in.h>

int main() {

struct in_addr arg;
arg.s_addr = htonl(INADDR_ANY);

; return 0; }
EOF
if { (eval echo configure:8756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
   have_in_addr="1" 
msg=yes  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   have_in_addr="0"
msg=no 
fi
rm -f conftest*
echo "$ac_t""$msg" 1>&6

echo $ac_n "checking "if fd == socket on this platform"""... $ac_c" 1>&6
echo "configure:8771: checking "if fd == socket on this platform"" >&5
if test "x$file_as_socket" = "x" ; then
    file_as_socket="1";
    echo "yes"
else
    echo "no"
fi





echo $ac_n "checking for sockaddr sa_len""... $ac_c" 1>&6
echo "configure:8784: checking for sockaddr sa_len" >&5
if eval "test \"`echo '$''{'ac_cv_define_sockaddr_sa_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 8790 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif

int main() {

struct sockaddr_in sai;
int i = sai.sin_len;

; return 0; }
EOF
if { (eval echo configure:8807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
  ac_cv_define_sockaddr_sa_len=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
  ac_cv_define_sockaddr_sa_len=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_define_sockaddr_sa_len" 1>&6

if test "$ac_cv_define_sockaddr_sa_len" = "yes"; then
  cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1 
EOF

fi



  echo $ac_n "checking for gethostbyname() which handles numeric address strings""... $ac_c" 1>&6
echo "configure:8836: checking for gethostbyname() which handles numeric address strings" >&5
if eval "test \"`echo '$''{'ac_cv_gethostbyname_nas'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_gethostbyname_nas="yes"

else
  cat > conftest.$ac_ext <<EOF
#line 8847 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
void main(void) {
    struct hostent *he = gethostbyname("127.0.0.1");
    if (he == NULL) {
        exit(1);
    }
    else {
        exit(0);
    }
}

EOF
if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
  ac_cv_gethostbyname_nas="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  ac_cv_gethostbyname_nas="no"

fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_gethostbyname_nas" 1>&6
if test "$ac_cv_gethostbyname_nas" = "yes"; then
  cat >> confdefs.h <<\EOF
#define GETHOSTBYNAME_HANDLES_NAS 1
EOF

fi



  echo $ac_n "checking for TCP_CORK in netinet/tcp.h""... $ac_c" 1>&6
echo "configure:8905: checking for TCP_CORK in netinet/tcp.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_TCP_CORK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8911 "configure"
#include "confdefs.h"

    #include <netinet/tcp.h>
    #ifdef TCP_CORK
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_TCP_CORK=yes
else
  rm -rf conftest*
  ac_cv_define_TCP_CORK=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_TCP_CORK" 1>&6
  if test "$ac_cv_define_TCP_CORK" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_TCP_CORK 1
EOF

  fi


  echo $ac_n "checking for TCP_NOPUSH in netinet/tcp.h""... $ac_c" 1>&6
echo "configure:8943: checking for TCP_NOPUSH in netinet/tcp.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_TCP_NOPUSH'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 8949 "configure"
#include "confdefs.h"

    #include <netinet/tcp.h>
    #ifdef TCP_NOPUSH
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_TCP_NOPUSH=yes
else
  rm -rf conftest*
  ac_cv_define_TCP_NOPUSH=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_TCP_NOPUSH" 1>&6
  if test "$ac_cv_define_TCP_NOPUSH" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_TCP_NOPUSH 1
EOF

  fi

apr_tcp_nopush_flag="0"
have_corkable_tcp="0"
if test "x$ac_cv_define_TCP_CORK" = "xyes"; then
    apr_tcp_nopush_flag="TCP_CORK"
    have_corkable_tcp="1"
else
    case $OS in
        *linux*)
            cat > conftest.$ac_ext <<EOF
#line 8988 "configure"
#include "confdefs.h"

                #include <linux/socket.h>
                #ifdef TCP_CORK
                yes
                #endif
            
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  
                apr_tcp_nopush_flag="3"
                have_corkable_tcp="1"
            
fi
rm -f conftest*

            ;;
        *)
            ;;
    esac
fi
if test "x$ac_cv_define_TCP_NOPUSH" = "xyes"; then
    apr_tcp_nopush_flag="TCP_NOPUSH"
    have_corkable_tcp="1"
fi


  echo $ac_n "checking for SO_ACCEPT_FILTER in sys/socket.h""... $ac_c" 1>&6
echo "configure:9019: checking for SO_ACCEPT_FILTER in sys/socket.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_SO_ACCEPT_FILTER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 9025 "configure"
#include "confdefs.h"

    #include <sys/socket.h>
    #ifdef SO_ACCEPT_FILTER
    YES_IS_DEFINED
    #endif
    
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_define_SO_ACCEPT_FILTER=yes
else
  rm -rf conftest*
  ac_cv_define_SO_ACCEPT_FILTER=no
fi
rm -f conftest*

  
fi

echo "$ac_t""$ac_cv_define_SO_ACCEPT_FILTER" 1>&6
  if test "$ac_cv_define_SO_ACCEPT_FILTER" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_SO_ACCEPT_FILTER 1
EOF

  fi

if test "x$ac_cv_define_SO_ACCEPT_FILTER" = "xyes"; then
    accept_filter="1"
else
    accept_filter="0"
fi





echo $ac_n "${nl}Checking for IPv6 Networking support...${nl}"

echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
echo "configure:9068: checking for library containing getaddrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getaddrinfo="no"
cat > conftest.$ac_ext <<EOF
#line 9075 "configure"
#include "confdefs.h"
/* 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 getaddrinfo();

int main() {
getaddrinfo()
; return 0; }
EOF
if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_getaddrinfo="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_getaddrinfo" = "no" && for i in inet6; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 9097 "configure"
#include "confdefs.h"
/* 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 getaddrinfo();

int main() {
getaddrinfo()
; return 0; }
EOF
if { (eval echo configure:9108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_getaddrinfo="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
if test "$ac_cv_search_getaddrinfo" != "no"; then
  test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
  
else :
  
fi

echo $ac_n "checking for library containing getnameinfo""... $ac_c" 1>&6
echo "configure:9130: checking for library containing getnameinfo" >&5
if eval "test \"`echo '$''{'ac_cv_search_getnameinfo'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getnameinfo="no"
cat > conftest.$ac_ext <<EOF
#line 9137 "configure"
#include "confdefs.h"
/* 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 getnameinfo();

int main() {
getnameinfo()
; return 0; }
EOF
if { (eval echo configure:9148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_getnameinfo="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_getnameinfo" = "no" && for i in inet6; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 9159 "configure"
#include "confdefs.h"
/* 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 getnameinfo();

int main() {
getnameinfo()
; return 0; }
EOF
if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_getnameinfo="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_getnameinfo" 1>&6
if test "$ac_cv_search_getnameinfo" != "no"; then
  test "$ac_cv_search_getnameinfo" = "none required" || LIBS="$ac_cv_search_getnameinfo $LIBS"
  
else :
  
fi

  echo $ac_n "checking for working getaddrinfo""... $ac_c" 1>&6
echo "configure:9192: checking for working getaddrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_working_getaddrinfo'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_working_getaddrinfo="yes"

else
  cat > conftest.$ac_ext <<EOF
#line 9203 "configure"
#include "confdefs.h"

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

void main(void) {
    struct addrinfo hints, *ai;
    int error;

    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;
    error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
    if (error) {
        exit(1);
    }
    else {
        exit(0);
    }
}

EOF
if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
  ac_cv_working_getaddrinfo="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  ac_cv_working_getaddrinfo="no"

fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_working_getaddrinfo" 1>&6
if test "$ac_cv_working_getaddrinfo" = "yes"; then
  cat >> confdefs.h <<\EOF
#define HAVE_GETADDRINFO 1
EOF

fi

for ac_func in getnameinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9265: 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 <<EOF
#line 9270 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getipnodebyname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9320: 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 <<EOF
#line 9325 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getipnodebyaddr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9375: 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 <<EOF
#line 9380 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* 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:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for sockaddr_in6""... $ac_c" 1>&6
echo "configure:9429: checking for sockaddr_in6" >&5
if eval "test \"`echo '$''{'ac_cv_define_sockaddr_in6'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 9435 "configure"
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif

int main() {

struct sockaddr_in6 sa;

; return 0; }
EOF
if { (eval echo configure:9451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    ac_cv_define_sockaddr_in6=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    ac_cv_define_sockaddr_in6=no

fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_define_sockaddr_in6" 1>&6

if test "$ac_cv_define_sockaddr_in6" = "yes"; then
  have_sockaddr_in6=1
else
  have_sockaddr_in6=0
fi

echo $ac_n "checking if APR supports IPv6""... $ac_c" 1>&6
echo "configure:9477: checking if APR supports IPv6" >&5
have_ipv6="0"
if test "x$have_sockaddr_in6" = "x1"; then
    if test "x$ac_cv_working_getaddrinfo" = "xyes"; then
        if test "x$ac_cv_func_getnameinfo" = "xyes"; then
            have_ipv6="1"
            echo "$ac_t"""yes"" 1>&6
        else
            echo "$ac_t"""no -- no getnameinfo"" 1>&6
        fi
    else
        echo "$ac_t"""no -- no working getaddrinfo"" 1>&6
    fi
else
    echo "$ac_t"""no -- no sockaddr_in6"" 1>&6;
fi














echo "${nl}Construct Makefiles and header files."
MAKEFILE1="Makefile lib/Makefile strings/Makefile passwd/Makefile tables/Makefile"
SUBDIRS="lib strings passwd tables "
for dir in $apr_modules
do
    test -d $dir || $MKDIR $dir
    if test -f $srcdir/$dir/$OSDIR/Makefile.in; then
        MAKEFILE2="$MAKEFILE2 $dir/$OSDIR/Makefile "
        SUBDIRS="$SUBDIRS $dir/$OSDIR "
    else
        MAKEFILE2="$MAKEFILE2 $dir/$DEFAULT_OSDIR/Makefile "
        SUBDIRS="$SUBDIRS $dir/$DEFAULT_OSDIR "
    fi
done

if test -d ./test; then
    MAKEFILE3="test/Makefile"
fi


case "$host_alias" in
*bsdi*)
    # Check whether they've installed GNU make
    if make --version > /dev/null 2>&1; then 
	INCLUDE_RULES="include $apr_buildout/rules.mk"
    else
	# BSDi make
	INCLUDE_RULES=".include \"$apr_buildout/rules.mk\""
    fi
    ;;
*)
    INCLUDE_RULES="include $apr_buildout/rules.mk"
    ;;
esac


SAVE_FILES="include/apr.h include/arch/unix/apr_private.h"

for i in $SAVE_FILES; do
  test -r $i && mv $i $i.save
done

dir=include/arch/unix
test -d $dir || $MKDIR $dir

trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir

trap 'rm -fr `echo "
	$MAKEFILE1 $MAKEFILE2 $MAKEFILE3
	include/apr.h
	APRVARS
	build/rules.mk
 include/arch/unix/apr_private.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%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%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@top_builddir@%$top_builddir%g
s%@apr_builders@%$apr_builders%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@RM@%$RM%g
s%@AR@%$AR%g
s%@CPP@%$CPP%g
s%@apr_charset_ebcdic@%$apr_charset_ebcdic%g
s%@SH@%$SH%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
s%@eolstr@%$eolstr%g
s%@threads@%$threads%g
s%@have_sigwait@%$have_sigwait%g
s%@sharedmem@%$sharedmem%g
s%@anonymous_shm@%$anonymous_shm%g
s%@filebased_shm@%$filebased_shm%g
s%@keybased_shm@%$keybased_shm%g
s%@mem_based@%$mem_based%g
s%@file_based@%$file_based%g
s%@sendfile@%$sendfile%g
s%@apr_inaddr_none@%$apr_inaddr_none%g
s%@fork@%$fork%g
s%@have_inet_addr@%$have_inet_addr%g
s%@have_inet_network@%$have_inet_network%g
s%@have_sigaction@%$have_sigaction%g
s%@have_setrlimit@%$have_setrlimit%g
s%@have_getrlimit@%$have_getrlimit%g
s%@iconv@%$iconv%g
s%@mmap@%$mmap%g
s%@have_memmove@%$have_memmove%g
s%@arpa_ineth@%$arpa_ineth%g
s%@conioh@%$conioh%g
s%@ctypeh@%$ctypeh%g
s%@crypth@%$crypth%g
s%@errnoh@%$errnoh%g
s%@direnth@%$direnth%g
s%@fcntlh@%$fcntlh%g
s%@ioh@%$ioh%g
s%@limitsh@%$limitsh%g
s%@netdbh@%$netdbh%g
s%@sys_syslimitsh@%$sys_syslimitsh%g
s%@netinet_inh@%$netinet_inh%g
s%@netinet_tcph@%$netinet_tcph%g
s%@stdargh@%$stdargh%g
s%@stdioh@%$stdioh%g
s%@stdlibh@%$stdlibh%g
s%@stringh@%$stringh%g
s%@stringsh@%$stringsh%g
s%@sys_sendfileh@%$sys_sendfileh%g
s%@sys_signalh@%$sys_signalh%g
s%@sys_socketh@%$sys_socketh%g
s%@sys_typesh@%$sys_typesh%g
s%@sys_timeh@%$sys_timeh%g
s%@sys_uioh@%$sys_uioh%g
s%@unistdh@%$unistdh%g
s%@signalh@%$signalh%g
s%@sys_waith@%$sys_waith%g
s%@pthreadh@%$pthreadh%g
s%@short_value@%$short_value%g
s%@int_value@%$int_value%g
s%@long_value@%$long_value%g
s%@off_t_value@%$off_t_value%g
s%@size_t_value@%$size_t_value%g
s%@ssize_t_value@%$ssize_t_value%g
s%@socklen_t_value@%$socklen_t_value%g
s%@ssize_t_fmt@%$ssize_t_fmt%g
s%@size_t_fmt@%$size_t_fmt%g
s%@off_t_fmt@%$off_t_fmt%g
s%@os_proc_t_fmt@%$os_proc_t_fmt%g
s%@have_strnicmp@%$have_strnicmp%g
s%@have_strncasecmp@%$have_strncasecmp%g
s%@have_stricmp@%$have_stricmp%g
s%@have_strcasecmp@%$have_strcasecmp%g
s%@have_strdup@%$have_strdup%g
s%@have_strstr@%$have_strstr%g
s%@aprdso@%$aprdso%g
s%@oc@%$oc%g
s%@struct_rlimit@%$struct_rlimit%g
s%@have_union_semun@%$have_union_semun%g
s%@flockser@%$flockser%g
s%@sysvser@%$sysvser%g
s%@fcntlser@%$fcntlser%g
s%@procpthreadser@%$procpthreadser%g
s%@pthreadser@%$pthreadser%g
s%@proclockglobal@%$proclockglobal%g
s%@rand@%$rand%g
s%@have_in_addr@%$have_in_addr%g
s%@file_as_socket@%$file_as_socket%g
s%@apr_tcp_nopush_flag@%$apr_tcp_nopush_flag%g
s%@have_corkable_tcp@%$have_corkable_tcp%g
s%@accept_filter@%$accept_filter%g
s%@have_ipv6@%$have_ipv6%g
s%@LDLIBS@%$LDLIBS%g
s%@OPTIM@%$OPTIM%g
s%@OSDIR@%$OSDIR%g
s%@DEFAULT_OSDIR@%$DEFAULT_OSDIR%g
s%@EXEEXT@%$EXEEXT%g
s%@THREAD_CPPFLAGS@%$THREAD_CPPFLAGS%g
s%@THREAD_CFLAGS@%$THREAD_CFLAGS%g
s%@LIBTOOL_LIBS@%$LIBTOOL_LIBS%g
s%@SUBDIRS@%$SUBDIRS%g
s%@INCLUDE_RULES@%$INCLUDE_RULES%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILE1 $MAKEFILE2 $MAKEFILE3
	include/apr.h
	APRVARS
	build/rules.mk
"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac


  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/arch/unix/apr_private.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

for i in $SAVE_FILES; do
  if cmp -s $i $i.save 2>/dev/null; then
    mv $i.save $i
    echo "$i is unchanged"
  fi
  rm -f $i.save
done

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1





if test -n "$USE_VPATH"; then
  if test -n "$USE_MM"; then
    MAKEFILE3="$MAKEFILE3 $mm_dir/Makefile"
  fi
  for makefile in $MAKEFILE1 $MAKEFILE2 $MAKEFILE3; do
    dir=`echo $makefile|sed 's%[^/][^/]*$%%'`
    (cat <<EOF
srcdir = $abs_srcdir/$dir
VPATH  = $abs_srcdir/$dir

EOF
)    |  cat - $makefile | \
        sed \
		-e 's#-I\($(INCDIR[0-9]*)\)#-I\1 -I$(srcdir)\1#g' \
		-e 's#-I\($(OSDIR[0-9]*)\)#-I\1 -I$(srcdir)\1#g' \
		-e 's#-I\($(DEFOSDIR[0-9]*)\)#-I\1 -I$(srcdir)\1#g' \
		> tmp
    cp tmp $makefile
  done
  if test -n "$USE_MM"; then
    cat $mm_dir/Makefile | \
       sed \
       -e 's#\($(CFLAGS)\)#\1 -I$(srcdir) -I.#' \
       -e '/mm_global\.c/d' \
       > tmp
    cp tmp $mm_dir/Makefile
  fi
  rm -f tmp
fi


