#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
cross_compiling=no
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

ac_unique_file="build/apr_common.m4"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
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'

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

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

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

  # 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_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

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

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$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_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    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 "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

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

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: should be removed in autoconf 3.0.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null

# 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 "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

EOF

  cat <<EOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]
EOF

  cat <<\EOF

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-shared=PKGS  build shared libraries default=yes
  --enable-static=PKGS  build static libraries default=yes
  --enable-fast-install=PKGS  optimize for fast installation default=yes
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-debug          Turn on debugging and compile time warnings
  --enable-maintainer-mode  Turn on debugging and compile time warnings
  --enable-profile        Turn on profiling for the build (GCC)
  --enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all]    Turn on pools debugging
  --enable-malloc-debug   Switch on malloc_debug for BeOS
  --enable-nonportable-atomics  Turn on optimized atomic code which may produce nonportable binaries
  --enable-threads        Enable threading support in APR.
  --enable-dso            Enable dso support
  --enable-other-child    Enable reliable child processes
  --disable-ipv6          Disable IPv6 support in APR.

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-installbuilddir=<path> location to store APR build files (defaults to '${datadir}/build')
  --without-libtool       avoid using libtool to link the library
  --with-efence[=DIR]     path to Electric Fence installation
  --with-sendfile         Override decision to use sendfile
  --with-egd=<path>       use egd-compatible socket
  --with-devrandom[=DEV]  use /dev/random or compatible [searches by default]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`

    case $srcdir in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [\\/]* | ?:[\\/]* ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure.gnu; then
      echo
      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.ac ||
           test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
exec 5>config.log
cat >&5 <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.52.  Invocation command line was

  $ $0 $@

EOF
{
cat <<_ASUNAME
## ---------- ##
## Platform.  ##
## ---------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

PATH = $PATH

_ASUNAME
} >&5

cat >&5 <<EOF
## ------------ ##
## Core tests.  ##
## ------------ ##

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  echo >&5
  echo "## ----------------- ##" >&5
  echo "## Cache variables.  ##" >&5
  echo "## ----------------- ##" >&5
  echo >&5
  # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} >&5
  sed "/^$/d" confdefs.h >conftest.log
  if test -s conftest.log; then
    echo >&5
    echo "## ------------ ##" >&5
    echo "## confdefs.h.  ##" >&5
    echo "## ------------ ##" >&5
    echo >&5
    cat conftest.log >&5
  fi
  (echo; echo) >&5
  test "$ac_signal" != 0 &&
    echo "$as_me: caught signal $ac_signal" >&5
  echo "$as_me: exit $exit_status" >&5
  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# 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

# Let the site file select an alternate cache file if it wants to.
# 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 "$as_me:889: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:900: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:908: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:924: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:928: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        { echo "$as_me:934: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
        { echo "$as_me:936:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:938:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
        ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.  It doesn't matter if
  # we pass some twice (in addition to the command line arguments).
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
       ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:957: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:959: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo  "exit 0"   >>conftest.sh
chmod +x conftest.sh
if { (echo "$as_me:979: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:982: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  ac_path_separator=';'
else
  ac_path_separator=:
fi
PATH_SEPARATOR="$ac_path_separator"
rm -f conftest.sh

ac_config_headers="$ac_config_headers include/arch/unix/apr_private.h"

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
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:1010: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
   { (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1999, 2000 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 and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments.  Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!).  If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.

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

  apr_ste_save_CPPFLAGS="$CPPFLAGS"

  apr_ste_save_CFLAGS="$CFLAGS"

  apr_ste_save_LDFLAGS="$LDFLAGS"

  apr_ste_save_LIBS="$LIBS"

  apr_ste_save_INCLUDES="$INCLUDES"

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

EOF
  if test -n "$CFLAGS"; then
    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> config.nice
  fi
  if test -n "$CPPFLAGS"; then
    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> config.nice
  fi
  if test -n "$LDFLAGS"; then
    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> config.nice
  fi
  if test -n "$LIBS"; then
    echo "LIBS=\"$LIBS\"; export LIBS" >> config.nice
  fi
  if test -n "$INCLUDES"; then
    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> config.nice
  fi
  if test -n "$NOTEST_CFLAGS"; then
    echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> config.nice
  fi
  if test -n "$NOTEST_CPPFLAGS"; then
    echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> config.nice
  fi
  if test -n "$NOTEST_LDFLAGS"; then
    echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> config.nice
  fi
  if test -n "$NOTEST_LIBS"; then
    echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> config.nice
  fi

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

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:1150: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1154: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  { { echo "$as_me:1163: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
  { { echo "$as_me:1167: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1172: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1179: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
  ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
  { { echo "$as_me:1188: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1193: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1200: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_target_alias=$target_alias
test "x$ac_cv_target_alias" = "x" &&
  ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
  { { echo "$as_me:1209: error: $ac_config_sub $ac_cv_target_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1214: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-
echo "Configuring APR library"
echo "Platform: $host"

case "$host" in
  *-apple-aux3*)

  if test -z "$CC"; then
    echo "  setting CC to \"gcc\""
    CC="gcc"
  fi

      ;;
  BS2000*-siemens-sysv4*)

  if test -z "$CC"; then
    echo "  setting CC to \"c89 -XLLML -XLLMK -XL -Kno_integer_overflow\""
    CC="c89 -XLLML -XLLMK -XL -Kno_integer_overflow"
  fi

      ;;
  *convex-v11*)

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

      ;;
  *-ibm-os390)

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

      ;;
  *-ibm-as400)

  if test -z "$CC"; then
    echo "  setting CC to \"icc\""
    CC="icc"
  fi

      ;;
  *-isc4*)

  if test -z "$CC"; then
    echo "  setting CC to \"gcc\""
    CC="gcc"
  fi

      ;;
  m88k-*-CX/SX|CYBER)

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

      ;;
  *-next-openstep*)

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

      ;;
  *-qnx32)

  if test -z "$CC"; then
    echo "  setting CC to \"cc -F\""
    CC="cc -F"
  fi

      ;;
  *-tandem-oss)

  if test -z "$CC"; then
    echo "  setting CC to \"c89\""
    CC="c89"
  fi

      ;;
  TPF)

  if test -z "$CC"; then
    echo "  setting CC to \"c89\""
    CC="c89"
  fi

      ;;
esac

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:1329: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:1344: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1352: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1355: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:1364: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:1379: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1387: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1390: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:1403: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:1418: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1426: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1429: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1438: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:1453: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1461: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1464: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:1477: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:1497: found $ac_dir/$ac_word" >&5
break
done

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 $# != 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" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1519: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1522: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:1533: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:1548: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1556: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1559: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl
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 "$as_me:1572: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:1587: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1595: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1598: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

test -z "$CC" && { { echo "$as_me:1610: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:1615:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1618: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1621: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1623: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1626: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1628: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1631: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
#line 1635 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:1651: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:1654: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1657: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
for ac_file in `ls a.exe conftest.exe 2>/dev/null;
                ls a.out conftest 2>/dev/null;
                ls a.* conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    a.out ) # We found the default executable, but exeext='' is most
            # certainly right.
            break;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1680: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:1686: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1691: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:1697: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1700: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:1707: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:1715: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1722: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:1724: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:1727: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:1729: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:1732: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:1748: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:1754: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:1760: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1766 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1781: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1793: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:1800: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:1804: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1810 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1825: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1828: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1831: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1834: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:1846: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:1852: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1858 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1873: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1876: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1879: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:1889: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1919: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1922: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1925: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 1937 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1950: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1953: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1956: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1959: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 1969 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:1984: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:1987: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:1990: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test "x$apr_preload_done" != "xyes" ; then

  apr_preload_done="yes"

  echo "Applying APR hints file rules for $host"

  case "$host" in
    *mint)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DMINT\""
    CPPFLAGS="-DMINT"
  else
    apr_addto_bugger="-DMINT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lportlib\""
    LIBS="-lportlib"
  else
    apr_addto_bugger="-lportlib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *MPE/iX*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE\""
    CPPFLAGS="-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE"
  else
    apr_addto_bugger="-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lsvipc -lcurses\""
    LIBS="-lsvipc -lcurses"
  else
    apr_addto_bugger="-lsvipc -lcurses"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\"\""
    LDFLAGS="-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\""
  else
    apr_addto_bugger="-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\""
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

	;;
    *-apple-aux3*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DAUX3 -D_POSIX_SOURCE\""
    CPPFLAGS="-DAUX3 -D_POSIX_SOURCE"
  else
    apr_addto_bugger="-DAUX3 -D_POSIX_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lposix -lbsd\""
    LIBS="-lposix -lbsd"
  else
    apr_addto_bugger="-lposix -lbsd"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-s\""
    LDFLAGS="-s"
  else
    apr_addto_bugger="-s"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

  echo "  forcing SHELL to \"/bin/ksh\""
  SHELL="/bin/ksh"

	;;
    *-ibm-aix*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-U__STR__\""
    CPPFLAGS="-U__STR__"
  else
    apr_addto_bugger="-U__STR__"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

                case $host in
            *-ibm-aix4.3)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_USE_IRS\""
    CPPFLAGS="-D_USE_IRS"
  else
    apr_addto_bugger="-D_USE_IRS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	        ;;
            *-ibm-aix5*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_USE_IRS\""
    CPPFLAGS="-D_USE_IRS"
  else
    apr_addto_bugger="-D_USE_IRS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	        ;;
            *-ibm-aix4.3.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_USE_IRS\""
    CPPFLAGS="-D_USE_IRS"
  else
    apr_addto_bugger="-D_USE_IRS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

                ;;
        esac
                if $CC 2>&1 | grep 'xlc' > /dev/null; then

  if test -z "$AIX_XLC"; then
    echo "  setting AIX_XLC to \"yes\""
    AIX_XLC="yes"
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-qHALT=E\""
    CFLAGS="-qHALT=E"
  else
    apr_addto_bugger="-qHALT=E"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

        fi

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

  if test -z "$apr_sysvsem_is_global"; then
    echo "  setting apr_sysvsem_is_global to \"yes\""
    apr_sysvsem_is_global="yes"
  fi

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-Wl,-brtl\""
    LDFLAGS="-Wl,-brtl"
  else
    apr_addto_bugger="-Wl,-brtl"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

        ;;
    *-apollo-*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DAPOLLO\""
    CPPFLAGS="-DAPOLLO"
  else
    apr_addto_bugger="-DAPOLLO"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-dg-dgux*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DDGUX\""
    CPPFLAGS="-DDGUX"
  else
    apr_addto_bugger="-DDGUX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *os2_emx*)

  echo "  forcing SHELL to \"sh\""
  SHELL="sh"

  if test -z "$apr_gethostbyname_is_thread_safe"; then
    echo "  setting apr_gethostbyname_is_thread_safe to \"yes\""
    apr_gethostbyname_is_thread_safe="yes"
  fi

  if test -z "$apr_gethostbyaddr_is_thread_safe"; then
    echo "  setting apr_gethostbyaddr_is_thread_safe to \"yes\""
    apr_gethostbyaddr_is_thread_safe="yes"
  fi

	;;
    *-hi-hiux)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DHIUX\""
    CPPFLAGS="-DHIUX"
  else
    apr_addto_bugger="-DHIUX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-hp-hpux11.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED\""
    CPPFLAGS="-DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED"
  else
    apr_addto_bugger="-DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-hp-hpux10.*)
 	case $host in
 	  *-hp-hpux10.01)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSELECT_NEEDS_CAST\""
    CPPFLAGS="-DSELECT_NEEDS_CAST"
  else
    apr_addto_bugger="-DSELECT_NEEDS_CAST"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	       ;;
 	esac

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_REENTRANT\""
    CPPFLAGS="-D_REENTRANT"
  else
    apr_addto_bugger="-D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-hp-hpux*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DHPUX -D_REENTRANT\""
    CPPFLAGS="-DHPUX -D_REENTRANT"
  else
    apr_addto_bugger="-DHPUX -D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-linux-*)
        case `uname -r` in
	    2.* )
  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DLINUX=2\""
    CPPFLAGS="-DLINUX=2"
  else
    apr_addto_bugger="-DLINUX=2"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	           ;;
	    1.* )
  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DLINUX=1\""
    CPPFLAGS="-DLINUX=1"
  else
    apr_addto_bugger="-DLINUX=1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	           ;;
	    * )
	           ;;
        esac

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_REENTRANT\""
    CPPFLAGS="-D_REENTRANT"
  else
    apr_addto_bugger="-D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-GNU*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DHURD\""
    CPPFLAGS="-DHURD"
  else
    apr_addto_bugger="-DHURD"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-lynx-lynxos)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D__NO_INCLUDE_WARN__ -DLYNXOS\""
    CPPFLAGS="-D__NO_INCLUDE_WARN__ -DLYNXOS"
  else
    apr_addto_bugger="-D__NO_INCLUDE_WARN__ -DLYNXOS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lbsd\""
    LIBS="-lbsd"
  else
    apr_addto_bugger="-lbsd"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *486-*-bsdi*)

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-m486\""
    CFLAGS="-m486"
  else
    apr_addto_bugger="-m486"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

	;;
    *-*-bsdi*)
        case $host in
            *bsdi4.1)

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-D_REENTRANT\""
    CFLAGS="-D_REENTRANT"
  else
    apr_addto_bugger="-D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

                ;;
        esac
        ;;
    *-openbsd*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_POSIX_THREADS\""
    CPPFLAGS="-D_POSIX_THREADS"
  else
    apr_addto_bugger="-D_POSIX_THREADS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-netbsd*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DNETBSD\""
    CPPFLAGS="-DNETBSD"
  else
    apr_addto_bugger="-DNETBSD"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-freebsd*)
	case $host in
	    *freebsd2345*)

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-funsigned-char\""
    CFLAGS="-funsigned-char"
  else
    apr_addto_bugger="-funsigned-char"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

		;;
	esac

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

  if test -z "$apr_lock_method"; then
    echo "  setting apr_lock_method to \"USE_FLOCK_SERIALIZE\""
    apr_lock_method="USE_FLOCK_SERIALIZE"
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_REENTRANT -D_THREAD_SAFE\""
    CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE"
  else
    apr_addto_bugger="-D_REENTRANT -D_THREAD_SAFE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-next-nextstep*)

  if test -z "$CFLAGS"; then
    echo "  setting CFLAGS to \"-O\""
    CFLAGS="-O"
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DNEXT\""
    CPPFLAGS="-DNEXT"
  else
    apr_addto_bugger="-DNEXT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-next-openstep*)

  if test -z "$CFLAGS"; then
    echo "  setting CFLAGS to \"-O\""
    CFLAGS="-O"
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DNEXT\""
    CPPFLAGS="-DNEXT"
  else
    apr_addto_bugger="-DNEXT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-apple-rhapsody*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DRHAPSODY\""
    CPPFLAGS="-DRHAPSODY"
  else
    apr_addto_bugger="-DRHAPSODY"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-apple-darwin*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp\""
    CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp"
  else
    apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test -z "$apr_posixsem_is_global"; then
    echo "  setting apr_posixsem_is_global to \"yes\""
    apr_posixsem_is_global="yes"
  fi

	;;
    *-dec-osf*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DOSF1\""
    CPPFLAGS="-DOSF1"
  else
    apr_addto_bugger="-DOSF1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-nto-qnx*)
	;;
    *-qnx)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DQNX\""
    CPPFLAGS="-DQNX"
  else
    apr_addto_bugger="-DQNX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-N128k -lunix\""
    LIBS="-N128k -lunix"
  else
    apr_addto_bugger="-N128k -lunix"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-qnx32)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DQNX\""
    CPPFLAGS="-DQNX"
  else
    apr_addto_bugger="-DQNX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-mf -3\""
    CFLAGS="-mf -3"
  else
    apr_addto_bugger="-mf -3"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-N128k -lunix\""
    LIBS="-N128k -lunix"
  else
    apr_addto_bugger="-N128k -lunix"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-isc4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-posix -DISC\""
    CPPFLAGS="-posix -DISC"
  else
    apr_addto_bugger="-posix -DISC"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-posix\""
    LDFLAGS="-posix"
  else
    apr_addto_bugger="-posix"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-linet\""
    LIBS="-linet"
  else
    apr_addto_bugger="-linet"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sco3*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSCO -D_REENTRANT\""
    CPPFLAGS="-DSCO -D_REENTRANT"
  else
    apr_addto_bugger="-DSCO -D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Oacgiltz\""
    CFLAGS="-Oacgiltz"
  else
    apr_addto_bugger="-Oacgiltz"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lPW -lmalloc _i\""
    LIBS="-lPW -lmalloc _i"
  else
    apr_addto_bugger="-lPW -lmalloc _i"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sco5*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSCO5 -D_REENTRANT\""
    CPPFLAGS="-DSCO5 -D_REENTRANT"
  else
    apr_addto_bugger="-DSCO5 -D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lmalloc -lprot -ltinfo -lx\""
    LIBS="-lmalloc -lprot -ltinfo -lx"
  else
    apr_addto_bugger="-lmalloc -lprot -ltinfo -lx"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sco_sv*|*-SCO_SV*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSCO -D_REENTRANT\""
    CPPFLAGS="-DSCO -D_REENTRANT"
  else
    apr_addto_bugger="-DSCO -D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lPW -lmalloc _i\""
    LIBS="-lPW -lmalloc _i"
  else
    apr_addto_bugger="-lPW -lmalloc _i"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-solaris2*)
    	PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT\""
    CPPFLAGS="-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
  else
    apr_addto_bugger="-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

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

	;;
    *-sunos4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSUNOS4\""
    CPPFLAGS="-DSUNOS4"
  else
    apr_addto_bugger="-DSUNOS4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-unixware1)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUW=100\""
    CPPFLAGS="-DUW=100"
  else
    apr_addto_bugger="-DUW=100"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-unixware2)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUW=200\""
    CPPFLAGS="-DUW=200"
  else
    apr_addto_bugger="-DUW=200"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lgen\""
    LIBS="-lgen"
  else
    apr_addto_bugger="-lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-unixware211)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUW=211\""
    CPPFLAGS="-DUW=211"
  else
    apr_addto_bugger="-DUW=211"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lgen\""
    LIBS="-lgen"
  else
    apr_addto_bugger="-lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-unixware212)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUW=212\""
    CPPFLAGS="-DUW=212"
  else
    apr_addto_bugger="-DUW=212"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lgen\""
    LIBS="-lgen"
  else
    apr_addto_bugger="-lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-unixware7)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUW=700\""
    CPPFLAGS="-DUW=700"
  else
    apr_addto_bugger="-DUW=700"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lgen\""
    LIBS="-lgen"
  else
    apr_addto_bugger="-lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    maxion-*-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc -lgen\""
    LIBS="-lc -lgen"
  else
    apr_addto_bugger="-lc -lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-*-powermax*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lgen\""
    LIBS="-lgen"
  else
    apr_addto_bugger="-lgen"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    TPF)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DTPF -D_POSIX_SOURCE\""
    CPPFLAGS="-DTPF -D_POSIX_SOURCE"
  else
    apr_addto_bugger="-DTPF -D_POSIX_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

       ;;
    BS2000*-siemens-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -D_XPG_IV\""
    CPPFLAGS="-DSVR4 -D_XPG_IV"
  else
    apr_addto_bugger="-DSVR4 -D_XPG_IV"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-siemens-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT\""
    CPPFLAGS="-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT"
  else
    apr_addto_bugger="-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    pyramid-pyramid-svr4)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -DNO_LONG_DOUBLE\""
    CPPFLAGS="-DSVR4 -DNO_LONG_DOUBLE"
  else
    apr_addto_bugger="-DSVR4 -DNO_LONG_DOUBLE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    DS/90\ 7000-*-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUXPDS\""
    CPPFLAGS="-DUXPDS"
  else
    apr_addto_bugger="-DUXPDS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-tandem-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-ncr-sysv4)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -DMPRAS\""
    CPPFLAGS="-DSVR4 -DMPRAS"
  else
    apr_addto_bugger="-DSVR4 -DMPRAS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc -L/usr/ucblib -lucb\""
    LIBS="-lc -L/usr/ucblib -lucb"
  else
    apr_addto_bugger="-lc -L/usr/ucblib -lucb"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sysv4*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    88k-encore-sysv4)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -DENCORE\""
    CPPFLAGS="-DSVR4 -DENCORE"
  else
    apr_addto_bugger="-DSVR4 -DENCORE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lPW\""
    LIBS="-lPW"
  else
    apr_addto_bugger="-lPW"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-uts*)
	PLATOSVERS=`echo $host | sed 's/^.*,//'`
	case $PLATOSVERS in
	    2*)
  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DUTS21\""
    CPPFLAGS="-DUTS21"
  else
    apr_addto_bugger="-DUTS21"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Xa -eft\""
    CFLAGS="-Xa -eft"
  else
    apr_addto_bugger="-Xa -eft"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lbsd -la\""
    LIBS="-lbsd -la"
  else
    apr_addto_bugger="-lbsd -la"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	        ;;
	    *)
  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Xa\""
    CFLAGS="-Xa"
  else
    apr_addto_bugger="-Xa"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

	        ;;
	esac
	;;
    *-ultrix)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DULTRIX\""
    CPPFLAGS="-DULTRIX"
  else
    apr_addto_bugger="-DULTRIX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  echo "  forcing SHELL to \"/bin/sh5\""
  SHELL="/bin/sh5"

	;;
    *powerpc-tenon-machten*)

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-Xlstack=0x14000 -Xldelcsect\""
    LDFLAGS="-Xlstack=0x14000 -Xldelcsect"
  else
    apr_addto_bugger="-Xlstack=0x14000 -Xldelcsect"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

	;;
    *-machten*)

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-stack 0x14000\""
    LDFLAGS="-stack 0x14000"
  else
    apr_addto_bugger="-stack 0x14000"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

	;;
    *convex-v11*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DCONVEXOS11\""
    CPPFLAGS="-DCONVEXOS11"
  else
    apr_addto_bugger="-DCONVEXOS11"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test -z "$CFLAGS"; then
    echo "  setting CFLAGS to \"-O1\""
    CFLAGS="-O1"
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-ext\""
    CFLAGS="-ext"
  else
    apr_addto_bugger="-ext"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

	;;
    i860-intel-osf1)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DPARAGON\""
    CPPFLAGS="-DPARAGON"
  else
    apr_addto_bugger="-DPARAGON"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx2.*.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=20\""
    CPPFLAGS="-DSEQUENT=20"
  else
    apr_addto_bugger="-DSEQUENT=20"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-linet -lc -lseq\""
    LIBS="-linet -lc -lseq"
  else
    apr_addto_bugger="-linet -lc -lseq"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx4.0.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=40\""
    CPPFLAGS="-DSEQUENT=40"
  else
    apr_addto_bugger="-DSEQUENT=40"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-linet -lc\""
    LIBS="-linet -lc"
  else
    apr_addto_bugger="-linet -lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx4.123.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=41\""
    CPPFLAGS="-DSEQUENT=41"
  else
    apr_addto_bugger="-DSEQUENT=41"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx4.4.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=44\""
    CPPFLAGS="-DSEQUENT=44"
  else
    apr_addto_bugger="-DSEQUENT=44"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx4.5.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=45\""
    CPPFLAGS="-DSEQUENT=45"
  else
    apr_addto_bugger="-DSEQUENT=45"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *-sequent-ptx5.0.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSEQUENT=50\""
    CPPFLAGS="-DSEQUENT=50"
  else
    apr_addto_bugger="-DSEQUENT=50"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wc,-pw\""
    CFLAGS="-Wc,-pw"
  else
    apr_addto_bugger="-Wc,-pw"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc\""
    LIBS="-lc"
  else
    apr_addto_bugger="-lc"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    *NEWS-OS*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DNEWSOS\""
    CPPFLAGS="-DNEWSOS"
  else
    apr_addto_bugger="-DNEWSOS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-riscix)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DRISCIX\""
    CPPFLAGS="-DRISCIX"
  else
    apr_addto_bugger="-DRISCIX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test -z "$CFLAGS"; then
    echo "  setting CFLAGS to \"-O\""
    CFLAGS="-O"
  fi

	;;
    *-irix*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_POSIX_THREAD_SAFE_FUNCTIONS\""
    CPPFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
  else
    apr_addto_bugger="-D_POSIX_THREAD_SAFE_FUNCTIONS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *beos*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DBEOS\""
    CPPFLAGS="-DBEOS"
  else
    apr_addto_bugger="-DBEOS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

        PLATOSVERS=`uname -r`

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

        case $PLATOSVERS in
            5.0.4)

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket\""
    LDFLAGS="-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket"
  else
    apr_addto_bugger="-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lbind -lbe -lroot\""
    LIBS="-lbind -lbe -lroot"
  else
    apr_addto_bugger="-lbind -lbe -lroot"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DBONE7\""
    CPPFLAGS="-DBONE7"
  else
    apr_addto_bugger="-DBONE7"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

                ;;
            5.1)

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket\""
    LDFLAGS="-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket"
  else
    apr_addto_bugger="-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind -lsocket"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lbind -lbe -lroot\""
    LIBS="-lbind -lbe -lroot"
  else
    apr_addto_bugger="-lbind -lbe -lroot"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

                ;;
	esac

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSIGPROCMASK_SETS_THREAD_MASK -DAP_AUTH_DBM_USE_APR\""
    CPPFLAGS="-DSIGPROCMASK_SETS_THREAD_MASK -DAP_AUTH_DBM_USE_APR"
  else
    apr_addto_bugger="-DSIGPROCMASK_SETS_THREAD_MASK -DAP_AUTH_DBM_USE_APR"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

        ;;
    4850-*.*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4 -DMPRAS\""
    CPPFLAGS="-DSVR4 -DMPRAS"
  else
    apr_addto_bugger="-DSVR4 -DMPRAS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc -L/usr/ucblib -lucb\""
    LIBS="-lc -L/usr/ucblib -lucb"
  else
    apr_addto_bugger="-lc -L/usr/ucblib -lucb"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    drs6000*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DSVR4\""
    CPPFLAGS="-DSVR4"
  else
    apr_addto_bugger="-DSVR4"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lc -L/usr/ucblib -lucb\""
    LIBS="-lc -L/usr/ucblib -lucb"
  else
    apr_addto_bugger="-lc -L/usr/ucblib -lucb"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
    m88k-*-CX/SX|CYBER)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_CX_SX\""
    CPPFLAGS="-D_CX_SX"
  else
    apr_addto_bugger="-D_CX_SX"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Xa\""
    CFLAGS="-Xa"
  else
    apr_addto_bugger="-Xa"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

	;;
    *-tandem-oss)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1\""
    CPPFLAGS="-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
  else
    apr_addto_bugger="-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

	;;
    *-ibm-os390)

  if test -z "$apr_lock_method"; then
    echo "  setting apr_lock_method to \"USE_SYSVSEM_SERIALIZE\""
    apr_lock_method="USE_SYSVSEM_SERIALIZE"
  fi

  if test -z "$apr_sysvsem_is_global"; then
    echo "  setting apr_sysvsem_is_global to \"yes\""
    apr_sysvsem_is_global="yes"
  fi

  if test -z "$apr_gethostbyname_is_thread_safe"; then
    echo "  setting apr_gethostbyname_is_thread_safe to \"yes\""
    apr_gethostbyname_is_thread_safe="yes"
  fi

  if test -z "$apr_gethostbyaddr_is_thread_safe"; then
    echo "  setting apr_gethostbyaddr_is_thread_safe to \"yes\""
    apr_gethostbyaddr_is_thread_safe="yes"
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-U_NO_PROTO -DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO -DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1\""
    CPPFLAGS="-U_NO_PROTO -DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO -DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1"
  else
    apr_addto_bugger="-U_NO_PROTO -DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO -DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

       ;;
    *-ibm-as400)

  if test -z "$apr_lock_method"; then
    echo "  setting apr_lock_method to \"USE_SYSVSEM_SERIALIZE\""
    apr_lock_method="USE_SYSVSEM_SERIALIZE"
  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"
  fi

  if test -z "$apr_gethostbyname_is_thread_safe"; then
    echo "  setting apr_gethostbyname_is_thread_safe to \"yes\""
    apr_gethostbyname_is_thread_safe="yes"
  fi

  if test -z "$apr_gethostbyaddr_is_thread_safe"; then
    echo "  setting apr_gethostbyaddr_is_thread_safe to \"yes\""
    apr_gethostbyaddr_is_thread_safe="yes"
  fi

       ;;
    *cygwin*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DCYGWIN\""
    CPPFLAGS="-DCYGWIN"
  else
    apr_addto_bugger="-DCYGWIN"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lcrypt\""
    LIBS="-lcrypt"
  else
    apr_addto_bugger="-lcrypt"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

	;;
  esac

fi

apr_srcdir=`(cd $srcdir && pwd)`
apr_builddir=`pwd`

if test "$apr_builddir" != "$apr_srcdir"; then
  USE_VPATH=1
fi

top_builddir="$apr_builddir"

apr_buildout=$apr_builddir/build
apr_builders=$apr_srcdir/build

MKDIR=$apr_builders/mkdir.sh

  echo "$as_me:5051: checking for working mkdir -p" >&5
echo $ECHO_N "checking for working mkdir -p... $ECHO_C" >&6
if test "${ac_cv_mkdir_p+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    test -d conftestdir && rm -rf conftestdir
    mkdir -p conftestdir/somedir >/dev/null 2>&1
    if test -d conftestdir/somedir; then
      ac_cv_mkdir_p=yes
    else
      ac_cv_mkdir_p=no
    fi
    rm -rf conftestdir

fi
echo "$as_me:5067: result: $ac_cv_mkdir_p" >&5
echo "${ECHO_T}$ac_cv_mkdir_p" >&6
  if test "$ac_cv_mkdir_p" = "yes"; then
      mkdir_p="mkdir -p"
  else
      mkdir_p="$apr_builders/mkdir.sh"
  fi

DEFAULT_OSDIR="unix"
echo "(Default will be ${DEFAULT_OSDIR})"

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

echo "$as_me:5080: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 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 conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:5100: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:5104: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:5114: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 5135 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:5140: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5146: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 5169 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:5173: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5179: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:5216: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 5226 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:5231: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5237: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 5260 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:5264: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5270: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:5298: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

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 "$as_me:5313: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:5328: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "$as_me:5336: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
  echo "$as_me:5339: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AWK" && break
done

echo "$as_me:5346: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  echo "$as_me:5350: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:5353: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:5360: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:5375: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:5383: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:5386: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:5395: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:5410: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:5419: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:5422: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:5443: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
    | /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if $as_executable_p "$ac_dir/$ac_prog"; then
	  if test $ac_prog = install &&
            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL=$ac_install_sh
  fi
fi
echo "$as_me:5492: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
echo "$as_me:5505: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RM"; then
  ac_cv_prog_RM="$RM" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RM="rm"
echo "$as_me:5520: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RM=$ac_cv_prog_RM
if test -n "$RM"; then
  echo "$as_me:5528: result: $RM" >&5
echo "${ECHO_T}$RM" >&6
else
  echo "$as_me:5531: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo "$as_me:5537: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AS"; then
  ac_cv_prog_AS="$AS" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AS="as"
echo "$as_me:5552: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AS=$ac_cv_prog_AS
if test -n "$AS"; then
  echo "$as_me:5560: result: $AS" >&5
echo "${ECHO_T}$AS" >&6
else
  echo "$as_me:5563: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
echo "$as_me:5569: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ASCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ASCPP"; then
  ac_cv_prog_ASCPP="$ASCPP" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ASCPP="cpp"
echo "$as_me:5584: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ASCPP=$ac_cv_prog_ASCPP
if test -n "$ASCPP"; then
  echo "$as_me:5592: result: $ASCPP" >&5
echo "${ECHO_T}$ASCPP" >&6
else
  echo "$as_me:5595: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test -n "$ac_tool_prefix"; then
  # 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 "$as_me:5602: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:5617: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
  echo "$as_me:5625: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
  echo "$as_me:5628: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_AR"; then
  ac_ct_AR=$AR
  # Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo "$as_me:5637: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_AR"; then
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:5652: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
  echo "$as_me:5661: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
  echo "$as_me:5664: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  AR=$ac_ct_AR
else
  AR="$ac_cv_prog_AR"
fi

echo "$as_me:5673: checking for AIX" >&5
echo $ECHO_N "checking for AIX... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 5676 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  echo "$as_me:5685: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  echo "$as_me:5692: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest*

echo "$as_me:5697: checking for POSIXized ISC" >&5
echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$as_me:5702: result: yes" >&5
echo "${ECHO_T}yes" >&6
  ISC=yes # If later tests want to check for ISC.

cat >>confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  if test "$GCC" = yes; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
else
  echo "$as_me:5716: result: no" >&5
echo "${ECHO_T}no" >&6
  ISC=
fi

echo "$as_me:5721: checking for minix/config.h" >&5
echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
if test "${ac_cv_header_minix_config_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5727 "configure"
#include "confdefs.h"
#include <minix/config.h>
_ACEOF
if { (eval echo "$as_me:5731: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5737: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_minix_config_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_minix_config_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:5756: result: $ac_cv_header_minix_config_h" >&5
echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
if test $ac_cv_header_minix_config_h = yes; then
  MINIX=yes
else
  MINIX=
fi

if test "$MINIX" = yes; then

cat >>confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

cat >>confdefs.h <<\EOF
#define _POSIX_1_SOURCE 2
EOF

cat >>confdefs.h <<\EOF
#define _MINIX 1
EOF

fi

  echo "$as_me:5780: checking whether system uses EBCDIC" >&5
echo $ECHO_N "checking whether system uses EBCDIC... $ECHO_C" >&6
if test "${ac_cv_ebcdic+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

  ac_cv_ebcdic="no"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 5792 "configure"
#include "confdefs.h"

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

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:5801: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5804: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:5806: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5809: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_ebcdic="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_ebcdic="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:5825: result: $ac_cv_ebcdic" >&5
echo "${ECHO_T}$ac_cv_ebcdic" >&6
  if test "$ac_cv_ebcdic" = "yes"; then
    apr_charset_ebcdic=1
  else
    apr_charset_ebcdic=0
  fi

echo "performing libtool configuration..."

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

# 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_c_compiler_gnu" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo "$as_me:5919: checking for ld used by GCC" >&5
echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
  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 "$as_me:5943: checking for GNU ld" >&5
echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
  echo "$as_me:5946: checking for non-GNU ld" >&5
echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
if test "${ac_cv_path_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:5976: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
  echo "$as_me:5979: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -z "$LD" && { { echo "$as_me:5982: error: no acceptable ld found in \$PATH" >&5
echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }
echo "$as_me:5985: checking if the linker ($LD) is GNU ld" >&5
echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${ac_cv_prog_gnu_ld+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:5997: result: $ac_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6

echo "$as_me:6000: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
if test "${ac_cv_path_NM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:6034: result: $NM" >&5
echo "${ECHO_T}$NM" >&6

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_c_compiler_gnu" = 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 6063 "configure"' > conftest.$ac_ext
  if { (eval echo "$as_me:6064: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6067: \$? = $ac_status" >&5
  (exit $ac_status); }; 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 "$as_me:6088: checking whether the C compiler needs -belf" >&5
echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6094 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6106: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6109: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6112: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6115: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  lt_cv_cc_needs_belf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6125: result: $lt_cv_cc_needs_belf" >&5
echo "${ECHO_T}$lt_cv_cc_needs_belf" >&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 <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && 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 "$as_me:6198: error: libtool configure failed" >&5
echo "$as_me: error: libtool configure failed" >&2;}
   { (exit 1); exit 1; }; }

# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:6207: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:6215: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$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) $(apr_builddir)/libtool'

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

    if test "x$LTFLAGS" = "x"; then
        LTFLAGS='--silent'
    fi
        eval `grep "^shlibpath_var=[A-Z_]*$" $apr_builddir/libtool`
    if test "x$shlibpath_var" = "x"; then
        shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR
    fi
    ;;
esac

# Check whether --with-installbuilddir or --without-installbuilddir was given.
if test "${with_installbuilddir+set}" = set; then
  withval="$with_installbuilddir"
   installbuilddir=$withval
else
   installbuilddir="${datadir}/build"
fi;

# Check whether --with-libtool or --without-libtool was given.
if test "${with_libtool+set}" = set; then
  withval="$with_libtool"
   use_libtool=$withval
else
   use_libtool="yes"
fi;

if test "x$use_libtool" = "xyes"; then
      lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -c $< && touch $@'
      link='$(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) $(ALL_LDFLAGS) -o $@'
      so_ext='lo'
      lib_target='-rpath $(libdir) $$objects'
      export_lib_target='-rpath \$(libdir) \$\$objects'
else
      lt_compile='$(COMPILE) -c $<'
      link='$(AR) cr $(TARGET_LIB) $$objects; $(RANLIB) $(TARGET_LIB)'
      so_ext='o'
      lib_target=''
      export_lib_target=''
fi

lib_target_libs=""
case $host in
    *aix*)
        lib_target_libs="\$(EXTRA_LIBS)";
        ;;
    *-solaris2*)
        apr_platform_runtime_link_flag="-R"
        ;;
    *)
        ;;
esac

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

case $host in
    *os390)
        if test "$ac_test_CFLAGS" != set; then

  if test "x$CFLAGS" = "x-g"; then
    echo "  nulling CFLAGS"
    CFLAGS=""
  else
    apr_new_bugger=""
    apr_removed=0
    for i in $CFLAGS; do
      if test "x$i" != "x-g"; then
        apr_new_bugger="$apr_new_bugger $i"
      else
        apr_removed=1
      fi
    done
    if test $apr_removed = "1"; then
      echo "  removed \"-g\" from CFLAGS"
      CFLAGS=$apr_new_bugger
    fi
  fi

        fi
        ;;
esac

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

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-g\""
    CFLAGS="-g"
  else
    apr_addto_bugger="-g"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

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

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wall\""
    CFLAGS="-Wall"
  else
    apr_addto_bugger="-Wall"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

   elif test "$AIX_XLC" = "yes"; then

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-qfullpath\""
    CFLAGS="-qfullpath"
  else
    apr_addto_bugger="-qfullpath"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

   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"

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-g\""
    CFLAGS="-g"
  else
    apr_addto_bugger="-g"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

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

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations\""
    CFLAGS="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
  else
    apr_addto_bugger="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

   elif test "$AIX_XLC" = "yes"; then

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-qfullpath -qinitauto=FE\""
    CFLAGS="-qfullpath -qinitauto=FE"
  else
    apr_addto_bugger="-qfullpath -qinitauto=FE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

   fi

fi;
# Check whether --enable-profile or --disable-profile was given.
if test "${enable_profile+set}" = set; then
  enableval="$enable_profile"
  if test "$GCC" = "yes"; then

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-pg\""
    CFLAGS="-pg"
  else
    apr_addto_bugger="-pg"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x-g"; then
    echo "  nulling CFLAGS"
    CFLAGS=""
  else
    apr_new_bugger=""
    apr_removed=0
    for i in $CFLAGS; do
      if test "x$i" != "x-g"; then
        apr_new_bugger="$apr_new_bugger $i"
      else
        apr_removed=1
      fi
    done
    if test $apr_removed = "1"; then
      echo "  removed \"-g\" from CFLAGS"
      CFLAGS=$apr_new_bugger
    fi
  fi

    if test "$host" = "i586-pc-beos"; then

  if test "x$CFLAGS" = "x-O2"; then
    echo "  nulling CFLAGS"
    CFLAGS=""
  else
    apr_new_bugger=""
    apr_removed=0
    for i in $CFLAGS; do
      if test "x$i" != "x-O2"; then
        apr_new_bugger="$apr_new_bugger $i"
      else
        apr_removed=1
      fi
    done
    if test $apr_removed = "1"; then
      echo "  removed \"-O2\" from CFLAGS"
      CFLAGS=$apr_new_bugger
    fi
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-O1\""
    CFLAGS="-O1"
  else
    apr_addto_bugger="-O1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-p\""
    LDFLAGS="-p"
  else
    apr_addto_bugger="-p"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

    fi
  fi

fi;
# Check whether --enable-pool-debug or --disable-pool-debug was given.
if test "${enable_pool_debug+set}" = set; then
  enableval="$enable_pool_debug"
   if test -z "$enableval"; then

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DAPR_POOL_DEBUG=1\""
    CPPFLAGS="-DAPR_POOL_DEBUG=1"
  else
    apr_addto_bugger="-DAPR_POOL_DEBUG=1"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

    elif test ! "$enableval" = "no"; then
        apr_pool_debug=1

        for i in $enableval
        do
            flag=0

            case $i in
            yes)
                flag=1
                ;;
            verbose)
                flag=2
                ;;
            lifetime)
                flag=4
                ;;
            owner)
                flag=8
                ;;
            verbose-alloc)
                flag=16
                ;;
            all)
                apr_pool_debug=31
                ;;
            *)
                ;;
            esac

            if test $flag -gt 0; then
                apr_pool_debug=`expr '(' $apr_pool_debug - $apr_pool_debug % \
                    '(' $flag '*' 2 ')' ')' + $flag + $apr_pool_debug % $flag`
            fi
        done

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DAPR_POOL_DEBUG=$apr_pool_debug\""
    CPPFLAGS="-DAPR_POOL_DEBUG=$apr_pool_debug"
  else
    apr_addto_bugger="-DAPR_POOL_DEBUG=$apr_pool_debug"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

    fi

fi;

# Check whether --with-efence or --without-efence was given.
if test "${with_efence+set}" = set; then
  withval="$with_efence"
   apr_efence_dir="$withval"
    if test "$apr_efence_dir" != "yes"; then

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-L$apr_efence_dir/lib\""
    LDFLAGS="-L$apr_efence_dir/lib"
  else
    apr_addto_bugger="-L$apr_efence_dir/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

      if test "x$apr_platform_runtime_link_flag" != "x"; then

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"$apr_platform_runtime_link_flag$apr_efence_dir/lib\""
    LDFLAGS="$apr_platform_runtime_link_flag$apr_efence_dir/lib"
  else
    apr_addto_bugger="$apr_platform_runtime_link_flag$apr_efence_dir/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

      fi
    fi
    echo "$as_me:6699: checking for malloc in -lefence" >&5
echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6
if test "${ac_cv_lib_efence_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lefence  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6707 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char malloc ();
int
main ()
{
malloc ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6726: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6729: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6732: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6735: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_efence_malloc=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_efence_malloc=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6746: result: $ac_cv_lib_efence_malloc" >&5
echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6
if test $ac_cv_lib_efence_malloc = yes; then

  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-lefence\""
    LIBS="-lefence"
  else
    apr_addto_bugger="-lefence"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

else
   { { echo "$as_me:6771: error: Electric Fence requested but not detected" >&5
echo "$as_me: error: Electric Fence requested but not detected" >&2;}
   { (exit 1); exit 1; }; }
fi

fi;

if test "$host" = "i586-pc-beos"; then
  # Check whether --enable-malloc-debug or --disable-malloc-debug was given.
if test "${enable_malloc_debug+set}" = set; then
  enableval="$enable_malloc_debug"

  if test "x$CFLAGS" = "x-O2"; then
    echo "  nulling CFLAGS"
    CFLAGS=""
  else
    apr_new_bugger=""
    apr_removed=0
    for i in $CFLAGS; do
      if test "x$i" != "x-O2"; then
        apr_new_bugger="$apr_new_bugger $i"
      else
        apr_removed=1
      fi
    done
    if test $apr_removed = "1"; then
      echo "  removed \"-O2\" from CFLAGS"
      CFLAGS=$apr_new_bugger
    fi
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-fcheck-memory-usage -D_KERNEL_MODE\""
    CPPFLAGS="-fcheck-memory-usage -D_KERNEL_MODE"
  else
    apr_addto_bugger="-fcheck-memory-usage -D_KERNEL_MODE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

fi;  fi

case "$host:$CC" in
    *-hp-hpux*:cc )

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Ae +DAportable +Z\""
    CFLAGS="-Ae +DAportable +Z"
  else
    apr_addto_bugger="-Ae +DAportable +Z"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

	;;
    powerpc-*-beos:mwcc* )

  echo "  forcing CPP to \"mwcc -E\""
  CPP="mwcc -E"

  echo "  forcing CC to \"mwcc\""
  CC="mwcc"

  echo "  forcing AR to \"ar\""
  AR="ar"

	;;
esac

apr_force_atomic_generic=0
proc_mutex_is_global=0
enable_nonportable_atomics=0

# Check whether --enable-nonportable-atomics or --disable-nonportable-atomics was given.
if test "${enable_nonportable_atomics+set}" = set; then
  enableval="$enable_nonportable_atomics"

    if test "$enableval" = "yes"; then
        enable_nonportable_atomics=1
    fi

fi;

config_subdirs="none"
INSTALL_SUBDIRS="none"
case $host in
   i386-ibm-aix* | *-ibm-aix1-2.* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
       OSDIR="aix"

  if test "x$LDFLAGS" = "x"; then
    echo "  setting LDFLAGS to \"-lld\""
    LDFLAGS="-lld"
  else
    apr_addto_bugger="-lld"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi

       eolstr="\\n"
       ;;
   *-os2*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DOS2\""
    CPPFLAGS="-DOS2"
  else
    apr_addto_bugger="-DOS2"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CFLAGS" = "x"; then
    echo "  setting CFLAGS to \"-Zmt\""
    CFLAGS="-Zmt"
  else
    apr_addto_bugger="-Zmt"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CFLAGS"
        CFLAGS="$CFLAGS $i"
      fi
    done
  fi

echo "$as_me:6946: checking for random in -lbsd" >&5
echo $ECHO_N "checking for random in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_random+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6954 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char random ();
int
main ()
{
random ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6973: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6976: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6979: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6982: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_random=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_random=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6993: result: $ac_cv_lib_bsd_random" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_random" >&6
if test $ac_cv_lib_bsd_random = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBBSD 1
EOF

  LIBS="-lbsd $LIBS"

fi

       OSDIR="os2"
       enable_threads="system_threads"
       eolstr="\\r\\n"
       file_as_socket="0"
       proc_mutex_is_global=1
       ;;
   *beos*)
       OSDIR="beos"

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DBEOS\""
    CPPFLAGS="-DBEOS"
  else
    apr_addto_bugger="-DBEOS"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

       enable_threads="system_threads"
       native_mmap_emul="1"

  echo "$as_me:7036: checking for BONE_VERSION in sys/socket.h" >&5
echo $ECHO_N "checking for BONE_VERSION in sys/socket.h... $ECHO_C" >&6
if test "${ac_cv_define_BONE_VERSION+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 7043 "configure"
#include "confdefs.h"

    #include <sys/socket.h>
    #ifdef BONE_VERSION
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_BONE_VERSION=yes
else
  ac_cv_define_BONE_VERSION=no
fi
rm -f conftest*

fi
echo "$as_me:7061: result: $ac_cv_define_BONE_VERSION" >&5
echo "${ECHO_T}$ac_cv_define_BONE_VERSION" >&6
  if test "$ac_cv_define_BONE_VERSION" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_BONE_VERSION 1
EOF

  fi

       eolstr="\\n"
       osver=`uname -r`
       proc_mutex_is_global=1
       case $osver in
          5.0.4)
             file_as_socket="1"
             ;;
          *)
             file_as_socket="0"
             ;;
       esac
       ;;
   *os390)
       OSDIR="os390"
       eolstr="\\n"
       ;;
   *os400)
       OSDIR="as400"
       eolstr="\\n"
       ;;
   *cygwin*)
       OSDIR="unix"

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-DCYGWIN\""
    CPPFLAGS="-DCYGWIN"
  else
    apr_addto_bugger="-DCYGWIN"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

       enable_threads="no"
       eolstr="\\n"
       ;;
   *sun*)
       case $host_cpu in
         *sparc*)
            OSDIR="solaris_sparc"
            eolstr="\\n"
            if test "$enable_nonportable_atomics" = 1; then
              apr_atomic_sparc_compile=apr_atomic_sparc.lo
              sparc_arch=`uname -m`
              is_gnu_as=`${AS} --help 2>/dev/null | grep gnu.org`
              case "$sparc_arch" in
                sun4c|sun4m|sun4d|sun4t|sun4)
                  apr_force_atomic_generic=1
                  apr_atomic_sparc_compile=apr_atomic_sparc_no_support.lo
                  ;;
                *)
                  if test -n "$is_gnu_as"; then
                    ASFLAGS="-xarch=v8plus -K PIC"
                    ASCPPFLAGS="-traditional-cpp -D_ASM -D__STDC__=0"
                    ASCPP="gcc -E"
                  else
                    ASFLAGS="-K pic -P -D_ASM -D__STDC__=0 -xarch=v8plus"
                    ASCPPFLAGS=""
                    ASCPP="cat"
                  fi
                  ;;
                esac
            else
              apr_force_atomic_generic=1
              apr_atomic_sparc_compile=apr_atomic_sparc_no_support.lo
            fi

            ;;
         *)
            OSDIR="unix"
            eolstr="\\n"
            ;;
       esac
       ;;
   *)
       OSDIR="unix"
       eolstr="\\n"
       ;;
esac

case $host 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/'`
        ;;
    *linux*)
        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
        ;;
     *)
        os_version=OS_VERSION_IS_NOT_SET
        ;;
esac

echo "$as_me:7173: checking for res_init in -lresolv" >&5
echo $ECHO_N "checking for res_init in -lresolv... $ECHO_C" >&6
if test "${ac_cv_lib_resolv_res_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7181 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char res_init ();
int
main ()
{
res_init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7200: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7203: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7206: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7209: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_resolv_res_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_resolv_res_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7220: result: $ac_cv_lib_resolv_res_init" >&5
echo "${ECHO_T}$ac_cv_lib_resolv_res_init" >&6
if test $ac_cv_lib_resolv_res_init = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBRESOLV 1
EOF

  LIBS="-lresolv $LIBS"

fi

echo "$as_me:7231: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7239 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7261: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7264: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7267: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7278: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBNSL 1
EOF

  LIBS="-lnsl $LIBS"

fi

echo "$as_me:7289: checking for library containing gethostname" >&5
echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6
if test "${ac_cv_search_gethostname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_gethostname=no
cat >conftest.$ac_ext <<_ACEOF
#line 7297 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7316: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7319: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7322: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7325: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_gethostname="none required"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_gethostname" = no; then
  for ac_lib in nsl; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
#line 7337 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7356: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7359: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7362: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7365: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_gethostname="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:7378: result: $ac_cv_search_gethostname" >&5
echo "${ECHO_T}$ac_cv_search_gethostname" >&6
if test "$ac_cv_search_gethostname" != no; then
  test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS"

fi

echo "$as_me:7385: checking for socket in -lsocket" >&5
echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7393 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7412: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7415: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7418: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7421: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_socket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_socket=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7432: result: $ac_cv_lib_socket_socket" >&5
echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
if test $ac_cv_lib_socket_socket = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSOCKET 1
EOF

  LIBS="-lsocket $LIBS"

fi

echo "$as_me:7443: checking for library containing crypt" >&5
echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
if test "${ac_cv_search_crypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_crypt=no
cat >conftest.$ac_ext <<_ACEOF
#line 7451 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7470: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7473: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7479: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_crypt="none required"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_crypt" = no; then
  for ac_lib in crypt ufc; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
#line 7491 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7510: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7513: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7516: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7519: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_crypt="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:7532: result: $ac_cv_search_crypt" >&5
echo "${ECHO_T}$ac_cv_search_crypt" >&6
if test "$ac_cv_search_crypt" != no; then
  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"

fi

echo "$as_me:7539: checking for main in -ltruerand" >&5
echo $ECHO_N "checking for main in -ltruerand... $ECHO_C" >&6
if test "${ac_cv_lib_truerand_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltruerand  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7547 "configure"
#include "confdefs.h"

int
main ()
{
main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7559: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7562: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7565: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7568: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_truerand_main=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_truerand_main=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7579: result: $ac_cv_lib_truerand_main" >&5
echo "${ECHO_T}$ac_cv_lib_truerand_main" >&6
if test $ac_cv_lib_truerand_main = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBTRUERAND 1
EOF

  LIBS="-ltruerand $LIBS"

fi

echo "$as_me:7590: checking for iconv in -liconv" >&5
echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
if test "${ac_cv_lib_iconv_iconv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7598 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7617: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7620: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7623: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7626: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_iconv_iconv=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_iconv_iconv=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7637: result: $ac_cv_lib_iconv_iconv" >&5
echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
if test $ac_cv_lib_iconv_iconv = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBICONV 1
EOF

  LIBS="-liconv $LIBS"

fi

echo "$as_me:7648: checking for modf in -lm" >&5
echo $ECHO_N "checking for modf in -lm... $ECHO_C" >&6
if test "${ac_cv_lib_m_modf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7656 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7675: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7678: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7681: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7684: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_m_modf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_m_modf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7695: result: $ac_cv_lib_m_modf" >&5
echo "${ECHO_T}$ac_cv_lib_m_modf" >&6
if test $ac_cv_lib_m_modf = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBM 1
EOF

  LIBS="-lm $LIBS"

fi

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_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7722: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7728 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7732: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7738: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7757: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
   enable_threads="pthread"
else
    enable_threads="no"
fi
done

    CPPFLAGS="$SAVE_FL"
  else

for ac_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:7775: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7781 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:7785: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:7791: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:7810: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
   enable_threads="pthread"
else
    enable_threads="no"
fi
done

  fi

fi;
fi

if test "$enable_threads" = "no"; then
    threads="0"
    pthreadh="0"
    pthreadser="0"
else
    if test "$enable_threads" = "pthread"; then
# We have specified pthreads for our threading library, just make sure
# that we have everything we need

  apr_pthsv_CFLAGS="$CFLAGS"
  apr_pthsv_LIBS="$LIBS"

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"
fi

if test "$cross_compiling" = yes; then
  pthreads_working="no"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7851 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:7870: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7873: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:7875: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7878: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:7894: checking for pthreads_cflags" >&5
echo $ECHO_N "checking for pthreads_cflags... $ECHO_C" >&6
if test "${ac_cv_pthreads_cflags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 <<_ACEOF
#line 7910 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:7929: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7932: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:7934: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7937: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

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

fi
echo "$as_me:7962: result: $ac_cv_pthreads_cflags" >&5
echo "${ECHO_T}$ac_cv_pthreads_cflags" >&6

echo "$as_me:7965: checking for pthreads_lib" >&5
echo $ECHO_N "checking for pthreads_lib... $ECHO_C" >&6
if test "${ac_cv_pthreads_lib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 <<_ACEOF
#line 7981 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8000: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8003: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8005: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8008: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

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

fi
echo "$as_me:8033: result: $ac_cv_pthreads_lib" >&5
echo "${ECHO_T}$ac_cv_pthreads_lib" >&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_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:8049: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8055 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:8059: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:8065: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:8084: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >>confdefs.h <<\EOF
#define USE_THREADS 1
EOF

else

          threads="0"
          pthreadh="0"
          pthreadser="0"

  CFLAGS="$apr_pthsv_CFLAGS"
  LIBS="$apr_pthsv_LIBS"

fi
done

    CPPFLAGS="$SAVE_FL"
  else

for ac_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:8116: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8122 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:8126: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:8132: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:8151: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >>confdefs.h <<\EOF
#define USE_THREADS 1
EOF

else

          threads="0"
          pthreadh="0"
          pthreadser="0"

  CFLAGS="$apr_pthsv_CFLAGS"
  LIBS="$apr_pthsv_LIBS"

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.

  apr_pthsv_CFLAGS="$CFLAGS"
  apr_pthsv_LIBS="$LIBS"

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"
fi

if test "$cross_compiling" = yes; then
  pthreads_working="no"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8203 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8222: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8225: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8227: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8230: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:8246: checking for pthreads_cflags" >&5
echo $ECHO_N "checking for pthreads_cflags... $ECHO_C" >&6
if test "${ac_cv_pthreads_cflags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 <<_ACEOF
#line 8262 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8281: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8284: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8286: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8289: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

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

fi
echo "$as_me:8314: result: $ac_cv_pthreads_cflags" >&5
echo "${ECHO_T}$ac_cv_pthreads_cflags" >&6

echo "$as_me:8317: checking for pthreads_lib" >&5
echo $ECHO_N "checking for pthreads_lib... $ECHO_C" >&6
if test "${ac_cv_pthreads_lib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 <<_ACEOF
#line 8333 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8352: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8355: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8360: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  pthreads_working="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  pthreads_working="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

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

fi
echo "$as_me:8385: result: $ac_cv_pthreads_lib" >&5
echo "${ECHO_T}$ac_cv_pthreads_lib" >&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_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:8401: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8407 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:8411: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:8417: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:8436: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >>confdefs.h <<\EOF
#define USE_THREADS 1
EOF

else

          threads="0"
          pthreadser="0"
          pthreadh="0"

  CFLAGS="$apr_pthsv_CFLAGS"
  LIBS="$apr_pthsv_LIBS"

fi
done

    CPPFLAGS="$SAVE_FL"
  else

for ac_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:8468: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8474 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:8478: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:8484: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:8503: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

          threads="1"
          pthreadh="1"
          pthreadser="1"
          cat >>confdefs.h <<\EOF
#define USE_THREADS 1
EOF

else

          threads="0"
          pthreadser="0"
          pthreadh="0"

  CFLAGS="$apr_pthsv_CFLAGS"
  LIBS="$apr_pthsv_LIBS"

fi
done

  fi

    fi
    if test "$pthreadh" = "1"; then

echo "$as_me:8534: checking whether pthread_getspecific takes two arguments" >&5
echo $ECHO_N "checking whether pthread_getspecific takes two arguments... $ECHO_C" >&6
if test "${ac_cv_pthread_getspecific_two_args+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 8541 "configure"
#include "confdefs.h"

#include <pthread.h>

int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8559: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8562: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8565: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8568: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_pthread_getspecific_two_args=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_pthread_getspecific_two_args=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:8583: result: $ac_cv_pthread_getspecific_two_args" >&5
echo "${ECHO_T}$ac_cv_pthread_getspecific_two_args" >&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 "$as_me:8594: checking whether pthread_attr_getdetachstate takes one argument" >&5
echo $ECHO_N "checking whether pthread_attr_getdetachstate takes one argument... $ECHO_C" >&6
if test "${ac_cv_pthread_attr_getdetachstate_one_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 8601 "configure"
#include "confdefs.h"

#include <pthread.h>

int
main ()
{

pthread_attr_t *attr;
pthread_attr_getdetachstate(attr);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8618: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8621: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8624: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8627: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_pthread_attr_getdetachstate_one_arg=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_pthread_attr_getdetachstate_one_arg=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:8642: result: $ac_cv_pthread_attr_getdetachstate_one_arg" >&5
echo "${ECHO_T}$ac_cv_pthread_attr_getdetachstate_one_arg" >&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 pthread_rwlock_init
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8656: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8662 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8693: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8696: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8699: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8702: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8712: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

        if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then
                                                            cat >conftest.$ac_ext <<_ACEOF
#line 8724 "configure"
#include "confdefs.h"
#include <sys/types.h>
                            #include <pthread.h>
int
main ()
{
pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8737: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8740: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8743: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8746: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_struct_pthread_rw=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_struct_pthread_rw=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
            if test "$ac_cv_struct_pthread_rw" = "no"; then
                cat >conftest.$ac_ext <<_ACEOF
#line 8757 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE 500
                    #define _BSD_SOURCE
                    #define _SVID_SOURCE
                    #include <sys/types.h>
                    #include <pthread.h>
int
main ()
{
pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8776: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8779: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8782: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_struct_pthread_rw=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_struct_pthread_rw=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$ac_cv_struct_pthread_rw" = "yes"; then

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_XOPEN_SOURCE=500 -D_BSD_SOURCE\""
    CPPFLAGS="-D_XOPEN_SOURCE=500 -D_BSD_SOURCE"
  else
    apr_addto_bugger="-D_XOPEN_SOURCE=500 -D_BSD_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_SVID_SOURCE\""
    CPPFLAGS="-D_SVID_SOURCE"
  else
    apr_addto_bugger="-D_SVID_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

                fi
            fi
        fi
    fi
fi

ac_cv_define_READDIR_IS_THREAD_SAFE=no
ac_cv_define_GETHOSTBYNAME_IS_THREAD_SAFE=no
ac_cv_define_GETHOSTBYADDR_IS_THREAD_SAFE=no
if test "$threads" = "1"; then
    echo "APR will use threads"
    echo "$as_me:8844: checking for readdir in -lc_r" >&5
echo $ECHO_N "checking for readdir in -lc_r... $ECHO_C" >&6
if test "${ac_cv_lib_c_r_readdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8852 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8871: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8874: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8877: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8880: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_c_r_readdir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_c_r_readdir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8891: result: $ac_cv_lib_c_r_readdir" >&5
echo "${ECHO_T}$ac_cv_lib_c_r_readdir" >&6
if test $ac_cv_lib_c_r_readdir = yes; then
  cat >>confdefs.h <<\EOF
#define READDIR_IS_THREAD_SAFE 1
EOF

fi

    if test "x$apr_gethostbyname_is_thread_safe" = "x"; then
        echo "$as_me:8901: checking for gethostbyname in -lc_r" >&5
echo $ECHO_N "checking for gethostbyname in -lc_r... $ECHO_C" >&6
if test "${ac_cv_lib_c_r_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8909 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8928: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8931: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8934: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8937: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_c_r_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_c_r_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8948: result: $ac_cv_lib_c_r_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_c_r_gethostbyname" >&6
if test $ac_cv_lib_c_r_gethostbyname = yes; then
  apr_gethostbyname_is_thread_safe=yes
fi

    fi
    if test "$apr_gethostbyname_is_thread_safe" = "yes"; then
        cat >>confdefs.h <<\EOF
#define GETHOSTBYNAME_IS_THREAD_SAFE 1
EOF

    fi
    if test "x$apr_gethostbyaddr_is_thread_safe" = "x"; then
        echo "$as_me:8962: checking for gethostbyaddr in -lc_r" >&5
echo $ECHO_N "checking for gethostbyaddr in -lc_r... $ECHO_C" >&6
if test "${ac_cv_lib_c_r_gethostbyaddr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8970 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyaddr ();
int
main ()
{
gethostbyaddr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8989: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8992: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8995: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8998: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_c_r_gethostbyaddr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_c_r_gethostbyaddr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9009: result: $ac_cv_lib_c_r_gethostbyaddr" >&5
echo "${ECHO_T}$ac_cv_lib_c_r_gethostbyaddr" >&6
if test $ac_cv_lib_c_r_gethostbyaddr = yes; then
  apr_gethostbyaddr_is_thread_safe=yes
fi

    fi
    if test "$apr_gethostbyaddr_is_thread_safe" = "yes"; then
        cat >>confdefs.h <<\EOF
#define GETHOSTBYADDR_IS_THREAD_SAFE 1
EOF

    fi

for ac_func in gethostbyname_r gethostbyaddr_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9026: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9032 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9063: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9066: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9072: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9082: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

    case "$host" in
    *-ibm-aix*)

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_THREAD_SAFE\""
    CPPFLAGS="-D_THREAD_SAFE"
  else
    apr_addto_bugger="-D_THREAD_SAFE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

        ;;
    esac
else
    echo "APR will be non-threaded"
fi

for ac_func in sigsuspend
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9124: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9130 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9161: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9164: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9167: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9170: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9180: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_sigsuspend="1"
else
   have_sigsuspend="0"
fi
done

for ac_func in sigwait
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9195: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9201 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9232: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9235: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9238: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9241: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9251: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_sigwait="1"
else
   have_sigwait="0"
fi
done

case $host in
    *alpha*-dec-osf* )
        have_sigwait="1"
        ;;
esac

for ac_func in poll
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9272: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9278 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9309: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9312: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9315: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9318: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9328: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getpwnam_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9341: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9347 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9378: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9381: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9384: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9387: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9397: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getpwuid_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9410: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9416 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9447: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9450: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9453: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9456: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9466: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getgrnam_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9479: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9485 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9516: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9519: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9522: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9525: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9535: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getgrgid_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9548: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9554 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9585: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9588: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9591: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9594: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9604: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

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

case $host in
   *-solaris*)

echo "$as_me:9619: checking for shm_open in -lrt" >&5
echo $ECHO_N "checking for shm_open in -lrt... $ECHO_C" >&6
if test "${ac_cv_lib_rt_shm_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9627 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shm_open ();
int
main ()
{
shm_open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9646: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9649: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9652: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9655: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_rt_shm_open=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_rt_shm_open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9666: result: $ac_cv_lib_rt_shm_open" >&5
echo "${ECHO_T}$ac_cv_lib_rt_shm_open" >&6
if test $ac_cv_lib_rt_shm_open = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBRT 1
EOF

  LIBS="-lrt $LIBS"

fi

       ;;
esac

for ac_header in sys/mman.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9683: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9689 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9693: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9699: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9718: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

  echo "$as_me:9728: checking for MAP_ANON in sys/mman.h" >&5
echo $ECHO_N "checking for MAP_ANON in sys/mman.h... $ECHO_C" >&6
if test "${ac_cv_define_MAP_ANON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 9735 "configure"
#include "confdefs.h"

    #include <sys/mman.h>
    #ifdef MAP_ANON
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_MAP_ANON=yes
else
  ac_cv_define_MAP_ANON=no
fi
rm -f conftest*

fi
echo "$as_me:9753: result: $ac_cv_define_MAP_ANON" >&5
echo "${ECHO_T}$ac_cv_define_MAP_ANON" >&6
  if test "$ac_cv_define_MAP_ANON" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_MAP_ANON 1
EOF

  fi

for ac_func in mmap munmap shm_open shm_unlink
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9765: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9771 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9802: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9805: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9808: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9811: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9821: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

ac_safe=`echo "/dev/zero" | sed 'y%./+-%__p_%'`
echo "$as_me:9832: checking for /dev/zero" >&5
echo $ECHO_N "checking for /dev/zero... $ECHO_C" >&6
if eval "test \"\${ac_cv_file_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test -r /dev/zero; then
    eval "ac_cv_file_$ac_safe=yes"
  else
    eval "ac_cv_file_$ac_safe=no"
  fi

fi
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  echo "$as_me:9846: result: yes" >&5
echo "${ECHO_T}yes" >&6
  :
else
  echo "$as_me:9850: result: no" >&5
echo "${ECHO_T}no" >&6

fi

for ac_header in sys/ipc.h sys/shm.h sys/file.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9858: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9864 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9868: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9874: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9893: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in shmget shmat shmdt shmctl
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:9906: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9912 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9943: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9946: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9949: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9952: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:9962: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in kernel/OS.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9975: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9981 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9985: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9991: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10010: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in create_area
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10023: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10029 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10060: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10063: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10066: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10069: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10079: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in os2.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:10092: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10098 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10102: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10108: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10127: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

if test "$ac_cv_func_mmap" = "yes" &&
   test "$ac_cv_file__dev_zero" = "yes"; then
    echo "$as_me:10139: checking for mmap that can map /dev/zero" >&5
echo $ECHO_N "checking for mmap that can map /dev/zero... $ECHO_C" >&6
    if test "$cross_compiling" = yes; then
  ac_cv_file__dev_zero=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10145 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
    int main()
    {
        int fd;
        void *m;
        fd = open("/dev/zero", O_RDWR);
        if (fd < 0) {
            return 1;
        }
        m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
        if (m < 0) {  /* aka MAP_FAILED */
            return 2;
        }
        if (munmap(m, sizeof(void*)) < 0) {
            return 3;
        }
        return 0;
    }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10173: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10176: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10178: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10181: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_file__dev_zero=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

    echo "$as_me:10193: result: $ac_cv_file__dev_zero" >&5
echo "${ECHO_T}$ac_cv_file__dev_zero" >&6
fi

haveshmgetanon="0"
havemmapzero="0"
havemmapanon="0"
ac_decision_item='anonymous shared memory allocation method'
ac_decision_msg='FAILED'
ac_decision=''

ac_rc=yes
for ac_spec in header:sys/ipc.h header:sys/shm.h header:sys/file.h              func:shmget func:shmat func:shmdt func:shmctl; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    haveshmgetanon="1"
              ac_decision='USE_SHMEM_SHMGET_ANON'
ac_decision_msg='SysV IPC shmget()'
ac_decision_USE_SHMEM_SHMGET_ANON=yes
ac_decision_USE_SHMEM_SHMGET_ANON_msg='SysV IPC shmget()'

else
    :

fi

ac_rc=yes
for ac_spec in header:sys/mman.h func:mmap func:munmap file:/dev/zero; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havemmapzero="1"
              ac_decision='USE_SHMEM_MMAP_ZERO'
ac_decision_msg='SVR4-style mmap() on /dev/zero'
ac_decision_USE_SHMEM_MMAP_ZERO=yes
ac_decision_USE_SHMEM_MMAP_ZERO_msg='SVR4-style mmap() on /dev/zero'

else
    :

fi

ac_rc=yes
for ac_spec in header:sys/mman.h func:mmap func:munmap define:MAP_ANON; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havemmapanon="1"
              ac_decision='USE_SHMEM_MMAP_ANON'
ac_decision_msg='4.4BSD-style mmap() via MAP_ANON'
ac_decision_USE_SHMEM_MMAP_ANON=yes
ac_decision_USE_SHMEM_MMAP_ANON_msg='4.4BSD-style mmap() via MAP_ANON'

else
    :

fi

ac_rc=yes
for ac_spec in header:os2.h; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    haveos2shm="1"
              ac_decision='USE_SHMEM_OS2_ANON'
ac_decision_msg='OS/2 DosAllocSharedMem()'
ac_decision_USE_SHMEM_OS2_ANON=yes
ac_decision_USE_SHMEM_OS2_ANON_msg='OS/2 DosAllocSharedMem()'

else
    :

fi

ac_rc=yes
for ac_spec in header:kernel/OS.h func:create_area; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havebeosshm="1"
              ac_decision='USE_SHMEM_BEOS_ANON'
ac_decision_msg='BeOS areas'
ac_decision_USE_SHMEM_BEOS_ANON=yes
ac_decision_USE_SHMEM_BEOS_ANON_msg='BeOS areas'

else
    :

fi

case $host in
    *linux* )
                                        if test $os_version -le "240"; then
                ac_decision=''
    for ac_item in USE_SHMEM_MMAP_ZERO USE_SHMEM_SHMGET_ANON; do
         eval "ac_decision_this=\$ac_decision_${ac_item}"
         if test ".$ac_decision_this" = .yes; then
             ac_decision=$ac_item
             eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
         fi
    done

        fi
        ;;
    *hpux11* )
            ac_decision=''
    for ac_item in USE_SHMEM_SHMGET_ANON; do
         eval "ac_decision_this=\$ac_decision_${ac_item}"
         if test ".$ac_decision_this" = .yes; then
             ac_decision=$ac_item
             eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
         fi
    done

        ;;
esac
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 "$as_me:10426: result: decision on $ac_decision_item... $ac_decision_msg" >&5
echo "${ECHO_T}decision on $ac_decision_item... $ac_decision_msg" >&6
fi

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

useshmgetanon="0"
usemmapzero="0"
usemmapanon="0"

case $ac_decision in
    USE_SHMEM_SHMGET_ANON )
        useshmgetanon="1"
        ;;
    USE_SHMEM_MMAP_ZERO )
        usemmapzero="1"
        ;;
    USE_SHMEM_MMAP_ANON )
        usemmapanon="1"
        ;;
esac

havemmaptmp="0"
havemmapshm="0"
haveshmget="0"
havebeosarea="0"
haveos2shm="0"
ac_decision_item='namebased memory allocation method'
ac_decision_msg='FAILED'
ac_decision=''

ac_rc=yes
for ac_spec in header:sys/mman.h func:mmap func:munmap; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havemmaptmp="1"
              ac_decision='USE_SHMEM_MMAP_TMP'
ac_decision_msg='Classical mmap() on temporary file'
ac_decision_USE_SHMEM_MMAP_TMP=yes
ac_decision_USE_SHMEM_MMAP_TMP_msg='Classical mmap() on temporary file'

else
    :

fi

ac_rc=yes
for ac_spec in header:sys/mman.h func:mmap func:munmap func:shm_open              func:shm_unlink; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havemmapshm="1"
              ac_decision='USE_SHMEM_MMAP_SHM'
ac_decision_msg='mmap() via POSIX.1 shm_open() on temporary file'
ac_decision_USE_SHMEM_MMAP_SHM=yes
ac_decision_USE_SHMEM_MMAP_SHM_msg='mmap() via POSIX.1 shm_open() on temporary file'

else
    :

fi

ac_rc=yes
for ac_spec in header:sys/ipc.h header:sys/shm.h header:sys/file.h              func:shmget func:shmat func:shmdt func:shmctl; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    haveshmget="1"
              ac_decision='USE_SHMEM_SHMGET'
ac_decision_msg='SysV IPC shmget()'
ac_decision_USE_SHMEM_SHMGET=yes
ac_decision_USE_SHMEM_SHMGET_msg='SysV IPC shmget()'

else
    :

fi

ac_rc=yes
for ac_spec in header:kernel/OS.h func:create_area; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    havebeosshm="1"
              ac_decision='USE_SHMEM_BEOS'
ac_decision_msg='BeOS areas'
ac_decision_USE_SHMEM_BEOS=yes
ac_decision_USE_SHMEM_BEOS_msg='BeOS areas'

else
    :

fi

ac_rc=yes
for ac_spec in header:os2.h; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    haveos2shm="1"
              ac_decision='USE_SHMEM_OS2'
ac_decision_msg='OS/2 DosAllocSharedMem()'
ac_decision_USE_SHMEM_OS2=yes
ac_decision_USE_SHMEM_OS2_msg='OS/2 DosAllocSharedMem()'

else
    :

fi

case $host in
    *linux* )
                                        if test $os_version -le "240"; then
                ac_decision=''
    for ac_item in USE_SHMEM_MMAP_TMP USE_SHMEM_MMAP_SHM                                   USE_SHMEM_SHMGET; do
         eval "ac_decision_this=\$ac_decision_${ac_item}"
         if test ".$ac_decision_this" = .yes; then
             ac_decision=$ac_item
             eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
         fi
    done

        fi
        ;;
esac
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 "$as_me:10670: result: decision on $ac_decision_item... $ac_decision_msg" >&5
echo "${ECHO_T}decision on $ac_decision_item... $ac_decision_msg" >&6
fi

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

usemmaptmp="0"
usemmapshm="0"
useshmget="0"
usebeosarea="0"
useos2shm="0"

case $ac_decision in
    USE_SHMEM_MMAP_TMP )
        usemmaptmp="1"
        ;;
    USE_SHMEM_MMAP_SHM )
        usemmapshm="1"
        ;;
    USE_SHMEM_SHMGET )
        useshmget="1"
        ;;
    USE_SHMEM_BEOS )
        usebeosarea="1"
        ;;
    USE_SHMEM_OS2 )
        useos2shm="1"
        ;;
esac

if test "$usemmaptmp$usemmapshm$usemmapzero$useshmget$usemmapanon$usebeosarea$useos2shm" = "0000000"; then
  sharedmem="0"
else
  sharedmem="1"
fi

for ac_func in calloc strcasecmp stricmp setsid nl_langinfo isinf isnan
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10711: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10717 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10748: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10751: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10754: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10757: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10767: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in setrlimit
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10780: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10786 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10817: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10820: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10823: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10826: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10836: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_setrlimit="1"
else
   have_setrlimit="0"
fi
done

for ac_func in getrlimit
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10851: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10857 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10888: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10891: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10894: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10897: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10907: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_getrlimit="1"
else
   have_getrlimit="0"
fi
done

for ac_func in writev
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10922: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10928 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10959: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10962: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10965: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10968: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10978: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

sendfile="0"

echo "$as_me:10990: checking for sendfilev in -lsendfile" >&5
echo $ECHO_N "checking for sendfilev in -lsendfile... $ECHO_C" >&6
if test "${ac_cv_lib_sendfile_sendfilev+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsendfile  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10998 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char sendfilev ();
int
main ()
{
sendfilev ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11017: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11020: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11023: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11026: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sendfile_sendfilev=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_sendfile_sendfilev=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11037: result: $ac_cv_lib_sendfile_sendfilev" >&5
echo "${ECHO_T}$ac_cv_lib_sendfile_sendfilev" >&6
if test $ac_cv_lib_sendfile_sendfilev = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSENDFILE 1
EOF

  LIBS="-lsendfile $LIBS"

fi

for ac_func in sendfile send_file sendfilev
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11051: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11057 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11088: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11091: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11094: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11097: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11107: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  sendfile="1"
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 $host 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
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11151: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11157 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11188: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11191: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11194: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11197: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11207: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_sigaction="1"
else
   have_sigaction="0"
fi
done

echo "$as_me:11219: checking for sys_siglist declaration in signal.h or unistd.h" >&5
echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
if test "${ac_cv_decl_sys_siglist+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11225 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h.  */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

int
main ()
{
char *msg = *(sys_siglist + 1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11243: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11246: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11249: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11252: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_decl_sys_siglist=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_decl_sys_siglist=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:11262: result: $ac_cv_decl_sys_siglist" >&5
echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&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
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11275: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11281 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11312: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11315: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11318: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11321: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11331: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  fork="1"
else
   fork="0"
fi
done

for ac_func in getpass
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11346: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11352 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11383: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11386: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11389: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11392: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11402: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:11412: checking for inet_addr" >&5
echo $ECHO_N "checking for inet_addr... $ECHO_C" >&6
if test "${ac_cv_func_inet_addr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 11419 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11440: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11443: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11446: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11449: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_func_inet_addr=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_func_inet_addr=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:11464: result: $ac_cv_func_inet_addr" >&5
echo "${ECHO_T}$ac_cv_func_inet_addr" >&6

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

echo "$as_me:11473: checking for inet_network" >&5
echo $ECHO_N "checking for inet_network... $ECHO_C" >&6
if test "${ac_cv_func_inet_network+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 11480 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11501: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11504: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11507: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11510: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_func_inet_network=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_func_inet_network=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:11525: result: $ac_cv_func_inet_network" >&5
echo "${ECHO_T}$ac_cv_func_inet_network" >&6

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

echo "$as_me:11534: checking for _getch" >&5
echo $ECHO_N "checking for _getch... $ECHO_C" >&6
if test "${ac_cv_func__getch+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11540 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _getch ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub__getch) || defined (__stub____getch)
choke me
#else
f = _getch;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11571: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11574: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11577: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11580: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func__getch=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func__getch=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11590: result: $ac_cv_func__getch" >&5
echo "${ECHO_T}$ac_cv_func__getch" >&6

for ac_func in gmtime_r localtime_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11596: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11602 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11633: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11636: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11639: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11642: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11652: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in strerror_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11665: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11671 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11702: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11705: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11708: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11711: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11721: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  strerror_r="1"
else
   strerror_r="0"
fi
done

if test "$strerror_r" = "1"; then

echo "$as_me:11735: checking for type of return code from strerror_r" >&5
echo $ECHO_N "checking for type of return code from strerror_r... $ECHO_C" >&6
if test "$cross_compiling" = yes; then

    ac_cv_strerror_r_rc_int=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11742 "configure"
#include "confdefs.h"

#include <errno.h>
#include <stdio.h>
main()
{
  char buf[1024];
  if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
    exit(0);
  }
  else {
    exit(1);
  }
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:11759: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11762: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:11764: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11767: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_strerror_r_rc_int=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_strerror_r_rc_int=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "x$ac_cv_strerror_r_rc_int" = xyes; then
  cat >>confdefs.h <<\EOF
#define STRERROR_R_RC_INT 1
EOF

  msg="int"
else
  msg="pointer"
fi
echo "$as_me:11789: result: $msg" >&5
echo "${ECHO_T}$msg" >&6

fi

for ac_func in crypt_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11797: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11803 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11834: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11837: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11840: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11843: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11853: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  crypt_r="1"
else
   crypt_r="0"
fi
done

if test "$crypt_r" = "1"; then

echo "$as_me:11867: checking style of crypt_r" >&5
echo $ECHO_N "checking style of crypt_r... $ECHO_C" >&6
if test "${ac_cv_crypt_r_style+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_cv_crypt_r_style=none
cat >conftest.$ac_ext <<_ACEOF
#line 11875 "configure"
#include "confdefs.h"

#include <crypt.h>

int
main ()
{

CRYPTD buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11892: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11895: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11898: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11901: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_crypt_r_style=cryptd
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test "$ac_cv_crypt_r_style" = "none"; then
cat >conftest.$ac_ext <<_ACEOF
#line 11911 "configure"
#include "confdefs.h"

#include <crypt.h>

int
main ()
{

struct crypt_data buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11928: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11931: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11934: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11937: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_crypt_r_style=struct_crypt_data
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test "$ac_cv_crypt_r_style" = "none"; then
cat >conftest.$ac_ext <<_ACEOF
#line 11948 "configure"
#include "confdefs.h"

#define _GNU_SOURCE
#include <crypt.h>

int
main ()
{

struct crypt_data buffer;
crypt_r("passwd", "hash", &buffer);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11966: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11969: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11972: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11975: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_crypt_r_style=struct_crypt_data_gnu_source
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:11986: result: $ac_cv_crypt_r_style" >&5
echo "${ECHO_T}$ac_cv_crypt_r_style" >&6
if test "$ac_cv_crypt_r_style" = "cryptd"; then

cat >>confdefs.h <<\EOF
#define CRYPT_R_CRYPTD 1
EOF

fi
if test "$ac_cv_crypt_r_style" = "struct_crypt_data" -o \
   "$ac_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then

cat >>confdefs.h <<\EOF
#define CRYPT_R_STRUCT_CRYPT_DATA 1
EOF

fi
if test "$ac_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_GNU_SOURCE\""
    CPPFLAGS="-D_GNU_SOURCE"
  else
    apr_addto_bugger="-D_GNU_SOURCE"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

fi

fi

for ac_func in iconv
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12032: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12038 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12069: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12072: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12075: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12078: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12088: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  iconv="1"
else
   iconv="0"
fi
done

if test "$iconv" = "1"; then

echo "$as_me:12102: checking for type of inbuf parameter to iconv" >&5
echo $ECHO_N "checking for type of inbuf parameter to iconv... $ECHO_C" >&6
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 "$as_me:12149: result: $msg" >&5
echo "${ECHO_T}$msg" >&6

fi

for ac_func in mmap
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12157: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12163 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12194: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12197: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12200: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12203: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12213: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  mmap="1"
else
   mmap="0"
fi
done

if test "$native_mmap_emul" = "1"; then
    mmap="1"
fi

for ac_func in hstrerror
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12232: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12238 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12269: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12272: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12275: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12278: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12288: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in memmove
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12301: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12307 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12338: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12341: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12344: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12347: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12357: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  have_memmove="1"
else
  have_memmove="0"
fi
done

for ac_func in mkstemp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12372: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12378 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12409: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12412: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12415: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12418: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12428: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  echo "$as_me:12438: checking whether sigwait takes one argument" >&5
echo $ECHO_N "checking whether sigwait takes one argument... $ECHO_C" >&6
if test "${ac_cv_sigwait_one_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  cat >conftest.$ac_ext <<_ACEOF
#line 12445 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12470: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12473: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12476: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12479: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_sigwait_one_arg=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_sigwait_one_arg=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12493: result: $ac_cv_sigwait_one_arg" >&5
echo "${ECHO_T}$ac_cv_sigwait_one_arg" >&6
  if test "$ac_cv_sigwait_one_arg" = "yes"; then

cat >>confdefs.h <<\EOF
#define SIGWAIT_TAKES_ONE_ARG 1
EOF

  fi

echo "$as_me:12503: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12509 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:12517: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:12523: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 12545 "configure"
#include "confdefs.h"
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
#line 12563 "configure"
#include "confdefs.h"
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
#line 12584 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      exit(2);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12613: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12615: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12618: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:12631: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

cat >>confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

for ac_header 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		\
    mach-o/dyld.h	\
    malloc.h		\
    memory.h		\
    netdb.h		\
    osreldate.h		\
    poll.h		\
    process.h		\
    pwd.h		\
    semaphore.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/un.h		\
    sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:12702: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12708 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:12712: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:12718: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:12737: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

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		\
    mach-o/dyld.h	\
    malloc.h		\
    memory.h		\
    netdb.h		\
    osreldate.h		\
    poll.h		\
    process.h		\
    pwd.h		\
    semaphore.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/un.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' -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 "$as_me:12816: checking for netinet/tcp.h" >&5
echo $ECHO_N "checking for netinet/tcp.h... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 12819 "configure"
#include "confdefs.h"

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

_ACEOF
if { (eval echo "$as_me:12828: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:12834: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  netinet_tcph="1"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  netinet_tcph="0"
fi
rm -f conftest.err conftest.$ac_ext
if test $netinet_tcph = 1; then
  echo "$as_me:12853: result: yes" >&5
echo "${ECHO_T}yes" >&6
  echo "#define HAVE_NETINET_TCP_H 1" >> confdefs.h
else
  echo "$as_me:12857: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "$netdbh" = "1"; then

  echo "$as_me:12863: checking for h_errno in netdb.h" >&5
echo $ECHO_N "checking for h_errno in netdb.h... $ECHO_C" >&6
  if test "${ac_cv_h_errno_cppflags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test x != x; then
    CPPFLAGS="-D $CPPFLAGS"
  fi
  cat >conftest.$ac_ext <<_ACEOF
#line 12873 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12894: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12897: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12900: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12903: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  if test x != x; then
    ac_cv_h_errno_cppflags=""
  else
    ac_cv_h_errno_cppflags=yes
  fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_h_errno_cppflags=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext
    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 <<_ACEOF
#line 12928 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12952: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12955: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12958: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  if test x$flag != x; then
    ac_cv_h_errno_cppflags="$flag"
  else
    ac_cv_h_errno_cppflags=yes
  fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_h_errno_cppflags=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext
        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 "$as_me:12987: result: yes, with -D$ac_cv_h_errno_cppflags" >&5
echo "${ECHO_T}yes, with -D$ac_cv_h_errno_cppflags" >&6
    else
      echo "$as_me:12990: result: $ac_cv_h_errno_cppflags" >&5
echo "${ECHO_T}$ac_cv_h_errno_cppflags" >&6
    fi
  else
    echo "$as_me:12994: result: $ac_cv_h_errno_cppflags" >&5
echo "${ECHO_T}$ac_cv_h_errno_cppflags" >&6
  fi

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

# On IRIX 5.3, sys/types and inttypes.h are conflicting.

for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:13011: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13017 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13026: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13029: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13032: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13042: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:13052: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13058 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13073: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13076: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13079: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13082: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_off_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13092: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

echo "$as_me:13104: checking for pid_t" >&5
echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13110 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13125: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13128: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13131: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13134: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_pid_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_pid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13144: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6
if test $ac_cv_type_pid_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

echo "$as_me:13156: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13162 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13177: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13180: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13183: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13186: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13196: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

echo "$as_me:13208: checking for uid_t in sys/types.h" >&5
echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
if test "${ac_cv_type_uid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13214 "configure"
#include "confdefs.h"
#include <sys/types.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  ac_cv_type_uid_t=yes
else
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi
echo "$as_me:13228: result: $ac_cv_type_uid_t" >&5
echo "${ECHO_T}$ac_cv_type_uid_t" >&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 "$as_me:13242: checking for ssize_t" >&5
echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
if test "${ac_cv_type_ssize_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13248 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((ssize_t *) 0)
  return 0;
if (sizeof (ssize_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13263: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13266: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13269: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13272: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_ssize_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_ssize_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13282: result: $ac_cv_type_ssize_t" >&5
echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
if test $ac_cv_type_ssize_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define ssize_t int
EOF

fi

echo "$as_me:13294: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line 13302 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:13351: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13354: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13360: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:13377: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:13380: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

echo "$as_me:13385: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 13393 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13402: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13405: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13408: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13411: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:13422: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&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 "$as_me:13437: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13443 "configure"
#include "confdefs.h"

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* 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;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13501: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13504: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13507: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13510: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13520: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\EOF
#define const
EOF

fi

echo "$as_me:13530: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13536 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13551: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13554: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13557: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13560: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13570: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

echo "$as_me:13582: checking whether setpgrp takes no argument" >&5
echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
if test "${ac_cv_func_setpgrp_void+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:13588: error: cannot check setpgrp if cross compiling" >&5
echo "$as_me: error: cannot check setpgrp if cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13593 "configure"
#include "confdefs.h"
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

int
main ()
{
/* If this system has a BSD-style setpgrp, which takes arguments, exit
   successfully.  */
  exit (setpgrp (1,1) == -1);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13610: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13613: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13615: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13618: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_setpgrp_void=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_setpgrp_void=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:13630: result: $ac_cv_func_setpgrp_void" >&5
echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
if test $ac_cv_func_setpgrp_void = yes; then

cat >>confdefs.h <<\EOF
#define SETPGRP_VOID 1
EOF

fi

echo "$as_me:13640: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ac_cv_socklen_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 13647 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13668: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13671: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13674: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13677: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_socklen_t=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_socklen_t=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:13692: result: $ac_cv_socklen_t" >&5
echo "${ECHO_T}$ac_cv_socklen_t" >&6

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

cat >>confdefs.h <<\EOF
#define HAVE_SOCKLEN_T 1
EOF

fi

  echo "$as_me:13703: checking whether system defines INADDR_NONE" >&5
echo $ECHO_N "checking whether system defines INADDR_NONE... $ECHO_C" >&6
if test "${ac_cv_inaddr_none+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  cat >conftest.$ac_ext <<_ACEOF
#line 13710 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13740: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13743: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13746: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_inaddr_none=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_inaddr_none=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13760: result: $ac_cv_inaddr_none" >&5
echo "${ECHO_T}$ac_cv_inaddr_none" >&6
  if test "$ac_cv_inaddr_none" = "no"; then
    apr_inaddr_none="((unsigned int) 0xffffffff)"
  else
    apr_inaddr_none="INADDR_NONE"
  fi

echo "$as_me:13768: checking for char" >&5
echo $ECHO_N "checking for char... $ECHO_C" >&6
if test "${ac_cv_type_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13774 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((char *) 0)
  return 0;
if (sizeof (char))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13789: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13792: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13795: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13798: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_char=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_char=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13808: result: $ac_cv_type_char" >&5
echo "${ECHO_T}$ac_cv_type_char" >&6

echo "$as_me:13811: checking size of char" >&5
echo $ECHO_N "checking size of char... $ECHO_C" >&6
if test "${ac_cv_sizeof_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_char" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 13820 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13832: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13835: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13838: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13841: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 13846 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13858: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13861: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13864: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13867: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 13883 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13895: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13898: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13901: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13904: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 13920 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13932: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13935: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13938: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13941: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_char=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:13954: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13959 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (char)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:13975: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13978: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:13980: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13983: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_char=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_char=0
fi
fi
echo "$as_me:13999: result: $ac_cv_sizeof_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_char" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
EOF

echo "$as_me:14005: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14011 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14026: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14029: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14032: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14035: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_int=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14045: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:14048: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 14057 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14069: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14072: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14075: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14078: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14083 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14095: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14098: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14101: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14104: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14120 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14132: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14135: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14138: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14141: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 14157 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14169: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14172: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14175: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14178: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_int=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:14191: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14196 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (int)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14212: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14215: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14217: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14220: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_int=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_int=0
fi
fi
echo "$as_me:14236: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF

echo "$as_me:14242: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14248 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long *) 0)
  return 0;
if (sizeof (long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14263: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14266: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14269: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14272: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14282: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:14285: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 14294 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14306: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14309: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14312: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14315: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14320 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14332: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14335: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14338: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14341: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14357 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14369: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14372: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14375: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14378: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 14394 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14406: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14409: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14412: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14415: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:14428: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14433 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14449: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14452: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14454: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14457: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long=0
fi
fi
echo "$as_me:14473: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF

echo "$as_me:14479: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6
if test "${ac_cv_type_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14485 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((short *) 0)
  return 0;
if (sizeof (short))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14500: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14503: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14506: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14509: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_short=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_short=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14519: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6

echo "$as_me:14522: checking size of short" >&5
echo $ECHO_N "checking size of short... $ECHO_C" >&6
if test "${ac_cv_sizeof_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_short" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 14531 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14543: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14546: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14549: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14552: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14557 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14569: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14572: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14575: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14578: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14594 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14606: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14609: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14612: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14615: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 14631 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14643: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14646: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14649: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14652: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_short=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:14665: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14670 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (short)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14686: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14689: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14691: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14694: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_short=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_short=0
fi
fi
echo "$as_me:14710: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF

echo "$as_me:14716: checking for long double" >&5
echo $ECHO_N "checking for long double... $ECHO_C" >&6
if test "${ac_cv_type_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14722 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long double *) 0)
  return 0;
if (sizeof (long double))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14737: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14740: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14743: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14746: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_double=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long_double=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14756: result: $ac_cv_type_long_double" >&5
echo "${ECHO_T}$ac_cv_type_long_double" >&6

echo "$as_me:14759: checking size of long double" >&5
echo $ECHO_N "checking size of long double... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_double" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 14768 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long double)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14780: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14783: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14786: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14789: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14794 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long double)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14806: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14809: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14812: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14815: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 14831 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long double)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14843: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14846: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14849: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14852: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 14868 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long double)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14880: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14883: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14886: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14889: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long_double=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:14902: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14907 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long double)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:14923: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:14926: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:14928: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14931: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_double=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_double=0
fi
fi
echo "$as_me:14947: result: $ac_cv_sizeof_long_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF

echo "$as_me:14953: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 14959 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long long *) 0)
  return 0;
if (sizeof (long long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:14974: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:14977: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:14980: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:14983: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:14993: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "$as_me:14996: checking size of long long" >&5
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 15005 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15017: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15020: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15023: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15026: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 15031 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15043: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15046: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15052: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 15068 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15080: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15083: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15086: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15089: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 15105 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:15117: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:15120: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:15123: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15126: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long_long=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:15139: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15144 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long long)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15163: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15165: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15168: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_long=0
fi
fi
echo "$as_me:15184: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&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_int" = "8"; then
    int64_literal='#define APR_INT64_C(val) (val)'
    int64_t_fmt='#define APR_INT64_T_FMT "d"'
    int64_t_fmt_len='#define APR_INT64_T_FMT_LEN 1'
    int64_value="int"
    long_value=int
elif test "$ac_cv_sizeof_long" = "8"; then
    int64_literal='#define APR_INT64_C(val) (val##L)'
    int64_t_fmt='#define APR_INT64_T_FMT "ld"'
    int64_t_fmt_len='#define APR_INT64_T_FMT_LEN 2'
    int64_value="long"
    long_value=long
elif test "$ac_cv_sizeof_long_long" = "8"; then
    int64_literal='#define APR_INT64_C(val) (val##LL)'
                    int64_t_fmt='#define APR_INT64_T_FMT "lld"'
    int64_t_fmt_len='#define APR_INT64_T_FMT_LEN 3'
    int64_value="long long"
    long_value="long long"
elif test "$ac_cv_sizeof_long_double" = "8"; then
    int64_literal='#define APR_INT64_C(val) (val##LD)'
    int64_t_fmt='#define APR_INT64_T_FMT "Ld"'
    int64_t_fmt_len='#define APR_INT64_T_FMT_LEN 2'
    int64_value="long double"
    long_value="long double"
elif test "$ac_cv_sizeof_longlong" = "8"; then
    int64_literal='#define APR_INT64_C(val) (val##LL)'
    int64_t_fmt='#define APR_INT64_T_FMT "qd"'
    int64_t_fmt_len='#define APR_INT64_T_FMT_LEN 2'
    int64_value="__int64"
    long_value="__int64"
else
            int64_literal='#error Can not determine the proper size for apr_int64_t'
    int64_t_fmt='#error Can not determine the proper size for apr_int64_t'
    int64_t_fmt_len='#error Can not determine the proper size for apr_int64_t'
fi

echo "$as_me:15232: checking for INT64_C" >&5
echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6
stdint=0
cat >conftest.$ac_ext <<_ACEOF
#line 15236 "configure"
#include "confdefs.h"
#ifdef INT64_C
YES_IS_DEFINED
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
   ac_cv_define_INT64_C=yes
  echo "$as_me:15246: result: yes" >&5
echo "${ECHO_T}yes" >&6

else
   ac_cv_define_INT64_C=no
  echo "$as_me:15251: result: no" >&5
echo "${ECHO_T}no" >&6

  echo "$as_me:15254: checking for INT64_C in stdint.h" >&5
echo $ECHO_N "checking for INT64_C in stdint.h... $ECHO_C" >&6
if test "${ac_cv_define_INT64_C+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 15261 "configure"
#include "confdefs.h"

    #include <stdint.h>
    #ifdef INT64_C
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_INT64_C=yes
else
  ac_cv_define_INT64_C=no
fi
rm -f conftest*

fi
echo "$as_me:15279: result: $ac_cv_define_INT64_C" >&5
echo "${ECHO_T}$ac_cv_define_INT64_C" >&6
  if test "$ac_cv_define_INT64_C" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_INT64_C 1
EOF

  fi

  if test "$ac_cv_define_INT64_C" = "yes"; then
    stdint=1
  fi

fi
rm -f conftest*

if test "$ac_cv_define_INT64_C" = "yes"; then
    int64_literal='#define APR_INT64_C(val) INT64_C(val)'
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 "$as_me:15320: checking size of ssize_t" >&5
echo $ECHO_N "checking size of ssize_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_ssize_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_ssize_t=8
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15329 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15342: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15345: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15347: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15350: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_ssize_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sizeof_ssize_t=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15362: result: $ac_cv_sizeof_ssize_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_ssize_t" >&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 "$as_me:15376: checking size of size_t" >&5
echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_size_t=8
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15385 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15398: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15401: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15403: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15406: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_size_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sizeof_size_t=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15418: result: $ac_cv_sizeof_size_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_size_t" >&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 "$as_me:15432: checking size of off_t" >&5
echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_off_t=8
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15441 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15454: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15457: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15459: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15462: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_off_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sizeof_off_t=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15474: result: $ac_cv_sizeof_off_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_off_t" >&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 "$as_me:15490: checking size of pid_t" >&5
echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_pid_t=8
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15499 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:15512: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15515: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:15517: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15520: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_pid_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sizeof_pid_t=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:15532: result: $ac_cv_sizeof_pid_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&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
    pid_t_fmt='#define APR_PID_T_FMT "d"'
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then
    pid_t_fmt='#define APR_PID_T_FMT "ld"'
elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then
    pid_t_fmt='#define APR_PID_T_FMT "qd"'
else
    pid_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 $host in
   *linux*)
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       ;;
   *os2_emx)
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       size_t_fmt='#define APR_SIZE_T_FMT "lu"'
       ;;
   *-solaris*)
       off_t_fmt='#define APR_OFF_T_FMT "ld"'
       pid_t_fmt='#define APR_PID_T_FMT "ld"'
       ;;
   *aix4*|*aix5*)
       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"'
        ;;
    *apple-darwin*)
        ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
        size_t_fmt='#define APR_SIZE_T_FMT "lu"'
        ;;
esac

for ac_func in strnicmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15582: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15588 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15619: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15622: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15625: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15628: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15638: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_strnicmp="1"
else
  have_strnicmp="0"
fi
done

for ac_func in strncasecmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15653: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15659 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15690: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15693: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15696: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15699: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15709: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_strncasecmp="1"
else
  have_strncasecmp="0"
fi
done

for ac_func in stricmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15724: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15730 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15761: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15764: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15767: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15770: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15780: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_stricmp="1"
else
  have_stricmp="0"
fi
done

for ac_func in strcasecmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15795: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15801 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15832: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15835: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15838: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15841: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15851: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_strcasecmp="1"
else
  have_strcasecmp="0"
fi
done

for ac_func in strdup
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15866: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15872 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15903: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15906: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15909: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15912: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15922: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_strdup="1"
else
  have_strdup="0"
fi
done

for ac_func in strstr
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:15937: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 15943 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:15974: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:15977: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:15980: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:15983: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:15993: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_strstr="1"
else
  have_strstr="0"
fi
done

for ac_func in memchr
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16008: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16014 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16045: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16048: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16051: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16054: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16064: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 have_memchr="1"
else
  have_memchr="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

for ac_func in NSLinkModule
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16086: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16092 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16123: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16126: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16129: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16132: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16142: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  tempdso="dyld"
else
   tempdso="no"
fi
done

    if test "$tempdso" = "no"; then
      echo "$as_me:16155: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16163 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16182: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16185: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16188: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16191: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16202: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
   tempdso="dlfcn"
  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-ldl\""
    LIBS="-ldl"
  else
    apr_addto_bugger="-ldl"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

else
  tempdso="no"
fi

    fi
    if test "$tempdso" = "no"; then

for ac_func in dlopen
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16236: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16242 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16273: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16276: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16279: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16282: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16292: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
  tempdso="dlfcn"
else
   tempdso="no"
fi
done

    fi
    if test "$tempdso" = "no"; then
      echo "$as_me:16306: checking for load_image in -lroot" >&5
echo $ECHO_N "checking for load_image in -lroot... $ECHO_C" >&6
if test "${ac_cv_lib_root_load_image+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lroot  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16314 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16333: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16336: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16339: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16342: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_root_load_image=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_root_load_image=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16353: result: $ac_cv_lib_root_load_image" >&5
echo "${ECHO_T}$ac_cv_lib_root_load_image" >&6
if test $ac_cv_lib_root_load_image = yes; then
  tempdso="yes"
else
  tempdso="no"
fi

    fi
    if test "$tempdso" = "no"; then
      echo "$as_me:16363: checking for shl_load in -ldld" >&5
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 16371 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16390: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16393: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16396: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16399: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dld_shl_load=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dld_shl_load=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:16410: result: $ac_cv_lib_dld_shl_load" >&5
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
if test $ac_cv_lib_dld_shl_load = yes; then
   tempdso="shl"
  if test "x$LIBS" = "x"; then
    echo "  setting LIBS to \"-ldld\""
    LIBS="-ldld"
  else
    apr_addto_bugger="-ldld"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi

else
  tempdso="no"
fi

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

fi;

if test "$tempdso" = "no"; then
    aprdso="0"
else
    case "$tempdso" in
	dlfcn) cat >>confdefs.h <<\EOF
#define DSO_USE_DLFCN 1
EOF
;;
	shl)   cat >>confdefs.h <<\EOF
#define DSO_USE_SHL 1
EOF
;;
	dyld)  cat >>confdefs.h <<\EOF
#define DSO_USE_DYLD 1
EOF
;;
    esac
    aprdso="1"
    apr_modules="$apr_modules dso"
fi

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

for ac_func in waitpid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16475: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16481 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16512: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16515: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16518: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16521: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16531: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

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 "$as_me:16553: checking struct rlimit" >&5
echo $ECHO_N "checking struct rlimit... $ECHO_C" >&6
if test "${ac_cv_struct_rlimit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then

    ac_cv_struct_rlimit=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16564 "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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:16579: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16582: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:16584: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16587: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_struct_rlimit=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_struct_rlimit=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:16601: result: $ac_cv_struct_rlimit" >&5
echo "${ECHO_T}$ac_cv_struct_rlimit" >&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 flock
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16611: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16617 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16648: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16651: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16654: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16657: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16667: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

for ac_header in semaphore.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:16680: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16686 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:16690: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:16696: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:16715: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in sem_close sem_unlink sem_post sem_wait
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:16728: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16734 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:16765: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16768: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:16771: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16774: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:16784: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:16794: checking for working sem_open" >&5
echo $ECHO_N "checking for working sem_open... $ECHO_C" >&6
if test "${ac_cv_func_sem_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  ac_cv_func_sem_open=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 16804 "configure"
#include "confdefs.h"

#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <semaphore.h>
main()
{
    sem_t *psem;
    const char *sem_name = "/apr_autoconf";

    psem = sem_open(sem_name, O_CREAT, 0644, 1);
    if (psem == (sem_t *)SEM_FAILED) {
	exit(1);
    }
    sem_close(psem);
    sem_unlink(sem_name);
    exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:16826: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:16829: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:16831: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16834: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_sem_open=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_sem_open=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:16846: result: $ac_cv_func_sem_open" >&5
echo "${ECHO_T}$ac_cv_func_sem_open" >&6

# It's stupid, but not all platforms have union semun, even those that need it.
echo "$as_me:16850: checking for union semun in sys/sem.h" >&5
echo $ECHO_N "checking for union semun in sys/sem.h... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 16853 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:16872: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:16875: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:16878: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:16881: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  have_union_semun="1" union_semun=yes
msg=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

have_union_semun="0"
msg=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:16893: result: $msg" >&5
echo "${ECHO_T}$msg" >&6

  echo "$as_me:16896: checking for LOCK_EX in sys/file.h" >&5
echo $ECHO_N "checking for LOCK_EX in sys/file.h... $ECHO_C" >&6
if test "${ac_cv_define_LOCK_EX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 16903 "configure"
#include "confdefs.h"

    #include <sys/file.h>
    #ifdef LOCK_EX
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_LOCK_EX=yes
else
  ac_cv_define_LOCK_EX=no
fi
rm -f conftest*

fi
echo "$as_me:16921: result: $ac_cv_define_LOCK_EX" >&5
echo "${ECHO_T}$ac_cv_define_LOCK_EX" >&6
  if test "$ac_cv_define_LOCK_EX" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_LOCK_EX 1
EOF

  fi

  echo "$as_me:16930: checking for F_SETLK in fcntl.h" >&5
echo $ECHO_N "checking for F_SETLK in fcntl.h... $ECHO_C" >&6
if test "${ac_cv_define_F_SETLK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 16937 "configure"
#include "confdefs.h"

    #include <fcntl.h>
    #ifdef F_SETLK
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_F_SETLK=yes
else
  ac_cv_define_F_SETLK=no
fi
rm -f conftest*

fi
echo "$as_me:16955: result: $ac_cv_define_F_SETLK" >&5
echo "${ECHO_T}$ac_cv_define_F_SETLK" >&6
  if test "$ac_cv_define_F_SETLK" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_F_SETLK 1
EOF

  fi

  echo "$as_me:16964: checking for SEM_UNDO in sys/sem.h" >&5
echo $ECHO_N "checking for SEM_UNDO in sys/sem.h... $ECHO_C" >&6
if test "${ac_cv_define_SEM_UNDO+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 16971 "configure"
#include "confdefs.h"

    #include <sys/sem.h>
    #ifdef SEM_UNDO
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_SEM_UNDO=yes
else
  ac_cv_define_SEM_UNDO=no
fi
rm -f conftest*

fi
echo "$as_me:16989: result: $ac_cv_define_SEM_UNDO" >&5
echo "${ECHO_T}$ac_cv_define_SEM_UNDO" >&6
  if test "$ac_cv_define_SEM_UNDO" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SEM_UNDO 1
EOF

  fi

  echo "$as_me:16998: checking for CODESET in langinfo.h" >&5
echo $ECHO_N "checking for CODESET in langinfo.h... $ECHO_C" >&6
if test "${ac_cv_define_CODESET+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 17005 "configure"
#include "confdefs.h"

    #include <langinfo.h>
    #ifdef CODESET
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_CODESET=yes
else
  ac_cv_define_CODESET=no
fi
rm -f conftest*

fi
echo "$as_me:17023: result: $ac_cv_define_CODESET" >&5
echo "${ECHO_T}$ac_cv_define_CODESET" >&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 "$as_me:17035: checking for POLLIN in poll.h sys/poll.h" >&5
echo $ECHO_N "checking for POLLIN in poll.h sys/poll.h... $ECHO_C" >&6
if test "${ac_cv_define_POLLIN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    ac_cv_define_POLLIN=no
    for curhdr in poll.h sys/poll.h
    do
      cat >conftest.$ac_ext <<_ACEOF
#line 17045 "configure"
#include "confdefs.h"

      #include <$curhdr>
      #ifdef POLLIN
      YES_IS_DEFINED
      #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_POLLIN=yes
fi
rm -f conftest*

    done

fi
echo "$as_me:17063: result: $ac_cv_define_POLLIN" >&5
echo "${ECHO_T}$ac_cv_define_POLLIN" >&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 "$as_me:17074: checking for PTHREAD_PROCESS_SHARED in pthread.h" >&5
echo $ECHO_N "checking for PTHREAD_PROCESS_SHARED in pthread.h... $ECHO_C" >&6
if test "${ac_cv_define_PTHREAD_PROCESS_SHARED+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 17081 "configure"
#include "confdefs.h"

    #include <pthread.h>
    #ifdef PTHREAD_PROCESS_SHARED
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_PTHREAD_PROCESS_SHARED=yes
else
  ac_cv_define_PTHREAD_PROCESS_SHARED=no
fi
rm -f conftest*

fi
echo "$as_me:17099: result: $ac_cv_define_PTHREAD_PROCESS_SHARED" >&5
echo "${ECHO_T}$ac_cv_define_PTHREAD_PROCESS_SHARED" >&6
  if test "$ac_cv_define_PTHREAD_PROCESS_SHARED" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_PTHREAD_PROCESS_SHARED 1
EOF

  fi

for ac_func in pthread_mutexattr_setpshared
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17111: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17117 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17148: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17151: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17154: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17157: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17167: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

                    ac_rc=yes
for ac_spec in header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    if test "$cross_compiling" = yes; then
  ac_cv_func_pthread_mutexattr_setpshared=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17207 "configure"
#include "confdefs.h"

        #include <sys/types.h>
        #include <pthread.h>
        int main()
        {
            pthread_mutex_t mutex;
            pthread_mutexattr_t attr;
            if (pthread_mutexattr_init(&attr))
                exit(1);
            if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
                exit(2);
            if (pthread_mutex_init(&mutex, &attr))
                exit(3);
            if (pthread_mutexattr_destroy(&attr))
                exit(4);
            if (pthread_mutex_destroy(&mutex))
                exit(5);
            exit(0);
        }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:17230: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17233: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:17235: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17238: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_pthread_mutexattr_setpshared=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
else
    :

fi

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

for ac_func in pthread_mutexattr_setrobust_np
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:17259: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 17265 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:17296: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:17299: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:17302: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17305: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:17315: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

        if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "no"; then
            cat >conftest.$ac_ext <<_ACEOF
#line 17327 "configure"
#include "confdefs.h"
#define _POSIX_THREAD_PRIO_INHERIT
            #include <sys/types.h>
            #include <pthread.h>
int
main ()
{

            int main()
            {
                pthread_mutex_t mutex;
                pthread_mutexattr_t attr;
                if (pthread_mutexattr_init(&attr))
                    exit(1);
                if (pthread_mutexattr_setrobust_np(&attr,
                                                   PTHREAD_MUTEX_ROBUST_NP))
                    exit(2);
                if (pthread_mutex_init(&mutex, &attr))
                    exit(3);
                if (pthread_mutexattr_destroy(&attr))
                    exit(4);
                if (pthread_mutex_destroy(&mutex))
                    exit(5);
                exit(0);
            }
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:17358: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:17361: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:17364: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:17367: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_pthread_mutexattr_setrobust_np=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
            if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "yes"; then

  if test "x$CPPFLAGS" = "x"; then
    echo "  setting CPPFLAGS to \"-D_POSIX_THREAD_PRIO_INHERIT\""
    CPPFLAGS="-D_POSIX_THREAD_PRIO_INHERIT"
  else
    apr_addto_bugger="-D_POSIX_THREAD_PRIO_INHERIT"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi

            fi
        fi
    fi
fi

# See which lock mechanisms we can support on this system.
ac_rc=yes
for ac_spec in header:semaphore.h func:sem_open func:sem_close              func:sem_unlink func:sem_post func:sem_wait; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hasposixser="1"
else
    :
    hasposixser="0"
fi

ac_rc=yes
for ac_spec in func:semget func:semctl define:SEM_UNDO; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hassysvser="1"
else
    :
    hassysvser="0"
fi

ac_rc=yes
for ac_spec in func:flock 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hasflockser="1"
else
    :
    hasflockser="0"
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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hasfcntlser="1"
else
    :
    hasfcntlser="0"
fi

# note: the current APR use of shared mutex requires /dev/zero
ac_rc=yes
for ac_spec in header:pthread.h define:PTHREAD_PROCESS_SHARED              func:pthread_mutexattr_setpshared              file:/dev/zero; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hasprocpthreadser="1"
else
    :
    hasprocpthreadser="0"
fi

ac_rc=yes
for ac_spec in struct:pthread_rw; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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
    :
    hasrwlockser="1"
else
    :
    hasrwlockser="0"
fi

# See which lock mechanism we'll select by default on this system.
# The last APR_DECIDE to execute sets the default.
# At this stage, we match the ordering in Apache 1.3
# which is (highest to lowest): pthread -> posixsem -> sysvsem -> fcntl -> flock
#
ac_decision_item='apr_lock implementation method'
ac_decision_msg='FAILED'
ac_decision=''

ac_rc=yes
for ac_spec in func:flock 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"   ;;
        struct ) ac_var="ac_cv_struct_$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"   ;;
        struct ) ac_var="ac_cv_struct_$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 func:semget func:semctl define:SEM_UNDO; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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:semaphore.h func:sem_open func_sem_close              func_sem_unlink func:sem_post func_sem_wait; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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_POSIXSEM_SERIALIZE'
ac_decision_msg='Posix sem_open()'
ac_decision_USE_POSIXSEM_SERIALIZE=yes
ac_decision_USE_POSIXSEM_SERIALIZE_msg='Posix sem_open()'

else
    :

fi

# note: the current APR use of shared mutex requires /dev/zero
ac_rc=yes
for ac_spec in header:pthread.h define:PTHREAD_PROCESS_SHARED             func:pthread_mutexattr_setpshared             file:/dev/zero; 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"   ;;
        struct ) ac_var="ac_cv_struct_$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 "$as_me:17802: result: decision on $ac_decision_item... $ac_decision_msg" >&5
echo "${ECHO_T}decision on $ac_decision_item... $ac_decision_msg" >&6
fi

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

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

echo "$as_me:17833: checking if all interprocess locks affect threads" >&5
echo $ECHO_N "checking if all interprocess locks affect threads... $ECHO_C" >&6
if test "x$apr_process_lock_is_global" = "xyes"; then
    proclockglobal="1"
    echo "$as_me:17837: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
    proclockglobal="0"
    echo "$as_me:17841: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:17845: checking if Posix sems affect threads in the same process" >&5
echo $ECHO_N "checking if Posix sems affect threads in the same process... $ECHO_C" >&6
if test "x$apr_posixsem_is_global" = "xyes"; then
  cat >>confdefs.h <<\EOF
#define POSIXSEM_IS_GLOBAL 1
EOF

  echo "$as_me:17852: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:17855: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:17859: checking if SysV sems affect threads in the same process" >&5
echo $ECHO_N "checking if SysV sems affect threads in the same process... $ECHO_C" >&6
if test "x$apr_sysvsem_is_global" = "xyes"; then
  cat >>confdefs.h <<\EOF
#define SYSVSEM_IS_GLOBAL 1
EOF

  echo "$as_me:17866: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:17869: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:17873: checking if fcntl locks affect threads in the same process" >&5
echo $ECHO_N "checking if fcntl locks affect threads in the same process... $ECHO_C" >&6
if test "x$apr_fcntl_is_global" = "xyes"; then
  cat >>confdefs.h <<\EOF
#define FCNTL_IS_GLOBAL 1
EOF

  echo "$as_me:17880: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:17883: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:17887: checking if flock locks affect threads in the same process" >&5
echo $ECHO_N "checking if flock locks affect threads in the same process... $ECHO_C" >&6
if test "x$apr_flock_is_global" = "xyes"; then
  cat >>confdefs.h <<\EOF
#define FLOCK_IS_GLOBAL 1
EOF

  echo "$as_me:17894: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:17897: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:17901: checking for entropy source" >&5
echo $ECHO_N "checking for entropy source... $ECHO_C" >&6

# Check whether --with-egd or --without-egd was given.
if test "${with_egd+set}" = set; then
  withval="$with_egd"
   if test "$withval" = "yes"; then
      { { echo "$as_me:17908: error: You must specify a default EGD socket path." >&5
echo "$as_me: error: You must specify a default EGD socket path." >&2;}
   { (exit 1); exit 1; }; }
    fi
    cat >>confdefs.h <<\EOF
#define HAVE_EGD 1
EOF

    cat >>confdefs.h <<EOF
#define EGD_DEFAULT_SOCKET $withval
EOF

    echo "$as_me:17920: result: EGD-compatible daemon" >&5
echo "${ECHO_T}EGD-compatible daemon" >&6
    rand="1"

fi;

if test "$rand" != "1"; then

# Check whether --with-devrandom or --without-devrandom was given.
if test "${with_devrandom+set}" = set; then
  withval="$with_devrandom"
   apr_devrandom="$withval"
else
   apr_devrandom="yes"
fi;

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

      echo "$as_me:17942: result: /dev/random" >&5
echo "${ECHO_T}/dev/random" >&6
      rand="1"
    elif test -r "/dev/arandom"; then
      cat >>confdefs.h <<\EOF
#define DEV_RANDOM /dev/arandom
EOF

      echo "$as_me:17950: result: /dev/arandom" >&5
echo "${ECHO_T}/dev/arandom" >&6
      rand="1"
    elif test -r "/dev/urandom"; then
      cat >>confdefs.h <<\EOF
#define DEV_RANDOM /dev/urandom
EOF

      echo "$as_me:17958: result: /dev/urandom" >&5
echo "${ECHO_T}/dev/urandom" >&6
      rand="1"
    fi
  elif test "$apr_devrandom" != "no"; then
    if test -r "$apr_devrandom"; then
      cat >>confdefs.h <<\EOF
#define DEV_RANDOM $apr_devrandom
EOF

      echo "$as_me:17968: result: $apr_devrandom" >&5
echo "${ECHO_T}$apr_devrandom" >&6
      rand="1"
    else
      { { echo "$as_me:17972: error: $apr_devrandom not found or unreadable." >&5
echo "$as_me: error: $apr_devrandom not found or unreadable." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi

if test "$rand" != "1"; then
    case $host in
        # we have built in support for OS/2
        *-os2*)
            echo "$as_me:17983: result: Using OS/2 builtin random" >&5
echo "${ECHO_T}Using OS/2 builtin random" >&6
            rand="1"
            ;;
        *)
            if test "$rand" != "1"; then
              if test "$ac_cv_lib_truerand_main" = "yes"; then
                cat >>confdefs.h <<\EOF
#define HAVE_TRUERAND 1
EOF

                echo "$as_me:17994: result: truerand" >&5
echo "${ECHO_T}truerand" >&6
                rand="1"
              else
                echo "$as_me:17998: result: not found" >&5
echo "${ECHO_T}not found" >&6
                rand="0"
              fi
            fi
            ;;
    esac
fi

echo $ac_n "${nl}Checking for Time Support...${nl}"
echo "$as_me:18008: checking for tm_gmtoff in struct tm" >&5
echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
if test "${ac_cv_struct_tm_gmtoff+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18014 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int
main ()
{
struct tm tm; tm.tm_gmtoff;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18027: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18030: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18033: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18036: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_struct_tm_gmtoff=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_struct_tm_gmtoff=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:18046: result: $ac_cv_struct_tm_gmtoff" >&5
echo "${ECHO_T}$ac_cv_struct_tm_gmtoff" >&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 "$as_me:18057: checking for in_addr in netinet/in.h" >&5
echo $ECHO_N "checking for in_addr in netinet/in.h... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 18060 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18078: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18081: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18084: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18087: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   have_in_addr="1"
msg=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 have_in_addr="0"
msg=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:18098: result: $msg" >&5
echo "${ECHO_T}$msg" >&6

echo "$as_me:18101: checking if fd == socket on this platform" >&5
echo $ECHO_N "checking if fd == socket on this platform... $ECHO_C" >&6
if test "x$file_as_socket" != "x0" ; then
    file_as_socket="1";
    echo "yes"
else
    echo "no"
fi

echo "$as_me:18110: checking for sockaddr sa_len" >&5
echo $ECHO_N "checking for sockaddr sa_len... $ECHO_C" >&6
if test "${ac_cv_define_sockaddr_sa_len+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 18117 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:18139: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:18142: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:18145: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18148: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_define_sockaddr_sa_len=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_define_sockaddr_sa_len=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:18163: result: $ac_cv_define_sockaddr_sa_len" >&5
echo "${ECHO_T}$ac_cv_define_sockaddr_sa_len" >&6

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

cat >>confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1
EOF

fi

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

echo "$as_me:18176: checking style of gethostbyname_r routine" >&5
echo $ECHO_N "checking style of gethostbyname_r routine... $ECHO_C" >&6
if test "${ac_cv_gethostbyname_r_style+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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"

#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

int main(int argc, const char * const argv) {

int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
                          (char *) 0, 0, (struct hostent **) 0, &tmp);

; return 0; }
EOTEST

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

fi
echo "$as_me:18229: result: $ac_cv_gethostbyname_r_style" >&5
echo "${ECHO_T}$ac_cv_gethostbyname_r_style" >&6

if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then

cat >>confdefs.h <<\EOF
#define GETHOSTBYNAME_R_GLIBC2 1
EOF

fi

echo "$as_me:18240: checking 3rd argument to the gethostbyname_r routines" >&5
echo $ECHO_N "checking 3rd argument to the gethostbyname_r routines... $ECHO_C" >&6
if test "${ac_cv_gethostbyname_r_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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"

#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

int main(int argc, const char * const argv) {

int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
                          (struct hostent_data *) 0);
; return 0; }
EOTEST

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

fi
echo "$as_me:18292: result: $ac_cv_gethostbyname_r_arg" >&5
echo "${ECHO_T}$ac_cv_gethostbyname_r_arg" >&6

if test "$ac_cv_gethostbyname_r_arg" = "hostent_data"; then

cat >>confdefs.h <<\EOF
#define GETHOSTBYNAME_R_HOSTENT_DATA 1
EOF

fi

fi

  echo "$as_me:18305: checking if TCP_NODELAY setting is inherited from listening sockets" >&5
echo $ECHO_N "checking if TCP_NODELAY setting is inherited from listening sockets... $ECHO_C" >&6
if test "${ac_cv_tcp_nodelay_inherited+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

    ac_cv_tcp_nodelay_inherited="yes"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 18317 "configure"
#include "confdefs.h"

#include <stdio.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_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
int main(void) {
    int listen_s, connected_s, client_s;
    int listen_port, rc;
    struct sockaddr_in sa;
    socklen_t sa_len;
    socklen_t option_len;
    int option;

    listen_s = socket(AF_INET, SOCK_STREAM, 0);
    if (listen_s < 0) {
        perror("socket");
        exit(1);
    }
    option = 1;
    rc = setsockopt(listen_s, IPPROTO_TCP, TCP_NODELAY, &option, sizeof option);
    if (rc < 0) {
        perror("setsockopt TCP_NODELAY");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave port 0 to get ephemeral */
    rc = bind(listen_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("bind for ephemeral port");
        exit(1);
    }
    /* find ephemeral port */
    sa_len = sizeof(sa);
    rc = getsockname(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (rc < 0) {
        perror("getsockname");
        exit(1);
    }
    listen_port = sa.sin_port;
    rc = listen(listen_s, 5);
    if (rc < 0) {
        perror("listen");
        exit(1);
    }
    client_s = socket(AF_INET, SOCK_STREAM, 0);
    if (client_s < 0) {
        perror("socket");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
    sa.sin_port   = listen_port;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave sin_addr all zeros to use loopback */
    rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("connect");
        exit(1);
    }
    sa_len = sizeof sa;
    connected_s = accept(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (connected_s < 0) {
        perror("accept");
        exit(1);
    }
    option_len = sizeof option;
    rc = getsockopt(connected_s, IPPROTO_TCP, TCP_NODELAY, &option, &option_len);
    if (rc < 0) {
        perror("getsockopt");
        exit(1);
    }
    if (!option) {
        fprintf(stderr, "TCP_NODELAY is not set in the child.\n");
        exit(1);
    }
    return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:18417: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18420: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:18422: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18425: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_tcp_nodelay_inherited="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_tcp_nodelay_inherited="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:18441: result: $ac_cv_tcp_nodelay_inherited" >&5
echo "${ECHO_T}$ac_cv_tcp_nodelay_inherited" >&6
if test "$ac_cv_tcp_nodelay_inherited" = "yes"; then
    tcp_nodelay_inherited=1
else
    tcp_nodelay_inherited=0
fi

  echo "$as_me:18449: checking if O_NONBLOCK setting is inherited from listening sockets" >&5
echo $ECHO_N "checking if O_NONBLOCK setting is inherited from listening sockets... $ECHO_C" >&6
if test "${ac_cv_o_nonblock_inherited+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

    ac_cv_o_nonblock_inherited="yes"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 18461 "configure"
#include "confdefs.h"

#include <stdio.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_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
int main(void) {
    int listen_s, connected_s, client_s;
    int listen_port, rc;
    struct sockaddr_in sa;
    socklen_t sa_len;

    listen_s = socket(AF_INET, SOCK_STREAM, 0);
    if (listen_s < 0) {
        perror("socket");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave port 0 to get ephemeral */
    rc = bind(listen_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("bind for ephemeral port");
        exit(1);
    }
    /* find ephemeral port */
    sa_len = sizeof(sa);
    rc = getsockname(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (rc < 0) {
        perror("getsockname");
        exit(1);
    }
    listen_port = sa.sin_port;
    rc = listen(listen_s, 5);
    if (rc < 0) {
        perror("listen");
        exit(1);
    }
    rc = fcntl(listen_s, F_SETFL, O_NONBLOCK);
    if (rc < 0) {
        perror("fcntl(F_SETFL)");
        exit(1);
    }
    client_s = socket(AF_INET, SOCK_STREAM, 0);
    if (client_s < 0) {
        perror("socket");
        exit(1);
    }
    memset(&sa, 0, sizeof sa);
    sa.sin_family = AF_INET;
    sa.sin_port   = listen_port;
#ifdef BEOS
    sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
#endif
    /* leave sin_addr all zeros to use loopback */
    rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa);
    if (rc < 0) {
        perror("connect");
        exit(1);
    }
    sa_len = sizeof sa;
    connected_s = accept(listen_s, (struct sockaddr *)&sa, &sa_len);
    if (connected_s < 0) {
        perror("accept");
        exit(1);
    }
    rc = fcntl(connected_s, F_GETFL, 0);
    if (rc < 0) {
        perror("fcntl(F_GETFL)");
        exit(1);
    }
    if (!(rc & O_NONBLOCK)) {
        fprintf(stderr, "O_NONBLOCK is not set in the child.\n");
        exit(1);
    }
    return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:18560: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18563: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:18565: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18568: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_o_nonblock_inherited="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_o_nonblock_inherited="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:18584: result: $ac_cv_o_nonblock_inherited" >&5
echo "${ECHO_T}$ac_cv_o_nonblock_inherited" >&6
if test "$ac_cv_o_nonblock_inherited" = "yes"; then
    o_nonblock_inherited=1
else
    o_nonblock_inherited=0
fi

  echo "$as_me:18592: checking for TCP_CORK in netinet/tcp.h" >&5
echo $ECHO_N "checking for TCP_CORK in netinet/tcp.h... $ECHO_C" >&6
if test "${ac_cv_define_TCP_CORK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 18599 "configure"
#include "confdefs.h"

    #include <netinet/tcp.h>
    #ifdef TCP_CORK
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_TCP_CORK=yes
else
  ac_cv_define_TCP_CORK=no
fi
rm -f conftest*

fi
echo "$as_me:18617: result: $ac_cv_define_TCP_CORK" >&5
echo "${ECHO_T}$ac_cv_define_TCP_CORK" >&6
  if test "$ac_cv_define_TCP_CORK" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_TCP_CORK 1
EOF

  fi

  echo "$as_me:18626: checking for TCP_NOPUSH in netinet/tcp.h" >&5
echo $ECHO_N "checking for TCP_NOPUSH in netinet/tcp.h... $ECHO_C" >&6
if test "${ac_cv_define_TCP_NOPUSH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 18633 "configure"
#include "confdefs.h"

    #include <netinet/tcp.h>
    #ifdef TCP_NOPUSH
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_TCP_NOPUSH=yes
else
  ac_cv_define_TCP_NOPUSH=no
fi
rm -f conftest*

fi
echo "$as_me:18651: result: $ac_cv_define_TCP_NOPUSH" >&5
echo "${ECHO_T}$ac_cv_define_TCP_NOPUSH" >&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 $host in
        *linux*)
            cat >conftest.$ac_ext <<_ACEOF
#line 18669 "configure"
#include "confdefs.h"

                #include <linux/socket.h>
                #ifdef TCP_CORK
                yes
                #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then

                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 "$as_me:18697: checking for SO_ACCEPTFILTER in sys/socket.h" >&5
echo $ECHO_N "checking for SO_ACCEPTFILTER in sys/socket.h... $ECHO_C" >&6
if test "${ac_cv_define_SO_ACCEPTFILTER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
#line 18704 "configure"
#include "confdefs.h"

    #include <sys/socket.h>
    #ifdef SO_ACCEPTFILTER
    YES_IS_DEFINED
    #endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  ac_cv_define_SO_ACCEPTFILTER=yes
else
  ac_cv_define_SO_ACCEPTFILTER=no
fi
rm -f conftest*

fi
echo "$as_me:18722: result: $ac_cv_define_SO_ACCEPTFILTER" >&5
echo "${ECHO_T}$ac_cv_define_SO_ACCEPTFILTER" >&6
  if test "$ac_cv_define_SO_ACCEPTFILTER" = "yes"; then
    cat >>confdefs.h <<\EOF
#define HAVE_SO_ACCEPTFILTER 1
EOF

  fi

if test "x$ac_cv_define_SO_ACCEPTFILTER" = "xyes"; then
    acceptfilter="1"
else
    acceptfilter="0"
fi

for ac_func in set_h_errno
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:18740: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 18746 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:18777: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18780: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:18783: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18786: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:18796: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  echo "$as_me:18806: checking for presence of retrans/retry fields in res_state/resolv.h " >&5
echo $ECHO_N "checking for presence of retrans/retry fields in res_state/resolv.h ... $ECHO_C" >&6
if test "${ac_cv_retransretry+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

  ac_cv_retransretry="no"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 18818 "configure"
#include "confdefs.h"

#include <sys/types.h>
#if defined(__sun__)
#include <inet/ip.h>
#endif
#include <resolv.h>
/* _res is a global defined in resolv.h */
int main(void) {
    _res.retrans = 2;
    _res.retry = 1;
    exit(0);
    return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:18836: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18839: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:18841: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18844: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_retransretry="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_retransretry="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:18860: result: $ac_cv_retransretry" >&5
echo "${ECHO_T}$ac_cv_retransretry" >&6
if test "$ac_cv_retransretry" = "yes"; then

cat >>confdefs.h <<\EOF
#define RESOLV_RETRANSRETRY 1
EOF

fi

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

# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
  enableval="$enable_ipv6"
   if test "$enableval" = "no"; then
        user_disabled_ipv6=1
    fi
else
   user_disabled_ipv6=0
fi;

echo "$as_me:18882: checking for library containing getaddrinfo" >&5
echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6
if test "${ac_cv_search_getaddrinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_getaddrinfo=no
cat >conftest.$ac_ext <<_ACEOF
#line 18890 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:18909: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18912: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:18915: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18918: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_getaddrinfo="none required"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_getaddrinfo" = no; then
  for ac_lib in inet6; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
#line 18930 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:18949: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:18952: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:18955: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:18958: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_getaddrinfo="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:18971: result: $ac_cv_search_getaddrinfo" >&5
echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6
if test "$ac_cv_search_getaddrinfo" != no; then
  test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"

fi

echo "$as_me:18978: checking for library containing gai_strerror" >&5
echo $ECHO_N "checking for library containing gai_strerror... $ECHO_C" >&6
if test "${ac_cv_search_gai_strerror+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_gai_strerror=no
cat >conftest.$ac_ext <<_ACEOF
#line 18986 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gai_strerror ();
int
main ()
{
gai_strerror ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19005: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19008: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19011: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19014: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_gai_strerror="none required"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_gai_strerror" = no; then
  for ac_lib in inet6; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
#line 19026 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gai_strerror ();
int
main ()
{
gai_strerror ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19045: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19048: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19051: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19054: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_gai_strerror="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:19067: result: $ac_cv_search_gai_strerror" >&5
echo "${ECHO_T}$ac_cv_search_gai_strerror" >&6
if test "$ac_cv_search_gai_strerror" != no; then
  test "$ac_cv_search_gai_strerror" = "none required" || LIBS="$ac_cv_search_gai_strerror $LIBS"

fi

echo "$as_me:19074: checking for library containing getnameinfo" >&5
echo $ECHO_N "checking for library containing getnameinfo... $ECHO_C" >&6
if test "${ac_cv_search_getnameinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_getnameinfo=no
cat >conftest.$ac_ext <<_ACEOF
#line 19082 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19101: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19104: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19107: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19110: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_getnameinfo="none required"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_getnameinfo" = no; then
  for ac_lib in inet6; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
#line 19122 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19141: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19144: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19147: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19150: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_getnameinfo="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:19163: result: $ac_cv_search_getnameinfo" >&5
echo "${ECHO_T}$ac_cv_search_getnameinfo" >&6
if test "$ac_cv_search_getnameinfo" != no; then
  test "$ac_cv_search_getnameinfo" = "none required" || LIBS="$ac_cv_search_getnameinfo $LIBS"

fi

for ac_func in gai_strerror
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:19173: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 19179 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:19210: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19213: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:19216: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19219: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:19229: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  echo "$as_me:19239: checking for working getaddrinfo" >&5
echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6
if test "${ac_cv_working_getaddrinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

  ac_cv_working_getaddrinfo="yes"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 19251 "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", NULL, &hints, &ai);
    if (error) {
        exit(1);
    }
    if (ai->ai_addr->sa_family != AF_INET) {
        exit(1);
    }
    exit(0);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:19286: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19289: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:19291: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19294: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_working_getaddrinfo="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_working_getaddrinfo="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:19310: result: $ac_cv_working_getaddrinfo" >&5
echo "${ECHO_T}$ac_cv_working_getaddrinfo" >&6
if test "$ac_cv_working_getaddrinfo" = "yes"; then
  if test "$ac_cv_func_gai_strerror" != "yes"; then
    ac_cv_working_getaddrinfo="no"
  else

cat >>confdefs.h <<\EOF
#define HAVE_GETADDRINFO 1
EOF

  fi
fi

  echo "$as_me:19324: checking for negative error codes for getaddrinfo" >&5
echo $ECHO_N "checking for negative error codes for getaddrinfo... $ECHO_C" >&6
if test "${ac_cv_negative_eai+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

  ac_cv_negative_eai="no"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 19336 "configure"
#include "confdefs.h"

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

void main(void) {
    if (EAI_ADDRFAMILY < 0) {
        exit(0);
    }
    exit(1);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:19352: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19355: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:19357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19360: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_negative_eai="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_negative_eai="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:19376: result: $ac_cv_negative_eai" >&5
echo "${ECHO_T}$ac_cv_negative_eai" >&6
if test "$ac_cv_negative_eai" = "yes"; then

cat >>confdefs.h <<\EOF
#define NEGATIVE_EAI 1
EOF

fi

  echo "$as_me:19386: checking for working getnameinfo" >&5
echo $ECHO_N "checking for working getnameinfo... $ECHO_C" >&6
if test "${ac_cv_working_getnameinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  if test "$cross_compiling" = yes; then

  ac_cv_working_getnameinfo="yes"

else
  cat >conftest.$ac_ext <<_ACEOF
#line 19398 "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
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif

void main(void) {
    struct sockaddr_in sa;
    char hbuf[256];
    int error;

    sa.sin_family = AF_INET;
    sa.sin_port = 0;
    sa.sin_addr.s_addr = inet_addr("127.0.0.1");
#ifdef SIN6_LEN
    sa.sin_len = sizeof(sa);
#endif

    error = getnameinfo((const struct sockaddr *)&sa, sizeof(sa),
                        hbuf, 256, NULL, 0,
                        NI_NUMERICHOST);
    if (error) {
        exit(1);
    } else {
        exit(0);
    }
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:19441: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:19444: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:19446: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19449: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

  ac_cv_working_getnameinfo="yes"

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

  ac_cv_working_getnameinfo="no"

fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:19465: result: $ac_cv_working_getnameinfo" >&5
echo "${ECHO_T}$ac_cv_working_getnameinfo" >&6
if test "$ac_cv_working_getnameinfo" = "yes"; then

cat >>confdefs.h <<\EOF
#define HAVE_GETNAMEINFO 1
EOF

fi

echo "$as_me:19475: checking for sockaddr_in6" >&5
echo $ECHO_N "checking for sockaddr_in6... $ECHO_C" >&6
if test "${ac_cv_define_sockaddr_in6+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
#line 19482 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:19503: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:19506: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:19509: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:19512: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    ac_cv_define_sockaddr_in6=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    ac_cv_define_sockaddr_in6=no

fi
rm -f conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:19527: result: $ac_cv_define_sockaddr_in6" >&5
echo "${ECHO_T}$ac_cv_define_sockaddr_in6" >&6

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

echo "$as_me:19536: checking if APR supports IPv6" >&5
echo $ECHO_N "checking if APR supports IPv6... $ECHO_C" >&6
have_ipv6="0"
if test "$user_disabled_ipv6" = 1; then
    echo "$as_me:19540: result: \"no -- disabled by user\"" >&5
echo "${ECHO_T}\"no -- disabled by user\"" >&6
else
    if test "x$have_sockaddr_in6" = "x1"; then
        if test "x$ac_cv_working_getaddrinfo" = "xyes"; then
            if test "x$ac_cv_working_getnameinfo" = "xyes"; then
                have_ipv6="1"
                echo "$as_me:19547: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
            else
                echo "$as_me:19550: result: \"no -- no getnameinfo\"" >&5
echo "${ECHO_T}\"no -- no getnameinfo\"" >&6
            fi
        else
            echo "$as_me:19554: result: \"no -- no working getaddrinfo\"" >&5
echo "${ECHO_T}\"no -- no working getaddrinfo\"" >&6
        fi
    else
        echo "$as_me:19558: result: \"no -- no sockaddr_in6\"" >&5
echo "${ECHO_T}\"no -- no sockaddr_in6\"" >&6;
    fi
fi

echo $ac_n "${nl}Restore user-defined environment settings...${nl}"

if test "x$apr_ste_save_CPPFLAGS" = "x"; then
  EXTRA_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS=
else
  if test "x$apr_ste_save_CPPFLAGS" = "x$CPPFLAGS"; then
    EXTRA_CPPFLAGS=
  else
    EXTRA_CPPFLAGS=`echo $CPPFLAGS | sed -e "s%${apr_ste_save_CPPFLAGS}%%"`
    CPPFLAGS="$apr_ste_save_CPPFLAGS"
  fi
fi
echo "  restoring CPPFLAGS to \"$CPPFLAGS\""
echo "  setting EXTRA_CPPFLAGS to \"$EXTRA_CPPFLAGS\""

if test "x$apr_ste_save_CFLAGS" = "x"; then
  EXTRA_CFLAGS="$CFLAGS"
  CFLAGS=
else
  if test "x$apr_ste_save_CFLAGS" = "x$CFLAGS"; then
    EXTRA_CFLAGS=
  else
    EXTRA_CFLAGS=`echo $CFLAGS | sed -e "s%${apr_ste_save_CFLAGS}%%"`
    CFLAGS="$apr_ste_save_CFLAGS"
  fi
fi
echo "  restoring CFLAGS to \"$CFLAGS\""
echo "  setting EXTRA_CFLAGS to \"$EXTRA_CFLAGS\""

if test "x$apr_ste_save_LDFLAGS" = "x"; then
  EXTRA_LDFLAGS="$LDFLAGS"
  LDFLAGS=
else
  if test "x$apr_ste_save_LDFLAGS" = "x$LDFLAGS"; then
    EXTRA_LDFLAGS=
  else
    EXTRA_LDFLAGS=`echo $LDFLAGS | sed -e "s%${apr_ste_save_LDFLAGS}%%"`
    LDFLAGS="$apr_ste_save_LDFLAGS"
  fi
fi
echo "  restoring LDFLAGS to \"$LDFLAGS\""
echo "  setting EXTRA_LDFLAGS to \"$EXTRA_LDFLAGS\""

if test "x$apr_ste_save_LIBS" = "x"; then
  EXTRA_LIBS="$LIBS"
  LIBS=
else
  if test "x$apr_ste_save_LIBS" = "x$LIBS"; then
    EXTRA_LIBS=
  else
    EXTRA_LIBS=`echo $LIBS | sed -e "s%${apr_ste_save_LIBS}%%"`
    LIBS="$apr_ste_save_LIBS"
  fi
fi
echo "  restoring LIBS to \"$LIBS\""
echo "  setting EXTRA_LIBS to \"$EXTRA_LIBS\""

if test "x$apr_ste_save_INCLUDES" = "x"; then
  EXTRA_INCLUDES="$INCLUDES"
  INCLUDES=
else
  if test "x$apr_ste_save_INCLUDES" = "x$INCLUDES"; then
    EXTRA_INCLUDES=
  else
    EXTRA_INCLUDES=`echo $INCLUDES | sed -e "s%${apr_ste_save_INCLUDES}%%"`
    INCLUDES="$apr_ste_save_INCLUDES"
  fi
fi
echo "  restoring INCLUDES to \"$INCLUDES\""
echo "  setting EXTRA_INCLUDES to \"$EXTRA_INCLUDES\""

echo "${nl}Construct Makefiles and header files."
MAKEFILE1="Makefile strings/Makefile passwd/Makefile tables/Makefile build/Makefile"
SUBDIRS="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 $srcdir/test; then
    MAKEFILE3="test/Makefile"
fi

case $host 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

ac_config_files="$ac_config_files $MAKEFILE1 $MAKEFILE2 $MAKEFILE3 include/apr.h APRVARS build/rules.mk apr-config"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:19759: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <bug-autoconf@gnu.org>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:19935: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:19954: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "$MAKEFILE1" ) CONFIG_FILES="$CONFIG_FILES $MAKEFILE1" ;;
  "$MAKEFILE2" ) CONFIG_FILES="$CONFIG_FILES $MAKEFILE2" ;;
  "$MAKEFILE3" ) CONFIG_FILES="$CONFIG_FILES $MAKEFILE3" ;;
  "include/apr.h" ) CONFIG_FILES="$CONFIG_FILES include/apr.h" ;;
  "APRVARS" ) CONFIG_FILES="$CONFIG_FILES APRVARS" ;;
  "build/rules.mk" ) CONFIG_FILES="$CONFIG_FILES build/rules.mk" ;;
  "apr-config" ) CONFIG_FILES="$CONFIG_FILES apr-config" ;;
  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
  "include/arch/unix/apr_private.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/arch/unix/apr_private.h" ;;
  *) { { echo "$as_me:19998: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@apr_srcdir@,$apr_srcdir,;t t
s,@apr_builddir@,$apr_builddir,;t t
s,@top_builddir@,$top_builddir,;t t
s,@apr_builders@,$apr_builders,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@CPP@,$CPP,;t t
s,@AWK@,$AWK,;t t
s,@LN_S@,$LN_S,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@RM@,$RM,;t t
s,@AS@,$AS,;t t
s,@ASCPP@,$ASCPP,;t t
s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@apr_charset_ebcdic@,$apr_charset_ebcdic,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@installbuilddir@,$installbuilddir,;t t
s,@lt_compile@,$lt_compile,;t t
s,@link@,$link,;t t
s,@so_ext@,$so_ext,;t t
s,@lib_target@,$lib_target,;t t
s,@export_lib_target@,$export_lib_target,;t t
s,@shlibpath_var@,$shlibpath_var,;t t
s,@LTFLAGS@,$LTFLAGS,;t t
s,@LT_LDFLAGS@,$LT_LDFLAGS,;t t
s,@lib_target_libs@,$lib_target_libs,;t t
s,@ASCPPFLAGS@,$ASCPPFLAGS,;t t
s,@ASFLAGS@,$ASFLAGS,;t t
s,@apr_atomic_sparc_compile@,$apr_atomic_sparc_compile,;t t
s,@apr_force_atomic_generic@,$apr_force_atomic_generic,;t t
s,@proc_mutex_is_global@,$proc_mutex_is_global,;t t
s,@eolstr@,$eolstr,;t t
s,@INSTALL_SUBDIRS@,$INSTALL_SUBDIRS,;t t
s,@threads@,$threads,;t t
s,@have_sigsuspend@,$have_sigsuspend,;t t
s,@have_sigwait@,$have_sigwait,;t t
s,@useshmgetanon@,$useshmgetanon,;t t
s,@usemmapzero@,$usemmapzero,;t t
s,@usemmapanon@,$usemmapanon,;t t
s,@haveshmgetanon@,$haveshmgetanon,;t t
s,@havemmapzero@,$havemmapzero,;t t
s,@havemmapanon@,$havemmapanon,;t t
s,@usemmaptmp@,$usemmaptmp,;t t
s,@usemmapshm@,$usemmapshm,;t t
s,@useshmget@,$useshmget,;t t
s,@usebeosarea@,$usebeosarea,;t t
s,@useos2shm@,$useos2shm,;t t
s,@havemmaptmp@,$havemmaptmp,;t t
s,@havemmapshm@,$havemmapshm,;t t
s,@haveshmget@,$haveshmget,;t t
s,@havebeosarea@,$havebeosarea,;t t
s,@haveos2shm@,$haveos2shm,;t t
s,@sharedmem@,$sharedmem,;t t
s,@sendfile@,$sendfile,;t t
s,@apr_inaddr_none@,$apr_inaddr_none,;t t
s,@fork@,$fork,;t t
s,@have_inet_addr@,$have_inet_addr,;t t
s,@tcp_nodelay_inherited@,$tcp_nodelay_inherited,;t t
s,@o_nonblock_inherited@,$o_nonblock_inherited,;t t
s,@have_inet_network@,$have_inet_network,;t t
s,@have_sigaction@,$have_sigaction,;t t
s,@have_setrlimit@,$have_setrlimit,;t t
s,@have_getrlimit@,$have_getrlimit,;t t
s,@iconv@,$iconv,;t t
s,@mmap@,$mmap,;t t
s,@have_memmove@,$have_memmove,;t t
s,@arpa_ineth@,$arpa_ineth,;t t
s,@conioh@,$conioh,;t t
s,@ctypeh@,$ctypeh,;t t
s,@crypth@,$crypth,;t t
s,@errnoh@,$errnoh,;t t
s,@direnth@,$direnth,;t t
s,@fcntlh@,$fcntlh,;t t
s,@ioh@,$ioh,;t t
s,@limitsh@,$limitsh,;t t
s,@netdbh@,$netdbh,;t t
s,@sys_syslimitsh@,$sys_syslimitsh,;t t
s,@netinet_inh@,$netinet_inh,;t t
s,@netinet_tcph@,$netinet_tcph,;t t
s,@stdargh@,$stdargh,;t t
s,@stdioh@,$stdioh,;t t
s,@stdlibh@,$stdlibh,;t t
s,@stringh@,$stringh,;t t
s,@stringsh@,$stringsh,;t t
s,@sys_sendfileh@,$sys_sendfileh,;t t
s,@sys_signalh@,$sys_signalh,;t t
s,@sys_socketh@,$sys_socketh,;t t
s,@sys_typesh@,$sys_typesh,;t t
s,@sys_timeh@,$sys_timeh,;t t
s,@sys_uioh@,$sys_uioh,;t t
s,@sys_unh@,$sys_unh,;t t
s,@timeh@,$timeh,;t t
s,@unistdh@,$unistdh,;t t
s,@signalh@,$signalh,;t t
s,@sys_waith@,$sys_waith,;t t
s,@pthreadh@,$pthreadh,;t t
s,@semaphoreh@,$semaphoreh,;t t
s,@short_value@,$short_value,;t t
s,@int_value@,$int_value,;t t
s,@long_value@,$long_value,;t t
s,@int64_value@,$int64_value,;t t
s,@off_t_value@,$off_t_value,;t t
s,@size_t_value@,$size_t_value,;t t
s,@ssize_t_value@,$ssize_t_value,;t t
s,@socklen_t_value@,$socklen_t_value,;t t
s,@int64_t_fmt@,$int64_t_fmt,;t t
s,@int64_t_fmt_len@,$int64_t_fmt_len,;t t
s,@ssize_t_fmt@,$ssize_t_fmt,;t t
s,@size_t_fmt@,$size_t_fmt,;t t
s,@off_t_fmt@,$off_t_fmt,;t t
s,@pid_t_fmt@,$pid_t_fmt,;t t
s,@int64_literal@,$int64_literal,;t t
s,@stdint@,$stdint,;t t
s,@have_strnicmp@,$have_strnicmp,;t t
s,@have_strncasecmp@,$have_strncasecmp,;t t
s,@have_stricmp@,$have_stricmp,;t t
s,@have_strcasecmp@,$have_strcasecmp,;t t
s,@have_strdup@,$have_strdup,;t t
s,@have_strstr@,$have_strstr,;t t
s,@have_memchr@,$have_memchr,;t t
s,@aprdso@,$aprdso,;t t
s,@oc@,$oc,;t t
s,@struct_rlimit@,$struct_rlimit,;t t
s,@have_union_semun@,$have_union_semun,;t t
s,@hasflockser@,$hasflockser,;t t
s,@hassysvser@,$hassysvser,;t t
s,@hasposixser@,$hasposixser,;t t
s,@hasfcntlser@,$hasfcntlser,;t t
s,@hasprocpthreadser@,$hasprocpthreadser,;t t
s,@hasrwlockser@,$hasrwlockser,;t t
s,@flockser@,$flockser,;t t
s,@sysvser@,$sysvser,;t t
s,@posixser@,$posixser,;t t
s,@fcntlser@,$fcntlser,;t t
s,@procpthreadser@,$procpthreadser,;t t
s,@pthreadser@,$pthreadser,;t t
s,@proclockglobal@,$proclockglobal,;t t
s,@rand@,$rand,;t t
s,@have_in_addr@,$have_in_addr,;t t
s,@file_as_socket@,$file_as_socket,;t t
s,@apr_tcp_nopush_flag@,$apr_tcp_nopush_flag,;t t
s,@have_corkable_tcp@,$have_corkable_tcp,;t t
s,@acceptfilter@,$acceptfilter,;t t
s,@have_ipv6@,$have_ipv6,;t t
s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
s,@EXTRA_INCLUDES@,$EXTRA_INCLUDES,;t t
s,@NOTEST_CPPFLAGS@,$NOTEST_CPPFLAGS,;t t
s,@NOTEST_CFLAGS@,$NOTEST_CFLAGS,;t t
s,@NOTEST_LDFLAGS@,$NOTEST_LDFLAGS,;t t
s,@NOTEST_LIBS@,$NOTEST_LIBS,;t t
s,@NOTEST_INCLUDES@,$NOTEST_INCLUDES,;t t
s,@LDLIBS@,$LDLIBS,;t t
s,@OSDIR@,$OSDIR,;t t
s,@DEFAULT_OSDIR@,$DEFAULT_OSDIR,;t t
s,@LIBTOOL_LIBS@,$LIBTOOL_LIBS,;t t
s,@SUBDIRS@,$SUBDIRS,;t t
s,@INCLUDE_RULES@,$INCLUDE_RULES,;t t
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_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    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 $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:20377: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:20395: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:20408: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

# 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=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:20469: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:20480: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:20493: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# 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.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t end
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed

# 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.undefs <<\EOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated automatically by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
      { echo "$as_me:20610: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`

  case $ac_dest in
    default )
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
chmod +x apr-config
 ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

if test -n "$USE_VPATH"; then
  for makefile in $MAKEFILE1 $MAKEFILE2 $MAKEFILE3; do
    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
  rm -f tmp
fi

