#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-shared[=PKGS]  build shared libraries [default=yes]"
ac_help="$ac_help
  --enable-static[=PKGS]  build static libraries [default=yes]"
ac_help="$ac_help
  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
ac_help="$ac_help
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
  --disable-libtool-lock  avoid locking (might break parallel builds)"
ac_help="$ac_help
  --with-installbuilddir=<path> location to store APR build files (defaults to '${datadir}/build')"
ac_help="$ac_help
  --without-libtool       avoid using libtool to link the library"
ac_help="$ac_help
  --enable-debug          Turn on debugging and compile time warnings"
ac_help="$ac_help
  --enable-maintainer-mode  Turn on debugging and compile time warnings"
ac_help="$ac_help
  --enable-profile        Turn on profiling for the build (GCC)"
ac_help="$ac_help
  --enable-pool-debug[[=yes|no|verbose|verbose-alloc|lifetime|owner|all]]    Turn on pools debugging"
ac_help="$ac_help
  --with-efence[[=DIR]]     path to Electric Fence installation"
ac_help="$ac_help
  --enable-malloc-debug   Switch on malloc_debug for BeOS"
ac_help="$ac_help
  --enable-nonportable-atomics  Turn on optimized atomic code which may produce nonportable binaries"
ac_help="$ac_help
  --enable-threads        Enable threading support in APR."
ac_help="$ac_help
  --with-sendfile         Override decision to use sendfile"
ac_help="$ac_help
  --enable-dso            Enable dso support "
ac_help="$ac_help
  --enable-other-child    Enable reliable child processes "
ac_help="$ac_help
  --with-egd=<path>       use egd-compatible socket"
ac_help="$ac_help
  --with-devrandom[[=DEV]]  use /dev/random or compatible [[searches by default]]"
ac_help="$ac_help
  --disable-ipv6          Disable IPv6 support in APR."

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

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

ac_prev=
for ac_option
do

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

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

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

  case "$ac_option" in

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

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

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

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

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

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

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

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

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

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

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

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

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi



ac_aux_dir=
for ac_dir in build $srcdir/build; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.












 

















































































































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

# serial 40 AC_PROG_LIBTOOL




# AC_LIBTOOL_DLOPEN - enable checks for dlopen support


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


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


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


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


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



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


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


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




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


# AC_CHECK_LIBM - check for math library


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


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






  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



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

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


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

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

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

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

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

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

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

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

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

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

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

echo "Configuring APR library"
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


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

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1087: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1170: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

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

cat > conftest.$ac_ext << EOF

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

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

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1212: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1217: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

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

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

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

fi

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



if test "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 $ac_n "checking for working mkdir -p""... $ac_c" 1>&6
echo "configure:4390: checking for working mkdir -p" >&5
if eval "test \"`echo '$''{'ac_cv_mkdir_p'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 "$ac_t""$ac_cv_mkdir_p" 1>&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 $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:4420: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

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

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

test -n "$AWK" && break
done

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:4561: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

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

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

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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4678: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RM"; then
  ac_cv_prog_RM="$RM" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RM="rm"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RM="$ac_cv_prog_RM"
if test -n "$RM"; then
  echo "$ac_t""$RM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

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

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

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


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

else
  AR="ar"
fi
fi


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

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

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


echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:4861: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&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 "$ac_t""no" 1>&6
  ISC=
fi

ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
echo "configure:4883: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4888 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MINIX=yes
else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6
echo "configure:4933: checking whether system uses EBCDIC" >&5
if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_ebcdic="no"

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

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

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

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

fi
rm -fr conftest*
fi

fi

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

 
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_prog_gcc" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:5069: checking for ld used by GCC" >&5
  ac_prog=`($CC -print-prog-name=ld) 2>&5`
  case "$ac_prog" in
    # Accept absolute paths.
    [\\/]* | [A-Za-z]:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:5093: checking for GNU ld" >&5
else
  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:5096: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -z "$LD"; then
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      ac_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
	test "$with_gnu_ld" != no && break
      else
	test "$with_gnu_ld" != yes && break
      fi
    fi
  done
  IFS="$ac_save_ifs"
else
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi

LD="$ac_cv_path_LD"
if test -n "$LD"; then
  echo "$ac_t""$LD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:5131: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  ac_cv_prog_gnu_ld=yes
else
  ac_cv_prog_gnu_ld=no
fi
fi

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


echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:5147: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$NM"; then
  # Let the user override the test.
  ac_cv_path_NM="$NM"
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -B"
	break
      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -p"
	break
      else
	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
	continue # so that we can try to find one that supports BSD flags
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi
fi

NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6


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

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


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

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

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 5211 "configure"' > conftest.$ac_ext
  if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    case "`/usr/bin/file conftest.o`" in
    *32-bit*)
      LD="${LD-ld} -32"
      ;;
    *N32*)
      LD="${LD-ld} -n32"
      ;;
    *64-bit*)
      LD="${LD-ld} -64"
      ;;
    esac
  fi
  rm -rf conftest*
  ;;

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:5233: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5238 "configure"
#include "confdefs.h"

int main() {

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

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


esac


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


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

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


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

# Always use our own libtool.
LIBTOOL='$(SHELL) $(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 $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6
echo "configure:5838: checking for malloc in -lefence" >&5
ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lefence  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5846 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char malloc();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   
  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 "$ac_t""no" 1>&6
 { echo "configure: error: Electric Fence requested but not detected" 1>&2; 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 $ac_n "checking for random in -lbsd""... $ac_c" 1>&6
echo "configure:6078: checking for random in -lbsd" >&5
ac_lib_var=`echo bsd'_'random | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6086 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char random();

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

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

  LIBS="-lbsd $LIBS"

else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking for BONE_VERSION in sys/socket.h""... $ac_c" 1>&6
echo "configure:6157: checking for BONE_VERSION in sys/socket.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_BONE_VERSION'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 6163 "configure"
#include "confdefs.h"

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

  
fi

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

  fi

       eolstr="\\n"
       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 $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
echo "configure:6304: checking for res_init in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6312 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char res_init();

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

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

  LIBS="-lresolv $LIBS"

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

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

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

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

  LIBS="-lnsl $LIBS"

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


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

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

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

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

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

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

  LIBS="-lsocket $LIBS"

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


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

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

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

echo "$ac_t""$ac_cv_search_crypt" 1>&6
if test "$ac_cv_search_crypt" != "no"; then
  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
  
else :
  
fi
echo $ac_n "checking for main in -ltruerand""... $ac_c" 1>&6
echo "configure:6569: checking for main in -ltruerand" >&5
ac_lib_var=`echo truerand'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ltruerand  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6577 "configure"
#include "confdefs.h"

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

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

  LIBS="-ltruerand $LIBS"

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

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

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

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

  LIBS="-liconv $LIBS"

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

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

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

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

  LIBS="-lm $LIBS"

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


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

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

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

  fi
  
fi

fi

if test "$enable_threads" = "no"; then
    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 <<EOF
#line 6834 "configure"
#include "confdefs.h"

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

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

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



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

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

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

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


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

fi

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

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

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

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

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


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

fi

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

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

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

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

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

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

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



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

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

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

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


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

fi

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

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

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

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

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


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

fi

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

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

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

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

  fi

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

#include <pthread.h>

int main() {

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

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

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

fi
rm -f conftest*

fi

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

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

fi

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

#include <pthread.h>

int main() {

pthread_attr_t *attr;
pthread_attr_getdetachstate(attr);

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

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

fi
rm -f conftest*

fi

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

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

fi

        for ac_func in pthread_key_delete pthread_rwlock_init
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7526: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


        if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then
                                                            cat > conftest.$ac_ext <<EOF
#line 7581 "configure"
#include "confdefs.h"
#include <sys/types.h>
                            #include <pthread.h>
int main() {
pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;
; return 0; }
EOF
if { (eval echo configure:7589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_pthread_rw=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_pthread_rw=no
fi
rm -f conftest*
            if test "$ac_cv_struct_pthread_rw" = "no"; then
                cat > conftest.$ac_ext <<EOF
#line 7601 "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; }
EOF
if { (eval echo configure:7612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_pthread_rw=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_pthread_rw=no
fi
rm -f conftest*
                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 $ac_n "checking for readdir in -lc_r""... $ac_c" 1>&6
echo "configure:7677: checking for readdir in -lc_r" >&5
ac_lib_var=`echo c_r'_'readdir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7685 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readdir();

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

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

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

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

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

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  apr_gethostbyaddr_is_thread_safe=yes
else
  echo "$ac_t""no" 1>&6
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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7818: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7823 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


    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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7903: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7908 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in sigwait
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7959: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7964 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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





for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8025: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8030 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


for ac_func in getpwnam_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8081: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8086 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in getpwuid_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8136: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8141 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in getgrnam_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8191: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8196 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in getgrgid_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8246: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8251 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


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

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

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

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

  LIBS="-lrt $LIBS"

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

       ;;
esac

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


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

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

  
fi

echo "$ac_t""$ac_cv_define_MAP_ANON" 1>&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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8434: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8439 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


ac_safe=`echo "/dev/zero" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
echo "configure:8489: checking for /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

fi

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

for ac_func in shmget shmat shmdt shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8552: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8557 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

for ac_func in create_area
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8647: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8652 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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


if test "$ac_cv_func_mmap" = "yes" &&
   test "$ac_cv_file__dev_zero" = "yes"; then
    echo $ac_n "checking for mmap that can map /dev/zero""... $ac_c" 1>&6
echo "configure:8743: checking for mmap that can map /dev/zero" >&5
    if test "$cross_compiling" = yes; then
  ac_cv_file__dev_zero=no
else
  cat > conftest.$ac_ext <<EOF
#line 8748 "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;
    }
EOF
if { (eval echo configure:8775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_file__dev_zero=no
fi
rm -fr conftest*
fi


    echo "$ac_t""$ac_cv_file__dev_zero" 1>&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 "$ac_t""decision on $ac_decision_item... $ac_decision_msg" 1>&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 "$ac_t""decision on $ac_decision_item... $ac_decision_msg" 1>&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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9324: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9329 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in setrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9379: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9384 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_setrlimit="1" 
else
  echo "$ac_t""no" 1>&6
have_setrlimit="0" 
fi
done
 
for ac_func in getrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9435: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9440 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
  have_getrlimit="1" 
else
  echo "$ac_t""no" 1>&6
have_getrlimit="0" 
fi
done
 
for ac_func in writev
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9491: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9496 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

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

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

  LIBS="-lsendfile $LIBS"

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

for ac_func in sendfile send_file sendfilev
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9594: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9599 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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



# Check whether --with-sendfile or --without-sendfile was given.
if test "${with_sendfile+set}" = set; then
  withval="$with_sendfile"
   if test "$withval" = "yes"; then
        sendfile="1"
    else
        sendfile="0"
    fi 
else
  
    orig_sendfile=$sendfile
    case $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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9684: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9689 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

fi


for ac_func in fork
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9779: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9784 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in getpass
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9835: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9840 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


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

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

int main() {

inet_addr("127.0.0.1");

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

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

fi
rm -f conftest*

fi

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

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


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

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

int main() {

inet_network("127.0.0.1");

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

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

fi
rm -f conftest*

fi

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

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


echo $ac_n "checking for _getch""... $ac_c" 1>&6
echo "configure:9987: checking for _getch" >&5
if eval "test \"`echo '$''{'ac_cv_func__getch'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9992 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _getch(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _getch();

int main() {

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

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

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

for ac_func in gmtime_r localtime_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10037: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10042 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in strerror_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10092: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10097 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

if test "$strerror_r" = "1"; then
  
echo $ac_n "checking for type of return code from strerror_r""... $ac_c" 1>&6
echo "configure:10148: checking for type of return code from strerror_r" >&5
if test "$cross_compiling" = yes; then
  
    ac_cv_strerror_r_rc_int=no  
else
  cat > conftest.$ac_ext <<EOF
#line 10154 "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);
  }
}
EOF
if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
    ac_cv_strerror_r_rc_int=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
    ac_cv_strerror_r_rc_int=no 
fi
rm -fr conftest*
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 "$ac_t""$msg" 1>&6
 
fi
for ac_func in crypt_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10199: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10204 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

if test "$crypt_r" = "1"; then
  
echo $ac_n "checking style of crypt_r""... $ac_c" 1>&6
echo "configure:10255: checking style of crypt_r" >&5
if eval "test \"`echo '$''{'ac_cv_crypt_r_style'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ac_cv_crypt_r_style=none
cat > conftest.$ac_ext <<EOF
#line 10262 "configure"
#include "confdefs.h"

#include <crypt.h>

int main() {

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

; return 0; }
EOF
if { (eval echo configure:10274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_crypt_r_style=cryptd
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "$ac_cv_crypt_r_style" = "none"; then
cat > conftest.$ac_ext <<EOF
#line 10284 "configure"
#include "confdefs.h"

#include <crypt.h>

int main() {

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

; return 0; }
EOF
if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_crypt_r_style=struct_crypt_data
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
fi
if test "$ac_cv_crypt_r_style" = "none"; then
cat > conftest.$ac_ext <<EOF
#line 10307 "configure"
#include "confdefs.h"

#define _GNU_SOURCE
#include <crypt.h>

int main() {

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

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

fi

echo "$ac_t""$ac_cv_crypt_r_style" 1>&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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10374: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10379 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

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

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

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

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

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

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

fi
for ac_func in mmap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10481: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10486 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

if test "$native_mmap_emul" = "1"; then
    mmap="1"
fi
for ac_func in hstrerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10540: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10545 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10595: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10600 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10651: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10656 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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















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

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

int main() {

  sigset_t set;
 
  sigwait(&set);

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

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

fi
rm -f conftest*
fi

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

  fi


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

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

fi

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

fi

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

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

fi
fi

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

fi



for ac_hdr in ByteOrder.h		\
    conio.h		\
    crypt.h		\
    ctype.h		\
    dir.h		\
    dirent.h		\
    dl.h		\
    dlfcn.h		\
    errno.h		\
    fcntl.h		\
    grp.h		\
    iconv.h		\
    io.h		\
    langinfo.h		\
    limits.h		\
    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 "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10937: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10942 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for aprt_i in ByteOrder.h		\
    conio.h		\
    crypt.h		\
    ctype.h		\
    dir.h		\
    dirent.h		\
    dl.h		\
    dlfcn.h		\
    errno.h		\
    fcntl.h		\
    grp.h		\
    iconv.h		\
    io.h		\
    langinfo.h		\
    limits.h		\
    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 $ac_n "checking for netinet/tcp.h""... $ac_c" 1>&6
echo "configure:11044: checking for netinet/tcp.h" >&5
cat > conftest.$ac_ext <<EOF
#line 11046 "configure"
#include "confdefs.h"

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

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

































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

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

int main() {

int h_e = h_errno;

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

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

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

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

int main() {

int h_e = h_errno;

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

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

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

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

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

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

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

fi

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

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

fi

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

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

fi

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:11322: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11327 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

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

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

fi

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

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

fi

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

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

fi

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

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

int main() {

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

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

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

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

fi

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

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

fi

echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:11537: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 11545 "configure"
#include "confdefs.h"

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

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

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


fi

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

fi



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

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

int main() {

socklen_t foo = (socklen_t) 0;

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

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

fi
rm -f conftest*

fi

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

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

fi



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

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

int main() {

unsigned long foo = INADDR_NONE;

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

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

fi
rm -f conftest*
fi

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


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

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


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

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


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

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


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

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


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

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


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

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



if test "$ac_cv_sizeof_short" = "2"; then
    short_value=short
fi
if test "$ac_cv_sizeof_int" = "4"; then
    int_value=int
fi
if test "$ac_cv_sizeof_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 $ac_n "checking for INT64_C""... $ac_c" 1>&6
echo "configure:11972: checking for INT64_C" >&5
stdint=0
cat > conftest.$ac_ext <<EOF
#line 11975 "configure"
#include "confdefs.h"
#ifdef INT64_C
YES_IS_DEFINED
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
  rm -rf conftest*
   ac_cv_define_INT64_C=yes
  echo "$ac_t""yes" 1>&6

else
  rm -rf conftest*
   ac_cv_define_INT64_C=no 
  echo "$ac_t""no" 1>&6
  
  echo $ac_n "checking for INT64_C in stdint.h""... $ac_c" 1>&6
echo "configure:11994: checking for INT64_C in stdint.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_INT64_C'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    cat > conftest.$ac_ext <<EOF
#line 12000 "configure"
#include "confdefs.h"

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

  
fi

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

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



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

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

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



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

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

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



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

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

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



if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then
    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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12313: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12318 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12369: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12374 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in stricmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12425: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12430 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in strcasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12481: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12486 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12537: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12542 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12593: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12598 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

for ac_func in memchr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12649: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12654 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 have_memchr="1"
else
  echo "$ac_t""no" 1>&6
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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12721: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12726 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   tempdso="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
  echo "$ac_t""no" 1>&6
tempdso="no"
fi

    fi
    if test "$tempdso" = "no"; then
      for ac_func in dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12841: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12846 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

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

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

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

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   tempdso="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
  echo "$ac_t""no" 1>&6
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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13040: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 13045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


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

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

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

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


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

for ac_func in semget semctl flock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13159: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 13164 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

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

for ac_func in sem_close sem_unlink sem_post sem_wait
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13254: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 13259 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


echo $ac_n "checking for working sem_open""... $ac_c" 1>&6
echo "configure:13308: checking for working sem_open" >&5
if eval "test \"`echo '$''{'ac_cv_func_sem_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  ac_cv_func_sem_open=no
else
  cat > conftest.$ac_ext <<EOF
#line 13317 "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);
}
EOF
if { (eval echo configure:13338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_sem_open=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_sem_open=no
fi
rm -fr conftest*
fi

fi

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

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

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

int main() {

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

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



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

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

  
fi

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

  fi


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

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

  
fi

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

  fi


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

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

  
fi

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

  fi


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

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

  
fi

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

  fi


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

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

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

    done
  
fi

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

  fi


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

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

  
fi

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

  fi

    for ac_func in pthread_mutexattr_setpshared
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13625: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 13630 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

                    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 <<EOF
#line 13707 "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);
        }
EOF
if { (eval echo configure:13729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_pthread_mutexattr_setpshared=no
fi
rm -fr conftest*
fi

else
    :
    
fi

    if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
        for ac_func in pthread_mutexattr_setrobust_np
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13750: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 13755 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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

        if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "no"; then
            cat > conftest.$ac_ext <<EOF
#line 13804 "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; }
EOF
if { (eval echo configure:13830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_pthread_mutexattr_setrobust_np=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
            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 "$ac_t""decision on $ac_decision_item... $ac_decision_msg" 1>&6
fi

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


flockser="0"
sysvser="0"
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 $ac_n "checking if all interprocess locks affect threads""... $ac_c" 1>&6
echo "configure:14311: checking if all interprocess locks affect threads" >&5
if test "x$apr_process_lock_is_global" = "xyes"; then
    proclockglobal="1"
    echo "$ac_t""yes" 1>&6
else
    proclockglobal="0"
    echo "$ac_t""no" 1>&6
fi



echo $ac_n "checking if Posix sems affect threads in the same process""... $ac_c" 1>&6
echo "configure:14323: checking if Posix sems affect threads in the same process" >&5
if test "x$apr_posixsem_is_global" = "xyes"; then
  cat >> confdefs.h <<\EOF
#define POSIXSEM_IS_GLOBAL 1
EOF

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

echo $ac_n "checking if SysV sems affect threads in the same process""... $ac_c" 1>&6
echo "configure:14335: checking if SysV sems affect threads in the same process" >&5
if test "x$apr_sysvsem_is_global" = "xyes"; then
  cat >> confdefs.h <<\EOF
#define SYSVSEM_IS_GLOBAL 1
EOF

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

echo $ac_n "checking if fcntl locks affect threads in the same process""... $ac_c" 1>&6
echo "configure:14347: checking if fcntl locks affect threads in the same process" >&5
if test "x$apr_fcntl_is_global" = "xyes"; then
  cat >> confdefs.h <<\EOF
#define FCNTL_IS_GLOBAL 1
EOF

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

echo $ac_n "checking if flock locks affect threads in the same process""... $ac_c" 1>&6
echo "configure:14359: checking if flock locks affect threads in the same process" >&5
if test "x$apr_flock_is_global" = "xyes"; then
  cat >> confdefs.h <<\EOF
#define FLOCK_IS_GLOBAL 1
EOF

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

echo $ac_n "checking for entropy source""... $ac_c" 1>&6
echo "configure:14371: checking for entropy source" >&5

# 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 "configure: error: You must specify a default EGD socket path." 1>&2; exit 1; }
    fi
    cat >> confdefs.h <<\EOF
#define HAVE_EGD 1
EOF

    cat >> confdefs.h <<EOF
#define EGD_DEFAULT_SOCKET $withval
EOF

    echo "$ac_t""EGD-compatible daemon" 1>&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 "$ac_t""/dev/random" 1>&6
      rand="1"
    elif test -r "/dev/arandom"; then
      cat >> confdefs.h <<\EOF
#define DEV_RANDOM /dev/arandom
EOF

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

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

      echo "$ac_t""$apr_devrandom" 1>&6
      rand="1"
    else
      { echo "configure: error: $apr_devrandom not found or unreadable." 1>&2; exit 1; }
    fi
  fi
fi

if test "$rand" != "1"; then
    case $host in
        # we have built in support for OS/2
        *-os2*)
            echo "$ac_t""Using OS/2 builtin random" 1>&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 "$ac_t""truerand" 1>&6
                rand="1"
              else
                echo "$ac_t""not found" 1>&6
                rand="0"
              fi
            fi
            ;;
    esac
fi


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

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

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

fi

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

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

int main() {

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

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

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





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

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

int main() {

struct sockaddr_in sai;
int i = sai.sin_len;

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

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

fi
rm -f conftest*

fi

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

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

fi


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

echo $ac_n "checking style of gethostbyname_r routine""... $ac_c" 1>&6
echo "configure:14601: checking style of gethostbyname_r routine" >&5
if eval "test \"`echo '$''{'ac_cv_gethostbyname_r_style'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 "$ac_t""$ac_cv_gethostbyname_r_style" 1>&6

if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then
    cat >> confdefs.h <<\EOF
#define GETHOSTBYNAME_R_GLIBC2 1
EOF

fi

echo $ac_n "checking 3rd argument to the gethostbyname_r routines""... $ac_c" 1>&6
echo "configure:14664: checking 3rd argument to the gethostbyname_r routines" >&5
if eval "test \"`echo '$''{'ac_cv_gethostbyname_r_arg'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 "$ac_t""$ac_cv_gethostbyname_r_arg" 1>&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 $ac_n "checking if TCP_NODELAY setting is inherited from listening sockets""... $ac_c" 1>&6
echo "configure:14729: checking if TCP_NODELAY setting is inherited from listening sockets" >&5
if eval "test \"`echo '$''{'ac_cv_tcp_nodelay_inherited'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
    ac_cv_tcp_nodelay_inherited="yes"

else
  cat > conftest.$ac_ext <<EOF
#line 14740 "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;
}

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

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

fi
rm -fr conftest*
fi

fi

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


  echo $ac_n "checking if O_NONBLOCK setting is inherited from listening sockets""... $ac_c" 1>&6
echo "configure:14866: checking if O_NONBLOCK setting is inherited from listening sockets" >&5
if eval "test \"`echo '$''{'ac_cv_o_nonblock_inherited'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
    ac_cv_o_nonblock_inherited="yes"

else
  cat > conftest.$ac_ext <<EOF
#line 14877 "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;
}

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

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

fi
rm -fr conftest*
fi

fi

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



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

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

  
fi

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

  fi


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

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

  
fi

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

  fi

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

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

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


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

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

  
fi

echo "$ac_t""$ac_cv_define_SO_ACCEPTFILTER" 1>&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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15166: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 15171 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


  echo $ac_n "checking for presence of retrans/retry fields in res_state/resolv.h ""... $ac_c" 1>&6
echo "configure:15220: checking for presence of retrans/retry fields in res_state/resolv.h " >&5
if eval "test \"`echo '$''{'ac_cv_retransretry'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_retransretry="no"

else
  cat > conftest.$ac_ext <<EOF
#line 15231 "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;
}

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

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

fi
rm -fr conftest*
fi

fi

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

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

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

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

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

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

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

echo "$ac_t""$ac_cv_search_gai_strerror" 1>&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"
  
else :
  
fi

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

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

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

echo "$ac_t""$ac_cv_search_getnameinfo" 1>&6
if test "$ac_cv_search_getnameinfo" != "no"; then
  test "$ac_cv_search_getnameinfo" = "none required" || LIBS="$ac_cv_search_getnameinfo $LIBS"
  
else :
  
fi
for ac_func in gai_strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15477: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 15482 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


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

else
  cat > conftest.$ac_ext <<EOF
#line 15542 "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);
}

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

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

fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_working_getaddrinfo" 1>&6
if test "$ac_cv_working_getaddrinfo" = "yes"; then
  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 $ac_n "checking for negative error codes for getaddrinfo""... $ac_c" 1>&6
echo "configure:15608: checking for negative error codes for getaddrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_negative_eai'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_negative_eai="no"

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

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

void main(void) {
    if (EAI_ADDRFAMILY < 0) {
        exit(0);
    }
    exit(1);
}

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

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

fi
rm -fr conftest*
fi

fi

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

fi


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

else
  cat > conftest.$ac_ext <<EOF
#line 15673 "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);
    }
}

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

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

fi
rm -fr conftest*
fi

fi

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

fi


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

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

int main() {

struct sockaddr_in6 sa;

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

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

fi
rm -f conftest*

fi

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

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


echo $ac_n "checking if APR supports IPv6""... $ac_c" 1>&6
echo "configure:15792: checking if APR supports IPv6" >&5
have_ipv6="0"
if test "$user_disabled_ipv6" = 1; then
    echo "$ac_t"""no -- disabled by user"" 1>&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 "$ac_t"""yes"" 1>&6
            else
                echo "$ac_t"""no -- no getnameinfo"" 1>&6
            fi
        else
            echo "$ac_t"""no -- no working getaddrinfo"" 1>&6
        fi
    else
        echo "$ac_t"""no -- no sockaddr_in6"" 1>&6;
    fi
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

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

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

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

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

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

DEFS=-DHAVE_CONFIG_H

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

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

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

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

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

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@apr_srcdir@%$apr_srcdir%g
s%@apr_builddir@%$apr_builddir%g
s%@top_builddir@%$top_builddir%g
s%@apr_builders@%$apr_builders%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CPP@%$CPP%g
s%@AWK@%$AWK%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@RM@%$RM%g
s%@AS@%$AS%g
s%@ASCPP@%$ASCPP%g
s%@AR@%$AR%g
s%@apr_charset_ebcdic@%$apr_charset_ebcdic%g
s%@LIBTOOL@%$LIBTOOL%g
s%@installbuilddir@%$installbuilddir%g
s%@lt_compile@%$lt_compile%g
s%@link@%$link%g
s%@so_ext@%$so_ext%g
s%@lib_target@%$lib_target%g
s%@export_lib_target@%$export_lib_target%g
s%@shlibpath_var@%$shlibpath_var%g
s%@LTFLAGS@%$LTFLAGS%g
s%@LT_LDFLAGS@%$LT_LDFLAGS%g
s%@lib_target_libs@%$lib_target_libs%g
s%@ASCPPFLAGS@%$ASCPPFLAGS%g
s%@ASFLAGS@%$ASFLAGS%g
s%@apr_atomic_sparc_compile@%$apr_atomic_sparc_compile%g
s%@apr_force_atomic_generic@%$apr_force_atomic_generic%g
s%@proc_mutex_is_global@%$proc_mutex_is_global%g
s%@eolstr@%$eolstr%g
s%@INSTALL_SUBDIRS@%$INSTALL_SUBDIRS%g
s%@threads@%$threads%g
s%@have_sigsuspend@%$have_sigsuspend%g
s%@have_sigwait@%$have_sigwait%g
s%@useshmgetanon@%$useshmgetanon%g
s%@usemmapzero@%$usemmapzero%g
s%@usemmapanon@%$usemmapanon%g
s%@haveshmgetanon@%$haveshmgetanon%g
s%@havemmapzero@%$havemmapzero%g
s%@havemmapanon@%$havemmapanon%g
s%@usemmaptmp@%$usemmaptmp%g
s%@usemmapshm@%$usemmapshm%g
s%@useshmget@%$useshmget%g
s%@usebeosarea@%$usebeosarea%g
s%@useos2shm@%$useos2shm%g
s%@havemmaptmp@%$havemmaptmp%g
s%@havemmapshm@%$havemmapshm%g
s%@haveshmget@%$haveshmget%g
s%@havebeosarea@%$havebeosarea%g
s%@haveos2shm@%$haveos2shm%g
s%@sharedmem@%$sharedmem%g
s%@sendfile@%$sendfile%g
s%@apr_inaddr_none@%$apr_inaddr_none%g
s%@fork@%$fork%g
s%@have_inet_addr@%$have_inet_addr%g
s%@tcp_nodelay_inherited@%$tcp_nodelay_inherited%g
s%@o_nonblock_inherited@%$o_nonblock_inherited%g
s%@have_inet_network@%$have_inet_network%g
s%@have_sigaction@%$have_sigaction%g
s%@have_setrlimit@%$have_setrlimit%g
s%@have_getrlimit@%$have_getrlimit%g
s%@iconv@%$iconv%g
s%@mmap@%$mmap%g
s%@have_memmove@%$have_memmove%g
s%@arpa_ineth@%$arpa_ineth%g
s%@conioh@%$conioh%g
s%@ctypeh@%$ctypeh%g
s%@crypth@%$crypth%g
s%@errnoh@%$errnoh%g
s%@direnth@%$direnth%g
s%@fcntlh@%$fcntlh%g
s%@ioh@%$ioh%g
s%@limitsh@%$limitsh%g
s%@netdbh@%$netdbh%g
s%@sys_syslimitsh@%$sys_syslimitsh%g
s%@netinet_inh@%$netinet_inh%g
s%@netinet_tcph@%$netinet_tcph%g
s%@stdargh@%$stdargh%g
s%@stdioh@%$stdioh%g
s%@stdlibh@%$stdlibh%g
s%@stringh@%$stringh%g
s%@stringsh@%$stringsh%g
s%@sys_sendfileh@%$sys_sendfileh%g
s%@sys_signalh@%$sys_signalh%g
s%@sys_socketh@%$sys_socketh%g
s%@sys_typesh@%$sys_typesh%g
s%@sys_timeh@%$sys_timeh%g
s%@sys_uioh@%$sys_uioh%g
s%@sys_unh@%$sys_unh%g
s%@timeh@%$timeh%g
s%@unistdh@%$unistdh%g
s%@signalh@%$signalh%g
s%@sys_waith@%$sys_waith%g
s%@pthreadh@%$pthreadh%g
s%@semaphoreh@%$semaphoreh%g
s%@short_value@%$short_value%g
s%@int_value@%$int_value%g
s%@long_value@%$long_value%g
s%@int64_value@%$int64_value%g
s%@off_t_value@%$off_t_value%g
s%@size_t_value@%$size_t_value%g
s%@ssize_t_value@%$ssize_t_value%g
s%@socklen_t_value@%$socklen_t_value%g
s%@int64_t_fmt@%$int64_t_fmt%g
s%@int64_t_fmt_len@%$int64_t_fmt_len%g
s%@ssize_t_fmt@%$ssize_t_fmt%g
s%@size_t_fmt@%$size_t_fmt%g
s%@off_t_fmt@%$off_t_fmt%g
s%@pid_t_fmt@%$pid_t_fmt%g
s%@int64_literal@%$int64_literal%g
s%@stdint@%$stdint%g
s%@have_strnicmp@%$have_strnicmp%g
s%@have_strncasecmp@%$have_strncasecmp%g
s%@have_stricmp@%$have_stricmp%g
s%@have_strcasecmp@%$have_strcasecmp%g
s%@have_strdup@%$have_strdup%g
s%@have_strstr@%$have_strstr%g
s%@have_memchr@%$have_memchr%g
s%@aprdso@%$aprdso%g
s%@oc@%$oc%g
s%@struct_rlimit@%$struct_rlimit%g
s%@have_union_semun@%$have_union_semun%g
s%@hasflockser@%$hasflockser%g
s%@hassysvser@%$hassysvser%g
s%@hasposixser@%$hasposixser%g
s%@hasfcntlser@%$hasfcntlser%g
s%@hasprocpthreadser@%$hasprocpthreadser%g
s%@hasrwlockser@%$hasrwlockser%g
s%@flockser@%$flockser%g
s%@sysvser@%$sysvser%g
s%@posixser@%$posixser%g
s%@fcntlser@%$fcntlser%g
s%@procpthreadser@%$procpthreadser%g
s%@pthreadser@%$pthreadser%g
s%@proclockglobal@%$proclockglobal%g
s%@rand@%$rand%g
s%@have_in_addr@%$have_in_addr%g
s%@file_as_socket@%$file_as_socket%g
s%@apr_tcp_nopush_flag@%$apr_tcp_nopush_flag%g
s%@have_corkable_tcp@%$have_corkable_tcp%g
s%@acceptfilter@%$acceptfilter%g
s%@have_ipv6@%$have_ipv6%g
s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
s%@EXTRA_LIBS@%$EXTRA_LIBS%g
s%@EXTRA_INCLUDES@%$EXTRA_INCLUDES%g
s%@NOTEST_CPPFLAGS@%$NOTEST_CPPFLAGS%g
s%@NOTEST_CFLAGS@%$NOTEST_CFLAGS%g
s%@NOTEST_LDFLAGS@%$NOTEST_LDFLAGS%g
s%@NOTEST_LIBS@%$NOTEST_LIBS%g
s%@NOTEST_INCLUDES@%$NOTEST_INCLUDES%g
s%@LDLIBS@%$LDLIBS%g
s%@OSDIR@%$OSDIR%g
s%@DEFAULT_OSDIR@%$DEFAULT_OSDIR%g
s%@EXEEXT@%$EXEEXT%g
s%@LIBTOOL_LIBS@%$LIBTOOL_LIBS%g
s%@SUBDIRS@%$SUBDIRS%g
s%@INCLUDE_RULES@%$INCLUDE_RULES%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

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

cat >> $CONFIG_STATUS <<EOF

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

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

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

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

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

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

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

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

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

  echo creating $ac_file

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

EOF

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

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

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

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

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

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

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

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





if test -n "$USE_VPATH"; then
  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


