#! /bin/sh

CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 latin5 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
DEFAULT_CHARSET=latin1
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

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

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

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

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

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

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

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

as_executable_p="test -f"

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

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

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

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

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

exec 6>&1

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

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

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

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

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

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

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

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

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

  case $ac_option in

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

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

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

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

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

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

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

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

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

  -help | --help | --hel | --he | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  -*) { echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

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

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

  esac
done

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

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

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

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

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

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

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

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CXX_set=${CXX+set}
ac_env_CXX_value=$CXX
ac_cv_env_CXX_set=${CXX+set}
ac_cv_env_CXX_value=$CXX
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<EOF
\`configure' configures this package to adapt to many kinds of systems.

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

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

Defaults for the options are specified in brackets.

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

EOF

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

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

For better control, use the options below.

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

  cat <<\EOF

Program names:
  --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

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

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-maintainer-mode enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
  --enable-shared=PKGS  build shared libraries default=yes
  --enable-static=PKGS  build static libraries default=yes
  --enable-fast-install=PKGS  optimize for fast installation default=yes
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-thread-safe-client
                          Compile the client with threads.
  --enable-assembler      Use assembler versions of some string
                          functions if available.
  --enable-local-infile
                          Enable LOAD DATA LOCAL INFILE (default: disabled)
  --disable-largefile     Omit support for large files

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
 --with-other-libc=/path/to/other/libc/dir Link against libc and other standard libraries installed in the specified non-standard location overriding default. Originally added to be able to link against glibc 2.2 without making the user upgrade the standard libc installation
  --with-server-suffix    Append value to the version string.
  --with-mit-threads      Always use included thread lib.
  --with-pthread          Force use of pthread library.
  --with-named-thread-libs=ARG
                          Use specified thread libraries instead of
                          those automatically found by configure.
  --with-named-curses-libs=ARG
                          Use specified curses libraries instead of
                          those automatically found by configure.
  --with-named-z-libs=ARG
                          Use specified zlib libraries instead of
                          those automatically found by configure.
  --with-raid             Enable RAID Support
  --with-unix-socket-path=SOCKET
                          Where to put the unix-domain socket.  SOCKET must be
                          an absolute file name.
  --with-tcp-port=port-number
                          Which port to use for MySQL services (default 3306)
  --with-mysqld-user=username
                          What user the mysqld daemon shall be run as.
  --with-libwrap=DIR    Compile in libwrap (tcp_wrappers) support
  --without-debug         Build a production version without debugging code
  --with-mysqld-ldflags   Extra linking arguments for mysqld
  --with-client-ldflags   Extra linking arguments for clients
  --with-lib-ccflags      Extra CC options for libraries
  --with-low-memory       Try to use less memory to compile to avoid
                          memory limitations.
  --with-comment          Comment about compilation environment.
  --without-server        Only build the client.
  --without-docs          Skip building of the documentation.
  --without-bench         Skip building of the benchmark suite.
  --without-readline      Use system readline instead of bundled copy.
  --with-charset=CHARSET  Use CHARSET by default (one of: big5 cp1251 cp1257
                          croat czech danish dec8 dos estonia euc_kr gb2312 gbk
                          german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
                          latin1 latin2 latin5 swe7 usa7 win1250 win1251ukr
                          ujis sjis tis620; Default is latin1)
  --with-extra-charsets=CHARSET,CHARSET,...
                          Use charsets in addition to default (none, complex,
                          all, or a list selected from the above sets)

  --with-berkeley-db=DIR
                          Use BerkeleyDB located in DIR

  --with-berkeley-db-includes=DIR
                          Find Berkeley DB headers in DIR

  --with-berkeley-db-libs=DIR
                          Find Berkeley DB libraries in DIR

  --with-innodb         Use Innodb

  --with-gemini=DIR Use Gemini DB located in DIR

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

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

EOF
fi

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

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

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

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

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

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

  $ $0 $@

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

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

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

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

PATH = $PATH

_ASUNAME
} >&5

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

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
for ac_arg
do
  case $ac_arg in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

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

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

# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    { echo "$as_me:954: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

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

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

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

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

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

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

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

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

test -z "$build_alias" &&
  build_alias=$ac_cv_build

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

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

test -z "$host_alias" &&
  host_alias=$ac_cv_host

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

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

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

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

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

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

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

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

echo "$as_me:1242: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
sleep 1
echo timestamp > conftestfile
# Do this in a subshell so we don't clobber the current shell's
# arguments.  FIXME: maybe try `-L' hack like GETLOADAVG test?
if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
then
   # Ok.
   :
else
   { { echo "$as_me:1253: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f conftest*
echo "$as_me:1260: result: yes" >&5
echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
  program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $.  echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed

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

PACKAGE=mysql

VERSION=3.23.51

if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  { { echo "$as_me:1309: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
   { (exit 1); exit 1; }; }
fi

cat >>confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >>confdefs.h <<EOF
#define VERSION "$VERSION"
EOF

missing_dir=`cd $ac_aux_dir && pwd`
echo "$as_me:1323: checking for working aclocal" >&5
echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
   ACLOCAL=aclocal
   echo "$as_me:1330: result: found" >&5
echo "${ECHO_T}found" >&6
else
   ACLOCAL="$missing_dir/missing aclocal"
   echo "$as_me:1334: result: missing" >&5
echo "${ECHO_T}missing" >&6
fi

echo "$as_me:1338: checking for working autoconf" >&5
echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
   AUTOCONF=autoconf
   echo "$as_me:1345: result: found" >&5
echo "${ECHO_T}found" >&6
else
   AUTOCONF="$missing_dir/missing autoconf"
   echo "$as_me:1349: result: missing" >&5
echo "${ECHO_T}missing" >&6
fi

echo "$as_me:1353: checking for working automake" >&5
echo $ECHO_N "checking for working automake... $ECHO_C" >&6
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (automake --version) < /dev/null > /dev/null 2>&1; then
   AUTOMAKE=automake
   echo "$as_me:1360: result: found" >&5
echo "${ECHO_T}found" >&6
else
   AUTOMAKE="$missing_dir/missing automake"
   echo "$as_me:1364: result: missing" >&5
echo "${ECHO_T}missing" >&6
fi

echo "$as_me:1368: checking for working autoheader" >&5
echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
   AUTOHEADER=autoheader
   echo "$as_me:1375: result: found" >&5
echo "${ECHO_T}found" >&6
else
   AUTOHEADER="$missing_dir/missing autoheader"
   echo "$as_me:1379: result: missing" >&5
echo "${ECHO_T}missing" >&6
fi

echo "$as_me:1383: checking for working makeinfo" >&5
echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
   MAKEINFO=makeinfo
   echo "$as_me:1390: result: found" >&5
echo "${ECHO_T}found" >&6
else
   MAKEINFO="$missing_dir/missing makeinfo"
   echo "$as_me:1394: result: missing" >&5
echo "${ECHO_T}missing" >&6
fi

ac_config_headers="$ac_config_headers config.h"

ac_config_commands="$ac_config_commands default-1"

PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_VERSION=10:0:0

# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[^.]*$||"`
F_PART=`echo $MYSQL_BASE_VERSION | sed -e "s|\.||g"| sed -e "s|a-zA-Z\+||"|sed -e "s|^\(..\)$|\\10|"`
L_PART=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|^[0-9]\.[0-9]*\.||" | sed -e "s|^\(.\)$|0\\1|" | sed -e "s|[a-z]||"`
MYSQL_VERSION_ID=${F_PART}${L_PART}

# The port should be constant for a LONG time
MYSQL_TCP_PORT_DEFAULT=3306
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"

# Remember to add a directory sql/share/LANGUAGE
AVAILABLE_LANGUAGES="\
czech danish dutch english estonian french german greek hungarian \
italian japanese korean norwegian norwegian-ny polish portuguese \
romanian russian slovak spanish swedish ukrainian"

# Generate make rules for all error messages
AVAILABLE_LANGUAGES_ERRORS=
AVAILABLE_LANGUAGES_ERRORS_RULES=$srcdir/ac_available_languages_fragment
rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
for i in $AVAILABLE_LANGUAGES
do
  AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys"
  echo "$i/errmsg.sys: $i/errmsg.txt
	\$(top_builddir)/extra/comp_err \$^ $i/errmsg.sys" \
    >> $AVAILABLE_LANGUAGES_ERRORS_RULES
done

#####
#####

cat >>confdefs.h <<EOF
#define PROTOCOL_VERSION $PROTOCOL_VERSION
EOF

cat >>confdefs.h <<EOF
#define DOT_FRM_VERSION $DOT_FRM_VERSION
EOF

# Canonicalize the configuration name.
SYSTEM_TYPE="$host_vendor-$host_os"
MACHINE_TYPE="$host_cpu"

cat >>confdefs.h <<EOF
#define SYSTEM_TYPE "$SYSTEM_TYPE"
EOF

cat >>confdefs.h <<EOF
#define MACHINE_TYPE "$MACHINE_TYPE"
EOF

# Detect intel x86 like processor
BASE_MACHINE_TYPE=$MACHINE_TYPE
case $MACHINE_TYPE in
  i?86) BASE_MACHINE_TYPE=i386 ;;
esac

# Save some variables and the command line options for mysqlbug
SAVE_CFLAGS="$CFLAGS"
SAVE_CXXFLAGS="$CXXFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
CONF_COMMAND="$0 $ac_configure_args"

echo "$as_me:1473: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
  enableval="$enable_maintainer_mode"
  USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
fi;
  echo "$as_me:1482: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6

if test $USE_MAINTAINER_MODE = yes; then
  MAINTAINER_MODE_TRUE=
  MAINTAINER_MODE_FALSE='#'
else
  MAINTAINER_MODE_TRUE='#'
  MAINTAINER_MODE_FALSE=
fi
  MAINT=$MAINTAINER_MODE_TRUE

#AC_ARG_PROGRAM			# Automaticly invoked by AM_INIT_AUTOMAKE
echo "$as_me:1495: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
sleep 1
echo timestamp > conftestfile
# Do this in a subshell so we don't clobber the current shell's
# arguments.  FIXME: maybe try `-L' hack like GETLOADAVG test?
if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
then
   # Ok.
   :
else
   { { echo "$as_me:1506: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f conftest*
echo "$as_me:1513: result: yes" >&5
echo "${ECHO_T}yes" >&6
# This is needed is SUBDIRS is set
echo "$as_me:1516: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:1536: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:1540: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# This generates rules for webpage generation for the MySQL homepage.

if test -d ../web/SitePages; then
  LOCAL_TRUE=
  LOCAL_FALSE='#'
else
  LOCAL_TRUE='#'
  LOCAL_FALSE=
fi

# This is need before AC_PROG_CC
#

if test "x${CFLAGS-}" = x ; then
  cflags_is_set=no
else
  cflags_is_set=yes
fi

if test "x${CPPFLAGS-}" = x ; then
  cppflags_is_set=no
else
  cppflags_is_set=yes
fi

if test "x${LDFLAGS-}" = x ; then
  ldflags_is_set=no
else
  ldflags_is_set=yes
fi

# The following hack should ensure that configure doesn't add optimizing
# or debugging flags to CFLAGS or CXXFLAGS
CFLAGS="$CFLAGS "
CXXFLAGS="$CXXFLAGS "

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

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

  test -n "$AWK" && break
done

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

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

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

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

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

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

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

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

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

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

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

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1816: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1819: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

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

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

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

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

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

# Provide some information about the compiler.
echo "$as_me:1912:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1915: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1918: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1920: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1923: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1925: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1928: \$? = $ac_status" >&5
  (exit $ac_status); }

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

int
main ()
{

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

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

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

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

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

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

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

int
main ()
{

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

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

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

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

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2167: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2170: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2173: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2176: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:2186: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2213: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2216: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2219: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2222: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 2234 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2247: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2250: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2253: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2256: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 2266 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2278: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2281: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2284: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2287: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

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

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:2324: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
echo "$as_me:2339: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "$as_me:2347: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "$as_me:2350: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:2363: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CXX="$ac_prog"
echo "$as_me:2378: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  echo "$as_me:2386: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
  echo "$as_me:2389: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CXX" && break
done
test -n "$ac_ct_CXX" || ac_ct_CXX="g++"

  CXX=$ac_ct_CXX
fi

# Provide some information about the compiler.
echo "$as_me:2401:" \
     "checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:2404: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:2407: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:2409: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:2412: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:2414: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:2417: \$? = $ac_status" >&5
  (exit $ac_status); }

echo "$as_me:2420: checking whether we are using the GNU C++ compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2426 "configure"
#include "confdefs.h"

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

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

fi
echo "$as_me:2462: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:2468: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2474 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2486: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2489: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2492: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2495: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cxx_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:2505: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 2532 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2548: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2551: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2554: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 2564 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2576: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2579: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2582: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2585: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

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

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

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

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

    done
    ac_cv_prog_CPP=$CPP

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

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

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

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

# Print version of CC and CXX compiler (if they support --version)
CC_VERSION=`$CC --version`
if test $? -eq "0"
then
  echo "$as_me:2811: checking \"C Compiler version\"" >&5
echo $ECHO_N "checking \"C Compiler version\"... $ECHO_C" >&6;
  echo "$as_me:2813: result: \"$CC $CC_VERSION\"" >&5
echo "${ECHO_T}\"$CC $CC_VERSION\"" >&6
fi
CXX_VERSION=`$CXX --version`
if test $? -eq "0"
then
  echo "$as_me:2819: checking \"C++ compiler version\"" >&5
echo $ECHO_N "checking \"C++ compiler version\"... $ECHO_C" >&6;
  echo "$as_me:2821: result: \"$CXX $CXX_VERSION\"" >&5
echo "${ECHO_T}\"$CXX $CXX_VERSION\"" >&6
fi

# Fix for sgi gcc / sgiCC which tries to emulate gcc
if test "$CC" = "sgicc"
then
  ac_cv_c_compiler_gnu="no"
fi
if test "$CXX" = "sgi++"
then
  GXX="no"
fi

if test "$ac_cv_c_compiler_gnu" = "yes"
then
  AS="$CC -c"

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

  test -z "$ac_cv_path_AS" && ac_cv_path_AS="as"
  ;;
esac
fi
AS=$ac_cv_path_AS

if test -n "$AS"; then
  echo "$as_me:2871: result: $AS" >&5
echo "${ECHO_T}$AS" >&6
else
  echo "$as_me:2874: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

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

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

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

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

# We use libtool
#AC_LIBTOOL_WIN32_DLL
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
  enable_shared=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_shared=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_shared=yes
fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
  enable_static=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_static=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_static=yes
fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
  enableval="$enable_fast_install"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
  enable_fast_install=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_fast_install=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_fast_install=yes
fi;

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

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

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

NM="$ac_cv_path_NM"
echo "$as_me:3148: result: $NM" >&5
echo "${ECHO_T}$NM" >&6

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

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

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

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

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

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

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo "$as_me:3213: checking whether the C compiler needs -belf" >&5
echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3219 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3231: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3234: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3237: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3240: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  lt_cv_cc_needs_belf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:3250: result: $lt_cv_cc_needs_belf" >&5
echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;

esac

# Save cache, so that ltconfig can load it
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
  (set) 2>&1 |
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \).
      sed -n \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

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

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

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

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

#AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC

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

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

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

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

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

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

# Not critical since the generated file is distributed
for ac_prog in 'bison -y' byacc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:3437: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_YACC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_YACC="$ac_prog"
echo "$as_me:3452: found $ac_dir/$ac_word" >&5
break
done

fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
  echo "$as_me:3460: result: $YACC" >&5
echo "${ECHO_T}$YACC" >&6
else
  echo "$as_me:3463: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

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

fi
fi
PDFMANUAL=$ac_cv_prog_PDFMANUAL
if test -n "$PDFMANUAL"; then
  echo "$as_me:3496: result: $PDFMANUAL" >&5
echo "${ECHO_T}$PDFMANUAL" >&6
else
  echo "$as_me:3499: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:3503: checking \"return type of sprintf\"" >&5
echo $ECHO_N "checking \"return type of sprintf\"... $ECHO_C" >&6

#check the return type of sprintf
if test "$cross_compiling" = yes; then
  { { echo "$as_me:3508: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3513 "configure"
#include "confdefs.h"

  int main()
    {
      char* s = "hello";
      char buf[6];
      if((int)sprintf(buf, s) == strlen(s))
	return 0;

      return -1;
     }

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:3528: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3531: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:3533: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3536: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define SPRINTF_RETURNS_INT 1
EOF
 echo "$as_me:3541: result: \"int\"" >&5
echo "${ECHO_T}\"int\"" >&6
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
if test "$cross_compiling" = yes; then
  { { echo "$as_me:3548: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3553 "configure"
#include "confdefs.h"

 int main()
   {
     char* s = "hello";
     char buf6;
     if((char*)sprintf(buf,s) == buf + strlen(s))
       return 0;
     return -1;
   }

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:3567: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3570: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:3572: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3575: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define SPRINTF_RETURNS_PTR 1
EOF
 echo "$as_me:3580: result: \"ptr\"" >&5
echo "${ECHO_T}\"ptr\"" >&6
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >>confdefs.h <<\EOF
#define SPRINTF_RETURNS_GARBAGE 1
EOF
 echo "$as_me:3589: result: \"garbage\"" >&5
echo "${ECHO_T}\"garbage\"" >&6
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

# option, cache_name, variable,
# code to execute if yes, code to exectute if fail

# arch, option, cache_name, variable

# os, option, cache_name, variable

# We need some special hacks when running slowaris
# Extract the first word of "uname", so it can be a program name with args.
set dummy uname; ac_word=$2
echo "$as_me:3608: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_uname_prog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $uname_prog in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_uname_prog="$uname_prog" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_uname_prog="$ac_dir/$ac_word"
   echo "$as_me:3625: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_uname_prog" && ac_cv_path_uname_prog="no"
  ;;
esac
fi
uname_prog=$ac_cv_path_uname_prog

if test -n "$uname_prog"; then
  echo "$as_me:3637: result: $uname_prog" >&5
echo "${ECHO_T}$uname_prog" >&6
else
  echo "$as_me:3640: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# We should go through this and put all the explictly system dependent
# stuff in one place
echo "$as_me:3646: checking operating system" >&5
echo $ECHO_N "checking operating system... $ECHO_C" >&6
if test "${mysql_cv_sys_os+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$uname_prog" != "no"; then
  mysql_cv_sys_os="`uname`"
else
  mysql_cv_sys_os="Not Solaris"
fi

fi

echo "$as_me:3660: result: $mysql_cv_sys_os" >&5
echo "${ECHO_T}$mysql_cv_sys_os" >&6

# This should be rewritten to use $target_os
case "$target_os" in
  sco3.2v5*)
     CFLAGS="$CFLAGS -DSCO"
     CXXFLAGS="$CXXFLAGS -DSCO"
     LD='$(CC) $(CFLAGS)'
     case "$CFLAGS" in
       *-belf*)

  echo "$as_me:3672: checking -belf" >&5
echo $ECHO_N "checking -belf... $ECHO_C" >&6
  OLD_CFLAGS="$CFLAGS"
  if test "${mysql_cv_option_sco_belf_option+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    CFLAGS="$OLD_CFLAGS -belf"
    if test "$cross_compiling" = yes; then
  mysql_cv_option_sco_belf_option=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3684 "configure"
#include "confdefs.h"
int main(){exit(0);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:3689: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3692: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:3694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3697: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_option_sco_belf_option=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_option_sco_belf_option=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi

  CFLAGS="$OLD_CFLAGS"

  if test x"$mysql_cv_option_sco_belf_option" = "xyes" ; then
    CFLAGS="$CFLAGS -belf"
    echo "$as_me:3715: result: yes" >&5
echo "${ECHO_T}yes" >&6

         case "$LDFLAGS" in
           *-belf*) ;;
           *) echo "Adding -belf option to ldflags."
              LDFLAGS="$LDFLAGS -belf"
           ;;
         esac

  else
    echo "$as_me:3726: result: no" >&5
echo "${ECHO_T}no" >&6

  fi

       ;;
       *)

  echo "$as_me:3734: checking -belf" >&5
echo $ECHO_N "checking -belf... $ECHO_C" >&6
  OLD_CFLAGS="$CFLAGS"
  if test "${mysql_cv_option_sco_belf_option+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    CFLAGS="$OLD_CFLAGS -belf"
    if test "$cross_compiling" = yes; then
  mysql_cv_option_sco_belf_option=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3746 "configure"
#include "confdefs.h"
int main(){exit(0);}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:3751: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3754: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:3756: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3759: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_option_sco_belf_option=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_option_sco_belf_option=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi

  CFLAGS="$OLD_CFLAGS"

  if test x"$mysql_cv_option_sco_belf_option" = "xyes" ; then
    CFLAGS="$CFLAGS -belf"
    echo "$as_me:3777: result: yes" >&5
echo "${ECHO_T}yes" >&6

         case "$LDFLAGS" in
           *-belf*) ;;
           *)
	     echo "Adding -belf option to ldflags."
             LDFLAGS="$LDFLAGS -belf"
           ;;
         esac

  else
    echo "$as_me:3789: result: no" >&5
echo "${ECHO_T}no" >&6

  fi

       ;;
     esac
  ;;
  sysv5UnixWare*)
    if test "$GCC" != "yes"; then
      # We are using built-in inline function
      CFLAGS="$CFLAGS -Kalloca"
    fi
    CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
  ;;
  sysv5OpenUNIX8*)
    if test "$GCC" != "yes"; then
      # We are using built-in inline function
      CFLAGS="$CFLAGS -Kalloca"
    fi
    CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
  ;;
esac

export CC CFLAGS LD LDFLAGS

if test "$GXX" = "yes"
then
  # mysqld requires -fno-implicit-templates.
  # Disable exceptions as they seams to create problems with gcc and threads.
  # mysqld doesn't use run-time-type-checking, so we disable it.
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"

  # If you are using 'gcc' 3.0 (not g++) to compile C++ programs,
  # we will gets some problems when linking static programs.
  # The following code is used to fix this problem.

  if test "$CXX" = "gcc"
  then
    if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1
    then
      CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW"
      CXXLDFLAGS="$CXXLDFLAGS -Wl,--defsym -Wl,__cxa_pure_virtual=0"
    fi
  fi
fi

# Avoid bug in fcntl on some versions of linux
echo "$as_me:3837: checking \"if we should use 'skip-locking' as default for $target_os\"" >&5
echo $ECHO_N "checking \"if we should use 'skip-locking' as default for $target_os\"... $ECHO_C" >&6
# Any wariation of Linux
if expr "$target_os" : "[Ll]inux.*" > /dev/null
then
  MYSQLD_DEFAULT_SWITCHES="--skip-locking"
  IS_LINUX="true"
  echo "$as_me:3844: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6;
else
  MYSQLD_DEFAULT_SWITCHES=""
  IS_LINUX="false"
  echo "$as_me:3849: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6;
fi

# Extract the first word of "ln", so it can be a program name with args.
set dummy ln; ac_word=$2
echo "$as_me:3855: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LN="$LN" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_LN="$ac_dir/$ac_word"
   echo "$as_me:3872: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_LN" && ac_cv_path_LN="ln"
  ;;
esac
fi
LN=$ac_cv_path_LN

if test -n "$LN"; then
  echo "$as_me:3884: result: $LN" >&5
echo "${ECHO_T}$LN" >&6
else
  echo "$as_me:3887: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# This must be able to take a -f flag like normal unix ln.
# Extract the first word of "ln", so it can be a program name with args.
set dummy ln; ac_word=$2
echo "$as_me:3894: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LN_CP_F+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LN_CP_F in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LN_CP_F="$LN_CP_F" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_LN_CP_F="$ac_dir/$ac_word"
   echo "$as_me:3911: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_LN_CP_F" && ac_cv_path_LN_CP_F="ln"
  ;;
esac
fi
LN_CP_F=$ac_cv_path_LN_CP_F

if test -n "$LN_CP_F"; then
  echo "$as_me:3923: result: $LN_CP_F" >&5
echo "${ECHO_T}$LN_CP_F" >&6
else
  echo "$as_me:3926: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# If ln -f does not exists use -s (AFS systems)
if test -n "$LN_CP_F"; then
  LN_CP_F="$LN_CP_F -s"
fi

# Extract the first word of "mv", so it can be a program name with args.
set dummy mv; ac_word=$2
echo "$as_me:3937: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MV+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $MV in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MV="$MV" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_MV="$ac_dir/$ac_word"
   echo "$as_me:3954: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
  ;;
esac
fi
MV=$ac_cv_path_MV

if test -n "$MV"; then
  echo "$as_me:3966: result: $MV" >&5
echo "${ECHO_T}$MV" >&6
else
  echo "$as_me:3969: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
  ;;
esac
fi
RM=$ac_cv_path_RM

if test -n "$RM"; then
  echo "$as_me:4004: result: $RM" >&5
echo "${ECHO_T}$RM" >&6
else
  echo "$as_me:4007: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "cp", so it can be a program name with args.
set dummy cp; ac_word=$2
echo "$as_me:4013: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_CP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CP="$CP" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_CP="$ac_dir/$ac_word"
   echo "$as_me:4030: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
  ;;
esac
fi
CP=$ac_cv_path_CP

if test -n "$CP"; then
  echo "$as_me:4042: result: $CP" >&5
echo "${ECHO_T}$CP" >&6
else
  echo "$as_me:4045: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; ac_word=$2
echo "$as_me:4051: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_SED+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SED in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SED="$SED" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_SED="$ac_dir/$ac_word"
   echo "$as_me:4068: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
  ;;
esac
fi
SED=$ac_cv_path_SED

if test -n "$SED"; then
  echo "$as_me:4080: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
else
  echo "$as_me:4083: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "cmp", so it can be a program name with args.
set dummy cmp; ac_word=$2
echo "$as_me:4089: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_CMP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_CMP="$ac_dir/$ac_word"
   echo "$as_me:4106: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp"
  ;;
esac
fi
CMP=$ac_cv_path_CMP

if test -n "$CMP"; then
  echo "$as_me:4118: result: $CMP" >&5
echo "${ECHO_T}$CMP" >&6
else
  echo "$as_me:4121: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "chmod", so it can be a program name with args.
set dummy chmod; ac_word=$2
echo "$as_me:4127: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_CHMOD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CHMOD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_CHMOD="$ac_dir/$ac_word"
   echo "$as_me:4144: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD="chmod"
  ;;
esac
fi
CHMOD=$ac_cv_path_CHMOD

if test -n "$CHMOD"; then
  echo "$as_me:4156: result: $CHMOD" >&5
echo "${ECHO_T}$CHMOD" >&6
else
  echo "$as_me:4159: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Extract the first word of "hostname", so it can be a program name with args.
set dummy hostname; ac_word=$2
echo "$as_me:4165: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_HOSTNAME+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $HOSTNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_HOSTNAME="$HOSTNAME" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_HOSTNAME="$ac_dir/$ac_word"
   echo "$as_me:4182: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_HOSTNAME" && ac_cv_path_HOSTNAME="hostname"
  ;;
esac
fi
HOSTNAME=$ac_cv_path_HOSTNAME

if test -n "$HOSTNAME"; then
  echo "$as_me:4194: result: $HOSTNAME" >&5
echo "${ECHO_T}$HOSTNAME" >&6
else
  echo "$as_me:4197: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
for ac_prog in gnutar gtar tar
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:4207: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_TAR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$TAR"; then
  ac_cv_prog_TAR="$TAR" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_TAR="$ac_prog"
echo "$as_me:4222: found $ac_dir/$ac_word" >&5
break
done

fi
fi
TAR=$ac_cv_prog_TAR
if test -n "$TAR"; then
  echo "$as_me:4230: result: $TAR" >&5
echo "${ECHO_T}$TAR" >&6
else
  echo "$as_me:4233: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$TAR" && break
done

# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo "$as_me:4242: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PERL="$ac_dir/$ac_word"
   echo "$as_me:4259: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
  ;;
esac
fi
PERL=$ac_cv_path_PERL

if test -n "$PERL"; then
  echo "$as_me:4271: result: $PERL" >&5
echo "${ECHO_T}$PERL" >&6
else
  echo "$as_me:4274: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
then
  PERL5=$PERL
else
  # Extract the first word of "perl5", so it can be a program name with args.
set dummy perl5; ac_word=$2
echo "$as_me:4284: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PERL5+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PERL5 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL5="$PERL5" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PERL5="$ac_dir/$ac_word"
   echo "$as_me:4301: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_PERL5" && ac_cv_path_PERL5="no"
  ;;
esac
fi
PERL5=$ac_cv_path_PERL5

if test -n "$PERL5"; then
  echo "$as_me:4313: result: $PERL5" >&5
echo "${ECHO_T}$PERL5" >&6
else
  echo "$as_me:4316: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  if test "$PERL5" != no
  then
    PERL=$PERL5
    ac_cv_path_PERL=$ac_cv_path_PERL5
  fi
fi

# Lock for PS
# Extract the first word of "ps", so it can be a program name with args.
set dummy ps; ac_word=$2
echo "$as_me:4330: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PS="$PS" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PS="$ac_dir/$ac_word"
   echo "$as_me:4347: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_PS" && ac_cv_path_PS="ps"
  ;;
esac
fi
PS=$ac_cv_path_PS

if test -n "$PS"; then
  echo "$as_me:4359: result: $PS" >&5
echo "${ECHO_T}$PS" >&6
else
  echo "$as_me:4362: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:4366: checking \"how to check if pid exists\"" >&5
echo $ECHO_N "checking \"how to check if pid exists\"... $ECHO_C" >&6
PS=$ac_cv_path_PS
# Linux style
if $PS p $$ 2> /dev/null | grep $0 > /dev/null
then
  FIND_PROC="$PS p \$\$PID | grep mysqld > /dev/null"
# Solaris
elif $PS -p $$ 2> /dev/null | grep $0 > /dev/null
then
  FIND_PROC="$PS -p \$\$PID | grep mysqld > /dev/null"
# BSD style
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
then
  FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
# SysV style
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
then
  FIND_PROC="$PS -ef | grep mysqld | grep \" \$\$PID \" > /dev/null"
# Do anybody use this?
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
then
  FIND_PROC="$PS \$\$PID | grep mysqld > /dev/null"
else
  case $SYSTEM_TYPE in
    *darwin*)
      FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
      ;;
    *cygwin*)
      FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
      ;;
    *)
      { { echo "$as_me:4398: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; }
  esac
fi

echo "$as_me:4404: result: \"$FIND_PROC\"" >&5
echo "${ECHO_T}\"$FIND_PROC\"" >&6

# Check if a pid is valid
# Extract the first word of "kill", so it can be a program name with args.
set dummy kill; ac_word=$2
echo "$as_me:4410: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_KILL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $KILL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_KILL="$ac_dir/$ac_word"
   echo "$as_me:4427: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_KILL" && ac_cv_path_KILL="kill"
  ;;
esac
fi
KILL=$ac_cv_path_KILL

if test -n "$KILL"; then
  echo "$as_me:4439: result: $KILL" >&5
echo "${ECHO_T}$KILL" >&6
else
  echo "$as_me:4442: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:4446: checking \"for kill switches\"" >&5
echo $ECHO_N "checking \"for kill switches\"... $ECHO_C" >&6
if $ac_cv_path_KILL -0 $$
then
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
elif kill -s 0 $$
then
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
else
  { echo "$as_me:4455: WARNING: kill -0 to check for pid seems to fail" >&5
echo "$as_me: WARNING: kill -0 to check for pid seems to fail" >&2;}
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
fi

echo "$as_me:4460: result: \"$CHECK_PID\"" >&5
echo "${ECHO_T}\"$CHECK_PID\"" >&6

# We need a ANSI C compiler

echo "$as_me:4465: checking for ${CC-cc} option to accept ANSI C" >&5
echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
if test "${am_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX			-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
# removed "-Xc -D__EXTENSIONS__" beacause sun c++ does not like it.
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
do
  CC="$ac_save_CC $ac_arg"
  cat >conftest.$ac_ext <<_ACEOF
#line 4483 "configure"
#include "confdefs.h"
#if !defined(__STDC__)
choke me
#endif
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/stat.h>
#endif

int
main ()
{

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4506: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4509: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4512: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4515: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_prog_cc_stdc="$ac_arg"; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
CC="$ac_save_CC"

fi

echo "$as_me:4528: result: $am_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
case "x$am_cv_prog_cc_stdc" in
  x|xno) ;;
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac

if test "$am_cv_prog_cc_stdc" = "no"
then
  { { echo "$as_me:4537: error: MySQL requires a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: MySQL requires a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; }
fi

NOINST_LDFLAGS=

# Check whether --with-other-libc or --without-other-libc was given.
if test "${with_other_libc+set}" = set; then
  withval="$with_other_libc"

   other_libc_include="$withval/include"
   other_libc_lib="$withval/lib"
   with_other_libc="yes"
   enable_shared="no"
   all_is_static="yes"
   CFLAGS="$CFLAGS -I$other_libc_include"
   # There seems to be a feature in gcc that treats system and libc headers
   # silently when they violatate ANSI C++ standard, but it is strict otherwise
   # since gcc cannot now recognize that our headers are libc, we work around
   # by telling it to be permissive. Note that this option only works with
   # new versions of gcc (2.95.x and above)
   CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include"
   static_nss=
   if test -f "$other_libc_lib/libnss_files.a"
   then
     # libc has been compiled with --enable-static-nss
     # we need special flags, but we will have to add those later
     STATIC_NSS_FLAGS="-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv \
  -Wl,--end-group"
     static_nss=1
   else
     # this is a dirty hack. We if we detect static nss glibc in the special
     # location, we do not re-direct the linker to get libraries from there
     # during check. The reason is that if we did, we would have to find a
     # way to append the special static nss flags to LIBS every time we do
     # any check - this is definitely feasible, but not worthwhile the risk
     # of breaking other things. So for our purposes it would be sufficient
     # to assume that whoever is using static NSS knows what he is doing and
     # has sensible libraries in the regular location
     LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
   fi

   # When linking against custom libc installed separately, we want to force
   # all binary builds to be static, including the build done by configure
   # itself to test for system features.
   with_mysqld_ldflags="-all-static"
   with_client_ldflags="-all-static"
   NOINST_LDFLAGS="-all-static"

else

  other_libc_include=
  other_libc_lib=
  with_other_libc="no"

fi;

# Check whether --with-server-suffix or --without-server-suffix was given.
if test "${with_server_suffix+set}" = set; then
  withval="$with_server_suffix"
  # I heard that 'cut' isn't portable.  Isn't there a better way?
     MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'`
else
   MYSQL_SERVER_SUFFIX=

fi;

# Set flags if we wants to have MIT threads.

# Check whether --with-mit-threads or --without-mit-threads was given.
if test "${with_mit_threads+set}" = set; then
  withval="$with_mit_threads"
   with_mit_threads=$withval
else
   with_mit_threads=no

fi;

if test "$with_mit_threads" = "yes"
then
  enable_largefile="no"		# Will not work on Linux.
fi

# Set flags if we want to force to use pthreads

# Check whether --with-pthread or --without-pthread was given.
if test "${with_pthread+set}" = set; then
  withval="$with_pthread"
   with_pthread=$withval
else
   with_pthread=no

fi;

# Force use of thread libs LIBS

# Check whether --with-named-thread-libs or --without-named-thread-libs was given.
if test "${with_named_thread_libs+set}" = set; then
  withval="$with_named_thread_libs"
   with_named_thread=$withval
else
   with_named_thread=no

fi;

# Force use of a curses libs

# Check whether --with-named-curses-libs or --without-named-curses-libs was given.
if test "${with_named_curses_libs+set}" = set; then
  withval="$with_named_curses_libs"
   with_named_curses=$withval
else
   with_named_curses=no

fi;

# Force use of a zlib (compress)

# Check whether --with-named-z-libs or --without-named-z-libs was given.
if test "${with_named_z_libs+set}" = set; then
  withval="$with_named_z_libs"
   with_named_zlib=$withval
else
   with_named_zlib=z

fi;

# Make thread safe client
# Check whether --enable-thread-safe-client or --disable-thread-safe-client was given.
if test "${enable_thread_safe_client+set}" = set; then
  enableval="$enable_thread_safe_client"
   THREAD_SAFE_CLIENT=$enableval
else
   THREAD_SAFE_CLIENT=no

fi;

# compile with strings functions in assembler
# Check whether --enable-assembler or --disable-assembler was given.
if test "${enable_assembler+set}" = set; then
  enableval="$enable_assembler"
   ENABLE_ASSEMBLER=$enableval
else
   ENABLE_ASSEMBLER=no

fi;

echo "$as_me:4685: checking if we should use assembler functions" >&5
echo $ECHO_N "checking if we should use assembler functions... $ECHO_C" >&6
# For now we only support assembler on i386 and sparc systems

if test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386"; then
  ASSEMBLER_x86_TRUE=
  ASSEMBLER_x86_FALSE='#'
else
  ASSEMBLER_x86_TRUE='#'
  ASSEMBLER_x86_FALSE=
fi

if test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc"; then
  ASSEMBLER_sparc_TRUE=
  ASSEMBLER_sparc_FALSE='#'
else
  ASSEMBLER_sparc_TRUE='#'
  ASSEMBLER_sparc_FALSE=
fi

if test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc_TRUE" = ""; then
  ASSEMBLER_TRUE=
  ASSEMBLER_FALSE='#'
else
  ASSEMBLER_TRUE='#'
  ASSEMBLER_FALSE=
fi

if test "$ASSEMBLER_TRUE" = ""
then
  echo "$as_me:4715: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:4718: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:4722: checking if we should use RAID" >&5
echo $ECHO_N "checking if we should use RAID... $ECHO_C" >&6

# Check whether --with-raid or --without-raid was given.
if test "${with_raid+set}" = set; then
  withval="$with_raid"
     USE_RAID=$withval
else
     USE_RAID=no

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

else
  echo "$as_me:4742: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Use this to set the place used for unix socket used to local communication.

# Check whether --with-unix-socket-path or --without-unix-socket-path was given.
if test "${with_unix_socket_path+set}" = set; then
  withval="$with_unix_socket_path"
   MYSQL_UNIX_ADDR=$withval
else
   MYSQL_UNIX_ADDR=$MYSQL_UNIX_ADDR_DEFAULT

fi;

# Check whether --with-tcp-port or --without-tcp-port was given.
if test "${with_tcp_port+set}" = set; then
  withval="$with_tcp_port"
   MYSQL_TCP_PORT=$withval
else
   MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT

fi;

# We might want to document the assigned port in the manual.

# Use this to set the place used for unix socket used to local communication.

# Check whether --with-mysqld-user or --without-mysqld-user was given.
if test "${with_mysqld_user+set}" = set; then
  withval="$with_mysqld_user"
   MYSQLD_USER=$withval
else
   MYSQLD_USER=mysql

fi;

# If we should allove LOAD DATA LOCAL
echo "$as_me:4780: checking if we should should enable LOAD DATA LOCAL by default" >&5
echo $ECHO_N "checking if we should should enable LOAD DATA LOCAL by default... $ECHO_C" >&6
# Check whether --enable-local-infile or --disable-local-infile was given.
if test "${enable_local_infile+set}" = set; then
  enableval="$enable_local_infile"
   ENABLED_LOCAL_INFILE=$enableval
else
   ENABLED_LOCAL_INFILE=no

fi;

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

else
  echo "$as_me:4800: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Use Paul Eggerts macros from GNU tar to check for large file support.

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

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

fi
fi
GETCONF=$ac_cv_prog_GETCONF
if test -n "$GETCONF"; then
  echo "$as_me:4838: result: $GETCONF" >&5
echo "${ECHO_T}$GETCONF" >&6
else
  echo "$as_me:4841: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

fi
fi
ac_ct_GETCONF=$ac_cv_prog_ac_ct_GETCONF
if test -n "$ac_ct_GETCONF"; then
  echo "$as_me:4873: result: $ac_ct_GETCONF" >&5
echo "${ECHO_T}$ac_ct_GETCONF" >&6
else
  echo "$as_me:4876: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  GETCONF=$ac_ct_GETCONF
else
  GETCONF="$ac_cv_prog_GETCONF"
fi

     echo "$as_me:4885: checking for CFLAGS value to request large file support" >&5
echo $ECHO_N "checking for CFLAGS value to request large file support... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_CFLAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if ($GETCONF LFS_CFLAGS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_CFLAGS=`cat conftest.1`
      else
	ac_cv_sys_largefile_CFLAGS=no
	case "$host_os" in
	   # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
	   hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	     if test "$GCC" = yes; then
	       ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
	     fi
	     ;;
	   # IRIX 6.2 and later require cc -n32.
	   irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
	     if test "$GCC" != yes; then
	       ac_cv_sys_largefile_CFLAGS=-n32
	     fi
	   esac
	   if test "$ac_cv_sys_largefile_CFLAGS" != no; then
	     ac_save_CC="$CC"
	     CC="$CC $ac_cv_sys_largefile_CFLAGS"
	     cat >conftest.$ac_ext <<_ACEOF
#line 4912 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4924: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4927: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4930: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4933: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sys_largefile_CFLAGS=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	     CC="$ac_save_CC"
	   fi
      fi
      rm -f conftest*
fi
echo "$as_me:4947: result: $ac_cv_sys_largefile_CFLAGS" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_CFLAGS" >&6
     echo "$as_me:4949: checking for LDFLAGS value to request large file support" >&5
echo $ECHO_N "checking for LDFLAGS value to request large file support... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_LDFLAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if ($GETCONF LFS_LDFLAGS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_LDFLAGS=`cat conftest.1`
      else
	ac_cv_sys_largefile_LDFLAGS=no

      fi
      rm -f conftest*
fi
echo "$as_me:4963: result: $ac_cv_sys_largefile_LDFLAGS" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_LDFLAGS" >&6
     echo "$as_me:4965: checking for LIBS value to request large file support" >&5
echo $ECHO_N "checking for LIBS value to request large file support... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_LIBS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if ($GETCONF LFS_LIBS) >conftest.1 2>conftest.2 && test ! -s conftest.2
      then
        ac_cv_sys_largefile_LIBS=`cat conftest.1`
      else
	ac_cv_sys_largefile_LIBS=no

      fi
      rm -f conftest*
fi
echo "$as_me:4979: result: $ac_cv_sys_largefile_LIBS" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_LIBS" >&6

     for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
       case "$ac_flag" in
       no) ;;
       -D_FILE_OFFSET_BITS=*) ;;
       -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
       -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
       -D?* | -I?*)
	 case "$ac_flag" in
   no) ;;
   ?*)
     case "$CPPFLAGS" in
     '') CPPFLAGS="$ac_flag" ;;
     *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
     esac ;;
   esac ;;
       *)
	 case "$ac_flag" in
   no) ;;
   ?*)
     case "$CFLAGS" in
     '') CFLAGS="$ac_flag" ;;
     *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
     esac ;;
   esac ;;
       esac
     done
     case "$ac_cv_sys_largefile_LDFLAGS" in
   no) ;;
   ?*)
     case "$LDFLAGS" in
     '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
     *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
     esac ;;
   esac
     case "$ac_cv_sys_largefile_LIBS" in
   no) ;;
   ?*)
     case "$LIBS" in
     '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
     *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
     esac ;;
   esac
     echo "$as_me:5024: checking for _FILE_OFFSET_BITS" >&5
echo $ECHO_N "checking for _FILE_OFFSET_BITS... $ECHO_C" >&6
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_sys_file_offset_bits=no
      case "$host_os" in
	# HP-UX 10.20 and later
	hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	  ac_cv_sys_file_offset_bits=64 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_FILE_OFFSET_BITS)
	  ac_cv_sys_file_offset_bits=1 ;;
	-D_FILE_OFFSET_BITS=*)
	  ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$as_me:5045: result: $ac_cv_sys_file_offset_bits" >&5
echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
   if test "$ac_cv_sys_file_offset_bits" != no; then

cat >>confdefs.h <<EOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
EOF

   fi
     echo "$as_me:5054: checking for _LARGEFILE_SOURCE" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_source+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_sys_largefile_source=no
      case "$host_os" in
	# HP-UX 10.20 and later
	hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	  ac_cv_sys_largefile_source=1 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_LARGEFILE_SOURCE)
	  ac_cv_sys_largefile_source=1 ;;
	-D_LARGEFILE_SOURCE=*)
	  ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$as_me:5075: result: $ac_cv_sys_largefile_source" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
   if test "$ac_cv_sys_largefile_source" != no; then

cat >>confdefs.h <<EOF
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
EOF

   fi
     echo "$as_me:5084: checking for _LARGE_FILES" >&5
echo $ECHO_N "checking for _LARGE_FILES... $ECHO_C" >&6
if test "${ac_cv_sys_large_files+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_sys_large_files=no
      case "$host_os" in
	# AIX 4.2 and later
	aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
	  ac_cv_sys_large_files=1 ;;
	esac
      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
	case "$ac_flag" in
	-D_LARGE_FILES)
	  ac_cv_sys_large_files=1 ;;
	-D_LARGE_FILES=*)
	  ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
	esac
      done

fi
echo "$as_me:5105: result: $ac_cv_sys_large_files" >&5
echo "${ECHO_T}$ac_cv_sys_large_files" >&6
   if test "$ac_cv_sys_large_files" != no; then

cat >>confdefs.h <<EOF
#define _LARGE_FILES $ac_cv_sys_large_files
EOF

   fi
   fi

# Types that must be checked AFTER large file support is checked

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

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

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

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 5178 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5199 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

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

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

fi

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

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

fi
done

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

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

fi

#--------------------------------------------------------------------
# Check for system header files
#--------------------------------------------------------------------

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
echo "$as_me:5362: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5368 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5383: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5386: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5389: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5392: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5402: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF

ac_header_dirent=$ac_hdr; break
fi

done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
  echo "$as_me:5415: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5423 "configure"
#include "confdefs.h"

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

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

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

fi

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

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

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

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

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 5584 "configure"
#include "confdefs.h"
#include <stdlib.h>

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5605 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

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

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

fi

echo "$as_me:5662: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
if test "${ac_cv_header_sys_wait_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5668 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif

int
main ()
{
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5690: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5693: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5696: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5699: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_sys_wait_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_sys_wait_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5709: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then

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

fi

for ac_header in fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
 memory.h pwd.h select.h \
 stdlib.h stddef.h \
 strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
 unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
 sys/ioctl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:5728: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5734 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:5738: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5744: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:5763: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

#--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS
# and defines HAVE_LIBM etc
#--------------------------------------------------------------------

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

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

  LIBS="-lm $LIBS"

else

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

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

  LIBS="-lm $LIBS"

fi

fi

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

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

  LIBS="-lnsl_r $LIBS"

else

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

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

  LIBS="-lnsl $LIBS"

fi

fi

echo "$as_me:6014: checking for gethostbyname_r" >&5
echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6020 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname_r (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname_r ();
char (*f) ();

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

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

echo "$as_me:6073: checking for setsockopt" >&5
echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
if test "${ac_cv_func_setsockopt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6079 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char setsockopt (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char setsockopt ();
char (*f) ();

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

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

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

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

  LIBS="-lsocket $LIBS"

fi

fi

echo "$as_me:6195: checking for yp_get_default_domain" >&5
echo $ECHO_N "checking for yp_get_default_domain... $ECHO_C" >&6
if test "${ac_cv_func_yp_get_default_domain+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6201 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char yp_get_default_domain (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char yp_get_default_domain ();
char (*f) ();

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

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

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

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

  LIBS="-lnsl $LIBS"

fi

fi

echo "$as_me:6317: checking for p2open" >&5
echo $ECHO_N "checking for p2open... $ECHO_C" >&6
if test "${ac_cv_func_p2open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6323 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char p2open (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char p2open ();
char (*f) ();

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

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

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

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

  LIBS="-lgen $LIBS"

fi

fi

# This may get things to compile even if bind-8 is installed
echo "$as_me:6440: checking for bind" >&5
echo $ECHO_N "checking for bind... $ECHO_C" >&6
if test "${ac_cv_func_bind+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6446 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char bind (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char bind ();
char (*f) ();

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

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

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

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

  LIBS="-lbind $LIBS"

fi

fi

# For crypt() on Linux

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

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

  LIBS="-lcrypt $LIBS"

fi

echo "$as_me:6622: checking for crypt" >&5
echo $ECHO_N "checking for crypt... $ECHO_C" >&6
if test "${ac_cv_func_crypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6628 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char crypt (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char crypt ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6659: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6662: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6665: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6668: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_crypt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_crypt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6678: result: $ac_cv_func_crypt" >&5
echo "${ECHO_T}$ac_cv_func_crypt" >&6
if test $ac_cv_func_crypt = yes; then
  cat >>confdefs.h <<\EOF
#define HAVE_CRYPT 1
EOF

fi

# For compress in zlib

save_LIBS="$LIBS"
LIBS="-l$with_named_zlib $LIBS"
echo "$as_me:6691: checking if libz with compress" >&5
echo $ECHO_N "checking if libz with compress... $ECHO_C" >&6
if test "${mysql_cv_compress+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6697 "configure"
#include "confdefs.h"
#include <zlib.h>
#ifdef __cplusplus
extern "C"
#endif

int
main ()
{
 return compress(0, (unsigned long*) 0, "", 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6714: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6717: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6720: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6723: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_compress=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_compress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6733: result: $mysql_cv_compress" >&5
echo "${ECHO_T}$mysql_cv_compress" >&6
if test "$mysql_cv_compress" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_COMPRESS 1
EOF

else
  LIBS="$save_LIBS"
fi

#--------------------------------------------------------------------
# Check for TCP wrapper support
#--------------------------------------------------------------------

# Check whether --with-libwrap or --without-libwrap was given.
if test "${with_libwrap+set}" = set; then
  withval="$with_libwrap"

  case "$with_libwrap" in
  no) : ;;
  yes|*)
    _cppflags=${CPPFLAGS}
    _ldflags=${LDFLAGS}

    if test "$with_libwrap" != "yes"; then
      CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
      LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
    fi

    _libs=${LIBS}
    echo "$as_me:6765: checking for tcpd.h" >&5
echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
if test "${ac_cv_header_tcpd_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6771 "configure"
#include "confdefs.h"
#include <tcpd.h>
_ACEOF
if { (eval echo "$as_me:6775: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:6781: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_tcpd_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_tcpd_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:6800: result: $ac_cv_header_tcpd_h" >&5
echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
if test $ac_cv_header_tcpd_h = yes; then
  LIBS="$LIBS -lwrap"
      echo "$as_me:6804: checking for TCP wrappers library -lwrap" >&5
echo $ECHO_N "checking for TCP wrappers library -lwrap... $ECHO_C" >&6
      cat >conftest.$ac_ext <<_ACEOF
#line 6807 "configure"
#include "confdefs.h"
#include <tcpd.h>
int allow_severity = 0;
int deny_severity  = 0;

struct request_info *req;

int
main ()
{
hosts_access (req)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6824: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6827: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6830: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6833: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:6835: result: yes" >&5
echo "${ECHO_T}yes" >&6
        cat >>confdefs.h <<\EOF
#define LIBWRAP 1
EOF

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

	if test "$with_libwrap" != "yes"; then
	    WRAPLIBS="-L${with_libwrap}/lib"
	fi
	WRAPLIBS="${WRAPLIBS} -lwrap"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:6852: result: no" >&5
echo "${ECHO_T}no" >&6
        CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
  CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}
fi

    LDFLAGS=${_ldflags} LIBS=${_libs}
    ;;
  esac

fi;

if test "$IS_LINUX" = "true"; then
  echo "$as_me:6868: checking for atomic operations" >&5
echo $ECHO_N "checking for atomic operations... $ECHO_C" >&6

  atom_ops=
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:6873: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6878 "configure"
#include "confdefs.h"

#include <asm/atomic.h>
int main()
{
  atomic_t v;

  atomic_set(&v, 23);
  atomic_add(5, &v);
  return atomic_read(&v) == 28 ? 0 : -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6893: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6896: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6898: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6901: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define HAVE_ATOMIC_ADD 1
EOF
 atom_ops="${atom_ops}atomic_add "
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:6915: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6920 "configure"
#include "confdefs.h"

#include <asm/atomic.h>
int main()
{
  atomic_t v;

  atomic_set(&v, 23);
  atomic_sub(5, &v);
  return atomic_read(&v) == 18 ? 0 : -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6938: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6940: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6943: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define HAVE_ATOMIC_SUB 1
EOF
 atom_ops="${atom_ops}atomic_sub "
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

  if test -z "$atom_ops"; then atom_ops="no"; fi
  echo "$as_me:6958: result: $atom_ops" >&5
echo "${ECHO_T}$atom_ops" >&6
fi

# Check for gtty if termio.h doesn't exists
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
then
  echo "$as_me:6965: checking for gtty" >&5
echo $ECHO_N "checking for gtty... $ECHO_C" >&6
if test "${ac_cv_func_gtty+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6971 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gtty (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gtty ();
char (*f) ();

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

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

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

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

  LIBS="-lcompat $LIBS"

fi

fi

fi
# We make a special variable for client library's to avoid including
# thread libs in the client.
NON_THREADED_CLIENT_LIBS="$LIBS"

echo "$as_me:7092: checking for int8" >&5
echo $ECHO_N "checking for int8... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  { { echo "$as_me:7095: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7100 "configure"
#include "confdefs.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

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

int main()
{
  int8 i;
  return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:7123: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7126: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:7128: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7131: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cat >>confdefs.h <<\EOF
#define HAVE_INT_8_16_32 1
EOF
 echo "$as_me:7136: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:7142: result: no" >&5
echo "${ECHO_T}no" >&6

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

#
# Some system specific hacks
#

MAX_C_OPTIMIZE="-O3"

case $SYSTEM_TYPE in
  *solaris2.7*)
    # Solaris 2.7 has a broken /usr/include/widec.h
    # Make a fixed copy in ./include
    echo "Fixing broken include files for $SYSTEM_TYPE"
    echo "  - Creating local copy of widec.h"
    if test ! -d include
    then
      mkdir ./include
    fi
    builddir=`pwd`
    sed -e "s|^#if[ 	]*!defined(lint) && !defined(__lint)|#if !defined\(lint\) \&\& !defined\(__lint\) \&\& !defined\(getwc\)|" < /usr/include/widec.h > include/widec.h
    CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
    CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
    ;;
  *solaris2.8*)
    # Solaris 2.8 has a broken /usr/include/widec.h
    # Make a fixed copy in ./include
    echo "Fixing broken include files for $SYSTEM_TYPE"
    echo "  - Creating local copy of widec.h"
    if test ! -d include
    then
      mkdir ./include
    fi
    builddir=`pwd`
    sed -e "s|^#if[ 	]*!defined(__lint)|#if !defined\(__lint\) \&\& !defined\(getwc\)|" < /usr/include/widec.h > include/widec.h
    CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
    CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T"
    ;;
  *solaris2.5.1*)
    echo "Enabling getpass() workaround for Solaris 2.5.1"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS -DHAVE_RWLOCK_T";
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T -DSOLARIS"
    ;;
  *solaris*)
    CFLAGS="$CFLAGS -DHAVE_RWLOCK_T"
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T"
    ;;
  *SunOS*)
    echo "Enabling getpass() workaround for SunOS"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS";
    ;;
  *hpux10.20*)
    echo "Enabling workarounds for hpux 10.20"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    if test "$with_named_thread" = "no"
    then
      echo "Using --with-named-thread=-lpthread"
      with_named_thread="-lcma"
    fi
    ;;
  *hpux11.*)
    echo "Enabling workarounds for hpux 11"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
    if test "$with_named_thread" = "no"
    then
      echo "Using --with-named-thread=-lpthread"
      with_named_thread="-lpthread"
    fi
    ;;
  *rhapsody*)
    if test "$ac_cv_c_compiler_gnu" = "yes"
    then
      CPPFLAGS="$CPPFLAGS -traditional-cpp "
      CFLAGS="-DHAVE_CTHREADS_WRAPPER -DDO_NOT_REMOVE_THREAD_WRAPPERS"
      CXXFLAGS="-DHAVE_CTHREADS_WRAPPER"
      if test $with_named_curses = "no"
      then
	with_named_curses=""
      fi
    fi
    ;;
  *darwin*)
    if test "$ac_cv_c_compiler_gnu" = "yes"
    then
      CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
      CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
      MAX_C_OPTIMIZE="-O"
      with_named_curses=""
    fi
    ;;
  *freebsd*)
    echo "Adding fix for interrupted reads"
    CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
    ;;
  *netbsd*)
    echo "Adding flag -Dunix"
    CFLAGS="$CFLAGS -Dunix"
    CXXFLAGS="$CXXFLAGS -Dunix"
    OVERRIDE_MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a"
    ;;
  *bsdi*)
    echo "Adding fix for BSDI"
    CFLAGS="$CFLAGS -D__BSD__ -DHAVE_BROKEN_REALPATH"
    cat >>confdefs.h <<EOF
#define SOCKOPT_OPTLEN_TYPE size_t
EOF

    ;;
   *sgi-irix6*)
    if test "$with_named_thread" = "no"
    then
      echo "Using --with-named-thread=-lpthread"
      with_named_thread="-lpthread"
    fi
    CXXFLAGS="-D_BOOL"
    ;;
    *aix4.3*)
      echo "Adding defines for AIX"
      CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
      CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
    ;;
    *dec-osf*)
      if test "$ac_cv_c_compiler_gnu" = "yes" && test "$host_cpu" = "alpha"
      then
	  echo "Adding defines for DEC OSF on alpha"
	  CFLAGS="$CFLAGS -mieee"
	  CXXFLAGS="$CXXFLAGS -mieee"
      fi
      echo "Adding defines for OSF1"
      # gethostbyname_r is deprecated and doesn't work ok on OSF1
      CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
      CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
    ;;
esac

#---START: Used in for client configure
# Check if we threads are in libc or if we should use
# -lpthread, -lpthreads or mit-pthreads
# We have to check libc last because else it fails on Solaris 2.6

with_posix_threads="no"
# Hack for DEC-UNIX (OSF1)
if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
  # Look for LinuxThreads.
  echo "$as_me:7293: checking \"LinuxThreads\"" >&5
echo $ECHO_N "checking \"LinuxThreads\"... $ECHO_C" >&6
    res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
    if test "$res" -gt 0
    then
      echo "$as_me:7298: result: \"Found\"" >&5
echo "${ECHO_T}\"Found\"" >&6
      cat >>confdefs.h <<\EOF
#define HAVE_LINUXTHREADS 1
EOF

      # Linux 2.0 sanity check
      cat >conftest.$ac_ext <<_ACEOF
#line 7306 "configure"
#include "confdefs.h"
#include <sched.h>
int
main ()
{
int a = sched_get_priority_min(1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7318: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7321: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7324: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7327: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:7333: error: Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual" >&5
echo "$as_me: error: Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_objext conftest.$ac_ext
      # RedHat 5.0 does not work with dynamic linking of this. -static also
      # gives a spped increase in linux so it does not hurt on other systems.
      with_named_thread="-lpthread"
    else
      echo "$as_me:7342: result: \"Not found\"" >&5
echo "${ECHO_T}\"Not found\"" >&6
      # If this is a linux machine we should barf
      if test "$IS_LINUX" = "true"
      then
	{ { echo "$as_me:7347: error: This is a linux system and Linuxthreads was not
found. On linux Linuxthreads should be used. So install Linuxthreads
(or a new glibc) and try again. See the Installation chapter in the
Reference Manual." >&5
echo "$as_me: error: This is a linux system and Linuxthreads was not
found. On linux Linuxthreads should be used. So install Linuxthreads
(or a new glibc) and try again. See the Installation chapter in the
Reference Manual." >&2;}
   { (exit 1); exit 1; }; }
      else
	echo "$as_me:7357: checking \"DEC threads\"" >&5
echo $ECHO_N "checking \"DEC threads\"... $ECHO_C" >&6
        if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
	then
	  with_named_thread="-lpthread -lmach -lexc"
	  #with_named_thread="-lpthread -lmach -lexc -lc"
	  cat >>confdefs.h <<\EOF
#define HAVE_DEC_THREADS 1
EOF

	  echo "$as_me:7367: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
	else
	  echo "$as_me:7370: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
	  echo "$as_me:7372: checking \"DEC 3.2 threads\"" >&5
echo $ECHO_N "checking \"DEC 3.2 threads\"... $ECHO_C" >&6
          if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
	  then
	    with_named_thread="-lpthreads -lmach -lc_r"
	    cat >>confdefs.h <<\EOF
#define HAVE_DEC_THREADS 1
EOF

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

            with_osf32_threads="yes"
            MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority"
	    echo "$as_me:7387: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
	  else
	    echo "$as_me:7390: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
          fi
	fi
     fi
   fi
fi

# Hack for SCO UNIX
if test "$with_named_thread" = "no"
then
  echo "$as_me:7401: checking \"SCO threads\"" >&5
echo $ECHO_N "checking \"SCO threads\"... $ECHO_C" >&6
  if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null
  then
    if test -f /usr/lib/libgthreads.a -o -f /usr/lib/libgthreads.so
    then

  LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'`

      with_named_thread="-lgthreads -lsocket -lgthreads"
      # sched.h conflicts with fsu-threads
      touch ./include/sched.h

      # We must have gcc
      if expr "$CC" : ".*gcc.*"
      then
	echo "$as_me:7417: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
      else
	{ { echo "$as_me:7420: error: On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; };
      fi
      echo "$as_me:7424: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
    elif test -f /usr/local/lib/libpthread.a -o -f /usr/local/lib/libpthread.so
    then

  LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'`

      with_named_thread="-lpthread -lsocket"
      # sched.h conflicts with fsu-threads
      # touch ./include/sched.h

      echo "$as_me:7435: checking \"for gcc\"" >&5
echo $ECHO_N "checking \"for gcc\"... $ECHO_C" >&6
      # We must have gcc
      if expr "$CC" : ".*gcc.*"
      then
	echo "$as_me:7440: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
      else
	{ { echo "$as_me:7443: error: On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; };
      fi
      echo "$as_me:7447: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
    # Hack for SCO UnixWare 7.1
    #
    elif test "$with_named_thread" = "no"
    then
      echo "$as_me:7453: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
      echo "$as_me:7455: checking \"SCO UnixWare 7.1 native threads\"" >&5
echo $ECHO_N "checking \"SCO UnixWare 7.1 native threads\"... $ECHO_C" >&6
      if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null
      then
        if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
        then

  LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'`

          if expr "$CC" : ".*gcc.*"
          then
            with_named_thread="-pthread -lsocket -lnsl"
          else
            with_named_thread="-Kthread -lsocket -lnsl"
          fi
          if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
          then
            cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_THREADS 1
EOF

          else
            cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_POSIX 1
EOF

          fi
          echo "$as_me:7482: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
          # We must have cc
          echo "$as_me:7485: checking \"for gcc\"" >&5
echo $ECHO_N "checking \"for gcc\"... $ECHO_C" >&6
          if expr "$CC" : ".*gcc.*"
          then
	    CC="$CC -pthread -DUNIXWARE_7";
	    CXX="$CXX -pthread -DUNIXWARE_7";
          else
	    CC="$CC -Kthread -DUNIXWARE_7";
	    CXX="$CXX -Kthread -DUNIXWARE_7";
          fi
        else
          { echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
        fi
      else
        echo "$as_me:7499: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
      fi
    else
      { { echo "$as_me:7503: error: On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; };
    fi
  else
    echo "$as_me:7508: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  fi
fi
# Hack for SCO UnixWare7
#
if test "$with_named_thread" = "no"
then
  echo "$as_me:7516: checking \"SCO UnixWare7 native threads\"" >&5
echo $ECHO_N "checking \"SCO UnixWare7 native threads\"... $ECHO_C" >&6
  if expr "$SYSTEM_TYPE" : ".*UnixWare*" > /dev/null
  then
    if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
    then

  LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'`

      with_named_thread="-Kthread -lsocket -lnsl"
      if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
      then
        cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_THREADS 1
EOF

      else
        cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_POSIX 1
EOF

      fi
      # We must have cc
      echo "$as_me:7539: checking \"for gcc\"" >&5
echo $ECHO_N "checking \"for gcc\"... $ECHO_C" >&6
      if expr "$CC" : ".*gcc.*"
      then
	{ echo "configure: error: On SCO UnixWare7 MySQL must be compiled with cc. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
      else
	CC="$CC -Kthread -DUNIXWARE_7";
	CXX="$CXX -Kthread -DUNIXWARE_7";
      fi
      echo "$as_me:7548: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
    else
      { echo "configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
    fi
  else
    echo "$as_me:7554: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  fi
fi

# Hack for Caldera OpenUNIX8
#
if test "$with_named_thread" = "no"
then
  echo "$as_me:7563: checking \"OpenUNIX8 native threads\"" >&5
echo $ECHO_N "checking \"OpenUNIX8 native threads\"... $ECHO_C" >&6
  if expr "$SYSTEM_TYPE" : ".*OpenUNIX*" > /dev/null
  then
    if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
    then

  LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'`

      with_named_thread="-Kthread -lsocket -lnsl"
      if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
      then
#        AC_DEFINE(HAVE_OpenUNIX8_THREADS)
        cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_THREADS 1
EOF

      else
#        AC_DEFINE(HAVE_OpenUNIX8_POSIX)
        cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE7_POSIX 1
EOF

      fi
      # We must have cc
      echo "$as_me:7588: checking \"for gcc\"" >&5
echo $ECHO_N "checking \"for gcc\"... $ECHO_C" >&6
      if expr "$CC" : ".*gcc.*"
      then
	{ echo "configure: error: On OpenUNIX8 and UnixWare7 MySQL must be compiled with cc. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
      else
#	CC="$CC -Kthread -DOpenUNIX8";
#	CXX="$CXX -Kthread -DOpenUNIX8";
	CC="$CC -Kthread -DUNIXWARE_7";
	CXX="$CXX -Kthread -DUNIXWARE_7";
      fi
      echo "$as_me:7599: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
    else
      { echo "configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual." 1>&2; exit 1; };
    fi
  else
    echo "$as_me:7605: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  fi
fi

# Hack for Siemens UNIX
if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
  echo "$as_me:7613: checking \"Siemens threads\"" >&5
echo $ECHO_N "checking \"Siemens threads\"... $ECHO_C" >&6
  if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4"
  then
    LIBS="-lxnet $LIBS"
    NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS -lxnet"
    with_named_thread="-Kthread $LDFLAGS -lxnet"
    LD_FLAGS=""
    CFLAGS="-Kthread $CFLAGS"
    CXXFLAGS="-Kthread $CXXFLAGS"
    echo "$as_me:7623: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
  else
    echo "$as_me:7626: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  fi
fi

# Use library named -lpthread
if test "$with_named_thread" = "no" -a "$with_pthread" = "yes"
then
    with_named_thread="-lpthread"
fi

#---END:

# Hack for Solaris >= 2.5
# We want both the new and the old interface

if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
  echo "$as_me:7644: checking \"Solaris threads\"" >&5
echo $ECHO_N "checking \"Solaris threads\"... $ECHO_C" >&6
  if test -f /usr/lib/libpthread.so -a -f /usr/lib/libthread.so
  then
    with_named_thread="-lpthread -lthread"
    echo "$as_me:7649: result: \"yes\"" >&5
echo "${ECHO_T}\"yes\"" >&6
  else
    echo "$as_me:7652: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  fi
fi

# Should we use named pthread library ?
echo "$as_me:7658: checking \"named thread libs:\"" >&5
echo $ECHO_N "checking \"named thread libs:\"... $ECHO_C" >&6
if test "$with_named_thread" != "no"
then
  LIBS="$with_named_thread $LIBS $with_named_thread"
  with_posix_threads="yes"
  with_mit_threads="no"
  echo "$as_me:7665: result: \"$with_named_thread\"" >&5
echo "${ECHO_T}\"$with_named_thread\"" >&6
else
  echo "$as_me:7668: result: \"no\"" >&5
echo "${ECHO_T}\"no\"" >&6
  if test "$with_mit_threads" = "no"
  then
    # pthread_create is in standard libraries (As in BSDI 3.0)
    echo "$as_me:7673: checking \"for pthread_create in -libc\"" >&5
echo $ECHO_N "checking \"for pthread_create in -libc\"... $ECHO_C" >&6;
    cat >conftest.$ac_ext <<_ACEOF
#line 7676 "configure"
#include "confdefs.h"
#include <pthread.h>
int
main ()
{
 (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7688: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7691: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7694: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7697: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  with_posix_threads=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
with_posix_threads=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    echo "$as_me:7706: result: \"$with_posix_threads\"" >&5
echo "${ECHO_T}\"$with_posix_threads\"" >&6
    if test "$with_posix_threads" = "no"
    then
      echo "$as_me:7710: checking \"for pthread_create in -lpthread\"" >&5
echo $ECHO_N "checking \"for pthread_create in -lpthread\"... $ECHO_C" >&6;
      ac_save_LIBS="$LIBS"
      LIBS="$LIBS -lpthread"
      cat >conftest.$ac_ext <<_ACEOF
#line 7715 "configure"
#include "confdefs.h"
#include <pthread.h>
int
main ()
{
 (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7727: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7730: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7733: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7736: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  with_posix_threads=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
with_posix_threads=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      echo "$as_me:7745: result: \"$with_posix_threads\"" >&5
echo "${ECHO_T}\"$with_posix_threads\"" >&6
      if test "$with_posix_threads" = "no"
      then
        LIBS=" $ac_save_LIBS -lpthreads"
        echo "$as_me:7750: checking \"for pthread_create in -lpthreads\"" >&5
echo $ECHO_N "checking \"for pthread_create in -lpthreads\"... $ECHO_C" >&6;
        cat >conftest.$ac_ext <<_ACEOF
#line 7753 "configure"
#include "confdefs.h"
#include <pthread.h>
int
main ()
{
 pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7765: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7768: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7771: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7774: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  with_posix_threads=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
with_posix_threads=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        echo "$as_me:7783: result: \"$with_posix_threads\"" >&5
echo "${ECHO_T}\"$with_posix_threads\"" >&6
        if test "$with_posix_threads" = "no"
        then
	  # This is for FreeBSD
	  LIBS="$ac_save_LIBS -pthread"
	  echo "$as_me:7789: checking \"for pthread_create in -pthread\"" >&5
echo $ECHO_N "checking \"for pthread_create in -pthread\"... $ECHO_C" >&6;
	  cat >conftest.$ac_ext <<_ACEOF
#line 7792 "configure"
#include "confdefs.h"
#include <pthread.h>
int
main ()
{
 pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7804: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7807: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7810: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7813: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  with_posix_threads=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
with_posix_threads=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          echo "$as_me:7822: result: \"$with_posix_threads\"" >&5
echo "${ECHO_T}\"$with_posix_threads\"" >&6
          if test "$with_posix_threads" = "no"
	  then
	    with_mit_threads="yes"
	    LIBS="$ac_save_LIBS"
	  fi
	fi
      fi
    fi
  fi
fi

#---START: Used in for client configure
# Must be checked after, because strtok_r may be in -lpthread
# On AIX strtok_r is in libc_r

my_save_LIBS="$LIBS"

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

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

  LIBS="-lpthread $LIBS"

fi

LIBS="$my_save_LIBS"
if test "$ac_cv_lib_pthread_strtok_r" = "no"
then
  my_save_LIBS="$LIBS"

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

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

  LIBS="-lc_r $LIBS"

fi

  case "$with_osf32_threads---$target_os" in
    # Don't keep -lc_r in LIBS; -pthread handles it magically
    yes---* | *---freebsd* ) LIBS="$my_save_LIBS" ;;
  esac

for ac_func in strtok_r pthread_init
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:7970: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7976 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

else

for ac_func in strtok_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:8041: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8047 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

fi
#---END:

# Check for dlopen, needed for user definable functions
# This must be checked after threads on AIX
# We only need this for mysqld, not for the clients.

my_save_LIBS="$LIBS"
LIBS=""

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

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

  LIBS="-ldl $LIBS"

fi

LIBDL=$LIBS
LIBS="$my_save_LIBS"

# System characteristics

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

fi
done

echo "$as_me:8228: checking for restartable system calls" >&5
echo $ECHO_N "checking for restartable system calls... $ECHO_C" >&6
if test "${ac_cv_sys_restartable_syscalls+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:8234: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8239 "configure"
#include "confdefs.h"
/* Exit 0 (true) if wait returns something other than -1,
   i.e. the pid of the child, which means that wait was restarted
   after getting the signal.  */

#include <sys/types.h>
#include <signal.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif

/* Some platforms explicitly require an extern "C" signal handler
   when using C++. */
#ifdef __cplusplus
extern "C" void ucatch (int dummy) { }
#else
void ucatch (dummy) int dummy; { }
#endif

int
main ()
{
  int i = fork (), status;

  if (i == 0)
    {
      sleep (3);
      kill (getppid (), SIGINT);
      sleep (3);
      exit (0);
    }

  signal (SIGINT, ucatch);

  status = wait (&i);
  if (status == -1)
    wait (&i);

  exit (status == -1);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8285: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8288: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8290: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8293: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sys_restartable_syscalls=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sys_restartable_syscalls=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:8305: result: $ac_cv_sys_restartable_syscalls" >&5
echo "${ECHO_T}$ac_cv_sys_restartable_syscalls" >&6
if test $ac_cv_sys_restartable_syscalls = yes; then

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

fi

# Build optimized or debug version ?
# First check for gcc and g++
if test "$ac_cv_c_compiler_gnu" = "yes"
then
  DEBUG_CFLAGS="-g"
  DEBUG_OPTIMIZE_CC="-O"
  OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
else
  DEBUG_CFLAGS="-g"
  DEBUG_OPTIMIZE_CC=""
  OPTIMIZE_CFLAGS="-O"
fi
if test "$ac_cv_prog_cxx_g" = "yes"
then
  DEBUG_CXXFLAGS="-g"
  DEBUG_OPTIMIZE_CXX="-O"
  OPTIMIZE_CXXFLAGS="-O3"
else
  DEBUG_CXXFLAGS="-g"
  DEBUG_OPTIMIZE_CXX=""
  OPTIMIZE_CXXFLAGS="-O"
fi

# Check whether --with-debug or --without-debug was given.
if test "${with_debug+set}" = set; then
  withval="$with_debug"
  with_debug=$withval
else
  with_debug=no
fi;
if test "$with_debug" = "yes"
then
  # Medium debug.
  CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
  CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
elif test "$with_debug" = "full"
then
  # Full debug. Very slow in some cases
  CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
  CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
else
  # Optimized version. No debug
  CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
  CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
fi

# Force static compilation to avoid linking probles/get more speed

# Check whether --with-mysqld-ldflags or --without-mysqld-ldflags was given.
if test "${with_mysqld_ldflags+set}" = set; then
  withval="$with_mysqld_ldflags"
  MYSQLD_EXTRA_LDFLAGS=$withval
else
  MYSQLD_EXTRA_LDFLAGS=
fi;

# Check whether --with-client-ldflags or --without-client-ldflags was given.
if test "${with_client_ldflags+set}" = set; then
  withval="$with_client_ldflags"
  CLIENT_EXTRA_LDFLAGS=$withval
else
  CLIENT_EXTRA_LDFLAGS=
fi;

# Check whether --with-lib-ccflags or --without-lib-ccflags was given.
if test "${with_lib_ccflags+set}" = set; then
  withval="$with_lib_ccflags"
  LIB_EXTRA_CCFLAGS=$withval
else
  LIB_EXTRA_CCFLAGS=
fi;

# Avoid stupid bug on some OS

# Check whether --with-low-memory or --without-low-memory was given.
if test "${with_low_memory+set}" = set; then
  withval="$with_low_memory"
  with_lowmem=$withval
else
  with_lowmem=no
fi;
if test "$with_lowmem" = "yes"
then
  if test "$ac_cv_c_compiler_gnu" = "yes"
  then
    LM_CFLAGS="-fno-inline"
  else
    LM_CFLAGS="-O0"
  fi
else
  LM_CFLAGS=""
fi

# Check whether --with-comment or --without-comment was given.
if test "${with_comment+set}" = set; then
  withval="$with_comment"
  with_comment=$withval
else
  with_comment=no
fi;
if test "$with_comment" != "no"
then
  COMPILATION_COMMENT=$with_comment
else
  COMPILATION_COMMENT="Source distribution"
fi

echo "$as_me:8422: checking \"need of special linking flags\"" >&5
echo $ECHO_N "checking \"need of special linking flags\"... $ECHO_C" >&6
if test "$IS_LINUX" = "true" -a "$ac_cv_c_compiler_gnu" = "yes" -a "$all_is_static" != "yes"
then
  LDFLAGS="$LDFLAGS -rdynamic"
  echo "$as_me:8427: result: \"-rdynamic\"" >&5
echo "${ECHO_T}\"-rdynamic\"" >&6
else
  echo "$as_me:8430: result: \"none\"" >&5
echo "${ECHO_T}\"none\"" >&6
fi

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

fi

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

echo "$as_me:8525: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8531 "configure"
#include "confdefs.h"

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

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

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

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

fi

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

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

fi
echo "$as_me:8655: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
  inline | yes) ;;
  no)
cat >>confdefs.h <<\EOF
#define inline
EOF
 ;;
  *)  cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

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

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

fi

echo "$as_me:8722: checking for struct stat.st_rdev" >&5
echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8728 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
static struct stat ac_aggr;
if (ac_aggr.st_rdev)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8742: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8745: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8748: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8751: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_stat_st_rdev=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_member_struct_stat_st_rdev=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:8761: result: $ac_cv_member_struct_stat_st_rdev" >&5
echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
if test $ac_cv_member_struct_stat_st_rdev = yes; then

cat >>confdefs.h <<EOF
#define HAVE_STRUCT_STAT_ST_RDEV 1
EOF

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

fi

echo "$as_me:8775: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8781 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8797: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8800: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8803: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8806: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_time=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:8816: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then

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

fi

echo "$as_me:8826: checking whether struct tm is in sys/time.h or time.h" >&5
echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
if test "${ac_cv_struct_tm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8832 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>

int
main ()
{
struct tm *tp; tp->tm_sec;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8846: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8849: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8852: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8855: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_struct_tm=time.h
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_struct_tm=sys/time.h
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:8865: result: $ac_cv_struct_tm" >&5
echo "${ECHO_T}$ac_cv_struct_tm" >&6
if test $ac_cv_struct_tm = sys/time.h; then

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

fi

# AC_CHECK_SIZEOF return 0 when it does not find the size of a
# type. We want a error instead.
echo "$as_me:8877: checking for char" >&5
echo $ECHO_N "checking for char... $ECHO_C" >&6
if test "${ac_cv_type_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8883 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((char *) 0)
  return 0;
if (sizeof (char))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8898: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8901: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8904: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8907: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_char=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_char=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:8917: result: $ac_cv_type_char" >&5
echo "${ECHO_T}$ac_cv_type_char" >&6

echo "$as_me:8920: checking size of char" >&5
echo $ECHO_N "checking size of char... $ECHO_C" >&6
if test "${ac_cv_sizeof_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_char" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 8929 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8941: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8944: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8947: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8950: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 8955 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8970: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8973: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8976: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 8992 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9004: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9007: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9010: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9013: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 9029 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9041: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9044: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9047: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9050: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_char=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:9063: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9068 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (char)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:9084: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9087: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:9089: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9092: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_char=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_char=0
fi
fi
echo "$as_me:9108: result: $ac_cv_sizeof_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_char" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
EOF

if test "$ac_cv_sizeof_char" -eq 0
then
  { { echo "$as_me:9116: error: No size for char type.
A likely cause for this could be that there isn't any
static libraries installed. You can verify this by checking if you have libm.a
in /lib, /usr/lib or some other standard place.  If this is the problem,
install the static libraries and try again.  If this isn't the problem,
examine config.log for possible errors.  If you want to report this, use
'scripts/mysqlbug' and include at least the last 20 rows from config.log!" >&5
echo "$as_me: error: No size for char type.
A likely cause for this could be that there isn't any
static libraries installed. You can verify this by checking if you have libm.a
in /lib, /usr/lib or some other standard place.  If this is the problem,
install the static libraries and try again.  If this isn't the problem,
examine config.log for possible errors.  If you want to report this, use
'scripts/mysqlbug' and include at least the last 20 rows from config.log!" >&2;}
   { (exit 1); exit 1; }; }
fi
echo "$as_me:9132: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9138 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9153: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9156: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9159: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9162: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_int=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:9172: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:9175: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 9184 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9196: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9199: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9202: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9205: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9210 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9222: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9225: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9228: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9231: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9247 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9259: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9262: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9265: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9268: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 9284 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9299: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9302: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9305: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_int=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:9318: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9323 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (int)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:9339: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9342: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:9344: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9347: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_int=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_int=0
fi
fi
echo "$as_me:9363: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF

if test "$ac_cv_sizeof_int" -eq 0
then
  { { echo "$as_me:9371: error: \"No size for int type.\"" >&5
echo "$as_me: error: \"No size for int type.\"" >&2;}
   { (exit 1); exit 1; }; }
fi
echo "$as_me:9375: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9381 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long *) 0)
  return 0;
if (sizeof (long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9396: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9399: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9402: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9405: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:9415: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:9418: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 9427 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9439: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9442: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9445: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9448: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9453 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9465: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9468: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9471: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9474: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9490 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9502: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9505: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9508: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9511: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 9527 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9539: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9542: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9545: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9548: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:9561: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9566 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:9582: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9585: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:9587: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9590: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long=0
fi
fi
echo "$as_me:9606: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF

if test "$ac_cv_sizeof_long" -eq 0
then
  { { echo "$as_me:9614: error: \"No size for long type.\"" >&5
echo "$as_me: error: \"No size for long type.\"" >&2;}
   { (exit 1); exit 1; }; }
fi
echo "$as_me:9618: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9624 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long long *) 0)
  return 0;
if (sizeof (long long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9639: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9642: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9645: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9648: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_long=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_long_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:9658: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "$as_me:9661: checking size of long long" >&5
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 9670 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9682: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9685: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9688: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9691: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9696 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9708: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9711: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9714: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9717: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9733 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9745: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9748: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9751: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9754: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 9770 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9785: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9788: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9791: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long_long=$ac_lo
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:9804: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9809 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (!f)
  exit (1);
fprintf (f, "%d", (sizeof (long long)));
fclose (f);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:9825: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9828: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:9830: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9833: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_long=0
fi
fi
echo "$as_me:9849: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF

if test "$ac_cv_sizeof_long_long" -eq 0
then
  { { echo "$as_me:9857: error: \"MySQL needs a long long type.\"" >&5
echo "$as_me: error: \"MySQL needs a long long type.\"" >&2;}
   { (exit 1); exit 1; }; }
fi
# off_t is not a builtin type
echo "$as_me:9862: checking size of off_t" >&5
echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_off_t=4
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9871 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(off_t));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:9888: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9891: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:9893: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9896: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_off_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_sizeof_off_t=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:9908: result: $ac_cv_sizeof_off_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
EOF

if test "$ac_cv_sizeof_off_t" -eq 0
then
  { { echo "$as_me:9916: error: \"MySQL needs a off_t type.\"" >&5
echo "$as_me: error: \"MySQL needs a off_t type.\"" >&2;}
   { (exit 1); exit 1; }; }
fi
# This always gives a warning. Ignore it unless you are cross compiling
echo "$as_me:9921: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
#line 9929 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9946: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9949: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9952: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9955: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
#line 9959 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9976: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9979: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9982: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9985: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
  { { echo "$as_me:10001: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10006 "configure"
#include "confdefs.h"
int
main ()
{
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10022: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10025: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10027: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10030: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:10043: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = yes; then

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

fi

#---START: Used in for client configure
# Check base type of last arg to accept

ac_save_CXXFLAGS="$CXXFLAGS"
echo "$as_me:10057: checking base type of last arg to accept" >&5
echo $ECHO_N "checking base type of last arg to accept... $ECHO_C" >&6
if test "${mysql_cv_btype_last_arg_accept+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test "$ac_cv_cxx_compiler_gnu" = "yes"
then
  CXXFLAGS="$CXXFLAGS -Werror"
fi
mysql_cv_btype_last_arg_accept=none
cat >conftest.$ac_ext <<_ACEOF
#line 10075 "configure"
#include "confdefs.h"
#if defined(inline)
#undef inline
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>

int
main ()
{
int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10093: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10096: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10099: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10102: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_btype_last_arg_accept=socklen_t
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test $mysql_cv_btype_last_arg_accept = none; then
cat >conftest.$ac_ext <<_ACEOF
#line 10112 "configure"
#include "confdefs.h"
#if defined(inline)
#undef inline
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>

int
main ()
{
int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10130: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10133: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10136: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10139: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_btype_last_arg_accept=size_t
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test $mysql_cv_btype_last_arg_accept = none; then
mysql_cv_btype_last_arg_accept=int
fi
fi
echo "$as_me:10152: result: $mysql_cv_btype_last_arg_accept" >&5
echo "${ECHO_T}$mysql_cv_btype_last_arg_accept" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

cat >>confdefs.h <<EOF
#define SOCKET_SIZE_TYPE $mysql_cv_btype_last_arg_accept
EOF

CXXFLAGS="$ac_save_CXXFLAGS"

#---END:
# Find where the stack goes
echo "$as_me:10168: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10177 "configure"
#include "confdefs.h"
find_stack_direction ()
 {
   static char *addr = 0;
   auto char dummy;
   if (addr == 0)
     {
       addr = &dummy;
       return find_stack_direction ();
     }
   else
     return (&dummy > addr) ? 1 : -1;
 }
 main ()
 {
   exit (find_stack_direction() < 0);
 }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10197: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10200: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10202: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10205: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_stack_direction=1
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_stack_direction=-1
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:10217: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
 cat >>confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

# We want to skip alloca on irix unconditionally. It may work on some version..

# Since we have heard that alloca fails on IRIX never define it on a
# SGI machine
if test ! "$host_vendor" = "sgi"
then
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo "$as_me:10231: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_header_alloca_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10237 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main ()
{
char *p = alloca(2 * sizeof(int));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10249: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10252: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10255: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10258: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_alloca_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10268: result: $ac_cv_header_alloca_h" >&5
echo "${ECHO_T}$ac_cv_header_alloca_h" >&6
 if test $ac_cv_header_alloca_h = yes
 then
	cat >>confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

 fi

 echo "$as_me:10278: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10284 "configure"
#include "confdefs.h"

 #ifdef __GNUC__
 # define alloca __builtin_alloca
 #else
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
 # else
 #  ifdef _AIX
  #pragma alloca
 #  else
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
 #   endif
 #  endif
 # endif
 #endif

int
main ()
{
char *p = (char *) alloca(1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10312: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10315: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10318: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10321: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_alloca_works=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10331: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
 if test $ac_cv_func_alloca_works = yes; then
   cat >>confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

 fi

 if test $ac_cv_func_alloca_works = no; then
   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
   # that cause trouble.  Some versions do not even contain alloca or
   # contain a buggy version.  If you still want to use their alloca,
   # use ar to extract alloca.o from them instead of compiling alloca.c.
   ALLOCA=alloca.o
   cat >>confdefs.h <<\EOF
#define C_ALLOCA 1
EOF

 echo "$as_me:10350: checking whether alloca needs Cray hooks" >&5
echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10356 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
 webecray
 #else
 wenotbecray
 #endif

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

fi
echo "$as_me:10374: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:10379: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10385 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10416: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10419: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10422: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10425: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10435: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

   break
fi

 done
 fi
 fi
 else
 echo "$as_me:10449: result: \"Skipped alloca tests\"" >&5
echo "${ECHO_T}\"Skipped alloca tests\"" >&6
fi

# Do struct timespec have members tv_sec or ts_sec
echo "$as_me:10454: checking if struct timespec has a ts_sec member" >&5
echo $ECHO_N "checking if struct timespec has a ts_sec member... $ECHO_C" >&6
if test "${mysql_cv_timespec_ts+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10460 "configure"
#include "confdefs.h"
#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif

int
main ()
{
struct timespec abstime;

abstime.ts_sec = time(NULL)+1;
abstime.ts_nsec = 0;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10480: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10483: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10486: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10489: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_timespec_ts=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_timespec_ts=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:10499: result: $mysql_cv_timespec_ts" >&5
echo "${ECHO_T}$mysql_cv_timespec_ts" >&6
if test "$mysql_cv_timespec_ts" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_TIMESPEC_TS_SEC 1
EOF

fi

# Do we have the tzname variable
echo "$as_me:10510: checking if we have tzname variable" >&5
echo $ECHO_N "checking if we have tzname variable... $ECHO_C" >&6
if test "${mysql_cv_tzname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10516 "configure"
#include "confdefs.h"
#include <time.h>
#ifdef __cplusplus
extern "C"
#endif

int
main ()
{
 tzset();
  return tzname[0] != 0;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10537: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10540: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10543: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_tzname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_tzname=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:10553: result: $mysql_cv_tzname" >&5
echo "${ECHO_T}$mysql_cv_tzname" >&6
if test "$mysql_cv_tzname" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_TZNAME 1
EOF

fi

# Do the system files define ulong
echo "$as_me:10564: checking for type ulong" >&5
echo $ECHO_N "checking for type ulong... $ECHO_C" >&6
if test "${ac_cv_ulong+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_ulong=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10573 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  ulong foo;
  foo++;
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10585: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10588: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10590: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10593: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_ulong=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_ulong=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

echo "$as_me:10606: result: $ac_cv_ulong" >&5
echo "${ECHO_T}$ac_cv_ulong" >&6
if test "$ac_cv_ulong" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_ULONG 1
EOF

fi

# Do the system files define uchar
echo "$as_me:10617: checking for type uchar" >&5
echo $ECHO_N "checking for type uchar... $ECHO_C" >&6
if test "${ac_cv_uchar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_uchar=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10626 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  uchar foo;
  foo++;
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10638: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10641: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10643: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10646: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_uchar=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_uchar=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

echo "$as_me:10659: result: $ac_cv_uchar" >&5
echo "${ECHO_T}$ac_cv_uchar" >&6
if test "$ac_cv_uchar" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_UCHAR 1
EOF

fi

# Do the system files define uint
echo "$as_me:10670: checking for type uint" >&5
echo $ECHO_N "checking for type uint... $ECHO_C" >&6
if test "${ac_cv_uint+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_uint=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10679 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  uint foo;
  foo++;
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10691: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10694: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10696: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10699: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_uint=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_uint=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

echo "$as_me:10712: result: $ac_cv_uint" >&5
echo "${ECHO_T}$ac_cv_uint" >&6
if test "$ac_cv_uint" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_UINT 1
EOF

fi

#Check for fp_except in ieeefp.h
echo "$as_me:10723: checking for type fp_except" >&5
echo $ECHO_N "checking for type fp_except... $ECHO_C" >&6
if test "${ac_cv_fp_except+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_fp_except=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10732 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
#include <ieeefp.h>
main()
{
  fp_except foo;
  foo++;
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10745: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10748: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10750: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10753: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_fp_except=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_fp_except=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

echo "$as_me:10766: result: $ac_cv_fp_except" >&5
echo "${ECHO_T}$ac_cv_fp_except" >&6
if test "$ac_cv_fp_except" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_FP_EXCEPT 1
EOF

fi

# Do the c++ compiler have a bool type

echo "$as_me:10778: checking if ${CXX} supports bool types" >&5
echo $ECHO_N "checking if ${CXX} supports bool types... $ECHO_C" >&6
if test "${mysql_cv_have_bool+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

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

int
main ()
{
bool b = true;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:10803: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:10806: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:10809: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10812: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_have_bool=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_have_bool=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

fi

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

fi

# Check some common bugs with gcc 2.8.# on sparc

echo "$as_me:10840: checking if conversion of longlong to float works" >&5
echo $ECHO_N "checking if conversion of longlong to float works... $ECHO_C" >&6
if test "${ac_cv_conv_longlong_to_float+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:10846: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10851 "configure"
#include "confdefs.h"
#include <stdio.h>
typedef long long longlong;
main()
{
  longlong ll=1;
  float f;
  FILE *file=fopen("conftestval", "w");
  f = (float) ll;
  fprintf(file,"%g\n",f);
  close(file);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10867: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10870: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10872: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10875: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_conv_longlong_to_float=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_conv_longlong_to_float=0
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
then
  ac_cv_conv_longlong_to_float=yes
else
  ac_cv_conv_longlong_to_float=no
fi
echo "$as_me:10893: result: $ac_cv_conv_longlong_to_float" >&5
echo "${ECHO_T}$ac_cv_conv_longlong_to_float" >&6

if test "$ac_cv_conv_longlong_to_float" != "yes"
then
  { { echo "$as_me:10898: error: Your compiler cannot convert a longlong value to a float!
If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
again" >&5
echo "$as_me: error: Your compiler cannot convert a longlong value to a float!
If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
again" >&2;}
   { (exit 1); exit 1; }; };
fi
echo "$as_me:10906: checking if pthread_yield takes zero arguments" >&5
echo $ECHO_N "checking if pthread_yield takes zero arguments... $ECHO_C" >&6
if test "${ac_cv_pthread_yield_zero_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10912 "configure"
#include "confdefs.h"
#define _GNU_SOURCE
#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif

int
main ()
{

  pthread_yield();

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10931: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10934: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10937: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10940: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_pthread_yield_zero_arg=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_pthread_yield_zero_arg=yeso
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:10950: result: $ac_cv_pthread_yield_zero_arg" >&5
echo "${ECHO_T}$ac_cv_pthread_yield_zero_arg" >&6
if test "$ac_cv_pthread_yield_zero_arg" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
EOF

fi

echo "$as_me:10960: checking if pthread_yield takes 1 argument" >&5
echo $ECHO_N "checking if pthread_yield takes 1 argument... $ECHO_C" >&6
if test "${ac_cv_pthread_yield_one_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10966 "configure"
#include "confdefs.h"
#define _GNU_SOURCE
#include <pthread.h>
#ifdef __cplusplus
extern "C"
#endif

int
main ()
{

  pthread_yield(0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10985: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10988: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10991: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10994: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_pthread_yield_one_arg=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_pthread_yield_one_arg=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:11004: result: $ac_cv_pthread_yield_one_arg" >&5
echo "${ECHO_T}$ac_cv_pthread_yield_one_arg" >&6
if test "$ac_cv_pthread_yield_one_arg" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_PTHREAD_YIELD_ONE_ARG 1
EOF

fi

######################################################################
# For readline-4.0 (We simply move the mimimum amount of stuff from
# the readline configure.in here)

MAKE_SHELL=/bin/sh

# Already-done: stdlib.h string.h unistd.h termios.h

for ac_header in varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
paths.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:11028: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11034 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:11038: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:11044: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:11063: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

# Already-done: strcasecmp

for ac_func in lstat putenv select setenv setlocale strcoll tcgetattr
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11078: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11084 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

echo "$as_me:11144: checking whether stat file-mode macros are broken" >&5
echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
if test "${ac_cv_header_stat_broken+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11150 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>

#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
#endif

#if defined(S_ISBLK) && defined(S_IFCHR)
# if S_ISBLK (S_IFCHR)
You lose.
# endif
#endif

#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif

#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#endif

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

fi
echo "$as_me:11189: result: $ac_cv_header_stat_broken" >&5
echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
if test $ac_cv_header_stat_broken = yes; then

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

fi

echo "$as_me:11199: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11205 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11227: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11230: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11233: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11236: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:11246: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

echo "$as_me:11253: checking for type of signal functions" >&5
echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
if test "${mysql_cv_signal_vintage+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  cat >conftest.$ac_ext <<_ACEOF
#line 11260 "configure"
#include "confdefs.h"
#include <signal.h>
int
main ()
{

    sigset_t ss;
    struct sigaction sa;
    sigemptyset(&ss); sigsuspend(&ss);
    sigaction(SIGINT, &sa, (struct sigaction *) 0);
    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11278: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11281: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11284: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11287: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_signal_vintage=posix
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

    cat >conftest.$ac_ext <<_ACEOF
#line 11295 "configure"
#include "confdefs.h"
#include <signal.h>
int
main ()
{

	int mask = sigmask(SIGINT);
	sigsetmask(mask); sigblock(mask); sigpause(mask);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11310: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11313: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11316: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11319: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_signal_vintage=4.2bsd
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5

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

	#include <signal.h>
	RETSIGTYPE foo() { }
int
main ()
{

		int mask = sigmask(SIGINT);
		sigset(SIGINT, foo); sigrelse(SIGINT);
		sighold(SIGINT); sigpause(SIGINT);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11345: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11348: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11351: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11354: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_signal_vintage=svr3
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_signal_vintage=v7

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

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

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

fi

echo "$as_me:11373: result: $mysql_cv_signal_vintage" >&5
echo "${ECHO_T}$mysql_cv_signal_vintage" >&6
if test "$mysql_cv_signal_vintage" = posix; then
cat >>confdefs.h <<\EOF
#define HAVE_POSIX_SIGNALS 1
EOF

elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
cat >>confdefs.h <<\EOF
#define HAVE_BSD_SIGNALS 1
EOF

elif test "$mysql_cv_signal_vintage" = svr3; then
cat >>confdefs.h <<\EOF
#define HAVE_USG_SIGHOLD 1
EOF

fi

echo "$as_me:11392: checking whether programs are able to redeclare getpw functions" >&5
echo $ECHO_N "checking whether programs are able to redeclare getpw functions... $ECHO_C" >&6
if test "${mysql_cv_can_redecl_getpw+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11398 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <pwd.h>
extern struct passwd *getpwent();
int
main ()
{
struct passwd *z; z = getpwent();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11412: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11415: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11418: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11421: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_can_redecl_getpw=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_can_redecl_getpw=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

echo "$as_me:11432: result: $mysql_cv_can_redecl_getpw" >&5
echo "${ECHO_T}$mysql_cv_can_redecl_getpw" >&6
if test $mysql_cv_can_redecl_getpw = no; then
cat >>confdefs.h <<\EOF
#define HAVE_GETPW_DECLS 1
EOF

fi

echo "$as_me:11441: checking for TIOCGWINSZ in sys/ioctl.h" >&5
echo $ECHO_N "checking for TIOCGWINSZ in sys/ioctl.h... $ECHO_C" >&6
if test "${mysql_cv_tiocgwinsz_in_ioctl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11447 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ioctl.h>
int
main ()
{
int x = TIOCGWINSZ;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11460: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11463: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11466: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11469: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_tiocgwinsz_in_ioctl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_tiocgwinsz_in_ioctl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

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

fi

echo "$as_me:11489: checking for FIONREAD in sys/ioctl.h" >&5
echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6
if test "${mysql_cv_fionread_in_ioctl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11495 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ioctl.h>
int
main ()
{
int x = FIONREAD;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11508: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11511: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11514: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11517: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_fionread_in_ioctl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_fionread_in_ioctl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

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

fi

echo "$as_me:11537: checking for TIOCSTAT in sys/ioctl.h" >&5
echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6
if test "${mysql_cv_tiocstat_in_ioctl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11543 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ioctl.h>
int
main ()
{
int x = TIOCSTAT;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11556: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11559: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11562: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11565: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_tiocstat_in_ioctl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_tiocstat_in_ioctl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi

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

fi

echo "$as_me:11585: checking if struct dirent has a d_ino member" >&5
echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6
if test "${mysql_cv_dirent_has_dino+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11591 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
#else
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
#  include <sys/ndir.h>
# endif /* SYSNDIR */
# ifdef HAVE_SYS_DIR_H
#  include <sys/dir.h>
# endif /* SYSDIR */
# ifdef HAVE_NDIR_H
#  include <ndir.h>
# endif
#endif /* HAVE_DIRENT_H */

int
main ()
{

struct dirent d; int z; z = d.d_ino;

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

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

fi

echo "$as_me:11654: checking whether signal handlers are of type void" >&5
echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6
if test "${mysql_cv_void_sighandler+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11660 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C"
#endif
void (*signal ()) ();
int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:11680: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:11683: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:11686: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11689: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_void_sighandler=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_void_sighandler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:11699: result: $mysql_cv_void_sighandler" >&5
echo "${ECHO_T}$mysql_cv_void_sighandler" >&6
if test $mysql_cv_void_sighandler = yes; then
cat >>confdefs.h <<\EOF
#define VOID_SIGHANDLER 1
EOF

fi

if test "$with_named_curses" = "no"
then

if test "${mysql_cv_termcap_lib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo "$as_me:11714: checking for tgetent in -lncurses" >&5
echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11722 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgetent ();
int
main ()
{
tgetent ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11741: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11744: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11747: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11750: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ncurses_tgetent=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ncurses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11761: result: $ac_cv_lib_ncurses_tgetent" >&5
echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
if test $ac_cv_lib_ncurses_tgetent = yes; then
  mysql_cv_termcap_lib=libncurses
else
  echo "$as_me:11766: checking for tgetent in -lcurses" >&5
echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_tgetent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11774 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char tgetent ();
int
main ()
{
tgetent ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:11793: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:11796: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:11799: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:11802: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_curses_tgetent=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_curses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:11813: result: $ac_cv_lib_curses_tgetent" >&5
echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
if test $ac_cv_lib_curses_tgetent = yes; then
  mysql_cv_termcap_lib=libcurses
else
  echo "$as_me:11818: checking for tgetent in -ltermcap" >&5
echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 11826 "configure"
#include "confdefs.h"

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

fi

fi

fi

echo "$as_me:11879: checking for termcap functions library" >&5
echo $ECHO_N "checking for termcap functions library... $ECHO_C" >&6
if test $mysql_cv_termcap_lib = NOT_FOUND; then
{ { echo "$as_me:11882: error: No curses/termcap library found" >&5
echo "$as_me: error: No curses/termcap library found" >&2;}
   { (exit 1); exit 1; }; }
elif test $mysql_cv_termcap_lib = libtermcap; then
TERMCAP_LIB=-ltermcap
elif test $mysql_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
else
TERMCAP_LIB=-lcurses
fi
echo "$as_me:11892: result: $TERMCAP_LIB" >&5
echo "${ECHO_T}$TERMCAP_LIB" >&6

else
  TERMCAP_LIB="$with_named_curses"
fi

# End of readline stuff
#########################################################################

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

fi
done

for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:11953: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 11959 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

echo "$as_me:12019: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12028 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */

#include <fcntl.h>
#include <sys/mman.h>

#if !STDC_HEADERS && !HAVE_STDLIB_H
char *malloc ();
#endif

/* This mess was copied from the GNU getpagesize.h.  */
#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h.  */
# if !HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  if HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

int
main ()
{
  char *data, *data2, *data3;
  int i, pagesize;
  int fd;

  pagesize = getpagesize ();

  /* First, make a file with some known garbage in it. */
  data = (char *) malloc (pagesize);
  if (!data)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    *(data + i) = rand ();
  umask (0);
  fd = creat ("conftest.mmap", 0600);
  if (fd < 0)
    exit (1);
  if (write (fd, data, pagesize) != pagesize)
    exit (1);
  close (fd);

  /* Next, try to mmap the file at a fixed address which already has
     something else allocated at it.  If we can, also make sure that
     we see the same garbage.  */
  fd = open ("conftest.mmap", O_RDWR);
  if (fd < 0)
    exit (1);
  data2 = (char *) malloc (2 * pagesize);
  if (!data2)
    exit (1);
  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data2 + i))
      exit (1);

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    exit (1);
  if (read (fd, data3, pagesize) != pagesize)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      exit (1);
  close (fd);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12155: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12158: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12160: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12163: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_mmap_fixed_mapped=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:12175: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then

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

fi
rm -f conftest.mmap

echo "$as_me:12186: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12192 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12214: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12217: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12220: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12223: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12233: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

echo "$as_me:12240: checking return type of qsort" >&5
echo $ECHO_N "checking return type of qsort... $ECHO_C" >&6
if test "${mysql_cv_type_qsort+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12246 "configure"
#include "confdefs.h"
#include <stdlib.h>
#ifdef __cplusplus
extern "C"
#endif
void qsort(void *base, size_t nel, size_t width,
 int (*compar) (const void *, const void *));

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12264: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12267: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12270: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12273: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_type_qsort=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_type_qsort=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12283: result: $mysql_cv_type_qsort" >&5
echo "${ECHO_T}$mysql_cv_type_qsort" >&6
cat >>confdefs.h <<EOF
#define RETQSORTTYPE $mysql_cv_type_qsort
EOF

if test "$mysql_cv_type_qsort" = "void"
then
 cat >>confdefs.h <<EOF
#define QSORT_TYPE_IS_VOID 1
EOF

fi

echo "$as_me:12297: checking whether utime accepts a null argument" >&5
echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6
if test "${ac_cv_func_utime_null+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  rm -f conftest.data; >conftest.data
# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
if test "$cross_compiling" = yes; then
  ac_cv_func_utime_null=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12308 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
struct stat s, t;
  exit (!(stat ("conftest.data", &s) == 0
          && utime ("conftest.data", (long *)0) == 0
          && stat ("conftest.data", &t) == 0
          && t.st_mtime >= s.st_mtime
          && t.st_mtime - s.st_mtime < 120));
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:12325: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12328: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:12330: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12333: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_utime_null=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_utime_null=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
echo "$as_me:12346: result: $ac_cv_func_utime_null" >&5
echo "${ECHO_T}$ac_cv_func_utime_null" >&6
if test $ac_cv_func_utime_null = yes; then

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

fi
rm -f conftest.data

for ac_func in vprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12360: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12366 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

echo "$as_me:12423: checking for _doprnt" >&5
echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
if test "${ac_cv_func__doprnt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12429 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _doprnt ();
char (*f) ();

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

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

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

fi

fi
done

for ac_func in alarm bmove \
 chsize ftruncate rint finite isnan fpsetmask fpresetsticky\
 cuserid fcntl fconvert poll \
 getrusage getpwuid getcwd getrlimit getwd index stpcpy locking longjmp \
 perror pread realpath readlink rename \
 socket strnlen madvise mkstemp \
 strtol strtoul strtoll strtoull snprintf tempnam thr_setconcurrency \
 gethostbyaddr_r gethostbyname_r getpwnam \
 bfill bzero bcmp strstr strpbrk strerror \
 tell atod memcpy memmove \
 setupterm strcasecmp sighold vidattr lrand48 localtime_r \
 sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
 pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
 pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
 pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
 fchmod getpass getpassphrase initgroups mlockall
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12510: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12516 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

# Sanity check: We chould not have any fseeko symbol unless
# large_file_support=yes

for ac_func in fseeko
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12582: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12588 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:12619: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:12622: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:12625: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12628: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:12638: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
 if test "$large_file_support" = no -a "$IS_LINUX" = "true";
then
  { { echo "$as_me:12646: error: \"Found fseeko symbol but large_file_support is not enabled!\"" >&5
echo "$as_me: error: \"Found fseeko symbol but large_file_support is not enabled!\"" >&2;}
   { (exit 1); exit 1; }; };
fi

fi
done

my_save_LIBS="$LIBS"
LIBS="$LIBS $LIBDL"

for ac_func in dlopen dlerror
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:12660: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12666 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

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

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

fi
done

LIBS="$my_save_LIBS"

# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
ac_save_CXXFLAGS="$CXXFLAGS"
echo "$as_me:12730: checking style of gethost* routines" >&5
echo $ECHO_N "checking style of gethost* routines... $ECHO_C" >&6
if test "${mysql_cv_gethost_style+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

# Do not treat warnings as errors if we are linking agaist other libc
# this is to work around gcc not being permissive on non-system includes
# with respect to ANSI C++
if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
then
  CXXFLAGS="$CXXFLAGS -Werror"
fi
cat >conftest.$ac_ext <<_ACEOF
#line 12750 "configure"
#include "confdefs.h"
#undef inline
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
int
main ()
{
int skr;
 struct hostent *foo = gethostbyaddr_r((const char *) 0,
  0, 0, (struct hostent *) 0, (char *) NULL,  0, &skr); return (foo == 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12773: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12776: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12779: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12782: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_gethost_style=solaris
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_gethost_style=other
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12792: result: $mysql_cv_gethost_style" >&5
echo "${ECHO_T}$mysql_cv_gethost_style" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethost_style" = "solaris"
then
  cat >>confdefs.h <<\EOF
#define HAVE_SOLARIS_STYLE_GETHOST 1
EOF

fi

#---START: Used in for client configure

# Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris)
ac_save_CXXFLAGS="$CXXFLAGS"
echo "$as_me:12813: checking style of gethostname_r routines" >&5
echo $ECHO_N "checking style of gethostname_r routines... $ECHO_C" >&6
if test "${mysql_cv_gethostname_style+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
then
  CXXFLAGS="$CXXFLAGS -Werror"
fi
cat >conftest.$ac_ext <<_ACEOF
#line 12830 "configure"
#include "confdefs.h"
#undef inline
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
int
main ()
{
int skr;

 skr = gethostbyname_r((const char *) 0,
  (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12854: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12857: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12860: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12863: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_gethostname_style=glibc2
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_gethostname_style=other
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12873: result: $mysql_cv_gethostname_style" >&5
echo "${ECHO_T}$mysql_cv_gethostname_style" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_style" = "glibc2"
then
  cat >>confdefs.h <<\EOF
#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
EOF

fi

# Check 3rd argument of getthostbyname_r
ac_save_CXXFLAGS="$CXXFLAGS"
echo "$as_me:12892: checking 3 argument to gethostname_r routines" >&5
echo $ECHO_N "checking 3 argument to gethostname_r routines... $ECHO_C" >&6
if test "${mysql_cv_gethostname_arg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
then
  CXXFLAGS="$CXXFLAGS -Werror"
fi
cat >conftest.$ac_ext <<_ACEOF
#line 12909 "configure"
#include "confdefs.h"
#undef inline
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
int
main ()
{
int skr;

 skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (struct hostent_data*) 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12935: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:12938: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:12941: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_gethostname_arg=hostent_data
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_gethostname_arg=char
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:12951: result: $mysql_cv_gethostname_arg" >&5
echo "${ECHO_T}$mysql_cv_gethostname_arg" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_arg" = "hostent_data"
then
  cat >>confdefs.h <<\EOF
#define HAVE_GETHOSTBYNAME_R_RETURN_INT 1
EOF

fi

if test "$with_mit_threads" = "no"
then
  # Check definition of pthread_getspecific
  echo "$as_me:12971: checking \"args to pthread_getspecific\"" >&5
echo $ECHO_N "checking \"args to pthread_getspecific\"... $ECHO_C" >&6
if test "${mysql_cv_getspecific_args+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12977 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
int
main ()
{
 void *pthread_getspecific(pthread_key_t key);
pthread_getspecific((pthread_key_t) NULL);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:12994: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:12997: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13000: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13003: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_getspecific_args=POSIX
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_getspecific_args=other
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13013: result: $mysql_cv_getspecific_args" >&5
echo "${ECHO_T}$mysql_cv_getspecific_args" >&6
  if test "$mysql_cv_getspecific_args" = "other"
  then
    cat >>confdefs.h <<\EOF
#define HAVE_NONPOSIX_PTHREAD_GETSPECIFIC 1
EOF

  fi

  # Check definition of pthread_mutex_init
  echo "$as_me:13024: checking \"args to pthread_mutex_init\"" >&5
echo $ECHO_N "checking \"args to pthread_mutex_init\"... $ECHO_C" >&6
if test "${mysql_cv_mutex_init_args+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13030 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
int
main ()
{

  pthread_mutexattr_t attr;
  pthread_mutex_t mp;
  pthread_mutex_init(&mp,&attr);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13049: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13052: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13055: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13058: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_mutex_init_args=POSIX
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_mutex_init_args=other
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:13068: result: $mysql_cv_mutex_init_args" >&5
echo "${ECHO_T}$mysql_cv_mutex_init_args" >&6
  if test "$mysql_cv_mutex_init_args" = "other"
  then
    cat >>confdefs.h <<\EOF
#define HAVE_NONPOSIX_PTHREAD_MUTEX_INIT 1
EOF

  fi
fi
#---END:

#---START: Used in for client configure
# Check definition of readdir_r
echo "$as_me:13082: checking \"args to readdir_r\"" >&5
echo $ECHO_N "checking \"args to readdir_r\"... $ECHO_C" >&6
if test "${mysql_cv_readdir_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13088 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
#include <dirent.h>
int
main ()
{
 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13106: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13109: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13112: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13115: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_readdir_r=POSIX
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_readdir_r=other
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:13125: result: $mysql_cv_readdir_r" >&5
echo "${ECHO_T}$mysql_cv_readdir_r" >&6
if test "$mysql_cv_readdir_r" = "POSIX"
then
  cat >>confdefs.h <<\EOF
#define HAVE_READDIR_R 1
EOF

fi

# Check definition av posix sigwait()
echo "$as_me:13136: checking \"style of sigwait\"" >&5
echo $ECHO_N "checking \"style of sigwait\"... $ECHO_C" >&6
if test "${mysql_cv_sigwait+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13142 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
#include <signal.h>
int
main ()
{
#ifndef _AIX
sigset_t set;
int sig;
sigwait(&set,&sig);
#endif
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13163: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13166: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13169: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13172: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_sigwait=POSIX
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_sigwait=other
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:13182: result: $mysql_cv_sigwait" >&5
echo "${ECHO_T}$mysql_cv_sigwait" >&6
if test "$mysql_cv_sigwait" = "POSIX"
then
  cat >>confdefs.h <<\EOF
#define HAVE_SIGWAIT 1
EOF

fi

if test "$mysql_cv_sigwait" != "POSIX"
then
unset mysql_cv_sigwait
# Check definition av posix sigwait()
echo "$as_me:13196: checking \"style of sigwait\"" >&5
echo $ECHO_N "checking \"style of sigwait\"... $ECHO_C" >&6
if test "${mysql_cv_sigwait+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13202 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
#include <signal.h>
int
main ()
{
sigset_t set;
int sig;
sigwait(&set);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13221: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13224: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13227: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13230: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_sigwait=NONPOSIX
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_sigwait=other
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:13240: result: $mysql_cv_sigwait" >&5
echo "${ECHO_T}$mysql_cv_sigwait" >&6
if test "$mysql_cv_sigwait" = "NONPOSIX"
then
  cat >>confdefs.h <<\EOF
#define HAVE_NONPOSIX_SIGWAIT 1
EOF

fi
fi
#---END:

# Check if pthread_attr_setscope() exists
echo "$as_me:13253: checking \"for pthread_attr_setscope\"" >&5
echo $ECHO_N "checking \"for pthread_attr_setscope\"... $ECHO_C" >&6
if test "${mysql_cv_pthread_attr_setscope+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 13259 "configure"
#include "confdefs.h"
#if !defined(SCO) && !defined(__osf__)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
int
main ()
{
pthread_attr_t thr_attr;
pthread_attr_setscope(&thr_attr,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:13276: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:13279: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:13282: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13285: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  mysql_cv_pthread_attr_setscope=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
mysql_cv_pthread_attr_setscope=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:13295: result: $mysql_cv_pthread_attr_setscope" >&5
echo "${ECHO_T}$mysql_cv_pthread_attr_setscope" >&6
if test "$mysql_cv_pthread_attr_setscope" = "yes"
then
  cat >>confdefs.h <<\EOF
#define HAVE_PTHREAD_ATTR_SETSCOPE 1
EOF

fi

# Check for bad includes
echo "$as_me:13306: checking \"can netinet files be included\"" >&5
echo $ECHO_N "checking \"can netinet files be included\"... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 13309 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
int
main ()
{
 printf("1\n");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:13329: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:13332: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:13335: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  netinet_inc=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
netinet_inc=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test "$netinet_inc" = "no"
then
  cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_NETINET_INCLUDES 1
EOF

fi
echo "$as_me:13351: result: \"$netinet_inc\"" >&5
echo "${ECHO_T}\"$netinet_inc\"" >&6

# Only build client code?

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

fi;

# Shall we build the docs?

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

fi;

if test "$with_docs" = "yes"
then
  docs_dirs="Docs"
else
  docs_dirs=""
fi

# Shall we build the bench code?

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

fi;

if test "$with_bench" = "yes"
then
  bench_dirs="sql-bench"
else
  bench_dirs=""
fi
bench_dirs="$bench_dirs mysql-test"

# Don't build readline, i have it already

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

fi;
if test "$with_readline" = "yes"
then
  readline_dir="readline"
  readline_link="\$(top_builddir)/readline/libreadline.a"
else
  # This requires readline to be in a standard place. Mosty for linux
  # there readline may be a shared library.
  readline_dir=""
  readline_link="-lreadline"
fi

# Check whether --with-charset or --without-charset was given.
if test "${with_charset+set}" = set; then
  withval="$with_charset"
  default_charset="$withval"
else
  default_charset="$DEFAULT_CHARSET"
fi;

# Check whether --with-extra-charsets or --without-extra-charsets was given.
if test "${with_extra_charsets+set}" = set; then
  withval="$with_extra_charsets"
  extra_charsets="$withval"
else
  extra_charsets="none"
fi;

echo "$as_me:13439: checking \"character sets\"" >&5
echo $ECHO_N "checking \"character sets\"... $ECHO_C" >&6

if test "$extra_charsets" = none; then
  CHARSETS=""
elif test "$extra_charsets" = complex; then
  CHARSETS=`/bin/ls -1 $srcdir/strings/ctype-*.c | \
                  sed -e 's;^.*/ctype-;;' -e 's;.c$;;'`
  CHARSETS=`echo $CHARSETS`     # get rid of line breaks
else
  if test "$extra_charsets" = all; then
    CHARSETS="$CHARSETS_AVAILABLE"
  else
    CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
  fi
fi

# Ensure that the default_charset is first in CHARSETS
TMP_CHARSETS="$default_charset "
for i in $CHARSETS
do
  if test $i != $default_charset
  then
    TMP_CHARSETS="$TMP_CHARSETS $i"
  fi
done
CHARSETS=$TMP_CHARSETS

# Check if charsets are all good
for cs in $CHARSETS
do
  charset_okay=0
  for charset in $CHARSETS_AVAILABLE
  do
    if test $cs = $charset; then charset_okay=1; fi
  done
  if test $charset_okay = 0;
  then
    { { echo "$as_me:13477: error: Charset $cs not available. (Available $CHARSETS_AVAILABLE).
    See the Installation chapter in the Reference Manual." >&5
echo "$as_me: error: Charset $cs not available. (Available $CHARSETS_AVAILABLE).
    See the Installation chapter in the Reference Manual." >&2;}
   { (exit 1); exit 1; }; };
  fi
done

CHARSET_SRCS=""
CHARSETS_NEED_SOURCE=""
CHARSET_DECLARATIONS=""
CHARSET_COMP_CS_INIT="CHARSET_INFO compiled_charsets[] = {"

want_use_strcoll=0
want_use_mb=0

index_file="$srcdir/sql/share/charsets/Index"

for c in $CHARSETS
do
  # get the charset number from $index_file
  subpat='^'"${c}"'[ 	][ 	]*\([0-9][0-9]*\)[^0-9]*$'
  number=`sed -e "/$subpat/!d" -e 's//\1/' $index_file`
  # some sanity checking....
  if test X"$number" = X
  then
    { { echo "$as_me:13503: error: No number was found in $index_file for the $c character set.  This is a bug in the MySQL distribution.  Please report this message to bugs@lists.mysql.com." >&5
echo "$as_me: error: No number was found in $index_file for the $c character set.  This is a bug in the MySQL distribution.  Please report this message to bugs@lists.mysql.com." >&2;}
   { (exit 1); exit 1; }; }
  fi

  cs_file="$srcdir/strings/ctype-$c.c"
  if test -f $cs_file
  then
    CHARSET_SRCS="${CHARSET_SRCS}ctype-$c.c "
    # get the strxfrm multiplier and max mb len from files
    subpat='^.*\\.configure\\. strxfrm_multiply_'"${c}"'='
    strx=`$AWK 'sub("'"$subpat"'", "") { print }' $cs_file`
    subpat='^.*\\.configure\\. mbmaxlen_'"${c}"'='
    maxl=`$AWK 'sub("'"$subpat"'", "") { print }' $cs_file`

    CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS

/* declarations for the ${c} character set, filled in by configure */
extern uchar ctype_${c}[], to_lower_${c}[], to_upper_${c}[], sort_order_${c}[];"
  else
    CHARSETS_NEED_SOURCE="$CHARSETS_NEED_SOURCE $c"
    strx=''
    maxl=''
  fi

  CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT

  /* this information is filled in by configure */
  {
    $number,    /* number */
    \"$c\",     /* name */
    ctype_${c},
    to_lower_${c},
    to_upper_${c},
    sort_order_${c},"

  if test -n "$strx"
  then
    want_use_strcoll=1

    CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS
extern int     my_strcoll_${c}(const uchar *, const uchar *);
extern int     my_strxfrm_${c}(uchar *, const uchar *, int);
extern int     my_strnncoll_${c}(const uchar *, int, const uchar *, int);
extern int     my_strnxfrm_${c}(uchar *, const uchar *, int, int);
extern my_bool my_like_range_${c}(const char *, uint, pchar, uint,
                          char *, char *, uint *, uint *);"

    CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
    $strx,      /* strxfrm_multiply */
    my_strcoll_${c},
    my_strxfrm_${c},
    my_strnncoll_${c},
    my_strnxfrm_${c},
    my_like_range_${c},"
  else
    CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
    0,          /* strxfrm_multiply */
    NULL,       /* strcoll    */
    NULL,       /* strxfrm    */
    NULL,       /* strnncoll  */
    NULL,       /* strnxfrm   */
    NULL,       /* like_range */"
  fi

  if test -n "$maxl"
  then
    want_use_mb=1

    CHARSET_DECLARATIONS="$CHARSET_DECLARATIONS
extern int     ismbchar_${c}(const char *, const char *);
extern my_bool ismbhead_${c}(uint);
extern int     mbcharlen_${c}(uint);"

    CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
    $maxl,      /* mbmaxlen */
    ismbchar_${c},
    ismbhead_${c},
    mbcharlen_${c}"
  else
    CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
    0,          /* mbmaxlen  */
    NULL,       /* ismbchar  */
    NULL,       /* ismbhead  */
    NULL        /* mbcharlen */"
  fi
  CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT
  },"
done

CHARSET_COMP_CS_INIT="$CHARSET_COMP_CS_INIT

  /* this information is filled in by configure */
  {
    0,          /* end-of-list marker */
    NullS,
    NULL,
    NULL,
    NULL,
    NULL,
    0,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    0,
    NULL,
    NULL,
    NULL
  }
};"

if test $want_use_strcoll = 1
then
  cat >>confdefs.h <<\EOF
#define USE_STRCOLL 1
EOF

fi

if test $want_use_mb = 1
then
  cat >>confdefs.h <<\EOF
#define USE_MB 1
EOF

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

fi

CHARSET_OBJS="`echo "$CHARSET_SRCS" | sed -e 's/\.c /.o /g'`"

cat <<EOF > $srcdir/strings/ctype_autoconf.c
/* This file is generated automatically by configure. */$CHARSET_DECLARATIONS

$CHARSET_COMP_CS_INIT
EOF

echo "$as_me:13644: result: default: $default_charset; compiled in: $CHARSETS" >&5
echo "${ECHO_T}default: $default_charset; compiled in: $CHARSETS" >&6

# Check whether --with-berkeley-db or --without-berkeley-db was given.
if test "${with_berkeley_db+set}" = set; then
  withval="$with_berkeley_db"
  bdb="$withval"
else
  bdb=no
fi;

# Check whether --with-berkeley-db-includes or --without-berkeley-db-includes was given.
if test "${with_berkeley_db_includes+set}" = set; then
  withval="$with_berkeley_db_includes"
  bdb_includes="$withval"
else
  bdb_includes=default
fi;

# Check whether --with-berkeley-db-libs or --without-berkeley-db-libs was given.
if test "${with_berkeley_db_libs+set}" = set; then
  withval="$with_berkeley_db_libs"
  bdb_libs="$withval"
else
  bdb_libs=default
fi;

  echo "$as_me:13671: checking for BerkeleyDB" >&5
echo $ECHO_N "checking for BerkeleyDB... $ECHO_C" >&6

  have_berkeley_db=no
  case "$bdb" in
    no )
      mode=no
      echo "$as_me:13678: result: no" >&5
echo "${ECHO_T}no" >&6
      ;;
    yes | default )
      case "$bdb_includes---$bdb_libs" in
        default---default )
          mode=search-$bdb
          echo "$as_me:13685: result: searching..." >&5
echo "${ECHO_T}searching..." >&6
          ;;
        default---* | *---default | yes---* | *---yes )
          { { echo "$as_me:13689: error: if either 'includes' or 'libs' is specified, both must be specified" >&5
echo "$as_me: error: if either 'includes' or 'libs' is specified, both must be specified" >&2;}
   { (exit 1); exit 1; }; }
          ;;
        * )
          mode=supplied-two
          echo "$as_me:13695: result: supplied" >&5
echo "${ECHO_T}supplied" >&6
          ;;
      esac
      ;;
    * )
      mode=supplied-one
      echo "$as_me:13702: result: supplied" >&5
echo "${ECHO_T}supplied" >&6
      ;;
  esac

  case $mode in
    no )
      bdb_includes=
      bdb_libs=
      bdb_libs_with_path=
      ;;
    supplied-two )

  inc="$bdb_includes"
  lib="$bdb_libs"
  if test -f "$inc/db.h"
  then

  db_major=`sed -e '/^.*#define[ 	]*DB_VERSION_MAJOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_minor=`sed -e '/^.*#define[ 	]*DB_VERSION_MINOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_patch=`sed -e '/^.*#define[ 	]*DB_VERSION_PATCH[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  test -z "$db_major" && db_major=0
  test -z "$db_minor" && db_minor=0
  test -z "$db_patch" && db_patch=0

  # This is ugly, but about as good as it can get
  mysql_bdb=
  if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  then
    mysql_bdb=h
  elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  then
    want_bdb_version="3.2.9a"	# hopefully this will stay up-to-date
    mysql_bdb=a
  fi

  if test -n "$mysql_bdb" && \
	grep "DB_VERSION_STRING.*:.*$mysql_bdb: " $inc/db.h > /dev/null
  then
    bdb_version_ok=yes
  else
    bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
    bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  fi

    if test X"$bdb_version_ok" = Xyes; then
      save_LDFLAGS="$LDFLAGS"
      LDFLAGS="-L$lib $LDFLAGS"
      echo "$as_me:13750: checking for db_env_create in -ldb" >&5
echo $ECHO_N "checking for db_env_create in -ldb... $ECHO_C" >&6
if test "${ac_cv_lib_db_db_env_create+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldb  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 13758 "configure"
#include "confdefs.h"

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

        bdb_dir_ok=installed

  case "$inc" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      inc="\$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:13813: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$inc" != "/"
  then
    inc=`echo $inc | sed -e 's,/$,,'`
  fi

  case "$lib" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      lib="\$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:13833: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$lib" != "/"
  then
    lib=`echo $lib | sed -e 's,/$,,'`
  fi

        bdb_includes="-I$inc"
        bdb_libs="-L$lib -ldb"
        bdb_libs_with_path="$lib/libdb.a"

fi

      LDFLAGS="$save_LDFLAGS"
    else
      bdb_dir_ok="$bdb_version_ok"
    fi
  else
    bdb_dir_ok="no db.h file in '$inc'"
  fi

      case $bdb_dir_ok in
        installed ) mode=yes ;;
        * ) { { echo "$as_me:13859: error: didn't find valid BerkeleyDB: $bdb_dir_ok" >&5
echo "$as_me: error: didn't find valid BerkeleyDB: $bdb_dir_ok" >&2;}
   { (exit 1); exit 1; }; } ;;
      esac
      ;;
    supplied-one )

  dir="$bdb"

  inc="$dir/include"
  lib="$dir/lib"
  if test -f "$inc/db.h"
  then

  db_major=`sed -e '/^.*#define[ 	]*DB_VERSION_MAJOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_minor=`sed -e '/^.*#define[ 	]*DB_VERSION_MINOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_patch=`sed -e '/^.*#define[ 	]*DB_VERSION_PATCH[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  test -z "$db_major" && db_major=0
  test -z "$db_minor" && db_minor=0
  test -z "$db_patch" && db_patch=0

  # This is ugly, but about as good as it can get
  mysql_bdb=
  if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  then
    mysql_bdb=h
  elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  then
    want_bdb_version="3.2.9a"	# hopefully this will stay up-to-date
    mysql_bdb=a
  fi

  if test -n "$mysql_bdb" && \
	grep "DB_VERSION_STRING.*:.*$mysql_bdb: " $inc/db.h > /dev/null
  then
    bdb_version_ok=yes
  else
    bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
    bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  fi

    if test X"$bdb_version_ok" = Xyes; then
      save_LDFLAGS="$LDFLAGS"
      LDFLAGS="-L$lib $LDFLAGS"
      echo "$as_me:13903: checking for db_env_create in -ldb" >&5
echo $ECHO_N "checking for db_env_create in -ldb... $ECHO_C" >&6
if test "${ac_cv_lib_db_db_env_create+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldb  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 13911 "configure"
#include "confdefs.h"

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

        bdb_dir_ok=installed

  case "$inc" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      inc="\$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:13966: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$inc" != "/"
  then
    inc=`echo $inc | sed -e 's,/$,,'`
  fi

  case "$lib" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      lib="\$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:13986: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$lib" != "/"
  then
    lib=`echo $lib | sed -e 's,/$,,'`
  fi

        bdb_includes="-I$inc"
        bdb_libs="-L$lib -ldb"
        bdb_libs_with_path="$lib/libdb.a"

fi

      LDFLAGS="$save_LDFLAGS"
    else
      bdb_dir_ok="$bdb_version_ok"
    fi
  else
    bdb_dir_ok="no db.h file in '$inc'"
  fi

  if test X"$bdb_dir_ok" != Xinstalled; then
    # test to see if it's a source dir
    rel="$dir/dist/RELEASE"
    if test -f "$rel"; then

  db_major=`sed -e '/^DB_VERSION_MAJOR=/ !d' -e 's///' $rel`
  db_minor=`sed -e '/^DB_VERSION_MINOR=/ !d' -e 's///' $rel`
  db_patch=`sed -e '/^DB_VERSION_PATCH=/ !d' -e 's///' $rel`
  test -z "$db_major" && db_major=0
  test -z "$db_minor" && db_minor=0
  test -z "$db_patch" && db_patch=0

  # This is ugly, but about as good as it can get
  mysql_bdb=
  if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  then
    mysql_bdb=h
  elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  then
    want_bdb_version="3.2.9a"	# hopefully this will stay up-to-date
    mysql_bdb=a
  fi

  if test -n "$mysql_bdb" && \
	grep "DB_VERSION_STRING.*:.*$mysql_bdb: " $rel > /dev/null
  then
    bdb_version_ok=yes
  else
    bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
    bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  fi

      if test X"$bdb_version_ok" = Xyes; then
        bdb_dir_ok=source
        bdb="$dir"

  case "$dir" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      dir="\$(top_builddir)/"`echo "$dir" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:14056: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$dir" != "/"
  then
    dir=`echo $dir | sed -e 's,/$,,'`
  fi

        bdb_includes="-I$dir/build_unix"
        bdb_libs="-L$dir/build_unix -ldb"
	bdb_libs_with_path="$dir/build_unix/libdb.a"
      else
        bdb_dir_ok="$bdb_version_ok"
      fi
    else
      bdb_dir_ok="'$dir' doesn't look like a BDB directory ($bdb_dir_ok)"
    fi
  fi

      case $bdb_dir_ok in
        source ) mode=compile ;;
        installed ) mode=yes ;;
        * ) { { echo "$as_me:14080: error: didn't find valid BerkeleyDB: $bdb_dir_ok" >&5
echo "$as_me: error: didn't find valid BerkeleyDB: $bdb_dir_ok" >&2;}
   { (exit 1); exit 1; }; } ;;
      esac
      ;;
    search-* )

  bdb_dir_ok="no BerkeleyDB found"

  for test_dir in $srcdir/bdb $srcdir/db-*.*.* /usr/local/BerkeleyDB*; do

  dir="$test_dir"

  inc="$dir/include"
  lib="$dir/lib"
  if test -f "$inc/db.h"
  then

  db_major=`sed -e '/^.*#define[ 	]*DB_VERSION_MAJOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_minor=`sed -e '/^.*#define[ 	]*DB_VERSION_MINOR[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  db_patch=`sed -e '/^.*#define[ 	]*DB_VERSION_PATCH[ 	][ 	]*/ !d' -e 's///' $inc/db.h`
  test -z "$db_major" && db_major=0
  test -z "$db_minor" && db_minor=0
  test -z "$db_patch" && db_patch=0

  # This is ugly, but about as good as it can get
  mysql_bdb=
  if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  then
    mysql_bdb=h
  elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  then
    want_bdb_version="3.2.9a"	# hopefully this will stay up-to-date
    mysql_bdb=a
  fi

  if test -n "$mysql_bdb" && \
	grep "DB_VERSION_STRING.*:.*$mysql_bdb: " $inc/db.h > /dev/null
  then
    bdb_version_ok=yes
  else
    bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
    bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  fi

    if test X"$bdb_version_ok" = Xyes; then
      save_LDFLAGS="$LDFLAGS"
      LDFLAGS="-L$lib $LDFLAGS"
      echo "$as_me:14128: checking for db_env_create in -ldb" >&5
echo $ECHO_N "checking for db_env_create in -ldb... $ECHO_C" >&6
if test "${ac_cv_lib_db_db_env_create+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldb  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 14136 "configure"
#include "confdefs.h"

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

        bdb_dir_ok=installed

  case "$inc" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      inc="\$(top_builddir)/"`echo "$inc" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:14191: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$inc')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$inc" != "/"
  then
    inc=`echo $inc | sed -e 's,/$,,'`
  fi

  case "$lib" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      lib="\$(top_builddir)/"`echo "$lib" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:14211: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$lib')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$lib" != "/"
  then
    lib=`echo $lib | sed -e 's,/$,,'`
  fi

        bdb_includes="-I$inc"
        bdb_libs="-L$lib -ldb"
        bdb_libs_with_path="$lib/libdb.a"

fi

      LDFLAGS="$save_LDFLAGS"
    else
      bdb_dir_ok="$bdb_version_ok"
    fi
  else
    bdb_dir_ok="no db.h file in '$inc'"
  fi

  if test X"$bdb_dir_ok" != Xinstalled; then
    # test to see if it's a source dir
    rel="$dir/dist/RELEASE"
    if test -f "$rel"; then

  db_major=`sed -e '/^DB_VERSION_MAJOR=/ !d' -e 's///' $rel`
  db_minor=`sed -e '/^DB_VERSION_MINOR=/ !d' -e 's///' $rel`
  db_patch=`sed -e '/^DB_VERSION_PATCH=/ !d' -e 's///' $rel`
  test -z "$db_major" && db_major=0
  test -z "$db_minor" && db_minor=0
  test -z "$db_patch" && db_patch=0

  # This is ugly, but about as good as it can get
  mysql_bdb=
  if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  then
    mysql_bdb=h
  elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  then
    want_bdb_version="3.2.9a"	# hopefully this will stay up-to-date
    mysql_bdb=a
  fi

  if test -n "$mysql_bdb" && \
	grep "DB_VERSION_STRING.*:.*$mysql_bdb: " $rel > /dev/null
  then
    bdb_version_ok=yes
  else
    bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
    bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  fi

      if test X"$bdb_version_ok" = Xyes; then
        bdb_dir_ok=source
        bdb="$dir"

  case "$dir" in
    /* ) ;;		# don't do anything with an absolute path
    "$srcdir"/* )
      # If BDB is under the source directory, we need to look under the
      # build directory for bdb/build_unix.
      # NOTE: I'm being lazy, and assuming the user did not specify
      # something like --with-berkeley-db=bdb (it would be missing "./").
      dir="\$(top_builddir)/"`echo "$dir" | sed -e "s,^$srcdir/,,"`
      ;;
    * )
      { { echo "$as_me:14281: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" >&5
echo "$as_me: error: The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$dir')" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac
  if test X"$dir" != "/"
  then
    dir=`echo $dir | sed -e 's,/$,,'`
  fi

        bdb_includes="-I$dir/build_unix"
        bdb_libs="-L$dir/build_unix -ldb"
	bdb_libs_with_path="$dir/build_unix/libdb.a"
      else
        bdb_dir_ok="$bdb_version_ok"
      fi
    else
      bdb_dir_ok="'$dir' doesn't look like a BDB directory ($bdb_dir_ok)"
    fi
  fi

    if test X"$bdb_dir_ok" = Xsource || test X"$bdb_dir_ok" = Xinstalled; then
	case "$bdb" in
	"$srcdir/"* ) bdb=`echo "$bdb" | sed -e "s,^$srcdir/,,"` ;;
	esac
        break
    fi
  done

      case $bdb_dir_ok in
        source ) mode=compile ;;
        installed ) mode=yes ;;
        * )
          # not found
          case $mode in
            *-yes ) { { echo "$as_me:14316: error: no suitable BerkeleyDB found" >&5
echo "$as_me: error: no suitable BerkeleyDB found" >&2;}
   { (exit 1); exit 1; }; } ;;
            * ) mode=no ;;
          esac
         bdb_includes=
         bdb_libs=
	 bdb_libs_with_path=
          ;;
      esac
      ;;
    *)
      { { echo "$as_me:14328: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" >&5
echo "$as_me: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac

  case $mode in
    no )
      echo "$as_me:14336: result: Not using Berkeley DB" >&5
echo "${ECHO_T}Not using Berkeley DB" >&6
      ;;
    yes )
      have_berkeley_db="yes"
      echo "$as_me:14341: result: Using Berkeley DB in '$bdb_includes'" >&5
echo "${ECHO_T}Using Berkeley DB in '$bdb_includes'" >&6
      ;;
    compile )
      have_berkeley_db="$bdb"
      echo "$as_me:14346: result: Compiling Berekeley DB in '$have_berkeley_db'" >&5
echo "${ECHO_T}Compiling Berekeley DB in '$have_berkeley_db'" >&6
      ;;
    * )
      { { echo "$as_me:14350: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" >&5
echo "$as_me: error: impossible case condition '$mode': please report this to bugs@lists.mysql.com" >&2;}
   { (exit 1); exit 1; }; }
      ;;
  esac

# Check whether --with-innodb or --without-innodb was given.
if test "${with_innodb+set}" = set; then
  withval="$with_innodb"
  innodb="$withval"
else
  innodb=no
fi;

  echo "$as_me:14364: checking for Innodb" >&5
echo $ECHO_N "checking for Innodb... $ECHO_C" >&6

  have_innodb=no
  innodb_includes=
  innodb_libs=
  case "$innodb" in
    yes )
      echo "$as_me:14372: result: Using Innodb" >&5
echo "${ECHO_T}Using Innodb" >&6
      cat >>confdefs.h <<\EOF
#define HAVE_INNOBASE_DB 1
EOF

      have_innodb="yes"
      innodb_includes="-I../innobase/include"
      innodb_system_libs=""
      innodb_libs="\
 \$(top_builddir)/innobase/usr/libusr.a\
 \$(top_builddir)/innobase/odbc/libodbc.a\
 \$(top_builddir)/innobase/srv/libsrv.a\
 \$(top_builddir)/innobase/dict/libdict.a\
 \$(top_builddir)/innobase/que/libque.a\
 \$(top_builddir)/innobase/srv/libsrv.a\
 \$(top_builddir)/innobase/ibuf/libibuf.a\
 \$(top_builddir)/innobase/row/librow.a\
 \$(top_builddir)/innobase/pars/libpars.a\
 \$(top_builddir)/innobase/btr/libbtr.a\
 \$(top_builddir)/innobase/trx/libtrx.a\
 \$(top_builddir)/innobase/read/libread.a\
 \$(top_builddir)/innobase/usr/libusr.a\
 \$(top_builddir)/innobase/buf/libbuf.a\
 \$(top_builddir)/innobase/ibuf/libibuf.a\
 \$(top_builddir)/innobase/eval/libeval.a\
 \$(top_builddir)/innobase/log/liblog.a\
 \$(top_builddir)/innobase/fsp/libfsp.a\
 \$(top_builddir)/innobase/fut/libfut.a\
 \$(top_builddir)/innobase/fil/libfil.a\
 \$(top_builddir)/innobase/lock/liblock.a\
 \$(top_builddir)/innobase/mtr/libmtr.a\
 \$(top_builddir)/innobase/page/libpage.a\
 \$(top_builddir)/innobase/rem/librem.a\
 \$(top_builddir)/innobase/thr/libthr.a\
 \$(top_builddir)/innobase/com/libcom.a\
 \$(top_builddir)/innobase/sync/libsync.a\
 \$(top_builddir)/innobase/data/libdata.a\
 \$(top_builddir)/innobase/mach/libmach.a\
 \$(top_builddir)/innobase/ha/libha.a\
 \$(top_builddir)/innobase/dyn/libdyn.a\
 \$(top_builddir)/innobase/mem/libmem.a\
 \$(top_builddir)/innobase/sync/libsync.a\
 \$(top_builddir)/innobase/ut/libut.a\
 \$(top_builddir)/innobase/os/libos.a\
 \$(top_builddir)/innobase/ut/libut.a"

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

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

      ;;
    * )
      echo "$as_me:14474: result: Not using Innodb" >&5
echo "${ECHO_T}Not using Innodb" >&6
      ;;
  esac

# Check whether --with-gemini or --without-gemini was given.
if test "${with_gemini+set}" = set; then
  withval="$with_gemini"
  gemini="$withval"
else
  gemini=no
fi;

  echo "$as_me:14487: checking for Gemini DB" >&5
echo $ECHO_N "checking for Gemini DB... $ECHO_C" >&6

  have_gemini_db=no
  gemini_includes=
  gemini_libs=
  case "$gemini" in
    no)
      echo "$as_me:14495: result: Not using Gemini DB" >&5
echo "${ECHO_T}Not using Gemini DB" >&6
      ;;
    yes | default | *)
      have_gemini_db="yes"
      gemini_includes="-I../gemini/incl -I../gemini"
      gemini_libs="\
 ../gemini/api/libapi.a\
 ../gemini/db/libdb.a\
 ../gemini/dbut/libdbut.a"
      echo "$as_me:14505: result: Using Gemini DB" >&5
echo "${ECHO_T}Using Gemini DB" >&6
      ;;
  esac

# If we have threads generate some library functions and test programs
sql_server_dirs=
server_scripts=
thread_dirs=

sql_client_dirs="libmysql client"
linked_client_targets="linked_libmysql_sources"
CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS
if test "$THREAD_SAFE_CLIENT" != "no"
then
  sql_client_dirs="libmysql_r $sql_client_dirs"
  linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
  cat >>confdefs.h <<\EOF
#define THREAD_SAFE_CLIENT 1
EOF

fi

if test "$static_nss" = "1"
then
  CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
fi

if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
then
  cat >>confdefs.h <<\EOF
#define THREAD 1
EOF

fi

if test "$with_server" = "yes"
then
  # Avoid _PROGRAMS names
  THREAD_LPROGRAMS="test_thr_alarm test_thr_lock"

  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o"

  sql_server_dirs="strings dbug mysys extra regex isam merge myisam myisammrg heap sql"
  server_scripts="safe_mysqld mysql_install_db"
  if test X"$have_berkeley_db" != Xno; then
    if test X"$have_berkeley_db" != Xyes; then
      # we must build berkeley db from source
      sql_server_dirs="$have_berkeley_db $sql_server_dirs"

      echo "CONFIGURING FOR BERKELEY DB"
      bdb_conf_flags=
      if test $with_debug = "yes"
      then
        bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
      fi
      # NOTICE: if you're compiling BDB, it needs to be a SUBDIR
      # of $srcdir (i.e., you can 'cd $srcdir/$bdb').  It won't
      # work otherwise.
      if test -d "$bdb"; then :
      else
	# This should only happen when doing a VPATH build
	echo "NOTICE: I have to make the BDB directory: `pwd`:$bdb"
	mkdir "$bdb" || exit 1
      fi
      if test -d "$bdb"/build_unix; then :
      else
	# This should only happen when doing a VPATH build
	echo "NOTICE: I have to make the build_unix directory: `pwd`:$bdb/build_unix"
	mkdir "$bdb/build_unix" || exit 1
      fi
      rel_srcdir=
      case "$srcdir" in
	/* ) rel_srcdir="$srcdir" ;;
	* )  rel_srcdir="../../$srcdir" ;;
      esac
      (cd $bdb/build_unix && \
       sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) || \
	{ { echo "$as_me:14583: error: could not configure Berkeley DB" >&5
echo "$as_me: error: could not configure Berkeley DB" >&2;}
   { (exit 1); exit 1; }; }

      echo "END OF BERKELEY DB CONFIGURATION"
    fi

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

  else
    if test -d bdb; then :
    else
      mkdir bdb && mkdir bdb/build_unix
    fi

    if test -r bdb/build_unix/db.h; then :
    else
      cat <<EOF > bdb/build_unix/db.h

This file is a placeholder to fool make.  The way that automake
and GNU make work together causes some files to depend on this
header, even if we're not building with Berkeley DB.

Obviously, if this file *is* used, it'll break and hopefully we can find
out why this file was generated by ${top_srcdir}/configure instead of
the real db.h.

If you run into some problems because of this file, please use mysql_bug
to generate a bug report, and give the exact output of make and any
details you can think of.  Send the message to bugs@lists.mysql.com.

Thank you!

EOF
    fi
  fi

  if test X"$have_innodb" = Xyes
  then
    sql_server_dirs="innobase $sql_server_dirs"
    echo "CONFIGURING FOR INNODB"
    if test ! -d "innobase"; then
        # This should only happen when doing a VPATH build
        echo "NOTICE: I have to make the Innobase directory: `pwd`/innobase"
	mkdir "innobase" || exit 1
    fi
    rel_srcdir=
    case "$srcdir" in
	/* ) rel_srcdir="$srcdir" ;;
	* )  rel_srcdir="../$srcdir" ;;
    esac
    (cd innobase && sh $rel_srcdir/innobase/configure) \
    || { { echo "$as_me:14637: error: could not configure INNODB" >&5
echo "$as_me: error: could not configure INNODB" >&2;}
   { (exit 1); exit 1; }; }

    echo "END OF INNODB CONFIGURATION"
  fi

  if test "X$have_gemini_db" = "Xyes"; then
    sql_server_dirs="gemini $sql_server_dirs"
    echo "CONFIGURING FOR GEMINI DB"
    (cd gemini && sh ./configure) \
    || { { echo "$as_me:14648: error: could not configure Gemini DB" >&5
echo "$as_me: error: could not configure Gemini DB" >&2;}
   { (exit 1); exit 1; }; }

    echo "END OF GEMINI DB CONFIGURATION"

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

  fi
fi

if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
then
  if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
  then
    # MIT user level threads
    thread_dirs="mit-pthreads"
    cat >>confdefs.h <<\EOF
#define HAVE_mit_thread 1
EOF

    MT_INCLUDES="-I\$(top_srcdir)/mit-pthreads/include"

    if test -n "$OVERRIDE_MT_LD_ADD"
    then
      MT_LD_ADD="$OVERRIDE_MT_LD_ADD"
    else
      MT_LD_ADD="-L \$(top_srcdir)/mit-pthreads/obj/ -lpthread"
    fi

    echo ""
    echo "Configuring MIT Pthreads"
    # We will never install so installation paths are not needed.
    (cd mit-pthreads; sh ./configure)
    echo "End of MIT Pthreads configuration"
    echo ""
    LIBS="$MT_LD_ADD $LIBS"
  fi
fi

# IMPORTANT - do not modify LIBS past this line - this hack is the only way
# I know to add the static NSS magic if we have static NSS libraries with
# glibc - Sasha

if test "$static_nss" = "1"
then
 LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
 LIBS="$LIBS $STATIC_NSS_FLAGS"
fi

#if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
#then
  # MIT pthreads does now support connecting with unix sockets
  # AC_DEFINE(HAVE_THREADS_WITHOUT_SOCKETS)
#fi

# Some usefull subst

# Output results
ac_config_files="$ac_config_files Makefile extra/Makefile mysys/Makefile isam/Makefile strings/Makefile regex/Makefile heap/Makefile bdb/Makefile myisam/Makefile myisammrg/Makefile man/Makefile os2/Makefile readline/Makefile libmysql_r/Makefile libmysql/Makefile client/Makefile sql/Makefile sql/share/Makefile merge/Makefile dbug/Makefile scripts/Makefile include/Makefile sql-bench/Makefile tests/Makefile Docs/Makefile support-files/Makefile mysql-test/Makefile include/mysql_version.h"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
  (set) 2>&1 |
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \).
      sed -n \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:14790: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

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

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

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

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

as_executable_p="test -f"

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

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

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

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

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <bug-autoconf@gnu.org>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:14966: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:14985: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
#

  test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h

EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "extra/Makefile" ) CONFIG_FILES="$CONFIG_FILES extra/Makefile" ;;
  "mysys/Makefile" ) CONFIG_FILES="$CONFIG_FILES mysys/Makefile" ;;
  "isam/Makefile" ) CONFIG_FILES="$CONFIG_FILES isam/Makefile" ;;
  "strings/Makefile" ) CONFIG_FILES="$CONFIG_FILES strings/Makefile" ;;
  "regex/Makefile" ) CONFIG_FILES="$CONFIG_FILES regex/Makefile" ;;
  "heap/Makefile" ) CONFIG_FILES="$CONFIG_FILES heap/Makefile" ;;
  "bdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES bdb/Makefile" ;;
  "myisam/Makefile" ) CONFIG_FILES="$CONFIG_FILES myisam/Makefile" ;;
  "myisammrg/Makefile" ) CONFIG_FILES="$CONFIG_FILES myisammrg/Makefile" ;;
  "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
  "os2/Makefile" ) CONFIG_FILES="$CONFIG_FILES os2/Makefile" ;;
  "readline/Makefile" ) CONFIG_FILES="$CONFIG_FILES readline/Makefile" ;;
  "libmysql_r/Makefile" ) CONFIG_FILES="$CONFIG_FILES libmysql_r/Makefile" ;;
  "libmysql/Makefile" ) CONFIG_FILES="$CONFIG_FILES libmysql/Makefile" ;;
  "client/Makefile" ) CONFIG_FILES="$CONFIG_FILES client/Makefile" ;;
  "sql/Makefile" ) CONFIG_FILES="$CONFIG_FILES sql/Makefile" ;;
  "sql/share/Makefile" ) CONFIG_FILES="$CONFIG_FILES sql/share/Makefile" ;;
  "merge/Makefile" ) CONFIG_FILES="$CONFIG_FILES merge/Makefile" ;;
  "dbug/Makefile" ) CONFIG_FILES="$CONFIG_FILES dbug/Makefile" ;;
  "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
  "sql-bench/Makefile" ) CONFIG_FILES="$CONFIG_FILES sql-bench/Makefile" ;;
  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
  "Docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES Docs/Makefile" ;;
  "support-files/Makefile" ) CONFIG_FILES="$CONFIG_FILES support-files/Makefile" ;;
  "mysql-test/Makefile" ) CONFIG_FILES="$CONFIG_FILES mysql-test/Makefile" ;;
  "include/mysql_version.h" ) CONFIG_FILES="$CONFIG_FILES include/mysql_version.h" ;;
  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
  *) { { echo "$as_me:15060: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@MYSQL_NO_DASH_VERSION@,$MYSQL_NO_DASH_VERSION,;t t
s,@MYSQL_BASE_VERSION@,$MYSQL_BASE_VERSION,;t t
s,@MYSQL_VERSION_ID@,$MYSQL_VERSION_ID,;t t
s,@PROTOCOL_VERSION@,$PROTOCOL_VERSION,;t t
s,@DOT_FRM_VERSION@,$DOT_FRM_VERSION,;t t
s,@SHARED_LIB_VERSION@,$SHARED_LIB_VERSION,;t t
s,@AVAILABLE_LANGUAGES@,$AVAILABLE_LANGUAGES,;t t
s,@AVAILABLE_LANGUAGES_ERRORS@,$AVAILABLE_LANGUAGES_ERRORS,;t t
/@AVAILABLE_LANGUAGES_ERRORS_RULES@/r $AVAILABLE_LANGUAGES_ERRORS_RULES
s,@AVAILABLE_LANGUAGES_ERRORS_RULES@,,;t t
s,@SYSTEM_TYPE@,$SYSTEM_TYPE,;t t
s,@MACHINE_TYPE@,$MACHINE_TYPE,;t t
s,@CONF_COMMAND@,$CONF_COMMAND,;t t
s,@SAVE_CFLAGS@,$SAVE_CFLAGS,;t t
s,@SAVE_CXXFLAGS@,$SAVE_CXXFLAGS,;t t
s,@SAVE_LDFLAGS@,$SAVE_LDFLAGS,;t t
s,@SAVE_CXXLDFLAGS@,$SAVE_CXXLDFLAGS,;t t
s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
s,@LOCAL_TRUE@,$LOCAL_TRUE,;t t
s,@LOCAL_FALSE@,$LOCAL_FALSE,;t t
s,@AWK@,$AWK,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@CPP@,$CPP,;t t
s,@AS@,$AS,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LN_S@,$LN_S,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@YACC@,$YACC,;t t
s,@PDFMANUAL@,$PDFMANUAL,;t t
s,@uname_prog@,$uname_prog,;t t
s,@LD@,$LD,;t t
s,@MYSQLD_DEFAULT_SWITCHES@,$MYSQLD_DEFAULT_SWITCHES,;t t
s,@IS_LINUX@,$IS_LINUX,;t t
s,@LN@,$LN,;t t
s,@LN_CP_F@,$LN_CP_F,;t t
s,@MV@,$MV,;t t
s,@RM@,$RM,;t t
s,@CP@,$CP,;t t
s,@SED@,$SED,;t t
s,@CMP@,$CMP,;t t
s,@CHMOD@,$CHMOD,;t t
s,@HOSTNAME@,$HOSTNAME,;t t
s,@TAR@,$TAR,;t t
s,@PERL@,$PERL,;t t
s,@PERL5@,$PERL5,;t t
s,@PS@,$PS,;t t
s,@FIND_PROC@,$FIND_PROC,;t t
s,@KILL@,$KILL,;t t
s,@CHECK_PID@,$CHECK_PID,;t t
s,@NOINST_LDFLAGS@,$NOINST_LDFLAGS,;t t
s,@MYSQL_SERVER_SUFFIX@,$MYSQL_SERVER_SUFFIX,;t t
s,@ASSEMBLER_x86_TRUE@,$ASSEMBLER_x86_TRUE,;t t
s,@ASSEMBLER_x86_FALSE@,$ASSEMBLER_x86_FALSE,;t t
s,@ASSEMBLER_sparc_TRUE@,$ASSEMBLER_sparc_TRUE,;t t
s,@ASSEMBLER_sparc_FALSE@,$ASSEMBLER_sparc_FALSE,;t t
s,@ASSEMBLER_TRUE@,$ASSEMBLER_TRUE,;t t
s,@ASSEMBLER_FALSE@,$ASSEMBLER_FALSE,;t t
s,@MYSQL_UNIX_ADDR@,$MYSQL_UNIX_ADDR,;t t
s,@MYSQL_TCP_PORT@,$MYSQL_TCP_PORT,;t t
s,@MYSQL_TCP_PORT_DEFAULT@,$MYSQL_TCP_PORT_DEFAULT,;t t
s,@MYSQLD_USER@,$MYSQLD_USER,;t t
s,@GETCONF@,$GETCONF,;t t
s,@ac_ct_GETCONF@,$ac_ct_GETCONF,;t t
s,@WRAPLIBS@,$WRAPLIBS,;t t
s,@LIBDL@,$LIBDL,;t t
s,@MYSQLD_EXTRA_LDFLAGS@,$MYSQLD_EXTRA_LDFLAGS,;t t
s,@CLIENT_EXTRA_LDFLAGS@,$CLIENT_EXTRA_LDFLAGS,;t t
s,@LIB_EXTRA_CCFLAGS@,$LIB_EXTRA_CCFLAGS,;t t
s,@LM_CFLAGS@,$LM_CFLAGS,;t t
s,@COMPILATION_COMMENT@,$COMPILATION_COMMENT,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@MAKE_SHELL@,$MAKE_SHELL,;t t
s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
s,@docs_dirs@,$docs_dirs,;t t
s,@bench_dirs@,$bench_dirs,;t t
s,@readline_dir@,$readline_dir,;t t
s,@readline_link@,$readline_link,;t t
s,@default_charset@,$default_charset,;t t
s,@CHARSET_SRCS@,$CHARSET_SRCS,;t t
s,@CHARSET_OBJS@,$CHARSET_OBJS,;t t
s,@CHARSETS_NEED_SOURCE@,$CHARSETS_NEED_SOURCE,;t t
s,@bdb_includes@,$bdb_includes,;t t
s,@bdb_libs@,$bdb_libs,;t t
s,@bdb_libs_with_path@,$bdb_libs_with_path,;t t
s,@innodb_includes@,$innodb_includes,;t t
s,@innodb_libs@,$innodb_libs,;t t
s,@innodb_system_libs@,$innodb_system_libs,;t t
s,@gemini_includes@,$gemini_includes,;t t
s,@gemini_libs@,$gemini_libs,;t t
s,@CLIENT_LIBS@,$CLIENT_LIBS,;t t
s,@sql_client_dirs@,$sql_client_dirs,;t t
s,@linked_client_targets@,$linked_client_targets,;t t
s,@THREAD_LPROGRAMS@,$THREAD_LPROGRAMS,;t t
s,@THREAD_LOBJECTS@,$THREAD_LOBJECTS,;t t
s,@MT_INCLUDES@,$MT_INCLUDES,;t t
s,@MT_LD_ADD@,$MT_LD_ADD,;t t
s,@sql_server_dirs@,$sql_server_dirs,;t t
s,@thread_dirs@,$thread_dirs,;t t
s,@server_scripts@,$server_scripts,;t t
s,@GXX@,$GXX,;t t
CEOF

EOF

  cat >>$CONFIG_STATUS <<\EOF
  # Split the substitutions into bite-sized pieces for seds with
  # small command number limits, like on Digital OSF/1 and HP-UX.
  ac_max_sed_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # Line after last line for current file.
  ac_more_lines=:
  ac_sed_cmds=
  while $ac_more_lines; do
    if test $ac_beg -gt 1; then
      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:15392: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:15410: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:15423: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

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

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:15484: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:15495: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:15508: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# And first: Protect against being on the right side of a sed subst in
# config.status.  Protect against being in an unquoted here document
# in config.status.
rm -f conftest.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t end
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed

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

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated automatically by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
      { echo "$as_me:15625: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`

  case $ac_dest in
    default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
echo
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
echo "latest release, upcoming features, and other information to make your"
echo "work or play with MySQL more productive. There you can also find"
echo "information about mailing lists for MySQL discussion."
echo
echo "Remember to check the platform specific part in the reference manual for"
echo "hints about installing on your platfrom. See the Docs directory."
echo
# The following text is checked in ./Do-compile to se that the configure ends.
echo "Thank you for choosing MySQL!"
echo
