#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for ncbi-tools++ 0.0.
#
# Report bugs to <cpp-core@ncbi.nlm.nih.gov>.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh

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


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# 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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    for as_base in sh ksh sh5 bash; do
      as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
         /*)
           if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
             CONFIG_SHELL=$as_dir/$as_base
             export CONFIG_SHELL
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
           fi;;
         esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


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

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

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_executable_p="test -f"

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

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


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

# CDPATH.
$as_unset 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
ac_config_libobj_dir=.
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}

# Identity of this package.
PACKAGE_NAME='ncbi-tools++'
PACKAGE_TARNAME='ncbi-tools--'
PACKAGE_VERSION='0.0'
PACKAGE_STRING='ncbi-tools++ 0.0'
PACKAGE_BUGREPORT='cpp-core@ncbi.nlm.nih.gov'

ac_unique_file="src/build-system/Makefile.mk.in"
# 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"

ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROJECTS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX MT_SFX DLL DLL_LIB_SETTING IF_WITH_DLL UNLESS_WITH_DLL STATIC USUAL_AND_DLL USUAL_AND_LIB LN_S RANLIB ac_ct_RANLIB AR STRIP DISTCC CCACHE TAIL EGREP VALGRIND_PATH CXXCPP TCHECK_CL AMQ CPP Z_INCLUDE Z_LIBS BZ2_INCLUDE BZ2_LIBS LZO_INCLUDE LZO_LIBS PCRE_INCLUDE PCRE_LIBS LIBGNUTLS_CONFIG GNUTLS_INCLUDE GNUTLS_LIBS OPENSSL_INCLUDE OPENSSL_LIBS FTDS64_INCLUDE FTDS64_LIBS FTDS64_LIB FTDS64_CTLIB_INCLUDE FTDS64_CTLIB_LIBS FTDS64_CTLIB_LIB FTDS_INCLUDE FTDS_LIBS FTDS_LIB freetds ftds64 mysql_config PYTHON PYTHON_INCLUDE PYTHON_LIBS PYTHON23 PYTHON23_INCLUDE PYTHON23_LIBS PYTHON24 PYTHON24_INCLUDE PYTHON24_LIBS PYTHON25 PYTHON25_INCLUDE PYTHON25_LIBS _ACJNI_JAVAC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS wxconf EXPAT_INCLUDE EXPAT_LIBS SABLOT_INCLUDE SABLOT_LIBS LIBXML_INCLUDE LIBXML_LIBS LIBXSLT_INCLUDE LIBXSLT_LIBS XSLTPROC SQLITE3_INCLUDE SQLITE3_LIBS OECHEM_INCLUDE OECHEM_LIBS SGE_INCLUDE SGE_LIBS MUPARSER_INCLUDE MUPARSER_LIBS HDF5_INCLUDE HDF5_LIBS JPEG_INCLUDE JPEG_LIBS PNG_INCLUDE PNG_LIBS TIFF_INCLUDE TIFF_LIBS UNGIF_INCLUDE UNGIF_LIBS GIF_INCLUDE GIF_LIBS XPM_INCLUDE XPM_LIBS freetype_config MAGIC_INCLUDE MAGIC_LIBS CURL_INCLUDE CURL_LIBS signature build_root top_srcdir srcdir status_dir builddir runpath ncbi_runpath c_ncbi_runpath LINK C_LINK TAIL_N EGREP_Q FAST_CFLAGS FAST_CXXFLAGS OBJCXX_CXXFLAGS DEPFLAGS DEPFLAGS_POST FAST_LDFLAGS APP_LDFLAGS DLL_LDFLAGS C_LIBS OBJCXX_LIBS GCCPCH RUNPATH_ORIGIN NO_STRICT_ALIASING D_SFX DEBUG_SFX LIB_OR_DLL FORCE_STATIC_LIB APP_LIB_SETTING APP_LIBS_SETTING LINK_DLL has_dll_loadable LINK_LOADABLE CFLAGS_DLL CXXFLAGS_DLL ALLOW_UNDEF FORBID_UNDEF OPT_GROUPS local_lbsm ncbi_crypt CONNEXT XCONNEXT serial bdb dbapi objects gui algo app internal sra check CHECK_ARG CHECK_TOOLS CHECK_TIMEOUT_MULT CHECK_OS_NAME FEATURES script_shell make_shell obj_ext lib_pre lib_l_pre lib_ext dll_ext loadable_ext lib_l_ext exe_ext f_compile f_outobj f_outlib f_libpath f_runpath f_outexe BDB_LIB BDB_CACHE_LIB DBAPI_DRIVER DBAPI_CTLIB DBAPI_DBLIB DBAPI_MYSQL DBAPI_ODBC THREAD_LIBS NCBIATOMIC_LIB NETWORK_LIBS NETWORK_PURE_LIBS RESOLVER_LIBS MATH_LIBS KSTAT_LIBS RPCSVC_LIBS CRYPT_LIBS DL_LIBS RT_LIBS UUID_LIBS DEMANGLE_LIBS ICONV_LIBS Z_LIB BZ2_LIB PCREPOSIX_LIBS PCRE_LIB OPENSSL_STATIC_LIBS TLS_INCLUDE TLS_LIBS SYBASE_PATH SYBASE_LCL_PATH SYBASE_INCLUDE SYBASE_LIBS SYBASE_DLLS SYBASE_DBLIBS MYSQL_INCLUDE MYSQL_LIBS BERKELEYDB_INCLUDE BERKELEYDB_LIBS BERKELEYDB_STATIC_LIBS BERKELEYDB_CXX_LIBS BERKELEYDB_CXX_STATIC_LIBS ODBC_INCLUDE ODBC_LIBS BOOST_INCLUDE BOOST_LIBPATH BOOST_TAG BOOST_REGEX_LIBS BOOST_REGEX_STATIC_LIBS BOOST_TEST_PEM_LIBS BOOST_TEST_PEM_STATIC_LIBS BOOST_TEST_TEM_LIBS BOOST_TEST_TEM_STATIC_LIBS BOOST_TEST_UTF_LIBS BOOST_TEST_UTF_STATIC_LIBS BOOST_THREAD_LIBS BOOST_THREAD_STATIC_LIBS NCBI_C_INCLUDE NCBI_C_LIBPATH OPENGL_INCLUDE OPENGL_LIBS OPENGL_STATIC_LIBS OSMESA_INCLUDE OSMESA_LIBS OSMESA_STATIC_LIBS GLUT_INCLUDE GLUT_LIBS GLEW_INCLUDE GLEW_LIBS GLEW_STATIC_LIBS FLTK_INCLUDE FLTK_LIBS FLTK_LIBS_GL FLTK_LIBS_IMAGES FLTK_LIBS_ALL FLTK_STATIC_LIBS FLTK_STATIC_LIBS_GL FLTK_STATIC_LIBS_IMAGES FLTK_STATIC_LIBS_ALL FLTK_CONFIG WXWIDGETS_INCLUDE WXWIDGETS_LIBS WXWIDGETS_STATIC_LIBS WXWIDGETS_GL_LIBS WXWIDGETS_GL_STATIC_LIBS WXWIDGETS_POST_LINK FASTCGI_INCLUDE FASTCGI_LIBS FASTCGI_OBJS NCBI_SSS_INCLUDE NCBI_SSS_LIBPATH LIBSSSUTILS LIBSSSDB sssutils SP_INCLUDE SP_LIBS ORBACUS_INCLUDE ORBACUS_LIBPATH LIBOB LIBIMR ICU_CONFIG ICU_INCLUDE ICU_LIBS ICU_STATIC_LIBS EXPAT_STATIC_LIBS SABLOT_STATIC_LIBS LIBXML_STATIC_LIBS LIBXSLT_STATIC_LIBS XERCES_INCLUDE XERCES_LIBS XERCES_STATIC_LIBS XALAN_INCLUDE XALAN_LIBS XALAN_STATIC_LIBS SQLITE3_STATIC_LIBS FREETYPE_INCLUDE FREETYPE_LIBS ncbi_xreader_pubseqos ncbi_xreader_pubseqos2 UNLESS_PUBSEQOS JDK_PATH JDK_INCLUDE ncbi_java NCBI_C_ncbi BINCOPY APP_NOCOPY APP_OR_NULL IF_REBUILDING_LIBS IF_REBUILDING_CONDITIONALLY IF_DEACTIVATING configurables_mfname CC_FILTER CXX_FILTER AR_FILTER LINK_FILTER CC_WRAPPER CXX_WRAPPER AR_WRAPPER LINK_WRAPPER KeepStateTarget Rules serial_ws50_rtti_kludge ncbicntr UNIX_SRC UNIX_USR_PROJ compiler compiler_root compiler_version COMPILER OSTYPE NCBI_PLATFORM_BITS LIBOBJS LTLIBOBJS'
ac_subst_files=''

# 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'

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 | -n)
    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 directory name 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 directory name 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.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: To remove some day.
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_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$0" : 'X\(//\)[^/]' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$0" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  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 ($ac_unique_file) in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
   { (exit 1); exit 1; }; }
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_CXXCPP_set=${CXXCPP+set}
ac_env_CXXCPP_value=$CXXCPP
ac_cv_env_CXXCPP_set=${CXXCPP+set}
ac_cv_env_CXXCPP_value=$CXXCPP
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 <<_ACEOF
\`configure' configures ncbi-tools++ 0.0 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 \`..']

_ACEOF

  cat <<_ACEOF
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]
_ACEOF

  cat <<\_ACEOF

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of ncbi-tools++ 0.0:";;
   esac
  cat <<\_ACEOF

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
===============================================================================
=============== NCBI C++ Toolkit specific configuration flags =================
 --without-debug         build non-debug versions of libs and apps
 --with-symbols          retain debugging symbols in non-debug mode
 --without-optimization  turn off optimization flags in non-debug mode
 --with-profiling        build profiled versions of libs and apps
 --with-tcheck(=DIR)     build for Intel Thread Checker (in DIR)
 --with-dll              build all libraries as DLLs
 --with-static           build all libraries statically even if --with-dll
 --with-static-exe       build all executables as statically as possible
 --with-plugin-auto-load always enable the plugin manager by default
 --with-bundles          build bundles in addition to dylibs on Mac OS X
 --with-bin-release      build executables suitable for public release
 --with-mt               compile in a MultiThread-safe manner
 --with-64               compile to 64-bit code
 --with-universal        build universal binaries on Mac OS X
 --with-universal=CPUs   build universal binaries targeting the given CPUs
 --without-exe           do not build executables
 --with-runpath=PATH     specify the usual runtime path to DLLs
 --with-relative-runpath=P specify an executable-relative DLL search path
 --with-hard-runpath     hard-code runtime path, ignoring LD_LIBRARY_PATH
 --with-lfs              enable large file support to the extent possible
 --with-extra-action=    script to call after the configuration is complete
 --with-autodep          automatic generation of dependencies (GNU make)
 --with-build-root=DIR   specify a non-default build directory name
 --with-fake-root=DIR    appear to have been built under DIR
 --without-suffix        no Release/Debug, MT or DLL sfx in the build dir name
 --with-hostspec         add full host specs to the build dir name
 --without-version       don't always include the cplr ver in the bd name
 --with-build-root-sfx=X add a user-specified suffix to the build dir name
 --without-execopy       do not copy built executables to the BIN area
 --with-bincopy          populate lib and bin with copies, not hard links
 --with-lib-rebuilds     ensure that apps use up-to-date libraries
 --with-lib-rebuilds=ask ask whether to update each app's libraries
 --without-deactivation  keep old copies of libraries that no longer build
 --without-makefile-auto-update  do not auto-update generated makefiles
 --with-projects=FILE    build projects listed in FILE by default
 --without-flat-makefile do not generate an all-encompassing flat makefile
 --with-configure-dialog allow interactive flat makefile project selection
 --with-saved-settings=F load configuration settings from the file F
 --with-check            run test suite after the build
 --with-check-tools=...  use the specified tools for testing
 --with-ncbi-public      ensure compatibility for all in-house platforms
 --with-strip            strip binaries at build time
 --with-pch              use precompiled headers if possible
 --with-caution          cancel configuration unconditionally when in doubt
 --without-caution       proceed without asking when in doubt
 --without-ccache        do not automatically use ccache if available
 --without-distcc        do not automatically use distcc if available
 --without-ncbi-c        do not use NCBI C Toolkit
 --without-sss           do not use NCBI SSS libraries
 --without-utils         do not use NCBI SSS UTIL library
 --without-sssdb         do not use NCBI SSS DB library
 --with-included-sss     use the in-tree copy of SSS
 --with-z=DIR            use zlib installation in DIR
 --without-z             use internal copy of zlib
 --with-bz2=DIR          use bzlib installation in DIR
 --without-bz2           use internal copy of bzlib
 --with-lzo=DIR          use LZO installation in DIR (requires 2.x or up)
 --without-lzo           do not use LZO
 --with-pcre=DIR         use PCRE installation in DIR
 --without-pcre          use internal copy of PCRE
 --with-gnutls=DIR       use GNUTLS installation in DIR
 --without-gnutls        do not use GNUTLS
 --with-openssl=DIR      use OpenSSL installation in DIR
 --without-openssl       do not use OpenSSL
 --without-sybase        do not use SYBASE libraries
 --with-sybase-local=DIR use local SYBASE install (DIR is optional)
 --with-sybase-new       use newer SYBASE install (12.5 rather than 12.0)
 --without-ftds          do not use FreeTDS libraries
 --with-ftds=DIR         use FreeTDS installation in DIR
 --without-ftds-renamed  do not rename Sybase DBLIB symbols in built-in FTDS
 --without-mysql         do not use MySQL
 --with-mysql=DIR        use MySQL installation in DIR
 --without-fltk          do not use FLTK
 --with-fltk=DIR         use FLTK installation in DIR
 --without-opengl        do not use OpenGL
 --with-opengl=DIR       use OpenGL installation in DIR
 --without-mesa          do not use MESA off-screen OpenGL
 --with-mesa=DIR         use MESA installation in DIR
 --without-glut          do not use GLUT
 --with-glut=DIR         use GLUT installation in DIR
 --without-glew          do not use GLEW
 --with-glew=DIR         use GLEW installation in DIR
 --with-glew-mx          insist on a multi-context-ready GLEW installation
 --without-wxwidgets     do not use wxWidgets (2.6+)
 --with-wxwidgets=DIR    use wxWidgets installation in DIR
 --with-wxwidgets-ucs    use Unicode builds of wxWidgets
 --without-wxwidgets-ucs do not use Unicode builds of wxWidgets
 --without-freetype      do not use FreeType
 --with-freetype=DIR     use FreeType installation in DIR
 --without-fastcgi       do not use Fast-CGI library
 --with-fastcgi=VERSION  use Fast-CGI installation in \$NCBI/fcgi-VERSION
 --with-fastcgi=DIR      use Fast-CGI installation in DIR
 --without-bdb           do not use Berkeley DB library
 --with-bdb=VERSION      use DB installation in \$NCBI/BerkeleyDB-VERSION
 --with-bdb=DIR          use Berkeley DB installation in DIR
 --without-sp            do not use SP libraries
 --without-orbacus       do not use ORBacus CORBA libraries
 --with-orbacus=DIR      use ORBacus installation in DIR
 --with-odbc=DIR         use ODBC installation in DIR
 --with-python=DIR       use Python installation in DIR
 --without-python        do not use Python
 --with-jni(=JDK-DIR)    build Java bindings (against the JDK in JDK-DIR)
 --with-boost=DIR        use Boost installation in DIR
 --without-boost         do not use Boost
 --with-boost-tag=TAG    use TAG as the tag appended to Boost library names
 --without-boost-tag     use untagged Boost library names
 --with-sqlite3=DIR      use SQLite 3.x installation in DIR
 --without-sqlite3,      do not use SQLite 3.x
 --with-icu=DIR          use ICU installation in DIR
 --without-icu,          do not use ICU
 --with-expat=DIR        use Expat installation in DIR
 --without-expat,        do not use Expat
 --with-sablot=DIR       use Sablotron installation in DIR
 --without-sablot,       do not use Sablotron
 --with-libxml=DIR       use libxml2 installation in DIR
 --without-libxml        do not use libxml2
 --with-libxslt=DIR      use libxslt installation in DIR
 --without-libxslt       do not use libxstl
 --with-xerces=DIR       use Xerces-C++ installation in DIR
 --without-xerces,       do not use Xerces-C++
 --with-xalan=DIR        use Xalan-C++ installation in DIR
 --without-xalan,        do not use Xalan-C++
 --with-oechem=DIR       use OpenEye OEChem installation in DIR
 --without-oechem        do not use OEChem
 --with-sge=DIR          use Sun Grid Engine installation in DIR
 --without-sge           do not use Sun Grid Engine
 --with-muparser=DIR     use muParser installation in DIR
 --without-muparser      do not use muParser
 --with-hdf5=DIR         use HDF5 installation in DIR
 --without-hdf5          do not use HDF5
 --with-gif=DIR          use lib(un)gif installation in DIR
 --without-gif           do not use lib(un)gif
 --with-jpeg=DIR         use libjpeg installation in DIR
 --without-jpeg          do not use libjpeg
 --with-png=DIR          use libpng installation in DIR
 --without-png           do not use libpng
 --with-tiff=DIR         use libtiff installation in DIR
 --without-tiff          do not use libtiff
 --with-xpm=DIR          use libXpm installation in DIR
 --without-xpm           do not use libXpm
 --with-magic=DIR        use libmagic installation in DIR
 --without-magic         do not use libmagic
 --with-curl=DIR         use libcurl installation in DIR
 --without-curl          do not use libcurl
 --with-3psw=std:netopt  favor standard (system) builds of the above pkgs.
 --without-3psw          do not use any of the above packages
 --without-local-lbsm    turn off support for IPC with locally running LBSMD
 --without-ncbi-crypt    use a dummy stubbed-out version of ncbi_crypt
 --without-connext       do not build non-public CONNECT library extensions
 --without-serial        do not build the serialization library and tools
 --without-objects       do not generate/build serializeable objects from ASNs
 --without-dbapi         do not build database connectivity libraries
 --without-app           do not build standalone applications like ID1_FETCH
 --without-ctools        do not build NCBI C Toolkit based projects
 --without-gui           do not build most graphical projects
 --without-algo          do not build CPU-intensive algorithms
 --without-internal      do not build internal projects
 --with-gbench           ensure that Genome Workbench can be built
 --without-gbench        do not build Genome Workbench
***** See also HTML documentation in ./doc/index.html *****
  --with-x                use the X Window System

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
  CXXCPP      C++ preprocessor
  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.

Report bugs to <cpp-core@ncbi.nlm.nih.gov>.
_ACEOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d $ac_dir || continue
    #ac_builddir=. # Useless!
ac_builddir=$builddir
if test -n "$ac_file_in"; then
   ac_dir_in=`(dirname "$ac_file_in") 2>/dev/null ||
$as_expr X"$ac_file_in" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file_in" : 'X\(//\)[^/]' \| \
	 X"$ac_file_in" : 'X\(//\)$' \| \
	 X"$ac_file_in" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file_in" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
else
   ac_dir_in="$ac_dir"
fi

if test $ac_dir_in != .; then
  ac_dir_suffix=`echo $ac_dir_in | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=../`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir/$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir/$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case $builddir in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=$builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=$builddir/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_dir_in in
.) ac_abs_top_srcdir=$real_srcdir;;
*)
  case $real_srcdir in
  .) ac_abs_top_srcdir=$ac_dir_in;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$real_srcdir;;
  *) ac_abs_top_srcdir=$ac_dir_in/$real_srcdir;;
  esac;;
esac
case $ac_abs_top_srcdir in
.) ac_abs_srcdir=$ac_dir_suffix;;
*)
  case $ac_dir_suffix in
  .) ac_abs_srcdir=$ac_abs_top_srcdir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_dir_suffix;;
  *) ac_abs_srcdir=$ac_abs_top_srcdir/$ac_dir_suffix;;
  esac;;
esac

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

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF
ncbi-tools++ configure 0.0
generated by GNU Autoconf 2.59

Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit 0
fi


# Check --with-3psw=.../--without-3psw early because a lot hinges on it
orig_NCBI=$NCBI
case "$with_3psw" in
   '' | yes | [\$/][Nn]*:[SsLl]* | [Nn]*:[SsLl]* )
      ncbi_favor_std_packages=no
      ;;
   [SsLl]*:* )
      ncbi_favor_std_packages=yes
      ;;
   [SsLl]* )
      $as_unset NCBI || test "${NCBI+set}" != set || { NCBI=; export NCBI; }
      ;;
   no )
      if test "${with_ncbi_c-no}" != "no"; then
         { echo "$as_me: error: incompatible options: --with-ncbi-c but --without-3psw" >&2
   { (exit 1); exit 1; }; }
      else
         with_ncbi_c=no
      fi
      if test "${with_sss-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sss but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sss=no
         fi
        if test "${with_sssutils-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sssutils but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sssutils=no
         fi
        if test "${with_sssdb-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sssdb but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sssdb=no
         fi
        if test "${with_z-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-z but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_z=no
         fi
        if test "${with_bz2-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-bz2 but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_bz2=no
         fi
        if test "${with_lzo-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-lzo but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_lzo=no
         fi
        if test "${with_pcre-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-pcre but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_pcre=no
         fi
        if test "${with_gnutls-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-gnutls but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_gnutls=no
         fi
        if test "${with_openssl-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-openssl but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_openssl=no
         fi
        if test "${with_sybase-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sybase but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sybase=no
         fi
        if test "${with_ftds-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-ftds but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_ftds=no
         fi
        if test "${with_mysql-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-mysql but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_mysql=no
         fi
        if test "${with_fltk-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-fltk but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_fltk=no
         fi
        if test "${with_opengl-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-opengl but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_opengl=no
         fi
        if test "${with_mesa-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-mesa but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_mesa=no
         fi
        if test "${with_glut-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-glut but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_glut=no
         fi
        if test "${with_glew-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-glew but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_glew=no
         fi
        if test "${with_wxwidgets-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-wxwidgets but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_wxwidgets=no
         fi
        if test "${with_freetype-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-freetype but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_freetype=no
         fi
        if test "${with_fastcgi-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-fastcgi but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_fastcgi=no
         fi
        if test "${with_bdb-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-bdb but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_bdb=no
         fi
        if test "${with_sp-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sp but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sp=no
         fi
        if test "${with_orbacus-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-orbacus but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_orbacus=no
         fi
        if test "${with_odbc-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-odbc but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_odbc=no
         fi
        if test "${with_python-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-python but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_python=no
         fi
        if test "${with_jni-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-jni but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_jni=no
         fi
        if test "${with_boost-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-boost but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_boost=no
         fi
        if test "${with_sqlite3-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sqlite3 but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sqlite3=no
         fi
        if test "${with_icu-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-icu but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_icu=no
         fi
        if test "${with_expat-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-expat but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_expat=no
         fi
        if test "${with_sablot-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sablot but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sablot=no
         fi
        if test "${with_libxml-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-libxml but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_libxml=no
         fi
        if test "${with_libxslt-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-libxslt but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_libxslt=no
         fi
        if test "${with_xerces-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-xerces but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_xerces=no
         fi
        if test "${with_xalan-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-xalan but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_xalan=no
         fi
        if test "${with_oechem-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-oechem but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_oechem=no
         fi
        if test "${with_sge-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-sge but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_sge=no
         fi
        if test "${with_muparser-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-muparser but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_muparser=no
         fi
        if test "${with_hdf5-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-hdf5 but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_hdf5=no
         fi
        if test "${with_gif-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-gif but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_gif=no
         fi
        if test "${with_jpeg-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-jpeg but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_jpeg=no
         fi
        if test "${with_png-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-png but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_png=no
         fi
        if test "${with_tiff-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-tiff but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_tiff=no
         fi
        if test "${with_xpm-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-xpm but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_xpm=no
         fi
        if test "${with_magic-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-magic but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_magic=no
         fi
        if test "${with_curl-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-curl but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_curl=no
         fi

      $as_unset NCBI || test "${NCBI+set}" != set || { NCBI=; export NCBI; }
      ;;
   * )
      { echo "$as_me: error: Unsupported option --with-3psw=$with_3psw" >&2
   { (exit 1); exit 1; }; }
      ;;
esac

if $srcdir/scripts/common/impl/get_lock.sh configure $$; then
    ac_clean_files=configure.lock
else
    exit 1
fi
# reconfigure.sh expects config.cache to exist; unconditionally clobber
# any command-line setting.
cache_file=config.cache
if test -z "$CONFIG_SITE" -a -r $srcdir/src/build-system/config.site; then
    CONFIG_SITE=$srcdir/src/build-system/config.site
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by ncbi-tools++ $as_me 0.0, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
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`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
    2)
      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
      # Get rid of the leading space.
      ac_sep=" "
      ;;
    esac
  done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }

# 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.
# WARNING: Be sure not to use single quotes in there, as some shells,
# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
    echo
    # 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;
}
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=$`echo $ac_var`
      echo "$ac_var='"'"'$ac_val'"'"'"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------- ##
## Output files. ##
## ------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=$`echo $ac_var`
	echo "$ac_var='"'"'$ac_val'"'"'"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      sed "/^$/d" confdefs.h | sort
      echo
    fi
    test "$ac_signal" != 0 &&
      echo "$as_me: caught signal $ac_signal"
    echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core &&
  rm -rf conftest* confdefs* 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

# Predefined preprocessor variables.






# 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:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
	{ echo "$as_me:$LINENO:   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.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:$LINENO: 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:$LINENO: 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































#############################################################################


#### Describe all "--with-*" arguments -- for the usage printout on "--help"

## Title

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

fi;

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

fi;

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

fi;

## Code generation

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

# Check whether --with-plugin-auto-load or --without-plugin-auto-load was given.
if test "${with_plugin_auto_load+set}" = set; then
  withval="$with_plugin_auto_load"

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

## Scripts, make features, and directory naming

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

# Check whether --with-build-root-sfx or --without-build-root-sfx was given.
if test "${with_build_root_sfx+set}" = set; then
  withval="$with_build_root_sfx"

fi;

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

fi;

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

fi;

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

fi;

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

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

fi;

# Check whether --with-makefile-auto-update or --without-makefile-auto-update was given.
if test "${with_makefile_auto_update+set}" = set; then
  withval="$with_makefile_auto_update"

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

## NCBI packages

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

## Third-party and system packages

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

## Optional projects

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

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

fi;

## Manuals

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

fi;


#### Check the passed arguments against the list of available ones
x_with_list="\
debug symbols optimization profiling tcheck dll static static-exe bundles \
plugin-auto-load bin-release mt 64 universal exe runpath hard-runpath lfs \
autodep suffix hostspec version execopy bincopy lib-rebuilds lib-rebuilds=ask \
deactivation makefile-auto-update projects flat-makefile configure-dialog \
check ncbi-public strip pch caution ccache distcc \
ncbi-c wxwidgets wxwidgets-ucs fastcgi sss sssdb sssutils included-sss \
geo included-geo \
z bz2 lzo pcre gnutls openssl sybase sybase-local sybase-new \
ftds mysql orbacus freetype fltk opengl mesa glut glew glew-mx \
bdb python jni sqlite3 icu boost boost-tag \
sp expat sablot libxml libxslt xerces xalan oechem sge muparser hdf5 \
gif jpeg tiff png xpm magic curl 3psw \
local-lbsm ncbi-crypt connext \
serial objects dbapi app ctools gui algo internal gbench"

x_with_list=`echo "$x_with_list" | sed 's/\([^ ][^ ]*\)/--with-\1 --without-\1/g'`


for x_arg in "$@" ; do
   if test -z "$x_arg" ; then
      continue
   fi

   x_okay=
   for x_desc in $x_with_list ; do
      if test "$x_arg" = "$x_desc" ; then
         x_okay="okay"
         break
      fi
   done
   if test "$x_okay" = "okay" ; then
      continue
   fi

   case "$x_arg" in
      --with-extra-action= | --exec-prefix= | --with-projects= | --srcdir= \
      | --cache-file= | --build= | --host= | --target= | --with-runpath= \
      | --with-relative-runpath= | --x-includes= | --x-libraries= )
      { { echo "$as_me:$LINENO: error: $x_arg:  requires value;  use --help to show usage" >&5
echo "$as_me: error: $x_arg:  requires value;  use --help to show usage" >&2;}
   { (exit 1); exit 1; }; }
      ;;

      --with-extra-action=* | --with-build-root=* | --with-build-root-sfx=* \
      | --with-fake-root=* | --with-saved-settings=* \
      | --with-projects=* | --with-check=* | --with-check-tools=* \
      | --with-universal=* | --with-tcheck=* \
      | --cache-file=* | --build=* | --host=* | --prefix=* | --exec-prefix=* \
      | --libdir=* | --bindir=* | --includedir=* | --srcdir=* \
      | [A-Z]*=* \
      | --with-z=* | --with-bz2=* | --with-lzo=* \
      | --with-pcre=* \
      | --with-gnutls=* | --with-openssl=* | --with-curl=* \
      | --with-sybase-local=* | --with-wxwidgets=* \
      | --with-ftds=* | --with-mysql=* | --with-fltk=* | --with-fastcgi=* \
      | --with-sqlite3=* | --with-expat=* | --with-sablot=* \
      | --with-icu=* | --with-xerces=* | --with-xalan=* \
      | --with-libxml=* | --with-libxslt=* \
      | --with-bdb=* | --with-odbc | --with-odbc=* \
      | --with-python=* | --with-freetype=* | --with-gif=* | --with-jpeg=* \
      | --with-png=* | --with-tiff=* | --with-xpm=* | --with-opengl=* \
      | --with-mesa=* | --with-glut=* | --with-glew=* | --with-oechem=* \
      | --with-boost=* | --with-boost-tag=* | --with-orbacus=* | --with-sge=* \
      | --with-muparser=* | --with-hdf5=* | --with-jni=* | --with-magic=* \
      | --x-includes=* | --x-libraries=* | --with-3psw=* \
      | --target=* | --with-runpath=* | --with-relative-runpath=* \
      | --no-create | --no-recursion)
      ;;

      * )
      { { echo "$as_me:$LINENO: error: $x_arg:  unknown option;  use --help to show usage" >&5
echo "$as_me: error: $x_arg:  unknown option;  use --help to show usage" >&2;}
   { (exit 1); exit 1; }; }
      ;;
   esac
done


if test "$with_gbench" = "yes" ; then
   if test "$with_dll" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-dll but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-dll but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_dll=yes
      fi
     if test "$with_mt" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-mt but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-mt but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_mt=yes
      fi
     if test "$with_gui" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-gui but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-gui but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_gui=yes
      fi
     if test "$with_exe" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-exe but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-exe but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_exe=yes
      fi
     if test "$with_serial" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-serial but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-serial but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_serial=yes
      fi
     if test "$with_objects" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-objects but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-objects but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_objects=yes
      fi
     if test "$with_algo" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-algo but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-algo but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_algo=yes
      fi
     if test "$with_glew_mx" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-glew_mx but --with-gbench" >&5
echo "$as_me: error: incompatible options: --without-glew_mx but --with-gbench" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_glew_mx=yes
      fi

   : ${with_projects=scripts/projects/ncbi_gbench.lst}
elif test "$with_jni" = "yes" ; then
   if test "$with_dll" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-dll but --with-jni" >&5
echo "$as_me: error: incompatible options: --without-dll but --with-jni" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_dll=yes
      fi
     if test "$with_mt" = "no"; then
         { { echo "$as_me:$LINENO: error: incompatible options: --without-mt but --with-jni" >&5
echo "$as_me: error: incompatible options: --without-mt but --with-jni" >&2;}
   { (exit 1); exit 1; }; }
      else
         with_mt=yes
      fi

   : ${with_exe=no}
fi

if test "$with_bin_release" = "yes" ; then
   # Default some other options accordingly
   : ${with_ncbi_public=yes}
   : ${with_dll=no}
   : ${with_local_lbsm=no}
   : ${with_ncbi_crypt=no}
   : ${with_connext=no}

cat >>confdefs.h <<\_ACEOF
#define NCBI_BIN_RELEASE 1
_ACEOF

fi

if test "$with_debug" = no; then
    : ${with_symbols=no}
    : ${with_optimization=yes}
else
    : ${with_symbols=yes}
    : ${with_optimization=no}
fi

#### Check for special options
if test "$with_extra_action" = "yes" ; then
   { { echo "$as_me:$LINENO: error: --with-extra-action must have a value after =" >&5
echo "$as_me: error: --with-extra-action must have a value after =" >&2;}
   { (exit 1); exit 1; }; }
fi
if test "$with_extra_action" = "no" ; then
   { { echo "$as_me:$LINENO: error: --without-extra-action is not allowed" >&5
echo "$as_me: error: --without-extra-action is not allowed" >&2;}
   { (exit 1); exit 1; }; }
fi

case "$with_projects" in
 "") if test -r projects; then
        { echo "$as_me:$LINENO: using default projects file \"projects\"." >&5
echo "$as_me: using default projects file \"projects\"." >&6;}
        with_projects=projects
        PROJECTS="\$(top_srcdir)/projects"

     else
        PROJECTS=""

        if test -f projects; then
           { echo "$as_me:$LINENO: WARNING: default projects file \"projects\" is unreadable." >&5
echo "$as_me: WARNING: default projects file \"projects\" is unreadable." >&2;}
        elif test -h projects; then
           { echo "$as_me:$LINENO: WARNING: default projects file \"projects\" is a dangling link." >&5
echo "$as_me: WARNING: default projects file \"projects\" is a dangling link." >&2;}
        fi
     fi
     ;;
 no) with_projects="" ;  PROJECTS=""
 ;;
 /*) PROJECTS=$with_projects
 ;;
 * ) PROJECTS="\$(top_srcdir)/$with_projects"
 ;;
esac


#### Always define this

cat >>confdefs.h <<\_ACEOF
#define NCBI_CXX_TOOLKIT 1
_ACEOF



#### Get the running host's properties
ac_aux_dir=
for ac_dir in src/build-system $srcdir/src/build-system; 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:$LINENO: error: cannot find install-sh or install.sh in src/build-system $srcdir/src/build-system" >&5
echo "$as_me: error: cannot find install-sh or install.sh in src/build-system $srcdir/src/build-system" >&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:$LINENO: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

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


echo "$as_me:$LINENO: 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:$LINENO: 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:$LINENO: 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/'`



cat >>confdefs.h <<_ACEOF
#define HOST "$host"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define HOST_CPU "$host_cpu"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define HOST_VENDOR "$host_vendor"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define HOST_OS "$host_os"
_ACEOF



#### Make some provisions for traditional operation
# 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"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: 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
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  # Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
  ./ | .// | /cC/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
  /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
      for ac_exec_ext in '' $ac_executable_extensions; do
	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	    break 3
	  fi
	fi
      done
    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:$LINENO: 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'



#### C and C++ compilers
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

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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
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
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }

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

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# 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:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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.

# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
# b.out is created by i960 compilers.
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
	;;
    conftest.$ac_ext )
	# This is the source file.
	;;
    [ab].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,
	# but it would be cool to find out if it's true.  Does anybody
	# maintain Libtool? --akim.
	export ac_cv_exeext
	break;;
    * )
	break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:$LINENO: 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:$LINENO: 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:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext b.out
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:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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 conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  export ac_cv_exeext
	  break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:$LINENO: 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:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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 | *.xSYM | *.bb | *.bbg ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_cc_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std1 is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std1.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err 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:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

# 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   '' \
   '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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
#include <stdlib.h>
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err 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
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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

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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO:" \
     "checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_cxx_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 \
   '' \
   '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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
#include <stdlib.h>
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err 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=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



#### Detect Insure++, and attempt to find the real compiler.
case "$CXX" in
   insure* | */insure*)
      psrcdump=`echo "$CXX" | sed -e 's/insure.*/psrcdump/'`
      real_CXX=`$psrcdump -t insure++ | sed -ne 's/^Compiler \(.*\)/\1/p'`
      real_dir=`$psrcdump -t insure++ | sed -ne 's/^Compilerinstalldir \(.*\)/\1/p'`
      test -n "$real_dir" && test -x "$real_dir/$real_CXX" && \
        real_CXX="$real_dir/$real_CXX"
      case "$real_CXX" in
          *gcc* ) LIBS="$LIBS -lstdc++"
      esac
      ;;
   *)
      real_CXX=$CXX
      ;;
esac


#### Detect KCC compiler
if test "$GCC" != "yes" ; then
   touch kcc_test.cpp
   kcc_ver="`$real_CXX -V -c kcc_test.cpp 2>&1 | grep '^KAI '`"
   kcc_license="`$real_CXX -V -c kcc_test.cpp 2>&1 | grep -v '^KAI '`"
   rm -f kcc_test.cpp kcc_test.o
   case "$kcc_ver" in
      KAI* )  KCC="yes" ;;
   esac
fi


#### Detect ICC compiler (newer versions of which configure can mis-ID as GCC)
if test "$KCC" != "yes"; then
   icc_ver="`$real_CXX -V 2>&1 | grep '^Intel(R) C'`"
   icc_license="`$real_CXX -c 2>&1 | grep '^icc: NOTE: The evaluation period for this product ends on '`"
   case "$icc_ver" in
      Intel*C*Compiler* )  ICC="yes"; GCC="no" ;;
   esac
fi


#### Detect IBM VisualAge compiler
if test "$GCC" != "yes"  -a  "$KCC" != "yes"  -a  "$ICC" != "yes"; then
   vac_ver="`$real_CXX -qversion 2>&1`"
   case "$vac_ver" in
      *AIX* ) VAC="yes" ;;
   esac
fi


#### Detect Compaq compiler
if test "$GCC" != "yes"  -a  "$KCC" != "yes"  -a  "$ICC" != "yes" \
  -a  "$VAC" != "yes"; then
   ccc_ver="`$real_CXX -V 2>&1 | grep '^Compaq C++ V'`"
   case "$ccc_ver" in
      *Compaq* ) CCC="yes" ;;
   esac
fi


#### Detect supported compilers
compiler=
compiler_ver=
ncbi_compiler="UNKNOWN"
ncbi_compiler_ver="0"

if test "$GCC" = "yes" ; then
   compiler_ver="`$real_CXX -dumpversion 2>&1`"
   case "$compiler_ver" in
     2.95* | 2.96* | 3.* | 4.* )
       compiler="GCC"
       ncbi_compiler="GCC"
       ncbi_compiler_ver="$compiler_ver"
                 WithFeatures="$WithFeatures${WithFeaturesSep}GCC"; WithFeaturesSep=" "
       ;;
   esac
elif test "$KCC" = "yes" ; then
   compiler_ver="$kcc_ver"
   compiler="KCC"
   ncbi_compiler="KCC"
   ncbi_compiler_ver="`echo $kcc_ver | sed 's%^KAI .*C[+][+] \([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}KCC"; WithFeaturesSep=" "
elif test "$ICC" = "yes" ; then
   compiler_ver="$icc_ver"
   compiler="ICC"
   ncbi_compiler="ICC"
   ncbi_compiler_ver="`echo $icc_ver | sed 's%.*Version \([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}ICC"; WithFeaturesSep=" "
elif test "$VAC" = "yes" ; then
   compiler_ver="$vac_ver"
   compiler="VisualAge"
   ncbi_compiler="VISUALAGE"
   ncbi_compiler_ver="`echo $vac_ver | sed 's%.*[Vv]ersion:* 0*\([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}VisualAge"; WithFeaturesSep=" "
elif test "$CCC" = "yes" ; then
   compiler_ver="$ccc_ver"
   compiler=Compaq
   ncbi_compiler="COMPAQ"
   ncbi_compiler_ver="`echo $ccc_ver | sed 's%.*C[+][+] V\([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}CompaqCompiler"; WithFeaturesSep=" "
else
   case "$host_os" in
    solaris* )
      compiler_ver="`$real_CXX -V 2>&1`"
      case "$compiler_ver" in
        *WorkShop*Compilers*5\.0 )
          compiler="WorkShop5"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.0" ;;
        *Sun*WorkShop*6*5\.1* )
          compiler="WorkShop51"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.1" ;;
        *Sun*WorkShop*6*5\.2* )
          compiler="WorkShop52"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.2" ;;
        *Sun*WorkShop*6*5\.3* )
          compiler="WorkShop53"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.3" ;;
        *Forte*7*5\.4* )
          compiler="WorkShop54"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.4" ;;
        *Sun*C*5\.5* )
          compiler="WorkShop55"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.5" ;;
        *Sun*C*5\.8* )
          compiler="WorkShop58"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.8" ;;
        *Sun*C*5\.9* )
          compiler="WorkShop59"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.9" ;;
        *Sun*C*5\.10* )
          compiler="WorkShop510"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.10" ;;
        *Sun*C*5\.11* )
          compiler="WorkShop511"
          ncbi_compiler="WORKSHOP"
          ncbi_compiler_ver="5.11" ;;
      esac
                WithFeatures="$WithFeatures${WithFeaturesSep}WorkShop"; WithFeaturesSep=" "
      ;;

    irix* )
      compiler_ver="`$real_CXX -version 2>&1`"
      case "$compiler_ver" in
        MIPSpro*Compilers:*Version*7\.3* )
          compiler="MIPSpro73"
          ncbi_compiler="MIPSPRO"
          ncbi_compiler_ver="7.3"
                    WithFeatures="$WithFeatures${WithFeaturesSep}MIPSpro"; WithFeaturesSep=" "
          ;;
      esac
      ;;

    cygwin* )
      case "$real_CXX" in
        *cl\.exe* | cl)
          compiler="MSVC"
          ncbi_compiler="MSVC"
          ncbi_compiler_ver="6.0"
                    WithFeatures="$WithFeatures${WithFeaturesSep}MSVC"; WithFeaturesSep=" "
          ;;
      esac
      ;;
   esac
fi

#ncbi_compiler_ver="`echo $ncbi_compiler_ver | sed 's%\([0-9]\)\.\([0-9]\)\.\([0-9]\).*%\1\2\3%; s%\([0-9]\)\.\([0-9][0-9]*\).*%\1\2%; s%^\([0-9][0-9]\)$%\10%; s%^\([0-9]\)$%\100%'`"
case "$compiler:$ncbi_compiler_ver" in
    WorkShop*:?.?? )   ncbi_compiler_sed='s/\([0-9]\)\.\([0-9][0-9]\)/\1\20/' ;;
    WorkShop*:[6-9].?) ncbi_compiler_sed='s/\([0-9]\)\.\([0-9\)/\10\20/' ;;
    ICC:??.? )  ncbi_compiler_sed='s/\([0-9][0-9]\)\.\([0-9]\)/\1\20/' ;;
    *:?.?.?)    ncbi_compiler_sed='s/\([0-9]\)\.\([0-9]\)\.\([0-9]\)/\1\2\3/' ;;
    *:?.??*)    ncbi_compiler_sed='s/\([0-9]\)\.\([0-9][0-9]\).*/\1\2/' ;;
    *:?.?)      ncbi_compiler_sed='s/\([0-9]\).\([0-9]\)/\1\20/' ;;
    *:?)        ncbi_compiler_sed='s/\([0-9]\)/\100/' ;;
esac
ncbi_compiler_ver=`echo $ncbi_compiler_ver | sed "$ncbi_compiler_sed"`
compiler_version=$ncbi_compiler_ver

# Possible values of NCBI_COMPILER_$ncbi_compiler, since acconfig.h is obsolete
if false; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_GCC 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_KCC 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_ICC 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_WORKSHOP 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_MIPSPRO 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_VISUALAGE 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_COMPAQ 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_MSVC 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_COMPILER_UNKNOWN 1
_ACEOF

fi


cat >>confdefs.h <<_ACEOF
#define NCBI_COMPILER "$ncbi_compiler"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define NCBI_COMPILER_$ncbi_compiler 1
_ACEOF


cat >>confdefs.h <<_ACEOF
#define NCBI_COMPILER_VERSION $ncbi_compiler_ver
_ACEOF



#### Additional check for pre-defined compilers
case "$compiler:$compiler_version" in
  MSVC:* )
    if test -z "$NCBI_COMPILER" ; then
       echo
       echo "Compiler \"${compiler}\" requires a special tuning, so you"
       echo "better use a special shell script located in \"compilers/*.sh\"!"
       case "$with_caution" in
    yes )
       { { echo "$as_me:$LINENO: error: Configuration has been canceled per --with-caution." >&5
echo "$as_me: error: Configuration has been canceled per --with-caution." >&2;}
   { (exit 1); exit 1; }; } ;;
    no )
       { echo "$as_me:$LINENO: WARNING: Proceeding without questions per --without-caution" >&5
echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you still want to proceed (at your own risk)? [y/N]"
       read answer
       case "$answer" in
         [Yy]* )  { echo "$as_me:$LINENO: WARNING: Proceeding at your own risk..." >&5
echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  { { echo "$as_me:$LINENO: error: Configuration has been canceled by user." >&5
echo "$as_me: error: Configuration has been canceled by user." >&2;}
   { (exit 1); exit 1; }; } ;;
       esac
       ;;
 esac
       echo
    fi ;;
esac


#### Use full path to the compiler, if possible

set $CC
x_CC="`type $1 | sed 's/.* \([^ ]*\)$/\1/'`"
if test ! -x "$x_CC" ; then
  x_CC="`which $1  2>/dev/null`"
fi

if test -x "$x_CC" ; then
  shift
  CC="$x_CC $*"
  echo "adjusted C   compiler: $CC"
fi
CC_PATH="`dirname $x_CC`"
x_CC=

set $CXX
x_CXX="`type $1 | sed 's/.* \([^ ]*\)$/\1/'`"
if test ! -x "$x_CXX" ; then
  x_CXX="`which $1  2>/dev/null`"
fi

if test -x "$x_CXX" ; then
  shift
  CXX="$x_CXX $*"
  echo "adjusted C++ compiler: $CXX"
fi
CXX_PATH="`dirname $x_CXX`"
x_CXX=

if test "$with_static_exe" = "yes"; then
   C_LINK='$(top_srcdir)/scripts/common/impl/favor-static $(CC)'
   LINK='$(top_srcdir)/scripts/common/impl/favor-static $(CXX)'
else
   C_LINK='$(CC)'
   LINK='$(CXX)'
fi

### Which of these is better?
#compiler_root=`dirname CXX_PATH`
compiler_root=`echo $CXX | sed -ne 's:\(.*\)[/\\]bin[/\\].*:\1:p'`



#### Multi-Thread safety
with_mt=${with_mt:="no"}
if test "$with_mt" = "yes" ; then
   case "$host_os:$compiler" in
    darwin* | irix* | cygwin*)  ;;
    solaris*:WorkShop*       )  : ${MT_FLAG:="-mt"} ;;
    solaris*:GCC             )  : ${MT_FLAG:="-pthreads"} ;;
    *:KCC                    )  : ${MT_FLAG:="--thread_safe"} ;;
    *:Compaq | *:GCC | *:ICC )  : ${MT_FLAG:="-pthread"} ;;
    *:VisualAge              )  : ${MT_FLAG:="-qthreaded"} ;;
    * )   { { echo "$as_me:$LINENO: error: Do not know how to build MT-safe with compiler $CXX $compiler_ver" >&5
echo "$as_me: error: Do not know how to build MT-safe with compiler $CXX $compiler_ver" >&2;}
   { (exit 1); exit 1; }; } ;;
   esac
   CPPFLAGS="$CPPFLAGS -D_MT -D_REENTRANT -D_THREAD_SAFE"
   case "$host_os:$compiler" in
     solaris2.10:GCC ) : ${THREAD_LIBS:="-lposix4"} ;;
     solaris*        ) : ${THREAD_LIBS:="-lpthread -lposix4"} ;;
     freebsd*        ) ;; # -pthread already substitutes libc_r for libc
     *               ) : ${THREAD_LIBS:="-lpthread"} ;;
   esac
   LIBS="$LIBS $THREAD_LIBS"
   case "$host_os:$compiler" in
     solaris2.??:* | solaris*:GCC | *:Compaq | irix* | aix* | darwin* | cygwin*)
        NCBIATOMIC_LIB=
        ;;
     *:GCC | *:ICC | linux*:KCC )
        case "$host_cpu" in
           i?86 | powerpc* | ppc* | x86_64 | sparc* ) NCBIATOMIC_LIB= ;;
           * ) NCBIATOMIC_LIB=xncbi ;;
        esac
        ;;
     *:WorkShop* | solaris*:KCC )
        NCBIATOMIC_LIB=xncbi
        ncbicntr="ncbicntr_workshop ncbiatomic_workshop"
        ;;
     * ) NCBIATOMIC_LIB=xncbi ;;
   esac
   mt_sfx="MT"
             WithFeatures="$WithFeatures${WithFeaturesSep}MT"; WithFeaturesSep=" "
else
   CPPFLAGS="$CPPFLAGS -DNCBI_WITHOUT_MT"
   MT_FLAG=
   THREAD_LIBS=
   NCBIATOMIC_LIB=
   mt_sfx=""
fi
MT_SFX="${mt_sfx}"


CFLAGS="$MT_FLAG $CFLAGS"
CXXFLAGS="$MT_FLAG $CXXFLAGS"
LDFLAGS="$MT_FLAG $LDFLAGS"

APP_LDFLAGS=
DLL_LDFLAGS=

case "$host_os:$compiler" in
   darwin*:GCC )

echo "$as_me:$LINENO: checking whether $CC supports -Wl,-rpath" >&5
echo $ECHO_N "checking whether $CC supports -Wl,-rpath... $ECHO_C" >&6
if test "${ncbi_cv_prog_cc_wl_rpath+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LDFLAGS=$LDFLAGS
          LDFLAGS="-Wl,-rpath,. $LDFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cc_wl_rpath=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_prog_cc_wl_rpath=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
          LDFLAGS=$orig_LDFLAGS
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_cc_wl_rpath" >&5
echo "${ECHO_T}$ncbi_cv_prog_cc_wl_rpath" >&6
      ;;
   *:GCC | *:ICC )
      echo "$as_me:$LINENO: checking whether $CC supports -Wl,-E" >&5
echo $ECHO_N "checking whether $CC supports -Wl,-E... $ECHO_C" >&6
if test "${ncbi_cv_prog_cc_wl_e+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LDFLAGS=$LDFLAGS
          LDFLAGS="-Wl,-E $LDFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cc_wl_e=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_prog_cc_wl_e=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
          LDFLAGS=$orig_LDFLAGS
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_cc_wl_e" >&5
echo "${ECHO_T}$ncbi_cv_prog_cc_wl_e" >&6
      test "$ncbi_cv_prog_cc_wl_e" = no  ||  APP_LDFLAGS="-Wl,-E $APP_LDFLAGS"
      echo "$as_me:$LINENO: checking whether $CC supports -Wl,--{en,dis}able-new-dtags" >&5
echo $ECHO_N "checking whether $CC supports -Wl,--{en,dis}able-new-dtags... $ECHO_C" >&6
if test "${ncbi_cv_prog_cc_new_dtags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LDFLAGS=$LDFLAGS
          LDFLAGS="-Wl,--enable-new-dtags $LDFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cc_new_dtags=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_prog_cc_new_dtags=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
          LDFLAGS=$orig_LDFLAGS
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_cc_new_dtags" >&5
echo "${ECHO_T}$ncbi_cv_prog_cc_new_dtags" >&6
      if test "$ncbi_cv_prog_cc_new_dtags" = yes; then
          if test "$with_hard_runpath" = yes; then
             LDFLAGS="-Wl,--disable-new-dtags $LDFLAGS"
          else
             LDFLAGS="-Wl,--enable-new-dtags $LDFLAGS"
          fi
      fi
      ;;
esac

#### Provide default environment setup for known platforms/compilers
DEPFLAGS="-M"
DEPFLAGS_POST="" # Needed for VisualAge
OBJCXX_CXXFLAGS=
OBJCXX_LIBS=
case "$host_os:$compiler" in
 solaris2\.6:GCC )
   echo "GCC compiler is not supported for:  $host"
   compiler=
   ;;

 solaris*:GCC )
   CPPFLAGS="-D_XOPEN_SOURCE=500 $CPPFLAGS"
   STRIP="@:"
   ;;

 linux*:ICC )
   # "incomplete type is not allowed" should be an error, not a warning!
   CFLAGS="-we70 $CFLAGS"
   CXXFLAGS="-we70 $CXXFLAGS"
   ;;

 irix*:GCC )
   if test "$with_debug" != "no" ; then
      LDFLAGS="-LD_LAYOUT:lgot_buffer=32 $LDFLAGS"
   fi
   ;;

 solaris*:WorkShop* )
   CPPFLAGS="-D__EXTENSIONS__ $CPPFLAGS"
   CXXFLAGS="+w +w2 $CXXFLAGS"
   DEPFLAGS="-xM1"
   LDFLAGS="-xildoff $LDFLAGS"
   AR=${AR:="$CXX $MT_FLAG -xar -o"}
   STRIP="@:"
   if test "$with_symbols" = "no" -a "$with_profiling" != "yes" \
      -a "$with_strip" = "yes" ; then
      LDFLAGS="-s $LDFLAGS"
   fi
   # Recent versions default to DWARF, yielding much larger executables in
   # debug configurations; insist on STABS when the choice exists, even for
   # versions that already default to it.
   case "$with_symbols:$compiler" in
      no:* | *:WorkShop5[0-4] ) ;;
      * )
         CFLAGS="-xdebugformat=stabs $CFLAGS"
         CXXFLAGS="-xdebugformat=stabs $CXXFLAGS"
         ;;
   esac
   CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/unix/cxx_filter.WorkShop.sh"
   LINK_FILTER="$CXX_FILTER"
   AR_FILTER="$CXX_FILTER"
   serial_ws50_rtti_kludge="rtti"
   ;;

 irix*:MIPSpro73 )
   COMMON_FLAGS="-fullwarn -brief_diagnostics -use_readonly_const -G0 -rdata_shared"
   # Warnings we disable (messages courtesy of "gettxt cc.cat.m:N")
   # 1107: A signed bit field has a length of 1 bit.
   # 1169: External/internal linkage conflicts with a previous declaration.
   # 1209: The controlling expression is constant. [while (0) et al.]
   # 1424: The %n1 is not used in declaring the argument types of %n2.
   # 1429: The type "long long" is nonstandard.
   # 1460: Function %n is redeclared "inline" after being called.
   # 1521: A nonstandard preprocessing directive is used.
   CFLAGS="$COMMON_FLAGS -woff 1209 $CFLAGS"
   CXXFLAGS="$COMMON_FLAGS -ansiW -ptused -FE:eliminate_duplicate_inline_copies -FE:template_in_elf_section -no_auto_include -LANG:std -LANG:ansi-for-init-scope -woff 1460,1521,1429,1169,1209,1107,1424 $CXXFLAGS"
   : ${CXXCPP:="$CXX -E -LANG:std"}
   LDFLAGS="-LANG:std -G0 -FE:eliminate_duplicate_inline_copies -FE:template_in_elf_section $LDFLAGS"
   CPPFLAGS="-D__LONGLONG $CPPFLAGS"
   CXX_FILTER="2>&1 | \$(top_srcdir)/compilers/unix/cxx_filter.$compiler.sh"
   ;;

 cygwin*:GCC )
   with_dll="no"
   : ${NETWORK_LIBS:="-lws2_32"}
   CONF_exe_ext=".exe"
   ;;

 cygwin*:MSVC )
   with_dll="no"
   CFLAGS="/W4 /Od /Zi /DEBUG /D_DEBUG"
   CXXFLAGS="/W4 /Od /Zi /DEBUG /D_DEBUG"
   CPPFLAGS="/nologo $CPPFLAGS"
   LDFLAGS="/DEBUG"
   AR="lib.exe"
   RANLIB=":"
   STRIP="@:"
   CONF_obj_ext=".obj"
   CONF_lib_ext=".lib"
   CONF_dll_ext=".dll"
   CONF_lib_l_ext=".lib"
   CONF_lib_pre=" "
   CONF_lib_l_pre=" "
   CONF_exe_ext=".exe"
   CONF_f_compile="/c "
   CONF_f_outobj="/Fo"
   CONF_f_outlib="/OUT:"
   CONF_f_libpath="/LIBPATH:"
   CONF_f_outexe="/OUT:"
   script_shell=""
   make_shell=""
   ;;

 *:VisualAge)
   # 1506-1108 (I) The use of keyword '__attribute__' is non-portable.
   CFLAGS="-qlanglvl=extc99 -qsuppress=1506-1108 $CFLAGS"
   # 1540-1663 (W) Incorrect assignment of a restrict qualified pointer.
   CXXFLAGS="-qrtti=all -qsuppress=1540-1663 $CXXFLAGS"
   DEPFLAGS="-E -M"
   DEPFLAGS_POST='>/dev/null 2>&1; (cat $*.u; rm -f $*.u)'
   ;;

 *:Compaq)
   CPPFLAGS="-D__USE_STD_IOSTREAM $CPPFLAGS"
   CXXFLAGS="-tweak -nocompress -distinguish_nested_enums $CXXFLAGS"
   DEPFLAGS="$DEPFLAGS -distinguish_nested_enums"
   case "$host_os" in
      osf*)
        # Suppress link warnings; otherwise, we get "weak symbol multiply
        # defined" all over the place.
        LDFLAGS="-Wl,-S $LDFLAGS"
        # The linker sometimes needs a LOT of memory.
        LINK="ulimit -d \`ulimit -H -d\` && $LINK"
        ;;
   esac
   ;;

 darwin*:GCC)
   # Per <http://fink.sourceforge.net/doc/porting/shared.php>, it was
   # historically necessary to build plugins as Mach-O bundles rather than
   # dynamic libraries.  That's not such a big deal on modern Mac OS X
   # versions, so the Toolkit now defaults to building only the latter.
   CONF_dll_ext=".dylib"
   if test "$with_bundles" = yes; then
      CONF_loadable_ext=".so"
   else
      CONF_loadable_ext=".dylib"
   fi
   if $CXX -v 2>&1 | grep -q Apple; then
      CFLAGS="-fpascal-strings $CFLAGS"
      CXXFLAGS="-fno-permissive -fpascal-strings $CXXFLAGS"
      # -flat_namespace is necessary for proper handling of shared libraries
      # that don't themselves link against all their dependencies.
      LDFLAGS="-flat_namespace $LDFLAGS"

      if test "$with_ncbi_public" = yes; then
         TARGET='-mmacosx-version-min=10.5'
         if test -d /Developer/SDKs/MacOSX10.5.sdk; then
             TARGET="-isysroot /Developer/SDKs/MacOSX10.5.sdk $TARGET"
         fi
         CC="$CC $TARGET"
         CXX="$CXX $TARGET"
      fi
   else
      LDFLAGS="-Wl,-flat_namespace $LDFLAGS"
   fi
   if test -f /usr/include/dlfcn.h; then
      # may be able to do without /sw, so ignore it by default
      :
   elif test -f /sw/include/dlfcn.h; then
      CPPFLAGS="-I/sw/include $CPPFLAGS"
      LDFLAGS="-L/sw/lib $LDFLAGS"
   else
      { echo "$as_me:$LINENO: WARNING: No dlfcn.h in /usr/include or /sw/include." >&5
echo "$as_me: WARNING: No dlfcn.h in /usr/include or /sw/include." >&2;}
   fi
   case "$CPPFLAGS $LIBS" in
      *sw/*) ;;
      *)
         if test -d "$orig_NCBI/safe-sw"; then
             CPPFLAGS="-I$orig_NCBI/safe-sw/include $CPPFLAGS"
             LDFLAGS="-L$orig_NCBI/safe-sw/lib $LDFLAGS"
         fi
         ;;
   esac
   : ${with_x=${with_xpm-no}}

   # CPPFLAGS="-F/System/Library/Frameworks/CoreServices.framework/Frameworks $CPPFLAGS"
   LIBS="-Wl,-framework,ApplicationServices $LIBS"

   OBJCXX_CXXFLAGS='-x objective-c++'
   OBJCXX_LIBS='-lobjc'

   case `uname -m` in
      *64 ) : ${with_64=yes} ;;
      *   ) : ${with_64=no}  ;;
   esac
   ;;
esac


#### Set makefile variables for platform-specific includes
COMPILER=`echo $ncbi_compiler | tr '[A-Z]' '[a-z]'`
OSTYPE=`echo $host_os | sed -e 's/[0-9.]*$//; s/-gnu[^-]*$//; y/A-Z/a-z/'`


#### Check if the compiler matches one of supported compilers on this platform
if test -z "$compiler" ; then
   cat <<EOF

  Compiler $CXX $compiler_ver is not fully supported.
  Consult doc/config.html\#ref_Compilers for the list of
  fully supported platforms/compilers.
EOF
   case "$with_caution" in
    yes )
       { { echo "$as_me:$LINENO: error: Configuration has been canceled per --with-caution." >&5
echo "$as_me: error: Configuration has been canceled per --with-caution." >&2;}
   { (exit 1); exit 1; }; } ;;
    no )
       { echo "$as_me:$LINENO: WARNING: Proceeding without questions per --without-caution" >&5
echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you still want to proceed (at your own risk)? [y/N]"
       read answer
       case "$answer" in
         [Yy]* )  { echo "$as_me:$LINENO: WARNING: Proceeding at your own risk..." >&5
echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  { { echo "$as_me:$LINENO: error: Configuration has been canceled by user." >&5
echo "$as_me: error: Configuration has been canceled by user." >&2;}
   { (exit 1); exit 1; }; } ;;
       esac
       ;;
 esac
   echo
   compiler="UNKNOWN"
fi


#### Set compiler prefix for non-native compilers
case "$host_os:$compiler" in
   *:GCC | *:KCC | *:ICC )
      compiler_pfx="${compiler}-"
      compiler_vpfx="${compiler}${compiler_version}-"
      ;;
esac


C_LIBS=$LIBS


ARCH_CPPFLAGS=
#### architecture settings, and extra C++ LIBS
if test "${with_universal-no}" != "no" ; then
   bit64_sfx= #"Univ"
   case "$host" in
    *-*-darwin[89].* | *-*-darwin[1-9][0-9]* )
      case "$with_universal" in
       yes )
          case "$with_64:$host_os" in
           yes:darwin8.* )
             { { echo "$as_me:$LINENO: error: Unable to build 64-bit universal binaries on $host" >&5
echo "$as_me: error: Unable to build 64-bit universal binaries on $host" >&2;}
   { (exit 1); exit 1; }; }
             ;;
           yes:* )
             ARCH_CFLAGS="-arch ppc64 -arch x86_64"
             ARCH_CPPFLAGS="-m64"
             ;;
           * )
             ARCH_CFLAGS="-arch ppc -arch i386"
             ARCH_CPPFLAGS="-m32"
             ;;
          esac
          ;;
       * )
         ARCH_CFLAGS="-arch `echo $with_universal | sed -e 's/,/ -arch /g'`"
         ARCH_CPPFLAGS="-arch `echo $with_universal | sed -e 's/,.*//'`"
         ;;
      esac
      case "$host" in
       p*pc*-*-darwin8.*)
         # Must specify -isysroot ..., but only once; anyway, the preprocessor
         # needs to see it, and naturally can't cope with multiple -arch flags.
         # The -mmacosx-version-min flag avoids link errors under OS 10.5
         # (Darwin 9), which otherwise tries to use crt1.10.5.o despite the
         # request for a sysroot lacking that file.
         SYSROOT="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
         #ARCH_CFLAGS="$SYSROOT $ARCH_CFLAGS"
         CC="$CC $SYSROOT"
         CXX="$CXX $SYSROOT"
         ;;
      esac
      ;;
    * ) { { echo "$as_me:$LINENO: error: Do not know how to build universal binaries on $host" >&5
echo "$as_me: error: Do not know how to build universal binaries on $host" >&2;}
   { (exit 1); exit 1; }; } ;;
   esac

cat >>confdefs.h <<\_ACEOF
#define NCBI_UNIVERSAL_BUILD 1
_ACEOF

   with_distcc=no
elif test "$with_64" = "yes" ; then
   bit64_sfx="64"
   case "$host:$compiler" in
    sparc-sun-solaris*:WorkShop5 | sparc-sun-solaris*:KCC )
      ARCH_CFLAGS="-xtarget=ultra -xarch=v9"
      ;;
    sparc-sun-solaris*:WorkShop51 )
      ARCH_CFLAGS="-xtarget=ultra -xarch=v9"
      LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -Bdynamic $LIBS -lc"
      ;;
    *solaris*:WorkShop59 | *solaris*:WorkShop51? )
      ARCH_CFLAGS="-m64"
      LIBS="-lCstd -lCrun $LIBS -lc"
      ;;
    *solaris*:WorkShop5* )
      ARCH_CFLAGS="-xtarget=generic64"
      # Redundant for programs, but necessary for dlopen-able shared libs,
      # at least in the x86 ReleaseMT configuration.
      LIBS="-lCstd -lCrun $LIBS -lc"
      ;;
    mips*:GCC )
      ARCH_CFLAGS="-mips64"
      ;;
    *:GCC )
      # May not work prior to GCC 3.1.
      ARCH_CFLAGS="-m64"
      case $host_os in darwin*) ARCH_CPPFLAGS="-m64" ;; esac
      ;;

    mips-sgi-irix*:MIPSpro73 )
      ARCH_CFLAGS="-64"
      CPPFLAGS="$ARCH_CFLAGS $CPPFLAGS"
      AR=${AR:="$CXX $ARCH_CFLAGS -ar -WR,-v -o"}
      ;;
    mips-sgi-irix*:KCC )
      ARCH_CFLAGS="-64"
      ;;
    * )
      { { echo "$as_me:$LINENO: error: Do not know how to compile 64-bit with compiler $CXX $compiler_ver $host:$compiler" >&5
echo "$as_me: error: Do not know how to compile 64-bit with compiler $CXX $compiler_ver $host:$compiler" >&2;}
   { (exit 1); exit 1; }; }
      ;;
   esac
else
   bit64_sfx=
   ARCH_CFLAGS=
   if test "$with_64" = "no" ; then
      case "$host:$compiler" in
       *solaris*:WorkShop* | *solaris*:KCC )
         ARCH_CFLAGS="-xtarget=generic"
         ;;
       mips*:GCC )
         ARCH_CFLAGS="-mipsn32"
         ;;
       *:GCC )
         # May not work prior to GCC 3.1.
         ARCH_CFLAGS="-m32"
         case $host_os in darwin*) ARCH_CPPFLAGS="-m32" ;; esac
         ;;

       mips-sgi-irix*:MIPSpro73 )
         ARCH_CFLAGS="-n32"
         CPPFLAGS="$ARCH_CFLAGS $CPPFLAGS"
         AR=${AR:="$CXX $ARCH_CFLAGS -ar -WR,-v -o"}
         ;;
       mips-sgi-irix*:KCC )
         ARCH_CFLAGS="-n32"
         ;;
       * )
         # Just a warning, since 32-bit mode is typically the default anyway...
         { echo "$as_me:$LINENO: WARNING: Do not know how to compile 32-bit with compiler $CXX $compiler_ver $host:$compiler" >&5
echo "$as_me: WARNING: Do not know how to compile 32-bit with compiler $CXX $compiler_ver $host:$compiler" >&2;}
         ;;
      esac
   fi
   case "$host:$compiler" in
    *solaris*:WorkShop5 )
      LIBS="-Bstatic -L$CXX_PATH/../SC5.0/lib -lm -Bdynamic $LIBS"
      MATH_LIBS=" "
      ;;
    *solaris*:WorkShop51 )
      LIBS="-Bstatic -L$CXX_PATH/../lib -lCstd -lCrun -lm -Bdynamic $LIBS -lc"
      MATH_LIBS=" "
      ;;
    sparc-sun-solaris*:WorkShop54 )
      # Using this (still very conservative) non-generic XARCH flavor allows
      # compiler to use the extended instruction set which reportedly speeds
      # up the locking of at least some STL classes by allowing them to use
      # atomic increment instead of mutex;  also seems to fix something that
      # caused misterios basic_string<> related crashes in the
      # WorkShop54 -xarch=v8 -mt configuration).
      ARCH_CFLAGS="-xarch=v8plus"
      LIBS="-lCstd $LIBS -lCrun -lc"
      ;;
    *solaris*:WorkShop5* )
      # MATH_LIBS=" "
      # Redundant for programs, but necessary for dlopen-able shared libs,
      # at least in the x86 ReleaseMT configuration.
      LIBS="-lCstd $LIBS -lCrun -lc"
      ;;
    *irix*:MIPSpro73 | *irix*:KCC )
      ARCH_CFLAGS="-n32"
      ;;
   esac
fi

case "$host_os:$host_cpu" in
   linux*:alpha*)
      ARCH_CFLAGS="-mieee $ARCH_CFLAGS"
      ;;
esac

CPPFLAGS="$ARCH_CPPFLAGS $CPPFLAGS"
CFLAGS="$ARCH_CFLAGS $CFLAGS"
CXXFLAGS="$ARCH_CFLAGS $CXXFLAGS"
LDFLAGS="$ARCH_CFLAGS $LDFLAGS"

: ${MATH_LIBS:="-lm"}

### Math lib to be always linked in
LIBS="$MATH_LIBS $LIBS"
C_LIBS="$MATH_LIBS $C_LIBS"

if test -n "$with_64"; then
   echo "$as_me:$LINENO: checking whether this system supports --with(out)-64" >&5
echo $ECHO_N "checking whether this system supports --with(out)-64... $ECHO_C" >&6
if test "${ncbi_cv_sys_with64_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF

          /* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string>
int
main ()
{
std::string* sp = new std::string("foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_sys_with64_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_sys_with64_ok=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_sys_with64_ok" >&5
echo "${ECHO_T}$ncbi_cv_sys_with64_ok" >&6
   if test "$ncbi_cv_sys_with64_ok" = no; then
      { { echo "$as_me:$LINENO: error: cannot continue; please try different options" >&5
echo "$as_me: error: cannot continue; please try different options" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

### large file support (switch to AC_SYS_LARGEFILE?)
case "$host_os:$compiler:$compiler_version" in
    *:GCC:3[4-9]* | *:GCC:[4-9]* | *:ICC:[91]* ) : ${with_lfs=yes} ;;
esac

if test "$with_lfs" = "yes" ; then
   LFSFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
   CPPFLAGS="$LFSFLAGS $CPPFLAGS"
fi


#### Flags to enable (potentially unsafe) extra optimization.
if test -z "$DEF_FAST_FLAGS"  -o  -z "$FAST_CXXFLAGS" ; then
   case "$compiler:$compiler_version" in
      GCC:2* | GCC:344 )
        # GCC 2.9x sometimes experiences internal errors at high optimization;
        # GCC 3.4.4 (at least on FreeBSD) meanwhile generates crashprone code.
        DEF_FAST_FLAGS="-O2"
        ;;
      GCC:* )
        DEF_FAST_FLAGS="-O9 -finline-functions -fstrict-aliasing"
        case "$host_os" in
           freebsd* ) ;;
           * )        DEF_FAST_FLAGS="$DEF_FAST_FLAGS -ffast-math" ;;
        esac
        if test "$with_profiling" != "yes"; then
           # incompatible with -pg
           DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fomit-frame-pointer"
        fi
        ;;
      WorkShop5[89]* | WorkShop510 )
        # Limit optimization to -xO2 (-O now maps to -xO3) due to compiler bugs.
        subst='s/[ 	]-x*O[1-9]*//g'
        CFLAGS="`  echo \" $CFLAGS\"   | sed -e \"$subst\"` -xO2"
        CXXFLAGS="`echo \" $CXXFLAGS\" | sed -e \"$subst\"` -xO2"
        LDFLAGS="` echo \" $LDFLAGS\"  | sed -e \"$subst\"` -xO2"
        DEF_FAST_FLAGS="-xO2"
        ;;
      WorkShop* )
        DEF_FAST_FLAGS="-fast"
        case "$with_ncbi_public:$host_cpu" in
           yes:sparc* )
              DEF_FAST_FLAGS="$DEF_FAST_FLAGS -xtarget=ultra"
              ;;
           *:i?86)
              case "$compiler_ver" in
                *5.[0-4]*)
                  # Work around a WorkShop standard library bug.
                  DEF_FAST_FLAGS="$DEF_FAST_FLAGS -D_RWSTD_NO_TEST_AND_SET"
                  ;;
              esac
              ;;
        esac
        # (Re)include ARCH_CFLAGS here because -fast implies -xtarget=native.
        DEF_FAST_FLAGS="$DEF_FAST_FLAGS $ARCH_CFLAGS"
        ;;
      KCC:* )
        DEF_FAST_FLAGS="+K3"
        case "$host_os" in
           solaris* )  DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fast $ARCH_CFLAGS" ;;
        esac
        ;;
      ICC:* )
        if test "$with_mt" = "yes" -a "$compiler_version" -lt 800; then
           DEF_FAST_FLAGS="-O3 -ip"
        elif test "$compiler_version" -ge 800 -a "$compiler_version" -lt 900; then
           DEF_FAST_FLAGS="-O2"
        else
           DEF_FAST_FLAGS="-O3 -axW -ip"
        fi
        ;;
      MIPSpro* )
        # -Ofast would be preferable, but runs into resource limits when
        # building libxblast.so. :-/
        DEF_FAST_FLAGS="-O2"
        ;;
      Compaq:* )
        DEF_FAST_FLAGS="-fast"
        ;;
      * )
        DEF_FAST_FLAGS="-O"
        ;;
   esac
else
   DEF_FAST_FLAGS="-O"
fi

: ${FAST_CFLAGS="$DEF_FAST_FLAGS"}
: ${FAST_CXXFLAGS="$DEF_FAST_FLAGS"}
: ${FAST_LDFLAGS="$DEF_FAST_FLAGS"}


#### DLLs

# Generate position-independent code (PIC)
if test -z "$CFLAGS_DLL"  -a  -z "$CXXFLAGS_DLL" ; then
   case "$host_os:$compiler" in
    darwin*:GCC )
      CFLAGS_DLL="-fno-common"
      CXXFLAGS_DLL="-fno-common"
      ;;
    *:GCC | linux* )
      CFLAGS_DLL="-fPIC"
      CXXFLAGS_DLL="-fPIC"
      ;;
    solaris*:WorkShop* | irix*:MIPSpro73 | \
    solaris*:KCC | irix*:KCC )
      CFLAGS_DLL="-KPIC"
      CXXFLAGS_DLL="-KPIC"
      ;;
   esac
fi

# Flag for setting the runtime library search path
if test -z "$CONF_f_runpath" ; then
   case "$host_os:$compiler" in
    solaris* )
      CONF_f_runpath="-R"
      ;;
    linux*:GCC | *bsd*:GCC | cygwin*:GCC | osf*:GCC )
      CONF_f_runpath="-Wl,-rpath,"
      ;;
    linux*:ICC )
      # trying to use "-Wl,-rpath," here sends "ld" to endless 100% CPU loop
      CONF_f_runpath="-Xlinker -rpath -Xlinker "
      ;;
    irix*:* | linux*:KCC | *:Compaq )
      CONF_f_runpath="-rpath "
      ;;
    darwin* )
      test "$ncbi_cv_prog_cc_wl_rpath" = no  ||  CONF_f_runpath="-Wl,-rpath,"
      ;;
   esac
fi
case "$host_os:$ncbi_cv_prog_cc_wl_rpath" in
    linux*|solaris* )
        origin="'\$\$ORIGIN'"
        RUNPATH_ORIGIN="$CONF_f_runpath$origin"
        ;;
    darwin*:yes )
        origin='@executable_path'
        RUNPATH_ORIGIN="$CONF_f_runpath$origin"
        ;;
    * )
        origin=
        RUNPATH_ORIGIN="-DNCBI_RPO_SUFFIX_EATER="
        ;;
esac

case "$compiler:$compiler_version:$with_bin_release" in
  GCC:*:yes )
    libstdcxx=`$CXX $LDFLAGS -print-file-name=libstdc++.a`
    case "$libstdcxx" in
       /*)
          LIBS="$libstdcxx $LIBS"
          LINK=$C_LINK
          ;;
       *)
          { echo "$as_me:$LINENO: WARNING: Unable to find static libstdc++ requested by --with-bin-release." >&5
echo "$as_me: WARNING: Unable to find static libstdc++ requested by --with-bin-release." >&2;}
          ;;
    esac
    ;;
  GCC:* )
    # Need to specify runpath for compiler-provided libraries
    case $compiler_version in
        30*     ) major=3 ;;
        31*     ) major=4 ;;
        3[23]*) major=5 ;;
        *       ) major=6 ;;
    esac
    found=false
    for f in libstdc++.so.$major libgcc_s.so.1 libstdc++.a; do
        path=`$CXX $LDFLAGS -print-file-name=$f`
        dir=`dirname "$path"`
        abs_dir=`cd "$dir" && pwd`
        case "$dir:$abs_dir" in
            *:/lib | *:/usr/lib | *:/usr/lib32 | *:/usr/lib64 )
               # no rpath needed
               break
               ;;
            /* )
               found=true
               break
               ;;
        esac
    done
    if test "$found" = "true" -a -n "$CONF_f_runpath"; then
        LDFLAGS="$CONF_f_runpath$dir $LDFLAGS"
        case "$host_os" in
           osf*)
              # the linker doesn't merge -rpath flags...
              CONF_f_runpath="$CONF_f_runpath$dir:"
              ;;
        esac
    fi
    ;;
  ICC:6* )
    # Seems to use libcxa.so.1 even without -i_dynamic...
    LDFLAGS="$CONF_f_runpath$compiler_root/lib $LDFLAGS"
    ;;
  ICC:7* )
    # Favor the static version, as libcxa.so.3 isn't exactly common....
    # (Undocumented, and unavailable at all in older versions. :-/)
    LDFLAGS="-static-libcxa $LDFLAGS"
    ;;
  ICC:8* )
    # In principle, these settings should work, and avoid the need to
    # depend on Intel's libraries at runtime.
    #  APP_LDFLAGS="-static-libcxa $APP_LDFLAGS"
    #  DLL_LDFLAGS="-nodefaultlibs $DLL_LDFLAGS"
    # In practice, they can break applications that use plugins. :-/
    LDFLAGS="$CONF_f_runpath$compiler_root/lib $LDFLAGS"
    ;;
  ICC:9* )
    # -i-static moved from common LDFLAGS to accommodate those few
    # DLLs (plugins for external programs such as Python) that need to
    # link ICC's libraries dynamically.
    APP_LDFLAGS="-i-static $APP_LDFLAGS"
    DLL_LDFLAGS="-i-static -nodefaultlibs $DLL_LDFLAGS"
    # Running icpc on a bunch of object files doesn't always ensure that
    # the C++ standard library is actually linked in, and we shouldn't
    # rely on help from wrapper scripts.
    LINK="$LINK -Kc++"
    ;;
  ICC:1???:* )
    APP_LDFLAGS="-i-static $APP_LDFLAGS"
    DLL_LDFLAGS="-i-static -nodefaultlibs $DLL_LDFLAGS"
    # Redundant for apps, but necessary for plugins to be adequately
    # self-contained, at least on 32-bit Linux.
    LIBS="$LIBS -lstdc++"
    LINK="$LINK -Kc++"
    # Defining _GCC_NEXT_LIMITS_H ensures that <limits.h> chaining doesn't
    # stop short, as can otherwise happen. :-/
    CPPFLAGS="$CPPFLAGS -D_GCC_NEXT_LIMITS_H"
    ;;
esac

# DLLs and profiling don't mix on all platforms
if test "$with_profiling" = "yes" ; then
   case "$host_os" in
      linux*) # any others?
         case "$with_dll" in
            yes) { { echo "$as_me:$LINENO: error: This platform does not support DLL profiling." >&5
echo "$as_me: error: This platform does not support DLL profiling." >&2;}
   { (exit 1); exit 1; }; }
                 ;;
            no) ;;
            *) with_dll=no ;;
         esac
      ;;
   esac
fi

# Whether to build DLLs or static (and whether by default, or forcibly)
LIB_OR_DLL="lib"
if test "$with_dll" = "yes" ; then
   case "$host_os:$compiler" in
    linux*:GCC | irix*:* | solaris*:WorkShop* | *:KCC | linux*:ICC \
    | solaris*:GCC | osf*:* | darwin*:GCC | freebsd*:GCC )
      ;;
    * )
      echo
      echo "DLLs may not be buildable by $CXX $compiler_ver on $host!"
      case "$with_caution" in
    yes )
       { { echo "$as_me:$LINENO: error: Configuration has been canceled per --with-caution." >&5
echo "$as_me: error: Configuration has been canceled per --with-caution." >&2;}
   { (exit 1); exit 1; }; } ;;
    no )
       { echo "$as_me:$LINENO: WARNING: Proceeding without questions per --without-caution" >&5
echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you still want to try build DLLs (at your own risk)? [y/N]"
       read answer
       case "$answer" in
         [Yy]* )  { echo "$as_me:$LINENO: WARNING: Proceeding at your own risk..." >&5
echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  { { echo "$as_me:$LINENO: error: Configuration has been canceled by user." >&5
echo "$as_me: error: Configuration has been canceled by user." >&2;}
   { (exit 1); exit 1; }; } ;;
       esac
       ;;
 esac
      echo
      ;;
   esac
fi

case "$with_dll:$with_static" in
   yes:yes) LIB_OR_DLL="both"; dll_sfx="DLL+static" ;;
   yes:*)   LIB_OR_DLL="dll";  dll_sfx="DLL" ;;
   *:no)    { { echo "$as_me:$LINENO: error: --without-static requires --with-dll" >&5
echo "$as_me: error: --without-static requires --with-dll" >&2;}
   { (exit 1); exit 1; }; } ;;
   *)       LIB_OR_DLL="lib";  dll_sfx=""  ;;
esac

DLL=
DLL_LIB_SETTING='$(DLL_DLIB)'
IF_WITH_DLL=
UNLESS_WITH_DLL='# '
STATIC="-static"
USUAL_AND_DLL=both
USUAL_AND_LIB=both

case "$LIB_OR_DLL" in
   dll)
       STATIC=
       USUAL_AND_DLL=dll
       ;;
   lib)
       DLL=-dll
       DLL_LIB_SETTING='$(DLL_LIB)'
       IF_WITH_DLL='# '
       UNLESS_WITH_DLL=
       USUAL_AND_LIB=lib
       ;;
esac










#### GNU compiler::  common flags and definitions
if test "$compiler" = "GCC" ; then
   CFLAGS="-Wall -Wno-format-y2k $CFLAGS"
   CXXFLAGS="-Wall -Wno-format-y2k $CXXFLAGS"
   case "$compiler_version" in
      2* ) CXXFLAGS="-ftemplate-depth-32 $CXXFLAGS" ;;
   esac
   case "$host_os" in
      solaris* )  CPPFLAGS="-D__EXTENSIONS__ $CPPFLAGS" ;;
      irix*    )  CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS" ;;
   esac
   # orig_CFLAGS=$CFLAGS
   # orig_CXXFLAGS=$CXXFLAGS
   # flag=-fno-merge-debug-strs
   # CFLAGS="$flag $CFLAGS"
   # CXXFLAGS="$flag $CXXFLAGS"
   # AC_CACHE_CHECK([whether GCC supports $flag], ncbi_cv_prog_gcc_nomerge,
   #    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],
   #                       ncbi_cv_prog_gcc_nomerge=yes,
   #                       ncbi_cv_prog_gcc_nomerge=no)])
   # if test "$ncbi_cv_prog_gcc_nomerge" = no; then
   #    CFLAGS=$orig_CFLAGS
   #    CXXFLAGS=$orig_CXXFLAGS
   # fi
fi


#### KAI compiler::  common flags and definitions
if test "$compiler" = "KCC" ; then
   AR=${AR:="$CXX $MT_FLAG -o"}
   CFLAGS="--display_error_number --c $CFLAGS"
   CXXFLAGS="--display_error_number --one_instantiation_per_object $CXXFLAGS"
   case "$host_os" in
      solaris* )  CPPFLAGS="-D__EXTENSIONS__ -D__STDC__=0 $CPPFLAGS" ;;
   esac
fi


#### Intel compiler::  common flags and definitions
if test "$compiler" = "ICC" ; then
   if test -n "$icc_license" ; then
      icc_CC="$CC"
      icc_CXX="$CXX"
      CC="./compilers/unix/cxx_filter.ICC.sh $CC"
      CXX="./compilers/unix/cxx_filter.ICC.sh $CXX"
   fi
fi


#### How to ensure that the compiler will account for potential aliasing
case "$compiler" in
   GCC ) NO_STRICT_ALIASING=-fno-strict-aliasing ;;
   ICC ) NO_STRICT_ALIASING='-falias -ffnalias' ;;
   WorkShop* ) NO_STRICT_ALIASING='-xalias_level=any' ;;
   * ) NO_STRICT_ALIASING=
esac


#### Automatic generation of dependencies for/by the "make" utility
case "$host_os" in
   solaris* )  KeepStateTarget=".KEEP_STATE:" ;;
esac

if test "$with_autodep" = "yes" ; then
   Rules="rules_with_autodep"
elif test "$with_autodep" = "no" ; then
   Rules="rules"
elif make --version 2>/dev/null | grep 'GNU Make' >/dev/null ; then
   Rules="rules_with_autodep"
else
   Rules="rules"
fi


### Support for precompiled headers
GCCPCH="#"
if test "$compiler" = GCC -a "$with_pch" = "yes" \
     -a "${with_universal-no}" = "no"; then
   echo "$as_me:$LINENO: checking whether $CXX supports precompiled headers" >&5
echo $ECHO_N "checking whether $CXX supports precompiled headers... $ECHO_C" >&6
if test "${ncbi_cv_cxx_pch+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  echo '#include <iostream>' > conftest.hpp
       echo $CXX $CPPFLAGS $CXXFLAGS -xc++-header -c conftest.hpp >&5
       if $CXX $CPPFLAGS $CXXFLAGS -xc++-header -c conftest.hpp >&5 2>&1 \
         &&  test -f conftest.hpp.gch; then
          ncbi_cv_cxx_pch=yes
       else
          ncbi_cv_cxx_pch=no
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_cxx_pch" >&5
echo "${ECHO_T}$ncbi_cv_cxx_pch" >&6
   if test "$ncbi_cv_cxx_pch" = "yes"; then
      if test "$Rules" = "rules"; then
         { echo "$as_me:$LINENO: WARNING: Your version of make does not fully support PCH-related dependencies." >&5
echo "$as_me: WARNING: Your version of make does not fully support PCH-related dependencies." >&2;}
      fi
      CXXFLAGS="-DNCBI_USE_PCH $CXXFLAGS"
      GCCPCH=""
   fi
fi


#### Tools
echo "$as_me:$LINENO: 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:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
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:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="ar cr"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

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

if test "x$RANLIB" != "x:"; then
   echo "$as_me:$LINENO: checking ranlib's effectiveness" >&5
echo $ECHO_N "checking ranlib's effectiveness... $ECHO_C" >&6
if test "${ncbi_cv_prog_ranlib_effect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
int libfunc(void) { return 0; }
_ACEOF
       echo $CXX $CPPFLAGS $CXXFLAGS -c conftest.$ac_ext >&5
       $CXX $CPPFLAGS $CXXFLAGS -c conftest.$ac_ext >&5 2>&1
       echo $AR conftest.a conftest.o >&5
       $AR conftest.a conftest.o >&5 2>&1
       save_LIBS=$LIBS
       LIBS="conftest.a $LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
extern int libfunc(void);
int
main ()
{
return libfunc();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ok_without=true
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ok_without=false
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       echo $RANLIB conftest.a >&5
       $RANLIB conftest.a >&5
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
extern int libfunc(void);
int
main ()
{
return libfunc();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ok_with=true
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ok_with=false
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       LIBS=$save_LIBS
       case $ok_with:$ok_without in
          true:false)  ncbi_cv_prog_ranlib_effect=positive ;;
          false:true)  ncbi_cv_prog_ranlib_effect=negative ;;
          true:true)   ncbi_cv_prog_ranlib_effect=neutral  ;;
          false:false) ncbi_cv_prog_ranlib_effect=unknown  ;;
       esac

fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_ranlib_effect" >&5
echo "${ECHO_T}$ncbi_cv_prog_ranlib_effect" >&6
   case "$ncbi_cv_prog_ranlib_effect" in
      negative) RANLIB=: ;;
      unknown)
        { echo "$as_me:$LINENO: WARNING: Failed to make a working library with or without ranlib." >&5
echo "$as_me: WARNING: Failed to make a working library with or without ranlib." >&2;}
        ;;
   esac
fi
if test "$with_strip" = yes; then
   # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="strip"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP="@:"
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  echo "$as_me:$LINENO: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

   echo "$as_me:$LINENO: checking whether strip loses runtime type information" >&5
echo $ECHO_N "checking whether strip loses runtime type information... $ECHO_C" >&6
if test "${ncbi_cv_strip_loses_rtti+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
          case "$host_os" in
             darwin* ) ncbi_cv_strip_loses_rtti=yes ;;
             # No problems observed elsewhere so far.
             *       ) ncbi_cv_strip_loses_rtti=no  ;;
          esac
       else
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <iostream>
                                 #include <typeinfo>
                                 struct SomeStruct { };
int
main ()
{
std::cout << typeid(SomeStruct).name();
  ;
  return 0;
}
_ACEOF
          echo $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o conftest$ac_exeext \
             conftest.$ac_ext >&5
          $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o conftest$ac_exeext \
             conftest.$ac_ext >&5 2>&1
          $STRIP conftest$ac_exeext
          if (ulimit -c 0; ./conftest$ac_exeext) >/dev/null 2>&1; then
             ncbi_cv_strip_loses_rtti=no
          else
             ncbi_cv_strip_loses_rtti=yes
          fi
          rm -rf conftest*
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_strip_loses_rtti" >&5
echo "${ECHO_T}$ncbi_cv_strip_loses_rtti" >&6
   if test "$ncbi_cv_strip_loses_rtti" = "yes"; then
      case "$with_caution" in
    yes )
       { { echo "$as_me:$LINENO: error: Configuration has been canceled per --with-caution." >&5
echo "$as_me: error: Configuration has been canceled per --with-caution." >&2;}
   { (exit 1); exit 1; }; } ;;
    no )
       { echo "$as_me:$LINENO: WARNING: Proceeding without questions per --without-caution" >&5
echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you still want to proceed (at your own risk)? [y/N]"
       read answer
       case "$answer" in
         [Yy]* )  { echo "$as_me:$LINENO: WARNING: Proceeding at your own risk..." >&5
echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  { { echo "$as_me:$LINENO: error: Configuration has been canceled by user." >&5
echo "$as_me: error: Configuration has been canceled by user." >&2;}
   { (exit 1); exit 1; }; } ;;
       esac
       ;;
 esac
   fi
else
   STRIP=@:
fi


# When using ccache and distcc together, ccache needs to be primary,
# so look for distcc(.sh) first.

if test -x $orig_NCBI/bin/distcc.sh ; then
   : ${DISTCC=$orig_NCBI/bin/distcc.sh}
   : ${with_distcc=yes}
fi

if test "$with_distcc" = "yes" ; then
   # Extract the first word of "distcc", so it can be a program name with args.
set dummy distcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_DISTCC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DISTCC"; then
  ac_cv_prog_DISTCC="$DISTCC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_DISTCC="distcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
DISTCC=$ac_cv_prog_DISTCC
if test -n "$DISTCC"; then
  echo "$as_me:$LINENO: result: $DISTCC" >&5
echo "${ECHO_T}$DISTCC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

   if test -n "$DISTCC" ; then
      # Test distcc reasonably thoroughly to avoid possible gotchas.
      cat > distcctest.c << EOF
#include <stddef.h>
#if !defined(__GNUC__)  &&  !defined(offsetof)
#  define offsetof(T, F) ((size_t)((char*) &(((T*) 0)->F) - (char*) 0))
#endif
struct S { int x; };
int f() { return offsetof(struct S, x); }
EOF
      DISTCC_FALLBACK=0
      export DISTCC_FALLBACK
      echo "$as_me:$LINENO: checking whether any distcc servers are available" >&5
echo $ECHO_N "checking whether any distcc servers are available... $ECHO_C" >&6
if test "${ncbi_cv_prog_distcc_servers+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  $DISTCC $CC -c distcctest.c 2>&5
          case $? in
            # 102: bind failed
            # 103: connect failed
            # 106: bad hostspec
            # 107: I/O error
            # 109: protocol error
            # 113: access denied
            # 116: no hosts defined
            102 | 103 | 106 | 107 | 109 | 113 | 116 )
             ncbi_cv_prog_distcc_servers=no ;;
            * )
             ncbi_cv_prog_distcc_servers=yes ;;
          esac
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_distcc_servers" >&5
echo "${ECHO_T}$ncbi_cv_prog_distcc_servers" >&6
      if test "$ncbi_cv_prog_distcc_servers" = no; then
         $as_unset DISTCC || test "${DISTCC+set}" != set || { DISTCC=; export DISTCC; }
      fi
      if test -n "$DISTCC" ; then
         echo "$as_me:$LINENO: checking whether $DISTCC is compatible with $CC" >&5
echo $ECHO_N "checking whether $DISTCC is compatible with $CC... $ECHO_C" >&6
if test "${ncbi_cv_prog_distcc_vs_cc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $DISTCC $CC -c distcctest.c 2>&5 ; then
                ncbi_cv_prog_distcc_vs_cc=yes
             else
                ncbi_cv_prog_distcc_vs_cc=no
             fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_distcc_vs_cc" >&5
echo "${ECHO_T}$ncbi_cv_prog_distcc_vs_cc" >&6
         if test "$ncbi_cv_prog_distcc_vs_cc" = yes; then
            CC_WRAPPER="$DISTCC $CC_WRAPPER"
         else
            $as_unset DISTCC || test "${DISTCC+set}" != set || { DISTCC=; export DISTCC; }
         fi
      fi
      if test -n "$DISTCC" ; then
         echo "$as_me:$LINENO: checking whether $DISTCC is compatible with $CXX" >&5
echo $ECHO_N "checking whether $DISTCC is compatible with $CXX... $ECHO_C" >&6
if test "${ncbi_cv_prog_distcc_vs_cxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  mv distcctest.c distcctest.cpp
             if $DISTCC $CXX -c distcctest.cpp 2>&5 ; then
                ncbi_cv_prog_distcc_vs_cxx=yes
             else
                ncbi_cv_prog_distcc_vs_cxx=no
             fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_distcc_vs_cxx" >&5
echo "${ECHO_T}$ncbi_cv_prog_distcc_vs_cxx" >&6
         if test "$ncbi_cv_prog_distcc_vs_cxx" = yes; then
            CXX_WRAPPER="$DISTCC $CXX_WRAPPER"
         else
            $as_unset DISTCC || test "${DISTCC+set}" != set || { DISTCC=; export DISTCC; }
         fi
      fi
      rm -f distcctest.*
   elif test "$with_distcc" = "yes" ; then
      { echo "$as_me:$LINENO: WARNING: distcc explicitly requested, but not found in PATH." >&5
echo "$as_me: WARNING: distcc explicitly requested, but not found in PATH." >&2;}
   fi
fi

if test -z "$with_ccache"  -a  -n "$DISTCC"  -a  -z "$CCACHE_DIR" ; then
   # Using CCACHE together with DISTCC causes problems when the involved DISTCC
   # servers share the same home dir, as in that case the caches from
   # different servers can mix up rather badly, corrupting each other.
   # On the other hand, most NCBI accounts have $CCACHE_DIR automatically set
   # to a non-shared, per-machine location (such as "/tmp/.ccache-username").
   with_ccache="no"
fi

if test "$with_ccache" != "no"; then
   # Extract the first word of "ccache", so it can be a program name with args.
set dummy ccache; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CCACHE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CCACHE"; then
  ac_cv_prog_CCACHE="$CCACHE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CCACHE="ccache"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CCACHE=$ac_cv_prog_CCACHE
if test -n "$CCACHE"; then
  echo "$as_me:$LINENO: result: $CCACHE" >&5
echo "${ECHO_T}$CCACHE" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

   if test -n "$CCACHE" ; then
      if test -n "$CC_WRAPPER"; then
         CC_WRAPPER="CCACHE_PREFIX=$CC_WRAPPER $CCACHE"
      else
         CC_WRAPPER=$CCACHE
      fi
      if test -n "$CXX_WRAPPER"; then
         CXX_WRAPPER="CCACHE_PREFIX=$CXX_WRAPPER $CCACHE"
      else
         CXX_WRAPPER=$CCACHE
      fi
   elif test "$with_ccache" = "yes"; then
      { echo "$as_me:$LINENO: WARNING: ccache explicitly requested, but not found in PATH." >&5
echo "$as_me: WARNING: ccache explicitly requested, but not found in PATH." >&2;}
   fi
fi

# Note the path, since syntax is version-specific....
# Extract the first word of "tail", so it can be a program name with args.
set dummy tail; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_TAIL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TAIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
TAIL=$ac_cv_path_TAIL

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

echo "$as_me:$LINENO: checking whether $TAIL accepts modern syntax (-n N)" >&5
echo $ECHO_N "checking whether $TAIL accepts modern syntax (-n N)... $ECHO_C" >&6
if $TAIL -n 1 config.log >/dev/null 2>&1; then
   TAIL_N="$TAIL -n "
   echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
   TAIL_N="$TAIL -"
   echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    then ac_cv_prog_egrep='grep -E'
    else ac_cv_prog_egrep='egrep'
    fi
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
 EGREP=$ac_cv_prog_egrep


echo "$as_me:$LINENO: checking how to run $EGREP quietly" >&5
echo $ECHO_N "checking how to run $EGREP quietly... $ECHO_C" >&6
if test -z "`echo foo | $EGREP -q fo+ 2>>config.log || echo $?`"; then
   EGREP_Q="$EGREP -q"
elif test -z "`echo foo | $EGREP -s fo+ 2>>config.log || echo $?`"; then
   EGREP_Q="$EGREP -s"
else
   EGREP_Q=">/dev/null $EGREP"
fi
echo "$as_me:$LINENO: result: $EGREP_Q" >&5
echo "${ECHO_T}$EGREP_Q" >&6

# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_VALGRIND_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$VALGRIND_PATH"; then
  ac_cv_prog_VALGRIND_PATH="$VALGRIND_PATH" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_VALGRIND_PATH="valgrind"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
VALGRIND_PATH=$ac_cv_prog_VALGRIND_PATH
if test -n "$VALGRIND_PATH"; then
  echo "$as_me:$LINENO: result: $VALGRIND_PATH" >&5
echo "${ECHO_T}$VALGRIND_PATH" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi



#### Check if "${build_root}" is defined;  provide a default one
if test -n "${with_build_root}" ; then
   build_root=${with_build_root}
fi

### Possibly add the version to the build directory name, but preseve
### the original default when reconfiguring.
if test -z "${with_version}" -a -n "${ac_cv_header_stdc}"; then
   with_version=${ncbi_cv_with_version:-no}
fi
if test -z "${build_root}" ; then
   build_root="${srcdir}/${compiler}"
   case "$compiler:$with_version" in
      *[0-9]:* | *:no) ;;
      *) build_root=${build_root}${compiler_version} ;;
   esac
   ncbi_cv_with_version=${with_version:-yes}
else
   : ${with_suffix:="no"}
fi


#### Release/Debug
case "${with_debug}:${with_optimization}" in
   no:*)
      release_debug=Release
      DEBUG_SFX=Release
      D_SFX=
      ;;
   yes:yes | :yes)
      release_debug=DebugOpt
      DEBUG_SFX=Debug
      D_SFX=d
      ;;
   *)
      release_debug=Debug
      DEBUG_SFX=Debug
      D_SFX=d
      ;;
esac


#### Profiling; try to turn on both function weight and basic-block counting
if test "$with_profiling" = "yes" ; then
   prof_sfx="Prof"
   case "$compiler" in
      Compaq)    PFFLAGS="-pg" ;;
      GCC)       PFFLAGS="-pg" ;;
      ICC)       PFFLAGS="-p" ;;
      KCC)       PFFLAGS="-pg" ;;
      MIPSpro73) PFFLAGS="" ;; # pixie(1) adds info at runtime
      MSVC)      PFFLAGS="/PROFILE" ;;
      VisualAge) PFFLAGS="-pg" ;;
      WorkShop*) PFFLAGS="-pg -xprofile=tcov" ;;
      *)         PFFLAGS="-p" ;; # Fairly standard; shouldn't rely on -pg
   esac
   CFLAGS="$CFLAGS $PFFLAGS"
   CXXFLAGS="$CXXFLAGS $PFFLAGS"
   LDFLAGS="$LDFLAGS $PFFLAGS"
   STRIP="@:" # Stripping may lose profiling info
else
   prof_sfx=
fi


### Should go before any test compiler runs

cat >>confdefs.h <<\_ACEOF
#define _GNU_SOURCE 1
_ACEOF



#### Determine whether this is implicitly a 64-bit platform
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
echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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
sed 's/^/| /' 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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
sed 's/^/| /' 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_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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
sed 's/^/| /' 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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
sed 's/^/| /' 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:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

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


echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: 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 <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF

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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_size_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define size_t unsigned
_ACEOF

fi

if test "${with_universal-no}" = "no"; then
   echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_size_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6

echo "$as_me:$LINENO: checking size of size_t" >&5
echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_size_t" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_size_t=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (size_t), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (size_t)); }
unsigned long ulongval () { return (long) (sizeof (size_t)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (size_t))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (size_t))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (size_t))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_size_t=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (size_t), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_size_t=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
_ACEOF


   ac_cv_sizeof_size_t=`echo "$ac_cv_sizeof_size_t" | tr -d '\r'`
   NCBI_PLATFORM_BITS=`expr 8 \* $ac_cv_sizeof_size_t`

cat >>confdefs.h <<_ACEOF
#define NCBI_PLATFORM_BITS $NCBI_PLATFORM_BITS
_ACEOF

   if test $NCBI_PLATFORM_BITS -eq 64; then
      bit64_sfx=64
   fi
fi


### Intel Thread Checker
if test "${with_tcheck=no}" != "no" ; then
   if test "${release_debug}${mt_sfx}" != "DebugMT" ; then
      { echo "$as_me:$LINENO: WARNING: --with-tcheck is most likely to be effective in DebugMT builds." >&5
echo "$as_me: WARNING: --with-tcheck is most likely to be effective in DebugMT builds." >&2;}
   fi
   if test "$compiler" = "ICC"; then
      case "$bit64_sfx" in
        64) tcbin=bin/32e ;;
        * ) tcbin=bin/32  ;;
      esac
      if test "$with_tcheck" != yes; then
         TCHECK_BIN=$with_tcheck/$tcbin
      fi
      # Extract the first word of "tcheck_cl", so it can be a program name with args.
set dummy tcheck_cl; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_TCHECK_CL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TCHECK_CL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TCHECK_CL="$TCHECK_CL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$TCHECK_BIN:$PATH:$TCHECK_FALLBACK"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TCHECK_CL="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
TCHECK_CL=$ac_cv_path_TCHECK_CL

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

      if test -n "$TCHECK_CL"; then
         CFLAGS="$CFLAGS -tcheck -O0"
         CXXFLAGS="$CXXFLAGS -tcheck -O0"
         LDFLAGS="$LDFLAGS -tcheck -O0 -L`dirname $TCHECK_CL`"
      fi
   fi
   CPPFLAGS="$CPPFLAGS -DNCBI_TCHECK"
fi


#### Add "Release"/"Debug", "MT", "DLL", "64", "_p" suffixes to "${build_root}"
if test "$with_suffix" != "no" ; then
   build_root="${build_root}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}"
fi


#### Add full host specs to "${build_root}"
if test "$with_hostspec" = "yes" ; then
   build_root="${build_root}--${host}"
fi

if test -n "$with_build_root_sfx" ; then
   build_root=$build_root$with_build_root_sfx
fi

case "$host_os" in
   linux*)
      kver=`uname -r | sed -e 's/-.*//'`
      libcver=`ldd --version | awk 'NR == 1 { print $NF }'`
      verbose_host=$host_cpu-$host_vendor-linux$kver-gnu$libcver
      ;;
   *) verbose_host=$host ;;
esac

#### Overall configuration mode summary
signature="${compiler}_${compiler_version}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}--${verbose_host}-`(hostname || uname -n) 2>/dev/null | sed 1q`"

cat >>confdefs.h <<_ACEOF
#define NCBI_SIGNATURE "$signature"
_ACEOF



#### Check if there is "${build_root}" dir
test -d "${build_root}"  ||  mkdir -p "${build_root}"
test -d "${build_root}"  ||  { { echo "$as_me:$LINENO: error: Couldn't create ${build_root}" >&5
echo "$as_me: error: Couldn't create ${build_root}" >&2;}
   { (exit 1); exit 1; }; }

#### Try to find a version of pwd that yields /net paths.
# Extract the first word of "amq", so it can be a program name with args.
set dummy amq; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_AMQ+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $AMQ in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AMQ="$AMQ" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:/usr/sbin:/sbin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AMQ="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
AMQ=$ac_cv_path_AMQ

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

case "$AMQ" in
   */amq)
      echo "$as_me:$LINENO: checking whether $AMQ -w works" >&5
echo $ECHO_N "checking whether $AMQ -w works... $ECHO_C" >&6
if test "${ncbi_cv_prog_amq_w+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $AMQ -w >/dev/null 2>&1; then
          ncbi_cv_prog_amq_w=yes
       else
          ncbi_cv_prog_amq_w=no
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_amq_w" >&5
echo "${ECHO_T}$ncbi_cv_prog_amq_w" >&6
      if test "$ncbi_cv_prog_amq_w" = yes; then
         smart_pwd="$AMQ -w"
      else
         smart_pwd=pwd
      fi
      ;;
   *)
      smart_pwd=pwd
      ;;
esac

#### Make "build_root" absolute
case "${build_root}" in
   /* ) ;;
   . )
      CDPATH=
      if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`"  ;
      then
         build_root="$PWD"
      else
         ncbi_fix_dir_tmp=`if cd $build_root; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $build_root && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            build_root=$ncbi_fix_dir_tmp2
         else
            case "$build_root" in
               /*) ;;
               * ) build_root=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) build_root=$ncbi_fix_dir_tmp ;;
 esac
      fi
   ;;
   *  ) ncbi_fix_dir_tmp=`if cd $build_root; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $build_root && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            build_root=$ncbi_fix_dir_tmp2
         else
            case "$build_root" in
               /*) ;;
               * ) build_root=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) build_root=$ncbi_fix_dir_tmp ;;
 esac ;;
esac
if test -n "$with_fake_root"; then
   build_root=$with_fake_root/`basename $build_root`
fi


#### Set runpath (may depend on build root)
if test -n "$with_relative_runpath"; then
   if test "$with_runpath" = "no"; then
      { { echo "$as_me:$LINENO: error: incompatible options: --without-runpath and --with-relative-runpath=$with_relative_runpath" >&5
echo "$as_me: error: incompatible options: --without-runpath and --with-relative-runpath=$with_relative_runpath" >&2;}
   { (exit 1); exit 1; }; }
   elif test -z "$origin"; then
      { { echo "$as_me:$LINENO: error: Do not know how to specify relative runpaths on $host" >&5
echo "$as_me: error: Do not know how to specify relative runpaths on $host" >&2;}
   { (exit 1); exit 1; }; }
   else
      rp=`echo "$origin/$with_relative_runpath" | \
          sed "s,:,:$origin/,g; s,/.:,:,g; s,/.\$,,"`
      with_runpath="$rp${with_runpath+:$with_runpath}"
   fi
fi

if test -z "$with_runpath"; then
   # Don't allow libdir values containing variable expansions,
   # including in particular the default "${exec_prefix}/lib"
   if test -n "$libdir"  &&  expr "$libdir" : '[^$]*$' >/dev/null; then
      with_runpath=$libdir
   elif test -n "$exec_prefix"  -a  "$exec_prefix" != "NONE" ; then
      with_runpath=$exec_prefix/lib
   elif test -n "$prefix"  -a  "$prefix" != "NONE" ; then
      with_runpath=$prefix/lib
   fi
fi

if   test "$with_runpath" = "no" ; then
   runpath=
   pure_runpath=
elif test -n "$with_runpath"  -a  "$with_runpath" != "yes" ; then
   root_base=`basename $build_root`
   pure_runpath=`echo "${with_runpath}" | sed -e "s/{}/$root_base/g"`
   runpath="${CONF_f_runpath}${pure_runpath}"
   case "$host_os:$compiler" in
    darwin* )
      # Needed for a few gui projects, including gbench_plugin_scan;
      # harmless elsewhere, since it only affects projects that indirectly
      # need one of these libraries.  (There seems to be no general
      # equivalent of -rpath-link.)
      for l in dbapi_driver gui_utils ncbi_xloader_genbank ncbi_xreader \
               ncbi_xreader_id1 ncbi_xreader_pubseqos; do
         ll=lib$l.dylib
         LDFLAGS="$LDFLAGS -dylib_file ${pure_runpath}/$ll:\$(libdir)/$ll"
      done
      ;;
    *:GCC )
      if `$CXX -print-prog-name=ld` --version 2>&1 | grep GNU >/dev/null; then
         runpath="$runpath -Wl,-rpath-link,\$(libdir)"
      fi
      ;;
    *:ICC )
      runpath="$runpath -Xlinker -rpath-link -Xlinker \$(libdir)"
      ;;
   esac
elif test "$with_runpath" = "yes"  -o  "$with_dll" != "no" ; then
   runpath="${CONF_f_runpath}\$(libdir)"
   pure_runpath='${build_root}/lib'
else
   runpath=
   pure_runpath=
fi
if test -z "$CONF_f_runpath" ; then
   # Drop the linker flag (since passing directory names doesn't work
   # so well), but keep pure_runpath for other uses.
   runpath=
fi


#### Linker command-line to build DLL (may depend on runpath)
has_dll_loadable="@# "
ALLOW_UNDEF=
FORBID_UNDEF=
case "$compiler" in
 GCC | ICC )
   LINK_DLL="$LINK $ARCH_CFLAGS -shared -o" # possibly overridden below
   case "$host_os" in
      solaris* )
        # See http://realm.progsoc.uts.edu.au/~subtle/solaris28_link.html
        LINK_DLL="$LINK $ARCH_CFLAGS -shared -mimpure-text -o"
        FORBID_UNDEF="-Wl,-z,defs"
        ;;
      darwin* )
        # Per <http://fink.sourceforge.net/doc/porting/shared.php>, it was
        # historically necessary to build plugins as Mach-O bundles rather than
        # dynamic libraries.  That's not such a big deal on modern Mac OS X
        # versions, so the Toolkit now defaults to building only the latter.
        if test "$with_bundles" = yes; then
           has_dll_loadable=""

cat >>confdefs.h <<\_ACEOF
#define NCBI_USE_BUNDLES 1
_ACEOF

        fi
        if $CXX -v 2>&1 | grep -q Apple; then
           LINK_DLL="$LINK $ARCH_CFLAGS -dynamiclib -install_name ${pure_runpath%%:*}/\$(XDLL) -o"
           LINK_LOADABLE="$LINK $ARCH_CFLAGS -bundle -o"
           ALLOW_UNDEF='-undefined suppress'
           FORBID_UNDEF='-undefined error'
        else
           LINK_DLL="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -install_name ${pure_runpath%%:*}/\$(XDLL) -o"
           LINK_LOADABLE="$CC $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -Wl,-bundle -Wl,-read_only_relocs,warning -lbundle1.o -o"
           ALLOW_UNDEF='-Wl,-undefined,suppress'
           FORBID_UNDEF='-Wl,-undefined,error'
        fi
        ;;
      linux* | *gnu* ) # | *bsd*
        case "$compiler:$compiler_version" in
           ICC:9* | ICC:1??? )
             ncbi_cv_prog_cc_wl_no_asu=no
             LIBS="$LIBS -lc"
             C_LIBS="$C_LIBS -lc"
             ;;
           ICC:* )
             ;;
           * )
             FORBID_UNDEF='-Wl,--no-undefined'
             ;;
        esac
        ;;
      irix* )
        FORBID_UNDEF='-Wl,-no_unresolved'
        ;;
      osf* )
        ALLOW_UNDEF='-Wl,-expect_unresolved,\*'
        FORBID_UNDEF='-Wl,-error_unresolved'
        ;;
   esac
   echo "$as_me:$LINENO: checking whether $CC supports -Wl,--no-allow-shlib-undefined" >&5
echo $ECHO_N "checking whether $CC supports -Wl,--no-allow-shlib-undefined... $ECHO_C" >&6
if test "${ncbi_cv_prog_cc_wl_no_asu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LDFLAGS=$LDFLAGS
       LDFLAGS="$CXXFLAGS_DLL -shared -Wl,--no-allow-shlib-undefined $LDFLAGS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cc_wl_no_asu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_prog_cc_wl_no_asu=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       LDFLAGS=$orig_LDFLAGS
fi
echo "$as_me:$LINENO: result: $ncbi_cv_prog_cc_wl_no_asu" >&5
echo "${ECHO_T}$ncbi_cv_prog_cc_wl_no_asu" >&6
   if test "$ncbi_cv_prog_cc_wl_no_asu" = yes; then
      FORBID_UNDEF="$FORBID_UNDEF -Wl,--no-allow-shlib-undefined"
   fi
  ;;
 MIPSpro73 )
   LINK_DLL="$LINK $ARCH_CFLAGS -shared -o"
   FORBID_UNDEF="-no_unresolved"
   ;;
 Compaq )
   LINK_DLL="$LINK $ARCH_CFLAGS -shared -o"
   ALLOW_UNDEF='-expect_unresolved \*'
   FORBID_UNDEF='-error_unresolved'
   ;;
 WorkShop* )
   LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG -G -h \$(XDLL) -o"
   FORBID_UNDEF="-z defs"
   ;;
 KCC )
   LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG --soname \$(XDLL) -o"
   FORBID_UNDEF="-z defs"
   ;;
 VisualAge )
   # NOTE: --without-dll still recommended, as the linker doesn't seem
   # to support building shared libraries with undefined symbols.
   LINK_DLL="$LINK $ARCH_CFLAGS $MT_FLAG -qmkshrobj -o"
   # ALLOW_UNDEF="???"
   ;;
 * )
   if test "$with_dll" = "yes"  &&  test -z "$LINK_DLL" ; then
      { { echo "$as_me:$LINENO: error: Do not know how to build DLLs with compiler $CXX $compiler_ver" >&5
echo "$as_me: error: Do not know how to build DLLs with compiler $CXX $compiler_ver" >&2;}
   { (exit 1); exit 1; }; }
   elif test -z "$LINK_DLL"; then
      with_dll=no
   fi
   ;;
esac

if test "$with_dll" = "no"; then # no DLLs whatsoever!
   DLL=
   FORCE_STATIC_LIB="LIB_OR_DLL = lib"
   APP_LIB_SETTING='$(STATIC_LIB)'
   APP_LIBS_SETTING='$(STATIC_LIBS)'
else
   FORCE_STATIC_LIB=
   APP_LIB_SETTING='$(LIB)'
   APP_LIBS_SETTING='$(LIBS)'
             WithFeatures="$WithFeatures${WithFeaturesSep}DLL"; WithFeaturesSep=" "
   # Some shared libraries end up containing static libraries, so make
   # sure to use DLL flags for both on platforms where such inclusion
   # would otherwise be illegal....
   case "$host_os:$host_cpu:$bit64_sfx" in
      # linux*:*86:*) ;;
      linux* | darwin* | solaris*:64 | *bsd* )
        CFLAGS="$CFLAGS $CFLAGS_DLL"
        CFLAGS_DLL=
        CXXFLAGS="$CXXFLAGS $CXXFLAGS_DLL"
        CXXFLAGS_DLL=
        ;;
   esac

cat >>confdefs.h <<\_ACEOF
#define NCBI_DLL_SUPPORT 1
_ACEOF

   if test "$with_dll" = "yes"; then
                WithFeatures="$WithFeatures${WithFeaturesSep}DLL_BUILD"; WithFeaturesSep=" "

cat >>confdefs.h <<\_ACEOF
#define NCBI_DLL_BUILD 1
_ACEOF

      : ${with_plugin_auto_load=yes}
   fi
fi

if test "$with_plugin_auto_load" = yes; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_PLUGIN_AUTO_LOAD 1
_ACEOF

fi

# Make sure we have commands for both C and C++ preprocessors
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:$LINENO: 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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
sed 's/^/| /' 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
sed 's/^/| /' 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:$LINENO: 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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
sed 's/^/| /' 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
sed 's/^/| /' 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:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

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



#### Make "srcdir" absolute
case "${srcdir}" in
   /* ) ;;
   . )
      CDPATH=
      if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`"  ;
      then
        srcdir="$PWD"
      else
        ncbi_fix_dir_tmp=`if cd $srcdir; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $srcdir && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            srcdir=$ncbi_fix_dir_tmp2
         else
            case "$srcdir" in
               /*) ;;
               * ) srcdir=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) srcdir=$ncbi_fix_dir_tmp ;;
 esac
      fi
   ;;
   * ) ncbi_fix_dir_tmp=`if cd $srcdir; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $srcdir && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            srcdir=$ncbi_fix_dir_tmp2
         else
            case "$srcdir" in
               /*) ;;
               * ) srcdir=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) srcdir=$ncbi_fix_dir_tmp ;;
 esac ;;
esac
real_srcdir=$srcdir
if test -n "$with_fake_root"; then
   srcdir=$build_root/..
fi


#### Ensure that all explicitly requested subtrees actually exist
if test "$with_algo" = "no" ; then
   NoConfProjects="$NoConfProjects algo"
fi

if test ! -f ${real_srcdir}/src/algo/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/algo ; then
   if test "${with_algo-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-algo:  ALGO sources are missing" >&5
echo "$as_me: error: --with-algo:  ALGO sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_algo="no"
fi

if test "$with_app" = "no" ; then
   NoConfProjects="$NoConfProjects app"
fi

if test ! -f ${real_srcdir}/src/app/Makefile.in ; then
   if test "${with_app-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-app:  APP sources are missing" >&5
echo "$as_me: error: --with-app:  APP sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_app="no"
fi

if test -f ${real_srcdir}/src/cgi/Makefile.in  -a \
        -d ${real_srcdir}/include/cgi; then
             WithProjects="$WithProjects${WithProjectsSep}cgi"; WithProjectsSep=" "
else
   { echo "$as_me:$LINENO: WARNING: CGI tree missing; some projects may fail to build." >&5
echo "$as_me: WARNING: CGI tree missing; some projects may fail to build." >&2;}
fi

if test "$with_ctools" = "no" ; then
   NoConfProjects="$NoConfProjects ctools"
fi

if test ! -f ${real_srcdir}/src/ctools/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/ctools ; then
   if test "${with_ctools-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-ctools:  CTOOLS sources are missing" >&5
echo "$as_me: error: --with-ctools:  CTOOLS sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_ctools="no"
fi

if test "$with_dbapi" = "no" ; then
   NoConfProjects="$NoConfProjects dbapi"
fi

if test ! -f ${real_srcdir}/src/dbapi/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/dbapi ; then
   if test "${with_dbapi-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-dbapi:  DBAPI sources are missing" >&5
echo "$as_me: error: --with-dbapi:  DBAPI sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_dbapi="no"
fi

if test "$with_gui" = "no" ; then
   NoConfProjects="$NoConfProjects gui"
fi

if test ! -f ${real_srcdir}/src/gui/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/gui ; then
   if test "${with_gui-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-gui:  GUI sources are missing" >&5
echo "$as_me: error: --with-gui:  GUI sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_gui="no"
fi

if test "$with_objects" = "no" ; then
   NoConfProjects="$NoConfProjects objects"
fi

if test ! -f ${real_srcdir}/src/objects/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/objects ; then
   if test "${with_objects-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-objects:  OBJECTS sources are missing" >&5
echo "$as_me: error: --with-objects:  OBJECTS sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_objects="no"
fi

if test "$with_serial" = "no" ; then
   NoConfProjects="$NoConfProjects serial"
fi

if test ! -f ${real_srcdir}/src/serial/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/serial ; then
   if test "${with_serial-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-serial:  SERIAL sources are missing" >&5
echo "$as_me: error: --with-serial:  SERIAL sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_serial="no"
fi



#### Source, include, and build directories
ncbiconf="$build_root/inc/ncbiconf_unix.h"
ncbiconf_old="$build_root/inc/ncbiconf.h"
if test -f "$ncbiconf_old" -a ! -f "$ncbiconf"; then
   mv "$ncbiconf_old" "$ncbiconf"
fi
if test "$build_root" = "$srcdir" ; then
   builddir="$srcdir/src"
else
   builddir="$build_root/build"
fi
status_dir="$build_root/status"


#### Create build directories
mkdir -p "$builddir" "$build_root/lib" "$build_root/bin"


#### Check if the target directory already has a configured system in it
if test "$no_create" != "yes"  -a  -f "${ncbiconf}" ; then
   echo
   echo "There is already a built \"${ncbiconf}\"!"
   case "$with_caution" in
    yes )
       { { echo "$as_me:$LINENO: error: Configuration has been canceled per --with-caution." >&5
echo "$as_me: error: Configuration has been canceled per --with-caution." >&2;}
   { (exit 1); exit 1; }; } ;;
    no )
       { echo "$as_me:$LINENO: WARNING: Proceeding without questions per --without-caution" >&5
echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you want to re-configure in \"${builddir}\"? [y/N]"
       read answer
       case "$answer" in
         [Yy]* )  { echo "$as_me:$LINENO: WARNING: Proceeding at your own risk..." >&5
echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  { { echo "$as_me:$LINENO: error: Configuration has been canceled by user." >&5
echo "$as_me: error: Configuration has been canceled by user." >&2;}
   { (exit 1); exit 1; }; } ;;
       esac
       ;;
 esac
   echo
fi


#### Use right command shell in scripts and makefiles
script_shell="#! ${CONFIG_SHELL:=/bin/sh}"
make_shell="SHELL=${CONFIG_SHELL:=/bin/sh}"


#### Turn on compilation warnings and adjust
#### some compiler-specific flags and features

if test "$CONF_obj_ext"   = " " ;  then obj_ext="" ; else obj_ext="${CONF_obj_ext:=.o}" ; fi
if test "$CONF_lib_pre"   = " " ;  then lib_pre="" ; else lib_pre="${CONF_lib_pre:=lib}" ; fi
if test "$CONF_lib_l_pre" = " " ;  then lib_l_pre="" ; else lib_l_pre="${CONF_lib_l_pre:=-l}" ; fi
if test "$CONF_lib_ext"   = " " ;  then lib_ext="" ; else lib_ext="${CONF_lib_ext:=.a}" ; fi
if test "$CONF_dll_ext"   = " " ;  then dll_ext="" ; else dll_ext="${CONF_dll_ext:=.so}" ; fi
if test "$CONF_loadable_ext"  = " " ;  then loadable_ext="" ; else loadable_ext="${CONF_loadable_ext:=.so}" ; fi
if test "$CONF_lib_l_ext" = " " ;  then lib_l_ext="" ; else lib_l_ext="${CONF_lib_l_ext}" ; fi
if test "$CONF_exe_ext"   = " " ;  then exe_ext="" ; else exe_ext="${CONF_exe_ext}" ; fi
if test "$CONF_f_compile" = " " ;  then f_compile="" ; else f_compile="${CONF_f_compile:=-c }" ; fi
if test "$CONF_f_outobj"  = " " ;  then f_outobj="" ; else f_outobj="${CONF_f_outobj:=-o }" ; fi
if test "$CONF_f_outlib"  = " " ;  then f_outlib="" ; else f_outlib="${CONF_f_outlib}" ; fi
if test "$CONF_f_libpath" = " " ;  then f_libpath="" ; else f_libpath="${CONF_f_libpath:=-L}" ; fi
if test "$CONF_f_runpath" = " " ;  then f_runpath="" ; else f_runpath="${CONF_f_runpath:=$CONF_f_libpath}" ; fi
if test "$CONF_f_outexe"  = " " ;  then f_outexe="" ; else f_outexe="${CONF_f_outexe:=-o }" ; fi


BINCOPY="cp -p"
MAC_BINCOPY="/Developer/Tools/CpMac -p"
if test "$with_bincopy" != "yes"; then
   echo "$as_me:$LINENO: checking whether cross-directory hard links work" >&5
echo $ECHO_N "checking whether cross-directory hard links work... $ECHO_C" >&6
if test "${ncbi_cv_sys_xdir_ln+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  mkdir conftestdir
       touch conftestdir/conftestfile
       if ln -f conftestdir/conftestfile .; then
          ncbi_cv_sys_xdir_ln=yes
       else
          ncbi_cv_sys_xdir_ln=no
       fi
       rm -rf conftestdir conftestfile
fi
echo "$as_me:$LINENO: result: $ncbi_cv_sys_xdir_ln" >&5
echo "${ECHO_T}$ncbi_cv_sys_xdir_ln" >&6
   if test "$ncbi_cv_sys_xdir_ln" = "yes"; then
      BINCOPY="ln -f"
      MAC_BINCOPY="\$(top_srcdir)/scripts/common/impl/ln_mac.sh"
   fi
fi
ifdiff="${CONFIG_SHELL} \$(top_srcdir)/scripts/common/impl/if_diff.sh"
if test "$OSTYPE" = "darwin" -a -x /Developer/Tools/CpMac; then
   BINCOPY="$ifdiff \"$MAC_BINCOPY\""
else
   BINCOPY="$ifdiff \"$BINCOPY\""
fi


#### Manage the debug-vs.-optimization flags ("--with(out)-debug",
#### "--with(out)-symbols", "--with(out)-optimization")
if test "$compiler" != "MSVC" ; then
   if test "$with_debug" = "no" -o "$with_tcheck" != "no"; then
      CPPFLAGS="-DNDEBUG $CPPFLAGS"
   else
      CPPFLAGS="-D_DEBUG $CPPFLAGS"
   fi

   if test "$with_symbols" = "no" ; then
      CFLAGS=`  echo " $CFLAGS"   | sed 's/[ 	]-g[0-9]*//g'`
      CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ 	]-g[0-9]*//g'`
      LDFLAGS=` echo " $LDFLAGS"  | sed 's/[ 	]-g[0-9]*//g'`
   else
      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-g[0-9]*' ; then
         CFLAGS="$CFLAGS -g"     ; fi
      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-g[0-9]*' ; then
         CXXFLAGS="$CXXFLAGS -g" ; fi
      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-g[0-9]*' ;
         then LDFLAGS="$LDFLAGS -g" ; fi
      STRIP="@:"
   fi

   NOPT_CFLAGS=`  echo " $CFLAGS"    | sed 's/[ 	]-x*O[0-9]*//g'`
   NOPT_CXXFLAGS=`echo " $CXXFLAGS"  | sed 's/[ 	]-x*O[0-9]*//g'`
   NOPT_LDFLAGS=` echo " $LDFLAGS"   | sed 's/[ 	]-x*O[0-9]*//g'`
   if test "${with_tcheck-no}" != "no"; then
      # Suppress warnings when building with ICC.
      NOPT_CFLAGS="$NOPT_CFLAGS -O0"
      NOPT_CXXFLAGS="$NOPT_CXXFLAGS -O0"
      NOPT_LDFLAGS="$NOPT_LDFLAGS -O0"
   fi
   if test "$with_optimization" = "no" ; then
      CFLAGS="$NOPT_CFLAGS"
      CXXFLAGS="$NOPT_CXXFLAGS"
      LDFLAGS="$NOPT_LDFLAGS"
      FAST_CFLAGS="$CFLAGS"
      FAST_CXXFLAGS="$CXXFLAGS"
      FAST_LDFLAGS="$LDFLAGS"
   else
      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
         CFLAGS="$CFLAGS -O" ; fi
      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
         CXXFLAGS="$CXXFLAGS -O" ; fi
      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
         LDFLAGS="$LDFLAGS -O" ; fi
      FAST_CFLAGS="$NOPT_CFLAGS $FAST_CFLAGS"
      FAST_CXXFLAGS="$NOPT_CXXFLAGS $FAST_CXXFLAGS"
      FAST_LDFLAGS="$NOPT_LDFLAGS $FAST_LDFLAGS"
   fi
fi



### ------------------------------------------------------------------
### ------------------------------------------------------------------

### Check for header files.


for ac_header in iostream  iostream.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



for ac_header in fstream   fstream.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done




for ac_header in strstream strstream.h strstrea.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done




for ac_header in inttypes.h limits
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


### Check for the platform (very roughly)

for ac_header in unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 x_have_unistd="yes"
fi

done


for ac_header in windows.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 x_have_windows="yes"
fi

done


if test "$x_have_windows" = "yes" -a "x$host_os" != "xcygwin32" -a "x$host_os" != "xcygwin"; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_MSWIN 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_OS "MSWIN"
_ACEOF

             WithFeatures="$WithFeatures${WithFeaturesSep}MSWin"; WithFeaturesSep=" "
elif test "$x_have_unistd" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_UNIX 1
_ACEOF


cat >>confdefs.h <<\_ACEOF
#define NCBI_OS "UNIX"
_ACEOF


   UNIX_SRC='$(UNIX_SRC)'
   UNIX_USR_PROJ='$(UNIX_USR_PROJ)'
             WithFeatures="$WithFeatures${WithFeaturesSep}unix"; WithFeaturesSep=" "
             WithFeatures="$WithFeatures${WithFeaturesSep}WinMain"; WithFeaturesSep=" " # to accommodate a PTB-specific (ab)use of REQUIRES

   # Extra defines for variants we care about
   case "$OSTYPE" in
     aix)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_AIX 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}AIX"; WithFeaturesSep=" "
        ;;
     *bsd)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_BSD 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}BSD"; WithFeaturesSep=" "
        ;;
     cygwin)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_CYGWIN 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}Cygwin"; WithFeaturesSep=" "
        if test "$with_mt" = yes; then           WithFeatures="$WithFeatures${WithFeaturesSep}CygwinMT"; WithFeaturesSep=" "; fi
        ;;
     darwin)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_DARWIN 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}Darwin"; WithFeaturesSep=" "
        if false; then           WithFeatures="$WithFeatures${WithFeaturesSep}XCODE"; WithFeaturesSep=" "; fi
        ;;
     irix)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_IRIX 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}IRIX"; WithFeaturesSep=" "
        ;;
     linux)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_LINUX 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}Linux"; WithFeaturesSep=" "
        ;;
     osf)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_OSF1 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}OSF"; WithFeaturesSep=" "
        ;;
     solaris)

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS_SOLARIS 1
_ACEOF

                  WithFeatures="$WithFeatures${WithFeaturesSep}Solaris"; WithFeaturesSep=" "
        ;;
   esac
else

cat >>confdefs.h <<\_ACEOF
#define NCBI_OS "MAC"
_ACEOF

             WithFeatures="$WithFeatures${WithFeaturesSep}MacOS"; WithFeaturesSep=" "
fi

case "$host_os" in
   cygwin* | osf* )

cat >>confdefs.h <<\_ACEOF
#define NETDB_REENTRANT 1
_ACEOF

      ;;
esac

# AC_CHECK_TYPES is insufficient, as linking may still fail :-/
echo "$as_me:$LINENO: checking for wstring" >&5
echo $ECHO_N "checking for wstring... $ECHO_C" >&6
if test "${ac_cv_type_wstring_linkable+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string>
         using std::wstring;
int
main ()
{
wstring ws, ws2; ws.find_first_of(ws2);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_wstring_linkable=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_wstring_linkable=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_wstring_linkable" >&5
echo "${ECHO_T}$ac_cv_type_wstring_linkable" >&6
if test "$ac_cv_type_wstring_linkable" = "yes"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_WSTRING 1
_ACEOF

fi

echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ac_cv_type_socklen_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/socket.h>

int
main ()
{
if ((socklen_t *) 0)
  return 0;
if (sizeof (socklen_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_socklen_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_SOCKLEN_T 1
_ACEOF


fi











for ac_header in atomic.h dlfcn.h ieeefp.h poll.h sys/epoll.h sys/mount.h \
                 sys/sockio.h sys/statvfs.h sys/sysinfo.h sys/vfs.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

# for FreeTDS 0.6x













for ac_header in arpa/inet.h errno.h malloc.h netdb.h \
                 netinet/in.h netinet/tcp.h paths.h signal.h \
                 sys/ioctl.h sys/select.h sys/socket.h sys/time.h wchar.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo "$as_me:$LINENO: 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
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: 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
  eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_time=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_time=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<\_ACEOF
#define TIME_WITH_SYS_TIME 1
_ACEOF

fi


## gethostbyname_r() -- 2 different variants: 5-arg (Solaris), 6-arg (Linux).

echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
if test "${ncbi_cv_func_gethostbyname_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_gethostbyname_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{

         void*           dummy = (void*) &gethostbyname_r;
         char            buf[1024];
         int             err;
         struct hostent* hp = 0;
         hp = gethostbyname_r("", hp, buf, sizeof(buf), &err);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_gethostbyname_r="5"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_gethostbyname_r" = "no" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{

         void*           dummy = (void*) &gethostbyname_r;
         char            buf[1024];
         int             err;
         struct hostent* hp = 0;
         err = gethostbyname_r("", hp, buf, sizeof(buf), &hp, &err);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_gethostbyname_r="6"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_gethostbyname_r" >&5
echo "${ECHO_T}$ncbi_cv_func_gethostbyname_r" >&6

if test "$ncbi_cv_func_gethostbyname_r" != "no" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYNAME_R $ncbi_cv_func_gethostbyname_r
_ACEOF

fi


## gethostbyaddr_r() -- 2 different variants: 7-arg (Solaris), 8-arg (Linux).

echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
if test "${ncbi_cv_func_gethostbyaddr_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_gethostbyaddr_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

         #include <netdb.h>
         #include <sys/types.h>
         #include <sys/socket.h>

int
main ()
{

         void* dummy = (void*) &gethostbyaddr_r;
         char            buf[1024];
         int             err;
         unsigned int    host;
         struct hostent* hp = 0;
         hp = gethostbyaddr_r((char *) &host, sizeof(host), AF_INET,
                              hp, buf, sizeof(buf), &err);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_gethostbyaddr_r="7"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_gethostbyaddr_r" = "no" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

         #include <netdb.h>
         #include <sys/types.h>
         #include <sys/socket.h>

int
main ()
{

         void* dummy = (void*) &gethostbyaddr_r;
         char            buf[1024];
         int             err;
         unsigned int    host;
         struct hostent* hp = 0;
         int res = gethostbyaddr_r((char *) &host, sizeof(host), AF_INET,
                                   hp, buf, sizeof(buf), &hp, &err);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_gethostbyaddr_r="8"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_gethostbyaddr_r" >&5
echo "${ECHO_T}$ncbi_cv_func_gethostbyaddr_r" >&6

if test "$ncbi_cv_func_gethostbyaddr_r" != "no" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_GETHOSTBYADDR_R $ncbi_cv_func_gethostbyaddr_r
_ACEOF

fi


## getservbyname_r() -- 2 different variants: 5-arg (Solaris), 6-arg (Linux).

echo "$as_me:$LINENO: checking for getservbyname_r" >&5
echo $ECHO_N "checking for getservbyname_r... $ECHO_C" >&6
if test "${ncbi_cv_func_getservbyname_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_getservbyname_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{

         void*           dummy = (void*) &getservbyname_r;
         char            buf[1024];
         int             err;
         struct servent* sp = 0;
         sp = getservbyname_r("", "", sp, buf, sizeof(buf));

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_getservbyname_r="5"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_getservbyname_r" = "no" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{

         void*           dummy = (void*) &getservbyname_r;
         char            buf[1024];
         int             err;
         struct servent* sp = 0;
         err = getservbyname_r("", "", sp, buf, sizeof(buf), &sp);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

         ncbi_cv_func_getservbyname_r="6"


else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_getservbyname_r" >&5
echo "${ECHO_T}$ncbi_cv_func_getservbyname_r" >&6

if test "$ncbi_cv_func_getservbyname_r" != "no" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_GETSERVBYNAME_R $ncbi_cv_func_getservbyname_r
_ACEOF

fi

## getpwuid_r() -- 2 major variants: 4-arg, 5-arg (POSIX).
## (Alternate 4-arg interface ignored due to rarity.)

echo "$as_me:$LINENO: checking for getpwuid_r" >&5
echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
if test "${ncbi_cv_func_getpwuid_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_getpwuid_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <unistd.h>
         #include <pwd.h>
int
main ()
{
struct passwd bpw;
         char buf[1024];
         char *dir = getpwuid_r(getuid(), &bpw, buf, sizeof(buf))->pw_dir;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_getpwuid_r=4
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_getpwuid_r" = "no" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <unistd.h>
         #include <pwd.h>
int
main ()
{
struct passwd *pw, bpw;
         char buf[1024];
         getpwuid_r(getuid(), &bpw, buf, sizeof(buf), &pw);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_getpwuid_r=5
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_getpwuid_r" >&5
echo "${ECHO_T}$ncbi_cv_func_getpwuid_r" >&6

if test "$ncbi_cv_func_getpwuid_r" != "no" ; then

cat >>confdefs.h <<_ACEOF
#define NCBI_HAVE_GETPWUID_R $ncbi_cv_func_getpwuid_r
_ACEOF

fi

# Perform a full-fledged check in C++ to be sure of an actual declaration.
# Accommodate the old Solaris interface that returns char* rather than int. :-/
echo "$as_me:$LINENO: checking for getlogin_r" >&5
echo $ECHO_N "checking for getlogin_r... $ECHO_C" >&6
if test "${ncbi_cv_func_getlogin_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_getlogin_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
char buf[64]; /* return */ getlogin_r(buf, 64);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_getlogin_r=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_GETLOGIN_R 1
_ACEOF

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

# some of these can lose in C++ due to the way autoconf works




for ac_func in localtime_r pthread_setconcurrency pthread_atfork
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_localtime_r" = "yes" ; then
   echo "$as_me:$LINENO: checking return type of localtime_r" >&5
echo $ECHO_N "checking return type of localtime_r... $ECHO_C" >&6
if test "${ac_cv_func_which_localtime_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <unistd.h>
               #include <time.h>
int
main ()
{
struct tm mytm;
               time_t t;
               int y = localtime_r(&t, &mytm)->tm_year;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_which_localtime_r=struct
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_which_localtime_r=int
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_which_localtime_r" >&5
echo "${ECHO_T}$ac_cv_func_which_localtime_r" >&6
   if test $ac_cv_func_which_localtime_r = struct; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_FUNC_LOCALTIME_R_TM 1
_ACEOF

   else

cat >>confdefs.h <<\_ACEOF
#define HAVE_FUNC_LOCALTIME_R_INT 1
_ACEOF

   fi
fi

echo "$as_me:$LINENO: checking whether pthread mutexes are available" >&5
echo $ECHO_N "checking whether pthread mutexes are available... $ECHO_C" >&6
if test "${ncbi_cv_func_pthread_mutex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
         pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
int
main ()
{
pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_pthread_mutex=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_func_pthread_mutex=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_pthread_mutex" >&5
echo "${ECHO_T}$ncbi_cv_func_pthread_mutex" >&6
if test $ncbi_cv_func_pthread_mutex=yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_PTHREAD_MUTEX 1
_ACEOF

fi


### Check for other standard library functions


for ac_func in vprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define _doprnt innocuous__doprnt

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef _doprnt

/* 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 ();
/* 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
char (*f) () = _doprnt;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != _doprnt;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func__doprnt=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func__doprnt=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<\_ACEOF
#define HAVE_DOPRNT 1
_ACEOF

fi

fi
done



































for ac_func in euidaccess atoll basename lchown fseeko getpagesize \
               getpass getpassphrase getpwuid getrusage gettimeofday \
               getuid memrchr readpassphrase readv usleep \
               asprintf vasprintf vsnprintf select statfs statvfs \
               strcasecmp strlcat strlcpy strdup strndup strtok_r \
               sysmp timegm utimes lutimes writev
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

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


echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_signal=int
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

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


test "$ac_cv_func_select" = yes  ||  ncbi_cv_func_select_updates_timeout=no
echo "$as_me:$LINENO: checking whether select updates the timeout when interrupted" >&5
echo $ECHO_N "checking whether select updates the timeout when interrupted... $ECHO_C" >&6
if test "${ncbi_cv_func_select_updates_timeout+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  case "$host_os" in
          linux) ncbi_cv_func_select_updates_timeout=yes ;;
          *) ncbi_cv_func_select_updates_timeout=no ;;
        esac
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <signal.h>
         #include <sys/types.h>
         #ifdef HAVE_SYS_SELECT_H
         #  include <sys/select.h>
         #endif
         #ifdef HAVE_SYS_TIME_H
         #  include <sys/time.h>
         #endif
         #ifdef HAVE_UNISTD_H
         #  include <unistd.h>
         #endif
         RETSIGTYPE handler(int sig) { alarm(0); }
int
main ()
{
struct timeval timeout = { 5, 0 };
         signal(SIGALRM, &handler);
         alarm(1);
         select(0, NULL, NULL, NULL, &timeout);
         return timeout.tv_sec == 5;
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_select_updates_timeout=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ncbi_cv_func_select_updates_timeout=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_select_updates_timeout" >&5
echo "${ECHO_T}$ncbi_cv_func_select_updates_timeout" >&6
if test "$ncbi_cv_func_select_updates_timeout" = yes; then

cat >>confdefs.h <<\_ACEOF
#define SELECT_UPDATES_TIMEOUT 1
_ACEOF

fi

# We want the program to return 0, which is *false* in C.  Also, since
# use of lowercase seems to be customary if not universal, the default
# is yes when cross-compiling; anyone cross-compiling for exceptional
# platforms can set ncbi_cv_func_strcasecmp_lc=no in config.site.
if test "$ac_cv_func_strcasecmp" = yes; then
   echo "$as_me:$LINENO: checking whether strcasecmp treats letters as lowercase" >&5
echo $ECHO_N "checking whether strcasecmp treats letters as lowercase... $ECHO_C" >&6
if test "${ncbi_cv_func_strcasecmp_lc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ncbi_cv_func_strcasecmp_lc=yes
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string.h>
int
main ()
{
return strcasecmp("A", "_") <= 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_strcasecmp_lc=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ncbi_cv_func_strcasecmp_lc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_strcasecmp_lc" >&5
echo "${ECHO_T}$ncbi_cv_func_strcasecmp_lc" >&6
   if test "$ncbi_cv_func_strcasecmp_lc" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_STRCASECMP_LC 1
_ACEOF

   fi
fi

echo "$as_me:$LINENO: checking for Linux-like sysinfo with 1 arg" >&5
echo $ECHO_N "checking for Linux-like sysinfo with 1 arg... $ECHO_C" >&6
if test "${ncbi_cv_func_sysinfo_1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/sysinfo.h>
int
main ()
{

         void* dummy = (void*) &sysinfo;
         struct sysinfo* info = 0;
         int retval = sysinfo(info);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_sysinfo_1=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_func_sysinfo_1=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_sysinfo_1" >&5
echo "${ECHO_T}$ncbi_cv_func_sysinfo_1" >&6

if test "$ncbi_cv_func_sysinfo_1" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_SYSINFO_1 1
_ACEOF

fi


for ac_func in getloadavg
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


## readdir_r() -- 2 different variants: 2-arg (trad. Solaris), 3-arg (POSIX).

echo "$as_me:$LINENO: checking for readdir_r" >&5
echo $ECHO_N "checking for readdir_r... $ECHO_C" >&6
if test "${ncbi_cv_func_readdir_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_func_readdir_r="no"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
DIR* dir; struct dirent* entry; readdir_r(dir, entry, &entry);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_readdir_r=3
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_readdir_r" = "no" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
DIR* dir; struct dirent* entry; readdir_r(dir, entry);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_readdir_r=2
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_readdir_r" >&5
echo "${ECHO_T}$ncbi_cv_func_readdir_r" >&6

if test "$ncbi_cv_func_readdir_r" != "no" ; then

cat >>confdefs.h <<_ACEOF
#define NCBI_HAVE_READDIR_R $ncbi_cv_func_readdir_r
_ACEOF

fi

### Check for typedefs, structures, and compiler features.
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_c_const=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<\_ACEOF
#define const
_ACEOF

fi


### Check for C standard types and sizes
if test "${with_universal-no}" = "no"; then
   echo "$as_me:$LINENO: 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
  # See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_c_bigendian=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

# It does not; compile a test program.
if test "$cross_compiling" = yes; then
  # try to guess the endianness by grepping values into an object file
  ac_cv_c_bigendian=unknown
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
int
main ()
{
 _ascii (); _ebcdic ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
  ac_cv_c_bigendian=yes
fi
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  if test "$ac_cv_c_bigendian" = unknown; then
    ac_cv_c_bigendian=no
  else
    # finding both strings is unlikely to happen, but who knows?
    ac_cv_c_bigendian=unknown
  fi
fi
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_c_bigendian=yes
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
case $ac_cv_c_bigendian in
  yes)

cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
_ACEOF
 ;;
  no)
     ;;
  *)
    { { echo "$as_me:$LINENO: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&5
echo "$as_me: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
   { (exit 1); exit 1; }; } ;;
esac


echo "$as_me:$LINENO: checking whether char is unsigned" >&5
echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
if test "${ac_cv_c_char_unsigned+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_char_unsigned=no
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_c_char_unsigned=yes
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  cat >>confdefs.h <<\_ACEOF
#define __CHAR_UNSIGNED__ 1
_ACEOF

fi

   echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_char=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_char=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
echo "${ECHO_T}$ac_cv_type_char" >&6

echo "$as_me:$LINENO: 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
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_char=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (char)); }
unsigned long ulongval () { return (long) (sizeof (char)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (char))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (char))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (char))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out 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:$LINENO: result: $ac_cv_sizeof_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_char" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF


   echo "$as_me:$LINENO: checking for double" >&5
echo $ECHO_N "checking for double... $ECHO_C" >&6
if test "${ac_cv_type_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((double *) 0)
  return 0;
if (sizeof (double))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_double=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
echo "${ECHO_T}$ac_cv_type_double" >&6

echo "$as_me:$LINENO: checking size of double" >&5
echo $ECHO_N "checking size of double... $ECHO_C" >&6
if test "${ac_cv_sizeof_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_double" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_double=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (double)); }
unsigned long ulongval () { return (long) (sizeof (double)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (double))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (double))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (double))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_double=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_double=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_double" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
_ACEOF


   echo "$as_me:$LINENO: checking for float" >&5
echo $ECHO_N "checking for float... $ECHO_C" >&6
if test "${ac_cv_type_float+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((float *) 0)
  return 0;
if (sizeof (float))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_float=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_float=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
echo "${ECHO_T}$ac_cv_type_float" >&6

echo "$as_me:$LINENO: checking size of float" >&5
echo $ECHO_N "checking size of float... $ECHO_C" >&6
if test "${ac_cv_sizeof_float+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_float" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_float=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (float)); }
unsigned long ulongval () { return (long) (sizeof (float)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (float))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (float))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (float))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_float=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_float=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
echo "${ECHO_T}$ac_cv_sizeof_float" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
_ACEOF


   echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_int=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:$LINENO: 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
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (int)); }
unsigned long ulongval () { return (long) (sizeof (int)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (int))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out 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:$LINENO: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


   echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:$LINENO: 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
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long)); }
unsigned long ulongval () { return (long) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out 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:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


   echo "$as_me:$LINENO: checking for long double" >&5
echo $ECHO_N "checking for long double... $ECHO_C" >&6
if test "${ac_cv_type_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long double *) 0)
  return 0;
if (sizeof (long double))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_double=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
echo "${ECHO_T}$ac_cv_type_long_double" >&6

echo "$as_me:$LINENO: checking size of long double" >&5
echo $ECHO_N "checking size of long double... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_double" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long_double=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long double)); }
unsigned long ulongval () { return (long) (sizeof (long double)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long double))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long double))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long double))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_double=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_double=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
_ACEOF


   echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "$as_me:$LINENO: 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
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long long)); }
unsigned long ulongval () { return (long) (sizeof (long long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out 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:$LINENO: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF


   echo "$as_me:$LINENO: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6
if test "${ac_cv_type_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((short *) 0)
  return 0;
if (sizeof (short))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_short=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_short=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6

echo "$as_me:$LINENO: checking size of short" >&5
echo $ECHO_N "checking size of short... $ECHO_C" >&6
if test "${ac_cv_sizeof_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_short" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_short=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (short)); }
unsigned long ulongval () { return (long) (sizeof (short)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (short))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_short=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_short=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


   echo "$as_me:$LINENO: checking for void*" >&5
echo $ECHO_N "checking for void*... $ECHO_C" >&6
if test "${ac_cv_type_voidp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((void* *) 0)
  return 0;
if (sizeof (void*))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_voidp=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_voidp=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5
echo "${ECHO_T}$ac_cv_type_voidp" >&6

echo "$as_me:$LINENO: checking size of void*" >&5
echo $ECHO_N "checking size of void*... $ECHO_C" >&6
if test "${ac_cv_sizeof_voidp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_voidp" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void*))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void*))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void*))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void*))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void*))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_voidp=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void*), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (void*)); }
unsigned long ulongval () { return (long) (sizeof (void*)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (void*))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (void*))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (void*))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_voidp=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void*), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void*), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_voidp=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5
echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
_ACEOF


   echo "$as_me:$LINENO: checking for __int64" >&5
echo $ECHO_N "checking for __int64... $ECHO_C" >&6
if test "${ac_cv_type___int64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((__int64 *) 0)
  return 0;
if (sizeof (__int64))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type___int64=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type___int64=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
echo "${ECHO_T}$ac_cv_type___int64" >&6

echo "$as_me:$LINENO: checking size of __int64" >&5
echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
if test "${ac_cv_sizeof___int64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type___int64" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof___int64=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (__int64), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (__int64)); }
unsigned long ulongval () { return (long) (sizeof (__int64)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (__int64))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (__int64))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (__int64))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof___int64=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (__int64), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof___int64=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF___INT64 $ac_cv_sizeof___int64
_ACEOF


fi
echo "$as_me:$LINENO: checking for intptr_t" >&5
echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
if test "${ac_cv_type_intptr_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((intptr_t *) 0)
  return 0;
if (sizeof (intptr_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_intptr_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_INTPTR_T 1
_ACEOF


fi
echo "$as_me:$LINENO: checking for uintptr_t" >&5
echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
if test "${ac_cv_type_uintptr_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((uintptr_t *) 0)
  return 0;
if (sizeof (uintptr_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_uintptr_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_UINTPTR_T 1
_ACEOF


fi


echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5
echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6
if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
        #include <netinet/in.h>

int
main ()
{
static struct sockaddr_in ac_aggr;
if (ac_aggr.sin_len)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_sockaddr_in_sin_len=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
        #include <netinet/in.h>

int
main ()
{
static struct sockaddr_in ac_aggr;
if (sizeof ac_aggr.sin_len)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_sockaddr_in_sin_len=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_SIN_LEN 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <time.h>

int
main ()
{
static struct tm ac_aggr;
if (ac_aggr.tm_zone)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <time.h>

int
main ()
{
static struct tm ac_aggr;
if (sizeof ac_aggr.tm_zone)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_tm_tm_zone=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_TM_TM_ZONE 1
_ACEOF


fi
echo "$as_me:$LINENO: checking for struct tm.__tm_zone" >&5
echo $ECHO_N "checking for struct tm.__tm_zone... $ECHO_C" >&6
if test "${ac_cv_member_struct_tm___tm_zone+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <time.h>

int
main ()
{
static struct tm ac_aggr;
if (ac_aggr.__tm_zone)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_tm___tm_zone=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <time.h>

int
main ()
{
static struct tm ac_aggr;
if (sizeof ac_aggr.__tm_zone)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct_tm___tm_zone=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_TM___TM_ZONE 1
_ACEOF


fi



echo "$as_me:$LINENO: checking whether function prototypes can use throw(...)" >&5
echo $ECHO_N "checking whether function prototypes can use throw(...)... $ECHO_C" >&6
if test "${ncbi_cv_cxx_throw_spec+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
template <class T> inline int test_throw_spec(const T&) throw() {
          return 0;
       }
int
main ()
{
return test_throw_spec(123);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cxx_throw_spec=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define NCBI_USE_THROW_SPEC 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for obsolete string::compare() syntax" >&5
echo $ECHO_N "checking for obsolete string::compare() syntax... $ECHO_C" >&6
if test "${ncbi_cv_func_string_compare_obsolete+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string>
int
main ()
{
std::string s;  int i = 0;  i = s.compare("aaa", 0, 2);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_string_compare_obsolete=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define NCBI_OBSOLETE_STR_COMPARE 1
_ACEOF

fi


echo "$as_me:$LINENO: checking whether the auto_ptr template class works" >&5
echo $ECHO_N "checking whether the auto_ptr template class works... $ECHO_C" >&6
if test "${ncbi_cv_type_auto_ptr_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <memory>
int
main ()
{
int *ip = 0; std::auto_ptr<int> ap(ip); *ip = *ap; ap.reset(ip);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_type_auto_ptr_works=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_type_auto_ptr_works=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_type_auto_ptr_works" >&5
echo "${ECHO_T}$ncbi_cv_type_auto_ptr_works" >&6
if test "$ncbi_cv_cxx_auto_ptr_works" = no; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_AUTO_PTR 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for min/max templates" >&5
echo $ECHO_N "checking for min/max templates... $ECHO_C" >&6
if test "${ncbi_cv_func_min_max+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

        #include <algorithm>
        #ifdef min
        #undef min
        #endif
        #ifdef max
        #undef max
        #endif

int
main ()
{
int a=0, b=1;  a = std::min(a, b);  b = std::max(a, b);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_min_max=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_func_min_max=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_func_min_max" >&5
echo "${ECHO_T}$ncbi_cv_func_min_max" >&6
if test "$ncbi_cv_func_min_max" = no; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_MINMAX_TEMPLATE 1
_ACEOF

fi


echo "$as_me:$LINENO: checking whether new C++ streams have ios_base::" >&5
echo $ECHO_N "checking whether new C++ streams have ios_base::... $ECHO_C" >&6
if test "${ncbi_cv_type_ios_base+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <iostream>
int
main ()
{
(void)(std::ios_base::out != std::ios_base::beg);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_type_ios_base=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_type_ios_base=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_type_ios_base" >&5
echo "${ECHO_T}$ncbi_cv_type_ios_base" >&6
if test "$ncbi_cv_type_ios_base" = no; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_IOS_BASE 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for ios(_base)::register_callback" >&5
echo $ECHO_N "checking for ios(_base)::register_callback... $ECHO_C" >&6
if test "${ncbi_cv_func_ios_register_callback+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <iostream>
int
main ()
{
std::cout.register_callback(0, std::ios::erase_event);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_ios_register_callback=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_IOS_REGISTER_CALLBACK 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for std::char_traits::" >&5
echo $ECHO_N "checking for std::char_traits::... $ECHO_C" >&6
if test "${ncbi_cv_type_char_traits+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <iostream>
int
main ()
{
using namespace std;
       char_traits<char>::int_type  i = char_traits<char>::eof();
       i = char_traits<char>::not_eof(i);
       char_traits<char>::char_type c = '\0';
       char_traits<char>::pos_type  p = 0;
       char_traits<char>::off_type  o = 1;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_type_char_traits=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_type_char_traits=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_type_char_traits" >&5
echo "${ECHO_T}$ncbi_cv_type_char_traits" >&6
if test "$ncbi_cv_type_char_traits" = no; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_CHAR_TRAITS 1
_ACEOF

fi


echo "$as_me:$LINENO: checking for std::is_sorted<> in <algorithm>" >&5
echo $ECHO_N "checking for std::is_sorted<> in <algorithm>... $ECHO_C" >&6
if test "${ncbi_cv_func_is_sorted+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <algorithm>
int
main ()
{
int a[2]; return std::is_sorted(a, a+2) ? 0 : 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_is_sorted=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_IS_SORTED 1
_ACEOF

fi



echo "$as_me:$LINENO: checking for SysV semaphores" >&5
echo $ECHO_N "checking for SysV semaphores... $ECHO_C" >&6
if test "${ncbi_cv_sys_semaphores+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/sem.h>
int
main ()
{
struct sembuf buf; int id = semget(0x1234, 0, IPC_CREAT);
       buf.sem_op = SEM_UNDO;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_sys_semaphores=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_sys_semaphores=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_sys_semaphores" >&5
echo "${ECHO_T}$ncbi_cv_sys_semaphores" >&6
if test "$ncbi_cv_sys_semaphores" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_SYSV_SEMAPHORES 1
_ACEOF

fi

echo "$as_me:$LINENO: checking for union semun" >&5
echo $ECHO_N "checking for union semun... $ECHO_C" >&6
if test "${ac_cv_type_union_semun+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/sem.h>

int
main ()
{
if ((union semun *) 0)
  return 0;
if (sizeof (union semun))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_union_semun=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_SEMUN 1
_ACEOF

fi



echo "$as_me:$LINENO: checking which way the stack grows" >&5
echo $ECHO_N "checking which way the stack grows... $ECHO_C" >&6
if test "${ncbi_cv_sys_stack_dir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ncbi_cv_sys_stack_dir="unknown (cross-compiling)"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
 int f(int* p) { int i; return (&i < p) ? 1 : 0; }
int
main ()
{
 int p; return f(&p);
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_sys_stack_dir=up
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ncbi_cv_sys_stack_dir=down
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_sys_stack_dir" >&5
echo "${ECHO_T}$ncbi_cv_sys_stack_dir" >&6
case "$ncbi_cv_sys_stack_dir" in
 up)
cat >>confdefs.h <<\_ACEOF
#define STACK_GROWS_UP 1
_ACEOF
  ;;
 down)
cat >>confdefs.h <<\_ACEOF
#define STACK_GROWS_DOWN 1
_ACEOF
;;
esac

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


echo "$as_me:$LINENO: checking whether the preprocessor supports C99-style variadic macros" >&5
echo $ECHO_N "checking whether the preprocessor supports C99-style variadic macros... $ECHO_C" >&6
if test "${ncbi_cv_cpp_std_varargs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define foo(...) 1
         #if foo(x,y,z) != 1
         #error failed
         #endif
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cpp_std_varargs=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_CPP_STD_VARARGS 1
_ACEOF

fi

echo "$as_me:$LINENO: checking whether the preprocessor supports GNU-style variadic macros" >&5
echo $ECHO_N "checking whether the preprocessor supports GNU-style variadic macros... $ECHO_C" >&6
if test "${ncbi_cv_cpp_gnu_varargs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define foo(args...) 1
         #if foo(x,y,z) != 1
         #error failed
         #endif
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cpp_gnu_varargs=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_CPP_GNU_VARARGS 1
_ACEOF

fi

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


# Avoid using unsupported (and noisily ignored) attributes.
case "$compiler:$compiler_version" in
   GCC:2* | GCC:3[01]* )
      ncbi_cv_c_deprecation_syntax=none
      ncbi_cv_c_forceinline=inline
      ;;
   VisualAge:* )
      ncbi_cv_c_forceinline=inline
      ;;
   WorkShop* )
      ncbi_cv_c_deprecation_syntax=none
      ncbi_cv_c_forceinline=inline
      ncbi_cv_c_noreturn=none
      ;;
esac

echo "$as_me:$LINENO: checking syntax for marking deprecated functions" >&5
echo $ECHO_N "checking syntax for marking deprecated functions... $ECHO_C" >&6
if test "${ncbi_cv_c_deprecation_syntax+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void f(void) __attribute__((__deprecated__)); void f(void) { }
int
main ()
{
f();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_deprecation_syntax='__attribute__((__deprecated__))'
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_c_deprecation_syntax=none
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_c_deprecation_syntax" >&5
echo "${ECHO_T}$ncbi_cv_c_deprecation_syntax" >&6
depr=$ncbi_cv_c_deprecation_syntax
test "$depr" = "none"  &&  depr=""

cat >>confdefs.h <<_ACEOF
#define NCBI_DEPRECATED $depr
_ACEOF


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:$LINENO: checking how to force inlining" >&5
echo $ECHO_N "checking how to force inlining... $ECHO_C" >&6
if test "${ncbi_cv_c_forceinline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_c_forceinline=no
    for fi in forceinline __forceinline__ __forceinline __always_inline \
      "inline __attribute__((always_inline))" inline __inline__; do
       test "$ncbi_cv_c_forceinline" = "no" || break
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$fi int f(void) { return 0; }
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_forceinline=$fi
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
echo "$as_me:$LINENO: result: $ncbi_cv_c_forceinline" >&5
echo "${ECHO_T}$ncbi_cv_c_forceinline" >&6
forceinline=$ncbi_cv_c_forceinline
test "$forceinline" = "no"  &&  forceinline=""

cat >>confdefs.h <<_ACEOF
#define NCBI_FORCEINLINE $forceinline
_ACEOF


echo "$as_me:$LINENO: checking whether the C compiler supports __attribute__((destructor))" >&5
echo $ECHO_N "checking whether the C compiler supports __attribute__((destructor))... $ECHO_C" >&6
if test "${ncbi_cv_c_attribute_destructor+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void f(void) __attribute__((destructor)); void f(void) { }
int
main ()
{
f();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_attribute_destructor=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_ATTRIBUTE_DESTRUCTOR 1
_ACEOF

fi

case "$compiler:$compiler_version $CFLAGS $CXXFLAGS" in
   GCC:[4-9]??\ *\ -fvisibility*|ICC:*\ -fvisibility* ) ;;
   * ) ncbi_cv_c_attribute_visibility_default=unnecessary ;;
esac

echo "$as_me:$LINENO: checking whether $CC supports __attribute__((visibility(\"default\")))" >&5
echo $ECHO_N "checking whether $CC supports __attribute__((visibility(\"default\")))... $ECHO_C" >&6
if test "${ncbi_cv_c_attribute_visibility_default+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((visibility("default"))) void f(void); void f(void) {}
int
main ()
{
f();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_attribute_visibility_default=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_ATTRIBUTE_VISIBILITY_DEFAULT 1
_ACEOF

fi

echo "$as_me:$LINENO: checking whether the C compiler supports C99 restrict" >&5
echo $ECHO_N "checking whether the C compiler supports C99 restrict... $ECHO_C" >&6
if test "${ncbi_cv_c_restrict+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_c_restrict=no
    for restrict in restrict __restrict__ __restrict; do
       test "$ncbi_cv_c_restrict" = "no" || break
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void f(int * $restrict p);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_restrict=$restrict
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
echo "$as_me:$LINENO: result: $ncbi_cv_c_restrict" >&5
echo "${ECHO_T}$ncbi_cv_c_restrict" >&6
restrict=$ncbi_cv_c_restrict
test "$restrict" = "no"  &&  restrict=""

cat >>confdefs.h <<_ACEOF
#define NCBI_RESTRICT_C $restrict
_ACEOF

if test -n "$restrict"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_RESTRICT_C 1
_ACEOF

fi
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


echo "$as_me:$LINENO: checking whether the C++ compiler supports C99 restrict" >&5
echo $ECHO_N "checking whether the C++ compiler supports C99 restrict... $ECHO_C" >&6
if test "${ncbi_cv_cxx_restrict+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_cxx_restrict=no
    for restrict in restrict __restrict__ __restrict; do
       test "$ncbi_cv_cxx_restrict" = "no" || break
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void f(int * $restrict p);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cxx_restrict=$restrict
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
echo "$as_me:$LINENO: result: $ncbi_cv_cxx_restrict" >&5
echo "${ECHO_T}$ncbi_cv_cxx_restrict" >&6
restrict=$ncbi_cv_cxx_restrict
test "$restrict" = "no"  &&  restrict=""

cat >>confdefs.h <<_ACEOF
#define NCBI_RESTRICT_CXX $restrict
_ACEOF

if test -n "$restrict"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_RESTRICT_CXX 1
_ACEOF

fi

echo "$as_me:$LINENO: checking syntax for marking functions that never return" >&5
echo $ECHO_N "checking syntax for marking functions that never return... $ECHO_C" >&6
if test "${ncbi_cv_c_noreturn+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void f(void) __attribute__((__noreturn__)); void f(void) { }
int
main ()
{
f();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_noreturn='__attribute__((__noreturn__))'
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_c_noreturn=none
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_c_noreturn" >&5
echo "${ECHO_T}$ncbi_cv_c_noreturn" >&6
noret=$ncbi_cv_c_noreturn
test "$noret" = "none"  &&  noret=""

cat >>confdefs.h <<_ACEOF
#define NCBI_NORETURN $noret
_ACEOF


# for FreeTDS
echo "$as_me:$LINENO: checking whether FIONBIO requires BSD_COMP to be defined" >&5
echo $ECHO_N "checking whether FIONBIO requires BSD_COMP to be defined... $ECHO_C" >&6
if test "${ncbi_cv_decl_fionbio_needs_bsd_comp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
 #include <sys/types.h>
          #include <sys/ioctl.h>
int
main ()
{
 int request = FIONBIO;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_decl_fionbio_needs_bsd_comp=no
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
 #define BSD_COMP 1
              #include <sys/types.h>
              #include <sys/ioctl.h>
int
main ()
{
 int request = FIONBIO;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_decl_fionbio_needs_bsd_comp=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_decl_fionbio_needs_bsd_comp="never defined at all"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_decl_fionbio_needs_bsd_comp" >&5
echo "${ECHO_T}$ncbi_cv_decl_fionbio_needs_bsd_comp" >&6
if test "$ncbi_cv_decl_fionbio_needs_bsd_comp" = yes; then

cat >>confdefs.h <<\_ACEOF
#define BSD_COMP 1
_ACEOF

fi

echo "$as_me:$LINENO: checking whether INADDR_NONE is defined" >&5
echo $ECHO_N "checking whether INADDR_NONE is defined... $ECHO_C" >&6
if test "${ncbi_cv_decl_inaddr_none+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

int
main ()
{
 unsigned long addr = INADDR_NONE;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_decl_inaddr_none=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_decl_inaddr_none=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_decl_inaddr_none" >&5
echo "${ECHO_T}$ncbi_cv_decl_inaddr_none" >&6
if test "$ncbi_cv_decl_inaddr_none" != yes; then

cat >>confdefs.h <<\_ACEOF
#define INADDR_NONE 0xffffffff
_ACEOF

fi

echo "$as_me:$LINENO: checking whether unaligned reads are permissible" >&5
echo $ECHO_N "checking whether unaligned reads are permissible... $ECHO_C" >&6
if test "${ncbi_cv_sys_unaligned_reads+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  case "$host_cpu" in
          i?86|x86_64|powerpc*|ppc*) ncbi_cv_sys_unaligned_reads=yes ;;
          *)                         ncbi_cv_sys_unaligned_reads=no  ;;
        esac
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
 #include <stdio.h>
int
main ()
{
 unsigned int a[2] = { 0x01234567, 0x89abcdef };
          fprintf(stderr, "%x\n", *(unsigned int*)((char*)a + 1));
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_sys_unaligned_reads=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ncbi_cv_sys_unaligned_reads=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_sys_unaligned_reads" >&5
echo "${ECHO_T}$ncbi_cv_sys_unaligned_reads" >&6
if test "$ncbi_cv_sys_unaligned_reads" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_UNALIGNED_READS 1
_ACEOF

fi

echo "$as_me:$LINENO: checking whether $CXX supports C++0x nullptr" >&5
echo $ECHO_N "checking whether $CXX supports C++0x nullptr... $ECHO_C" >&6
if test "${ncbi_cv_cxx_nullptr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
void * p = nullptr;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cxx_nullptr=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define HAVE_NULLPTR 1
_ACEOF

fi

### Check for the availability of other packages
### --------------------------------------------


echo "$as_me:$LINENO: checking whether in-house NCBI resources are available" >&5
echo $ECHO_N "checking whether in-house NCBI resources are available... $ECHO_C" >&6
if test -n "$orig_NCBI" -a -f "$orig_NCBI/.ncbirc" \
    -a -d /am/coremake_builds/test_data; \
then
             WithFeatures="$WithFeatures${WithFeaturesSep}in-house-resources"; WithFeaturesSep=" "
   echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
   echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

### Common-use system and miscellaneous libs
if test -z "${NETWORK_LIBS+set}"; then
   echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  libnsl=-lnsl
else
  libnsl=
fi

   echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 connect ();
int
main ()
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_socket_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  NETWORK_LIBS="-lsocket $libnsl"
else
  NETWORK_LIBS=$libnsl
fi

fi
echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
if test "${ac_cv_lib_resolv_res_search+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LIBS=$LIBS
    LIBS="-lresolv $NETWORK_LIBS $orig_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <resolv.h>
int
main ()
{
unsigned char ans[256];
         int st = res_search("foo.bar", 1, 1, ans, sizeof(ans));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_resolv_res_search=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_resolv_res_search=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
    LIBS=$orig_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
if test "$ac_cv_lib_resolv_res_search" = "yes"; then
   RESOLVER_LIBS=-lresolv
else
   RESOLVER_LIBS=
fi

orig_LIBS=$LIBS
LIBS="$NETWORK_LIBS $orig_LIBS"

for ac_func in inet_ntoa_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$with_ncbi_public" = "yes"  -a  "$OSTYPE" = "solaris"; then
   { echo "$as_me:$LINENO: Skipping checks for network functions new to Solaris 8." >&5
echo "$as_me: Skipping checks for network functions new to Solaris 8." >&6;}
else
   echo "$as_me:$LINENO: checking for getaddrinfo" >&5
echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
if test "${ac_cv_func_getaddrinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{
struct addrinfo *p; getaddrinfo("foo", "bar", p, &p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_getaddrinfo=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_getaddrinfo=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
   test "$ac_cv_func_getaddrinfo" = "yes" && \

cat >>confdefs.h <<\_ACEOF
#define HAVE_GETADDRINFO 1
_ACEOF

   echo "$as_me:$LINENO: checking for getnameinfo" >&5
echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
if test "${ac_cv_func_getnameinfo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <netdb.h>
            #include <sys/types.h>
            #include <sys/socket.h>
int
main ()
{
struct sockaddr p; char buf[256], buf2[256];
            getnameinfo(&p, sizeof(p), buf, 256, buf2, 256, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_getnameinfo=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_getnameinfo=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
   test "$ac_cv_func_getnameinfo" = "yes" && \

cat >>confdefs.h <<\_ACEOF
#define HAVE_GETNAMEINFO 1
_ACEOF






for ac_func in freehostent gethostent_r getipnodebyaddr getipnodebyname \
                  inet_ntop
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

fi
LIBS=$orig_LIBS


### Save original compiler/linker flags
orig_CPPFLAGS="$CPPFLAGS"
orig_LDFLAGS="$LDFLAGS"
orig_LIBS="$LIBS"


### Check for math functions that aren't always available

for ac_func in erf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing kstat_open" >&5
echo $ECHO_N "checking for library containing kstat_open... $ECHO_C" >&6
if test "${ac_cv_search_kstat_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_kstat_open=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 kstat_open ();
int
main ()
{
kstat_open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_kstat_open="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_kstat_open" = no; then
  for ac_lib in "$KSTAT_LIBS" kstat; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 kstat_open ();
int
main ()
{
kstat_open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_kstat_open="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_kstat_open" >&5
echo "${ECHO_T}$ac_cv_search_kstat_open" >&6
if test "$ac_cv_search_kstat_open" != no; then
  test "$ac_cv_search_kstat_open" = "none required" || LIBS="$ac_cv_search_kstat_open $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBKSTAT 1
_ACEOF

   test "x$ac_cv_search_kstat_open" = "xnone required" || KSTAT_LIBS=$ac_cv_search_kstat_open
fi

 LIBS=$saved_LIBS

saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing rstat" >&5
echo $ECHO_N "checking for library containing rstat... $ECHO_C" >&6
if test "${ac_cv_search_rstat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_rstat=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 rstat ();
int
main ()
{
rstat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_rstat="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_rstat" = no; then
  for ac_lib in "$RPCSVC_LIBS" rpcsvc; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 rstat ();
int
main ()
{
rstat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_rstat="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_rstat" >&5
echo "${ECHO_T}$ac_cv_search_rstat" >&6
if test "$ac_cv_search_rstat" != no; then
  test "$ac_cv_search_rstat" = "none required" || LIBS="$ac_cv_search_rstat $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBRPCSVC 1
_ACEOF

   test "x$ac_cv_search_rstat" = "xnone required" || RPCSVC_LIBS=$ac_cv_search_rstat
fi

 LIBS=$saved_LIBS

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

# Force C for this test because Sun WorkShop otherwise complains about
# multiple extern "C" declarations of setkey.
saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing setkey" >&5
echo $ECHO_N "checking for library containing setkey... $ECHO_C" >&6
if test "${ac_cv_search_setkey+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_setkey=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 setkey ();
int
main ()
{
setkey ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_setkey="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_setkey" = no; then
  for ac_lib in "$CRYPT_LIBS" crypt crypt_i; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 setkey ();
int
main ()
{
setkey ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_setkey="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_setkey" >&5
echo "${ECHO_T}$ac_cv_search_setkey" >&6
if test "$ac_cv_search_setkey" != no; then
  test "$ac_cv_search_setkey" = "none required" || LIBS="$ac_cv_search_setkey $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBCRYPT 1
_ACEOF

   test "x$ac_cv_search_setkey" = "xnone required" || CRYPT_LIBS=$ac_cv_search_setkey
fi

 LIBS=$saved_LIBS

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

case "$host_os:$compiler" in
     solaris*:GCC ) ac_cv_search_dlopen="-ldl" ;;
     darwin*      ) ac_cv_search_iconv="-liconv" ;;
esac
saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
if test "${ac_cv_search_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_dlopen=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_dlopen="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_dlopen" = no; then
  for ac_lib in "$DL_LIBS" dl; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_dlopen="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
echo "${ECHO_T}$ac_cv_search_dlopen" >&6
if test "$ac_cv_search_dlopen" != no; then
  test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBDL 1
_ACEOF

   test "x$ac_cv_search_dlopen" = "xnone required" || DL_LIBS=$ac_cv_search_dlopen
fi

 LIBS=$saved_LIBS

# libc's stubs aren't always sufficient...
case "$host_os:$libnsl" in
     solaris2.[89]:* ) orig_LIBS="$DL_LIBS $orig_LIBS" ;;
     solaris*:-lnsl    ) NETWORK_LIBS="$NETWORK_LIBS $DL_LIBS" ;;
esac
echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5
echo $ECHO_N "checking for library containing uuid_generate... $ECHO_C" >&6
if test "${ac_cv_search_uuid_generate+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_uuid_generate=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 uuid_generate ();
int
main ()
{
uuid_generate ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_uuid_generate="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_uuid_generate" = no; then
  for ac_lib in uuid; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 uuid_generate ();
int
main ()
{
uuid_generate ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_uuid_generate="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5
echo "${ECHO_T}$ac_cv_search_uuid_generate" >&6
if test "$ac_cv_search_uuid_generate" != no; then
  test "$ac_cv_search_uuid_generate" = "none required" || LIBS="$ac_cv_search_uuid_generate $LIBS"
            WithPackages="$WithPackages${WithPackagesSep}UUID"; WithPackagesSep=" "
    test "x$ac_cv_search_uuid_generate" = "xnone required" || \
       UUID_LIBS=$ac_cv_search_uuid_generate
fi

LIBS=$orig_LIBS
echo "$as_me:$LINENO: checking for library containing fuse_loop" >&5
echo $ECHO_N "checking for library containing fuse_loop... $ECHO_C" >&6
if test "${ac_cv_search_fuse_loop+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_fuse_loop=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 fuse_loop ();
int
main ()
{
fuse_loop ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_fuse_loop="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_fuse_loop" = no; then
  for ac_lib in fuse; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 fuse_loop ();
int
main ()
{
fuse_loop ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_fuse_loop="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_fuse_loop" >&5
echo "${ECHO_T}$ac_cv_search_fuse_loop" >&6
if test "$ac_cv_search_fuse_loop" != no; then
  test "$ac_cv_search_fuse_loop" = "none required" || LIBS="$ac_cv_search_fuse_loop $LIBS"
            WithPackages="$WithPackages${WithPackagesSep}FUSE"; WithPackagesSep=" "
fi

LIBS=$orig_LIBS
saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
if test "${ac_cv_search_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_clock_gettime=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_clock_gettime="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_clock_gettime" = no; then
  for ac_lib in "$RT_LIBS" rt posix4; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_clock_gettime="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
if test "$ac_cv_search_clock_gettime" != no; then
  test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBRT 1
_ACEOF

   test "x$ac_cv_search_clock_gettime" = "xnone required" || RT_LIBS=$ac_cv_search_clock_gettime
fi

 LIBS=$saved_LIBS

saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing cplus_demangle" >&5
echo $ECHO_N "checking for library containing cplus_demangle... $ECHO_C" >&6
if test "${ac_cv_search_cplus_demangle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_cplus_demangle=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 cplus_demangle ();
int
main ()
{
cplus_demangle ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_cplus_demangle="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_cplus_demangle" = no; then
  for ac_lib in "$DEMANGLE_LIBS" demangle; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 cplus_demangle ();
int
main ()
{
cplus_demangle ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_cplus_demangle="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_cplus_demangle" >&5
echo "${ECHO_T}$ac_cv_search_cplus_demangle" >&6
if test "$ac_cv_search_cplus_demangle" != no; then
  test "$ac_cv_search_cplus_demangle" = "none required" || LIBS="$ac_cv_search_cplus_demangle $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBDEMANGLE 1
_ACEOF

   test "x$ac_cv_search_cplus_demangle" = "xnone required" || DEMANGLE_LIBS=$ac_cv_search_cplus_demangle
fi

 LIBS=$saved_LIBS

# Add to (orig_)LIBS if present for the sake of corelib and the
# following call to AC_CHECK_FUNCS.
if test -n "$DEMANGLE_LIBS$RT_LIBS"; then
    LIBS="$DEMANGLE_LIBS $RT_LIBS $LIBS"
    orig_LIBS="$DEMANGLE_LIBS $RT_LIBS $orig_LIBS"
fi


for ac_func in nanosleep sched_yield
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


# We need to include <iconv.h>, since some implementations rename the symbols.
# This logic adapted from Bruno Haible's iconv.m4.
echo "$as_me:$LINENO: checking for library containing iconv" >&5
echo $ECHO_N "checking for library containing iconv... $ECHO_C" >&6
if test "${ac_cv_search_iconv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

   ac_cv_search_iconv=no
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
           #include <iconv.h>
int
main ()
{
iconv_t cd = iconv_open("","");
           iconv(cd,NULL,NULL,NULL,NULL);
           iconv_close(cd);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_iconv="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   if test "$ac_cv_search_iconv" != "none required"; then
      for l in iconv; do
         LIBS="-l$l $orig_LIBS"
         cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
                  #include <iconv.h>
int
main ()
{
iconv_t cd = iconv_open("","");
                  iconv(cd,NULL,NULL,NULL,NULL);
                  iconv_close(cd);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_iconv=-l$l
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
         LIBS="$orig_LIBS"
      done
   fi
fi
echo "$as_me:$LINENO: result: $ac_cv_search_iconv" >&5
echo "${ECHO_T}$ac_cv_search_iconv" >&6
if test "x$ac_cv_search_iconv" != xno; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBICONV 1
_ACEOF

   echo "$as_me:$LINENO: checking for iconv declaration" >&5
echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
   if test "${am_cv_proto_iconv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

      cat >conftest.$ac_ext <<_ACEOF

#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  am_cv_proto_iconv_arg1=""
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

am_cv_proto_iconv_arg1="const"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi

   am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
   echo "$as_me:$LINENO: result: ${ac_t:-
       }$am_cv_proto_iconv" >&5
echo "${ECHO_T}${ac_t:-
       }$am_cv_proto_iconv" >&6

cat >>confdefs.h <<_ACEOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
_ACEOF

   if test "x$ac_cv_search_iconv" != "xnone required"; then
      ICONV_LIBS=$ac_cv_search_iconv
   fi
fi


### Third-party libraries

usr_lib='[/usr]*/lib/*[amdsprcv]*[23469]*'
no_usr_lib="s,-L$usr_lib ,,g;"

if test "$with_z" != "no"; then
    case "$with_z" in
       yes | "" ) ;;
       *        ) Z_PATH=$with_z ;;
    esac
    if test -d "$Z_PATH"; then
       in_path=" in $Z_PATH"
       if test -z "$Z_INCLUDE" -a -d "$Z_PATH/include"; then
          Z_INCLUDE="-I$Z_PATH/include"
       fi
       if test -n "$Z_LIBPATH"; then
          :
       elif test -d "$Z_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $Z_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    Z_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $Z_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    Z_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$Z_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $Z_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    Z_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $Z_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    Z_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       Z_LIBS="$Z_LIBPATH -lz "
    else
       Z_INCLUDE=""
       Z_LIBS="-lz "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libz$in_path" >&5
echo $ECHO_N "checking for libz$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_z+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $Z_INCLUDE $orig_CPPFLAGS"
       LIBS="$Z_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <zlib.h>
int
main ()
{
gzFile fp; char buf[1024]; int n = gzread(fp, buf, sizeof(buf))
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_z=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_z=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_z" >&5
echo "${ECHO_T}$ncbi_cv_lib_z" >&6
    if test "$ncbi_cv_lib_z" = "no"; then
       if test "${with_z:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-z explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-z explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_z" = "no"; then
    Z_PATH="No_Z"
    Z_INCLUDE=
    Z_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}Z"; WithPackagesSep=" "
    Z_INCLUDE=" $Z_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBZ 1
_ACEOF

 fi



if test -z "$Z_LIBS"; then
   zlocal=util/compress/zlib
   { echo "$as_me:$LINENO: using local zlib copy in $zlocal" >&5
echo "$as_me: using local zlib copy in $zlocal" >&6;}
   Z_PATH="<$zlocal>"
   Z_INCLUDE="-I\$(includedir)/$zlocal -I\$(includedir0)/$zlocal"
   # Z_LIBS="-lz"
   Z_LIB="z"
   # AC_DEFINE(USE_LOCAL_ZLIB, 1, [Define to 1 if using a local copy of zlib.])
             WithPackages="$WithPackages${WithPackagesSep}Z"; WithPackagesSep=" "
             WithPackages="$WithPackages${WithPackagesSep}LocalZ"; WithPackagesSep=" "
fi

if test "$with_bz2" != "no"; then
    case "$with_bz2" in
       yes | "" ) ;;
       *        ) BZ2_PATH=$with_bz2 ;;
    esac
    if test -d "$BZ2_PATH"; then
       in_path=" in $BZ2_PATH"
       if test -z "$BZ2_INCLUDE" -a -d "$BZ2_PATH/include"; then
          BZ2_INCLUDE="-I$BZ2_PATH/include"
       fi
       if test -n "$BZ2_LIBPATH"; then
          :
       elif test -d "$BZ2_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $BZ2_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BZ2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $BZ2_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    BZ2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$BZ2_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $BZ2_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BZ2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $BZ2_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    BZ2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       BZ2_LIBS="$BZ2_LIBPATH -lbz2 "
    else
       BZ2_INCLUDE=""
       BZ2_LIBS="-lbz2 "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libbz2$in_path" >&5
echo $ECHO_N "checking for libbz2$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_bz2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $BZ2_INCLUDE $orig_CPPFLAGS"
       LIBS="$BZ2_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bzlib.h>
int
main ()
{
BZFILE* fp; char buf[1024]; int err;
        int n = BZ2_bzRead(&err, fp, buf, sizeof(buf))
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_bz2=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_bz2=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_bz2" >&5
echo "${ECHO_T}$ncbi_cv_lib_bz2" >&6
    if test "$ncbi_cv_lib_bz2" = "no"; then
       if test "${with_bz2:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-bz2 explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-bz2 explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_bz2" = "no"; then
    BZ2_PATH="No_BZ2"
    BZ2_INCLUDE=
    BZ2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}BZ2"; WithPackagesSep=" "
    BZ2_INCLUDE=" $BZ2_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBBZ2 1
_ACEOF

 fi



if test -z "$BZ2_LIBS"; then
   bzlocal=util/compress/bzip2
   { echo "$as_me:$LINENO: using local bzlib copy in $bzlocal" >&5
echo "$as_me: using local bzlib copy in $bzlocal" >&6;}
   BZ2_PATH="<$bzlocal>"
   BZ2_INCLUDE="-I\$(includedir)/$bzlocal -I\$(includedir0)/$bzlocal"
   # BZ2_LIBS="-lbz2"
   BZ2_LIB="bz2"

cat >>confdefs.h <<\_ACEOF
#define USE_LOCAL_BZLIB 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}BZ2"; WithPackagesSep=" "
             WithPackages="$WithPackages${WithPackagesSep}LocalBZ2"; WithPackagesSep=" "
fi

: ${LZO_PATH=$NCBI/lzo2}
if test -d "$LZO_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LZO_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LZO_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LZO_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LZO_PATH" in
               /*) ;;
               * ) LZO_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LZO_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_lzo" != "no"; then
    case "$with_lzo" in
       yes | "" ) ;;
       *        ) LZO_PATH=$with_lzo ;;
    esac
    if test -d "$LZO_PATH"; then
       in_path=" in $LZO_PATH"
       if test -z "$LZO_INCLUDE" -a -d "$LZO_PATH/include"; then
          LZO_INCLUDE="-I$LZO_PATH/include"
       fi
       if test -n "$LZO_LIBPATH"; then
          :
       elif test -d "$LZO_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $LZO_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LZO_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LZO_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    LZO_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LZO_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $LZO_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LZO_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LZO_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    LZO_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LZO_LIBS="$LZO_LIBPATH -llzo2 "
    else
       LZO_INCLUDE=""
       LZO_LIBS="-llzo2 "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for liblzo2$in_path" >&5
echo $ECHO_N "checking for liblzo2$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_lzo+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $LZO_INCLUDE $orig_CPPFLAGS"
       LIBS="$LZO_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lzo/lzo1x.h>
int
main ()
{
lzo_uint32 c = lzo_crc32(0, (const unsigned char*)"foo", 3);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_lzo=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_lzo=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_lzo" >&5
echo "${ECHO_T}$ncbi_cv_lib_lzo" >&6
    if test "$ncbi_cv_lib_lzo" = "no"; then
       if test "${with_lzo:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-lzo explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-lzo explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_lzo" = "no"; then
    LZO_PATH="No_LZO"
    LZO_INCLUDE=
    LZO_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LZO"; WithPackagesSep=" "
    LZO_INCLUDE=" $LZO_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBLZO 1
_ACEOF

 fi




if test -z "$PCRE_PATH"  &&  pcre-config --version >/dev/null 2>&1; then
    p=`pcre-config --prefix`
    test "x$p" = "x/usr"  ||  PCRE_PATH=$p
fi
if test "$with_pcre" != "no"; then
    case "$with_pcre" in
       yes | "" ) ;;
       *        ) PCRE_PATH=$with_pcre ;;
    esac
    if test -d "$PCRE_PATH"; then
       in_path=" in $PCRE_PATH"
       if test -z "$PCRE_INCLUDE" -a -d "$PCRE_PATH/include"; then
          PCRE_INCLUDE="-I$PCRE_PATH/include"
       fi
       if test -n "$PCRE_LIBPATH"; then
          :
       elif test -d "$PCRE_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PCRE_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PCRE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PCRE_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PCRE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$PCRE_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PCRE_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PCRE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PCRE_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PCRE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       PCRE_LIBS="$PCRE_LIBPATH -lpcre "
    else
       PCRE_INCLUDE=""
       PCRE_LIBS="-lpcre "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libpcre$in_path" >&5
echo $ECHO_N "checking for libpcre$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_pcre+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $PCRE_INCLUDE $orig_CPPFLAGS"
       LIBS="$PCRE_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pcre.h>
int
main ()
{
const char*s[]={"x"}; pcre* p; pcre_extra* x = pcre_study(p, 1, s);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_pcre=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_pcre=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_pcre" >&5
echo "${ECHO_T}$ncbi_cv_lib_pcre" >&6
    if test "$ncbi_cv_lib_pcre" = "no"; then
       if test "${with_pcre:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-pcre explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-pcre explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_pcre" = "no"; then
    PCRE_PATH="No_PCRE"
    PCRE_INCLUDE=
    PCRE_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PCRE"; WithPackagesSep=" "
    PCRE_INCLUDE=" $PCRE_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPCRE 1
_ACEOF

 fi



if test -z "$PCRE_LIBS"; then
   pcrelocal=util/regexp
   { echo "$as_me:$LINENO: using local PCRE copy in $pcrelocal" >&5
echo "$as_me: using local PCRE copy in $pcrelocal" >&6;}
   PCRE_PATH="<$pcrelocal>"
   PCRE_INCLUDE="-I\$(includedir)/$pcrelocal -I\$(includedir0)/$pcrelocal"
   # PCRE_LIBS="-lregexp"
   # PCREPOSIX_LIBS="-lregexp"
   PCRE_LIB="regexp"

cat >>confdefs.h <<\_ACEOF
#define USE_LOCAL_PCRE 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}PCRE"; WithPackagesSep=" "
             WithPackages="$WithPackages${WithPackagesSep}LocalPCRE"; WithPackagesSep=" "
else
   PCREPOSIX_LIBS=`echo "$PCRE_LIBS" | sed -e 's/-lpcre/-lpcreposix -lpcre/'`
fi

## SSL/TLS libraries
case "$with_gnutls" in
   no )       ac_cv_path_LIBGNUTLS_CONFIG=no ;;
   yes | '' ) : ${GNUTLS_PATH=$NCBI/gnutls}  ;;
   * )        GNUTLS_PATH=$with_gnutls       ;;
esac
if test -d "$GNUTLS_PATH"; then
   ncbi_fix_dir_tmp=`if cd $GNUTLS_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GNUTLS_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GNUTLS_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GNUTLS_PATH" in
               /*) ;;
               * ) GNUTLS_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GNUTLS_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
# Extract the first word of "libgnutls-config", so it can be a program name with args.
set dummy libgnutls-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LIBGNUTLS_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LIBGNUTLS_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIBGNUTLS_CONFIG="$LIBGNUTLS_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${GNUTLS_BIN-$GNUTLS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/bin}:$GNUTLS_PATH/bin${bit64_sfx}:$GNUTLS_PATH/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
LIBGNUTLS_CONFIG=$ac_cv_path_LIBGNUTLS_CONFIG

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


if test "x$with_gnutls" != xno; then
   if test -x "$LIBGNUTLS_CONFIG"; then
      if test -z "$GNUTLS_PATH"; then
         p=`libgnutls-config --prefix`
         test "x$p" = "x/usr"  ||  GNUTLS_PATH=$p
      fi
   else
      LIBGNUTLS_CONFIG="eval PKG_CONFIG_PATH=\"$GNUTLS_PATH/lib/pkgconfig\" pkg-config gnutls"
      $LIBGNUTLS_CONFIG --exists >/dev/null 2>&1 ||  LIBGNUTLS_CONFIG=no
   fi
   case "$LIBGNUTLS_CONFIG" in
       eval\ *)
           if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GNUTLS_LIBPATH=`$LIBGNUTLS_CONFIG --libs-only-L | sed -e ""`
 else
    GNUTLS_LIBPATH=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$LIBGNUTLS_CONFIG --libs-only-L | sed -e ""`; do
       case "$x" in
          -L*)
             GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_R_flags}"
 fi
           ;;
       no)
           ;;
       *)
           if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GNUTLS_LIBPATH=`$LIBGNUTLS_CONFIG --exec-prefix | sed -e "s,^,-L,; s,$,/lib,;"`
 else
    GNUTLS_LIBPATH=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$LIBGNUTLS_CONFIG --exec-prefix | sed -e "s,^,-L,; s,$,/lib,;"`; do
       case "$x" in
          -L*)
             GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    GNUTLS_LIBPATH="$GNUTLS_LIBPATH${ncbi_rp_R_flags}"
 fi
           ;;
   esac

   if test "x$LIBGNUTLS_CONFIG" != xno; then
      GNUTLS_INCLUDE=`$LIBGNUTLS_CONFIG --cflags`
      GNUTLS_CONFIG_LIBS="`$LIBGNUTLS_CONFIG --libs` $Z_LIBS"
   fi
else
   $as_unset GNUTLS_CONFIG_LIBS || test "${GNUTLS_CONFIG_LIBS+set}" != set || { GNUTLS_CONFIG_LIBS=; export GNUTLS_CONFIG_LIBS; }
fi
if test "$with_gnutls" != "no"; then
    case "$with_gnutls" in
       yes | "" ) ;;
       *        ) GNUTLS_PATH=$with_gnutls ;;
    esac
    if test -d "$GNUTLS_PATH"; then
       in_path=" in $GNUTLS_PATH"
       if test -z "$GNUTLS_INCLUDE" -a -d "$GNUTLS_PATH/include"; then
          GNUTLS_INCLUDE="-I$GNUTLS_PATH/include"
       fi
       if test -n "$GNUTLS_LIBPATH"; then
          :
       elif test -d "$GNUTLS_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $GNUTLS_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GNUTLS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GNUTLS_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GNUTLS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GNUTLS_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $GNUTLS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GNUTLS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GNUTLS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GNUTLS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GNUTLS_LIBS="$GNUTLS_LIBPATH -lgnutls $GNUTLS_CONFIG_LIBS"
    else
       GNUTLS_INCLUDE=""
       GNUTLS_LIBS="-lgnutls $GNUTLS_CONFIG_LIBS"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libgnutls$in_path" >&5
echo $ECHO_N "checking for libgnutls$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_gnutls+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $GNUTLS_INCLUDE $orig_CPPFLAGS"
       LIBS="$GNUTLS_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <gnutls/gnutls.h>
                     #if defined(_MT) && !defined(NCBI_WITHOUT_MT)
                     #  include <gcrypt.h>
                     #  include <pthread.h>
                     #  include <errno.h>
                     GCRY_THREAD_OPTION_PTHREAD_IMPL;
                     #endif
int
main ()
{
#if defined(_MT) && !defined(NCBI_WITHOUT_MT)
     gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
     #endif
     gnutls_session_t s; gnutls_init(&s, GNUTLS_CLIENT);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_gnutls=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_gnutls=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_gnutls" >&5
echo "${ECHO_T}$ncbi_cv_lib_gnutls" >&6
    if test "$ncbi_cv_lib_gnutls" = "no"; then
       if test "${with_gnutls:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-gnutls explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-gnutls explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_gnutls" = "no"; then
    GNUTLS_PATH="No_GNUTLS"
    GNUTLS_INCLUDE=
    GNUTLS_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GNUTLS"; WithPackagesSep=" "
    GNUTLS_INCLUDE=" $GNUTLS_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGNUTLS 1
_ACEOF

 fi



if test -n "$GNUTLS_CONFIG_LIBS"; then
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GNUTLS_LIBS=`echo $GNUTLS_CONFIG_LIBS | sed -e "$no_usr_lib"`
 else
    GNUTLS_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `echo $GNUTLS_CONFIG_LIBS | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L*)
             GNUTLS_LIBS="$GNUTLS_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             GNUTLS_LIBS="$GNUTLS_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    GNUTLS_LIBS="$GNUTLS_LIBS${ncbi_rp_R_flags}"
 fi
fi

if test "$with_openssl" != "no"; then
    case "$with_openssl" in
       yes | "" ) ;;
       *        ) OPENSSL_PATH=$with_openssl ;;
    esac
    if test -d "$OPENSSL_PATH"; then
       in_path=" in $OPENSSL_PATH"
       if test -z "$OPENSSL_INCLUDE" -a -d "$OPENSSL_PATH/include"; then
          OPENSSL_INCLUDE="-I$OPENSSL_PATH/include"
       fi
       if test -n "$OPENSSL_LIBPATH"; then
          :
       elif test -d "$OPENSSL_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OPENSSL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENSSL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENSSL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OPENSSL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$OPENSSL_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OPENSSL_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENSSL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENSSL_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OPENSSL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       OPENSSL_LIBS="$OPENSSL_LIBPATH -lssl -lcrypto"
    else
       OPENSSL_INCLUDE=""
       OPENSSL_LIBS="-lssl -lcrypto"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libssl$in_path" >&5
echo $ECHO_N "checking for libssl$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_openssl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $OPENSSL_INCLUDE $orig_CPPFLAGS"
       LIBS="$OPENSSL_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <openssl/ssl.h>
int
main ()
{
SSL_library_init();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_openssl=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_openssl=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_openssl" >&5
echo "${ECHO_T}$ncbi_cv_lib_openssl" >&6
    if test "$ncbi_cv_lib_openssl" = "no"; then
       if test "${with_openssl:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-openssl explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-openssl explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_openssl" = "no"; then
    OPENSSL_PATH="No_OPENSSL"
    OPENSSL_INCLUDE=
    OPENSSL_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}OPENSSL"; WithPackagesSep=" "
    OPENSSL_INCLUDE=" $OPENSSL_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBOPENSSL 1
_ACEOF

 fi




OPENSSL_STATIC_LIBS=$OPENSSL_LIBS
for d in `echo " $OPENSSL_LIBS" | fmt -w 1 | sed -ne 's/^ *-L//p'` \
   /usr/local/lib${bit64_sfx} /usr/local/lib /usr/lib${bit64_sfx} /usr/lib; do
   if test -f $d/libssl.a -a -f $d/libcrypto.a; then
      OPENSSL_STATIC_LIBS="$d/libssl.a $d/libcrypto.a"
      break
   elif test -f $d/libssl.so -o -f $d/libssl.dylib; then
      break
   fi
done

if test -n "$GNUTLS_LIBS"; then
   TLS_INCLUDE=$GNUTLS_INCLUDE
   TLS_LIBS=$GNUTLS_LIBS
else
   TLS_INCLUDE=$OPENSSL_INCLUDE
   TLS_LIBS=$OPENSSL_LIBS
fi

## SYBASE libraries

NETWORK_PURE_LIBS="$NETWORK_LIBS"
ncbi_xreader_pubseqos=
UNLESS_PUBSEQOS=
if test "$with_sybase" != "no" ; then
   sybase_lib=lib$bit64_sfx
   resolve_sybase=true
   default_pointer=default-${NCBI_PLATFORM_BITS}bit
   : ${with_sybase_new:="no"}
   case "$host_os" in
      linux* )
         : ${with_sybase_local:=yes}
         ;;
      * )
         if test -d "$net_sybase_root" ; then
            : ${with_sybase_local:=no}
         else
            : ${with_sybase_local:=yes}
         fi
         ;;
   esac

   if test "$with_sybase_local" != "no" ; then
      if test "$with_sybase_local" = "yes" ; then
         if test -n "$SYBASE_PATH" ; then
            with_sybase_local=$SYBASE_PATH
         else
            if test "$with_sybase_new" = "yes" ; then
               with_sybase_local=$local_sybase_root/new
            elif test -f "$local_sybase_root/$default_pointer" ; then
               with_sybase_local=`cat $local_sybase_root/$default_pointer`
               resolve_sybase=false
            else
               with_sybase_local=$local_sybase_root/current
            fi
            if test -d "$with_sybase_local$NCBI_PLATFORM_BITS" ; then
               with_sybase_local=$with_sybase_local$NCBI_PLATFORM_BITS
            fi
         fi # default paths
      fi # no command-line path
      if test -d "$with_sybase_local" ; then
         SYBASE_PATH=$with_sybase_local
         SYBASE_LCL_PATH=
      else
         with_sybase_local=no
      fi
   fi

   if test "$with_sybase_local" = "no" ; then
      if test "$with_sybase_new" = "yes" ; then
         if test -d "$net_sybase_root/new$NCBI_PLATFORM_BITS" ; then
            SYBASE_LCL_PATH=$local_sybase_root/new$NCBI_PLATFORM_BITS
            SYBASE_PATH=$net_sybase_root/new$NCBI_PLATFORM_BITS
         elif test -d "$net_sybase_root/new" ; then
            SYBASE_LCL_PATH=$local_sybase_root/new
            SYBASE_PATH=$net_sybase_root/new
         else
            with_sybase_new=no
         fi
      fi

      if test -z "$SYBASE_PATH" ; then
         if test -f "$net_sybase_root/$default_pointer" ; then
            SYBASE_LCL_PATH=
            SYBASE_PATH=`cat $local_sybase_root/$default_pointer`
            resolve_sybase=false
         elif test -d "$net_sybase_root/current$NCBI_PLATFORM_BITS" ; then
            SYBASE_LCL_PATH=$local_sybase_root/current$NCBI_PLATFORM_BITS
            SYBASE_PATH=$net_sybase_root/current$NCBI_PLATFORM_BITS
         elif test -d "$net_sybase_root/current" ; then
            SYBASE_LCL_PATH=$local_sybase_root/current
            SYBASE_PATH=$net_sybase_root/current
         else
            SYBASE_LCL_PATH=
            SYBASE_PATH=$SYBASE
         fi
      fi
   fi

   # Lock in the version we found, ignoring symlinks further up
   case "$SYBASE_PATH" in
      */[1-9]* ) resolve_sybase=false ;;
   esac
   if test -d "$SYBASE_PATH"  &&  $resolve_sybase; then
      # SYBASE_PATH_=`cd $SYBASE_PATH && /bin/pwd`
      SYBASE_PATH_=`ls -ld $SYBASE_PATH | sed -ne 's/.* -> //p'`
      case "$SYBASE_PATH_" in
         '' ) ;;
         /* )
            SYBASE_VERSION=`basename $SYBASE_PATH_`
            SYBASE_PATH=`dirname $SYBASE_PATH`/$SYBASE_VERSION
            test -d "$SYBASE_PATH"  ||  SYBASE_PATH=$SYBASE_PATH_
            ;;
         * )
            orig_parent=`dirname $SYBASE_PATH`
            SYBASE_VERSION=`basename $SYBASE_PATH_`
            SYBASE_PATH=$orig_parent/$SYBASE_VERSION
            test -d "$SYBASE_PATH"  ||  SYBASE_PATH=$orig_parent/$SYBASE_PATH_
            ;;
      esac
   fi

   if test -d "$SYBASE_LCL_PATH"  &&  $resolve_sybase ; then
      # SYBASE_LCL_PATH_=`cd $SYBASE_LCL_PATH && /bin/pwd`
      SYBASE_LCL_PATH_=`ls -ld $SYBASE_LCL_PATH | sed -ne 's/.* -> //p'`
      case "$SYBASE_LCL_PATH_" in
         '' ) ;;
         /* )
            SYBASE_LCL_VERSION=`basename $SYBASE_LCL_PATH_`
            SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_LCL_VERSION
            test -d "$SYBASE_LCL_PATH"  ||  SYBASE_LCL_PATH=$SYBASE_LCL_PATH_
            ;;
         * )
            orig_parent=`dirname $SYBASE_LCL_PATH`
            SYBASE_LCL_VERSION=`basename $SYBASE_LCL_PATH_`
            SYBASE_LCL_PATH=$orig_parent/$SYBASE_LCL_VERSION
            test -d "$SYBASE_LCL_PATH"  || \
               SYBASE_LCL_PATH=$orig_parent/$SYBASE_LCL_PATH_
            ;;
      esac
   elif test -n "$SYBASE_LCL_PATH" ; then
      SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_VERSION
   fi

   if test -n "$SYBASE_VERSION" -a -n "$SYBASE_LCL_VERSION" \
        -a "$SYBASE_VERSION" != "$SYBASE_LCL_VERSION" ; then
      { echo "$as_me:$LINENO: WARNING: ignoring inconsistent local Sybase symlink: $SYBASE_LCL_VERSION vs. $SYBASE_VERSION" >&5
echo "$as_me: WARNING: ignoring inconsistent local Sybase symlink: $SYBASE_LCL_VERSION vs. $SYBASE_VERSION" >&2;}
      SYBASE_LCL_PATH=`dirname $SYBASE_LCL_PATH`/$SYBASE_VERSION
   fi

   if test -n "$SYBASE" ; then
      if test -d "$net_sybase_root" -o -d "$local_sybase_root" ; then
         case $SYBASE in
            $net_sybase_root/* | $local_sybase_root/* ) ;;
            * ) { echo "$as_me:$LINENO: WARNING: ignoring non-standard SYBASE setting: $SYBASE" >&5
echo "$as_me: WARNING: ignoring non-standard SYBASE setting: $SYBASE" >&2;} ;;
            # Ignored regardless, but standard values are not so concerning.
         esac
      fi
   fi

   SYBASE_LIBPATH="$SYBASE_PATH/${sybase_lib}"
   syb_sfx=$bit64_sfx
   if test "$with_mt" = "yes" ; then
      echo "$as_me:$LINENO: checking for reentrant Sybase libraries" >&5
echo $ECHO_N "checking for reentrant Sybase libraries... $ECHO_C" >&6
if test "${ncbi_cv_lib_sybase_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -f "$SYBASE_LIBPATH/libct_r$bit64_sfx.so"; then
             ncbi_cv_lib_sybase_r=yes
          else
             ncbi_cv_lib_sybase_r=no
          fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sybase_r" >&5
echo "${ECHO_T}$ncbi_cv_lib_sybase_r" >&6
      if test $ncbi_cv_lib_sybase_r = yes; then
         syb_sfx=_r$bit64_sfx
      fi
   fi
   case "$host_os" in
      linux*) sybtcl=-lsybtcl$syb_sfx; sybtli="" ;;
      *)      sybtcl=-ltcl$syb_sfx;    sybtli=-ltli$syb_sfx ;;
   esac
   test -f "$SYBASE_LIBPATH/libtli.so" || sybtli=

   # quick-patch for the bad "tli" lib (Solaris8/Intel specific)
   case "$host_os:$host_vendor" in
      solaris*:pc )  : ${sybase_sol8pc_patch:="yes"} ;;
   esac
   if test "$sybase_sol8pc_patch" = "yes" ; then
      sybtli="-ltli_orig$syb_sfx -ltli$syb_sfx"
      SYBASE_NETWORK_LIBS="-ltli$syb_sfx $NETWORK_LIBS"
   else
      SYBASE_NETWORK_LIBS="$NETWORK_LIBS"
   fi

   test -n "$bit64_sfx"  &&  SYBASE_INCLUDE="-DSYB_LP64"
   SYBASE_LIBLIST="-lblk$syb_sfx -lct$syb_sfx -lcs$syb_sfx $sybtcl"
   SYBASE_LIBLIST="$SYBASE_LIBLIST -lcomn$syb_sfx -lintl$syb_sfx"
   SYBASE_DLLLIST="$sybtli"

   # deduce conf.macro: SYBASE_INCLUDE, SYBASE_LIBS, SYBASE_DLLS, SYBASE_DBLIBS
   SYBASE_INCLUDE="-I$SYBASE_PATH/include $SYBASE_INCLUDE"
   if test -z "$SYBASE_LCL_PATH" ; then
      ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SYBASE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SYBASE_LPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SYBASE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SYBASE_LPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   else
      SYBASE_LCL_LIBPATH="$SYBASE_LCL_PATH/${sybase_lib}"
      ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SYBASE_LCL_LIBPATH $SYBASE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SYBASE_LPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SYBASE_LCL_LIBPATH $SYBASE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SYBASE_LPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
      SYBASE_INCLUDE="-I$SYBASE_LCL_PATH/include $SYBASE_INCLUDE"
   fi
   SYBASE_LIBS="$SYBASE_LPATH $SYBASE_LIBLIST"
   SYBASE_DBLIBS="$SYBASE_LPATH $SYBASE_DBLIBS"
   SYBASE_DLLS="$SYBASE_DLLLIST"

   echo "$as_me:$LINENO: checking for Sybase in $SYBASE_PATH" >&5
echo $ECHO_N "checking for Sybase in $SYBASE_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_sybase+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$SYBASE_INCLUDE $orig_CPPFLAGS"
       LIBS="$SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $DL_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctpublic.h>
int
main ()
{
CS_RETCODE i = ct_init(0,0);  i = cs_ctx_global(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sybase=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sybase=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sybase" >&5
echo "${ECHO_T}$ncbi_cv_lib_sybase" >&6

   if test "$ncbi_cv_lib_sybase" = yes; then
                WithPackages="$WithPackages${WithPackagesSep}Sybase"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSYBASE 1
_ACEOF

      if test "$with_mt" = "yes" -a "$ncbi_cv_lib_sybase_r" = "yes"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_SYBASE_REENTRANT 1
_ACEOF

      fi
      if test "$with_dbapi" != no -a -f ${real_srcdir}/src/objtools/data_loaders/genbank/pubseq/Makefile.ncbi_xreader_pubseqos.lib ; then
         echo "$as_me:$LINENO: checking for PubSeq service availability" >&5
echo $ECHO_N "checking for PubSeq service availability... $ECHO_C" >&6
if test "${ncbi_cv_db_pubseq+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if grep PUBSEQ_OS $SYBASE_PATH/interfaces >/dev/null; then
                ncbi_cv_db_pubseq=yes
             else
                ncbi_cv_db_pubseq=no
             fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_db_pubseq" >&5
echo "${ECHO_T}$ncbi_cv_db_pubseq" >&6
         if test "$ncbi_cv_db_pubseq" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_PUBSEQ_OS 1
_ACEOF

                      WithFeatures="$WithFeatures${WithFeaturesSep}PubSeqOS"; WithFeaturesSep=" "
            ncbi_xreader_pubseqos=ncbi_xreader_pubseqos
            ncbi_xreader_pubseqos2=ncbi_xreader_pubseqos2
            UNLESS_PUBSEQOS=\#
         fi
      fi

      SYBASE_DBLIBS="$SYBASE_LPATH -lsybdb${bit64_sfx}"
      echo "$as_me:$LINENO: checking for Sybase DBLib" >&5
echo $ECHO_N "checking for Sybase DBLib... $ECHO_C" >&6
if test "${ncbi_cv_lib_sybdb+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$SYBASE_DBLIBS $SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $DL_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

              #include <sybfront.h>
              #include <sybdb.h>

int
main ()
{

              LOGINREC*  x_login     = 0;
              DBPROCESS* x_dbproc    = dbopen(x_login, (char*) "SRV_NAME");

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sybdb=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sybdb=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sybdb" >&5
echo "${ECHO_T}$ncbi_cv_lib_sybdb" >&6
      if test "$ncbi_cv_lib_sybdb" = yes; then
                   WithPackages="$WithPackages${WithPackagesSep}DBLib"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSYBDB 1
_ACEOF

      else
         SYBASE_DBLIBS=
      fi
      # apply the Sybase patch to $NETWORK_LIBS
      if test "$sybase_sol8pc_patch" = "yes" ; then
         NETWORK_LIBS="$SYBASE_LPATH $SYBASE_NETWORK_LIBS"
      fi
   else
      if test "${with_sybase:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sybase explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sybase explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi # with_sybase != no?

if test "$with_sybase" = no; then
   SYBASE_PATH="No_Sybase"
   SYBASE_INCLUDE=
   SYBASE_LIBS=
   SYBASE_DLLS=
   SYBASE_DBLIBS=
fi

SYBASE_LPATH=
SYBASE_LCL_LIBPATH=
SYBASE_LIBLIST=
SYBASE_DLLLIST=
SYBASE_LIBPATH=


## FreeTDS libraries
freetds=
if test "$with_ftds" != "no" ; then
   ftds64=ftds64
   try_local=yes
   case "$with_ftds" in
      64 | yes | '' )
         ftds_ver=64
         ftds64=ftds
         ;;
      * )
         FTDS_PATH=$with_ftds
         try_local=no
         ;;
   esac
   : ${FTDS_CTLIBS:="-lct -ltds"}
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $FTDS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FTDS_CTLIBS="${ncbi_rp_L_flags} $FTDS_CTLIBS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FTDS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    FTDS_CTLIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} $FTDS_CTLIBS"
 fi
   FTDS_INCLUDE="-I$FTDS_PATH/include"
   d="dbapi/driver/ftds64/freetds"
      if test $try_local = yes -a -f "${real_srcdir}/src/$d/Makefile.in" ; then
         test "$with_ftds" = 64  &&  FTDS_PATH="<$d>"
         FTDS64_CTLIB_LIB="ct_ftds64${STATIC} tds_ftds64${STATIC}"
         FTDS64_CTLIB_LIBS='$(ICONV_LIBS)'
         FTDS64_CTLIB_INCLUDE="-I\$(includedir)/$d -I\$(includedir0)/$d"
         freetds=freetds
      elif test -d "$FTDS_PATH" ; then
         FTDS64_CTLIB_LIB=
         FTDS64_CTLIB_LIBS=$FTDS_CTLIBS
         FTDS64_CTLIB_INCLUDE=$FTDS_INCLUDE
      fi
      FTDS64_LIB='$(FTDS64_CTLIB_LIB)'
      FTDS64_LIBS='$(FTDS64_CTLIB_LIBS)'
      FTDS64_INCLUDE='$(FTDS64_CTLIB_INCLUDE)'

   if test -n "$freetds" ; then
      FTDS_LIB="\$(FTDS${ftds_ver}_LIB)"
      FTDS_LIBS="\$(FTDS${ftds_ver}_LIBS)"
      FTDS_INCLUDE="\$(FTDS${ftds_ver}_INCLUDE)"
      if test "$with_ftds_renamed" != "no" ; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_FTDS_RENAME_SYBDB 1
_ACEOF

      fi
      { echo "$as_me:$LINENO: Using bundled FreeTDS (version $ftds_ver) from $FTDS_PATH" >&5
echo "$as_me: Using bundled FreeTDS (version $ftds_ver) from $FTDS_PATH" >&6;}
   else
      FTDS_LIBS="$FTDS_CTLIBS"
      echo "$as_me:$LINENO: checking for FreeTDS in $FTDS_PATH" >&5
echo $ECHO_N "checking for FreeTDS in $FTDS_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_freetds+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$FTDS_INCLUDE $orig_CPPFLAGS"
          LIBS="$FTDS_LIBS $NETWORK_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

             #include <sybdb.h>
             #include <tds.h>

int
main ()
{

             LOGINREC*  x_login     = 0;
             DBPROCESS* x_dbproc    = dbopen(x_login, (char*) "SRV_NAME");
             TDSLOGIN*  x_tds_login = 0;
             /* TDSSOCKET* x_sock      = tds_connect(x_tds_login); */
             tds_set_timeouts(x_tds_login, 0, 0, 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_freetds=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_freetds=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_freetds" >&5
echo "${ECHO_T}$ncbi_cv_lib_freetds" >&6
      if test "$ncbi_cv_lib_freetds" = "no"; then
         # Don't panic when using partial trees lacking dbapi/driver/ftdsN.
         if test "${with_ftds:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-ftds explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-ftds explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      fi
   fi
fi
if test "$with_ftds" = "no" ; then
   FTDS_PATH=
   FTDS_INCLUDE=
   FTDS_LIBS=
   FTDS_LIB=
   FTDS64_INCLUDE=
   FTDS64_LIBS=
   FTDS64_LIB=
   FTDS64_CTLIB_INCLUDE=
   FTDS64_CTLIB_LIBS=
   FTDS64_CTLIB_LIB=
   freetds=
else

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBFTDS 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}FreeTDS"; WithPackagesSep=" "
fi













## MySQL
if test "$with_mysql" != "no" ; then
   case "$with_mysql" in
      yes | "" ) ;;
      *        ) MYSQL_PATH=$with_mysql ;;
   esac
   : ${MYSQL_BINPATH=$MYSQL_PATH/bin}
   # Extract the first word of "mysql_config", so it can be a program name with args.
set dummy mysql_config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_mysql_config+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $mysql_config in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_mysql_config="$mysql_config" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$MYSQL_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_mysql_config="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
mysql_config=$ac_cv_path_mysql_config

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

   if test -n "$mysql_config" ; then
      : ${MYSQL_BINPATH=`dirname $mysql_config`}
      # Kill off single quotes, due to later requoting
      : ${MYSQL_INCLUDE=`$mysql_config --include | tr -d \'`}
      if test -z "${MYSQL_LIBS+set}"; then
    if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    MYSQL_LIBS=`$mysql_config --libs${mt_sfx:+_r} | sed -e "s/'//g; "`
 else
    MYSQL_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$mysql_config --libs${mt_sfx:+_r} | sed -e "s/'//g; "`; do
       case "$x" in
          -L*)
             MYSQL_LIBS="$MYSQL_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             MYSQL_LIBS="$MYSQL_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    MYSQL_LIBS="$MYSQL_LIBS${ncbi_rp_R_flags}"
 fi
 fi
      echo "$as_me:$LINENO: checking whether MySQL works" >&5
echo $ECHO_N "checking whether MySQL works... $ECHO_C" >&6
if test "${ncbi_cv_lib_mysql+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$MYSQL_INCLUDE $orig_CPPFLAGS"
          LIBS="$MYSQL_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <mysql.h>
int
main ()
{
MYSQL *p;  p = mysql_init(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_mysql=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_mysql=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_mysql" >&5
echo "${ECHO_T}$ncbi_cv_lib_mysql" >&6
      if test "$ncbi_cv_lib_mysql" = no; then
         if test "${with_mysql:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-mysql explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-mysql explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      fi
   else
      if test "${with_mysql:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-mysql explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-mysql explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_mysql" = "no" ; then
   MYSQL_PATH="No_MYSQL"
   MYSQL_INCLUDE=
   MYSQL_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}MySQL"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_MYSQL 1
_ACEOF

fi


## Berkeley DB library
if test "$with_bdb" != "no" ; then
   case "$with_bdb" in
      yes | "" )
         : ${BERKELEYDB_PATH:="$NCBI/BerkeleyDB"}
         ;;
      */*)
          BERKELEYDB_PATH=$with_bdb
          $as_unset BERKELEYDB_INCLUDE || test "${BERKELEYDB_INCLUDE+set}" != set || { BERKELEYDB_INCLUDE=; export BERKELEYDB_INCLUDE; }
          $as_unset BERKELEYDB_LIBPATH || test "${BERKELEYDB_LIBPATH+set}" != set || { BERKELEYDB_LIBPATH=; export BERKELEYDB_LIBPATH; }
          $as_unset BERKELEYDB_LIBS || test "${BERKELEYDB_LIBS+set}" != set || { BERKELEYDB_LIBS=; export BERKELEYDB_LIBS; }
          ;;
      *)
          BERKELEYDB_PATH=$NCBI/BerkeleyDB-${with_bdb}
          $as_unset BERKELEYDB_INCLUDE || test "${BERKELEYDB_INCLUDE+set}" != set || { BERKELEYDB_INCLUDE=; export BERKELEYDB_INCLUDE; }
          $as_unset BERKELEYDB_LIBPATH || test "${BERKELEYDB_LIBPATH+set}" != set || { BERKELEYDB_LIBPATH=; export BERKELEYDB_LIBPATH; }
          $as_unset BERKELEYDB_LIBS || test "${BERKELEYDB_LIBS+set}" != set || { BERKELEYDB_LIBS=; export BERKELEYDB_LIBS; }
          ;;
   esac
   if test -d "$BERKELEYDB_PATH"; then
      ncbi_fix_dir_tmp=`if cd $BERKELEYDB_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $BERKELEYDB_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            BERKELEYDB_PATH=$ncbi_fix_dir_tmp2
         else
            case "$BERKELEYDB_PATH" in
               /*) ;;
               * ) BERKELEYDB_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) BERKELEYDB_PATH=$ncbi_fix_dir_tmp ;;
 esac
      : ${BERKELEYDB_INCLUDE:="-I$BERKELEYDB_PATH/include"}
   fi
   if test -z "${BERKELEYDB_LIBPATH}"; then
      for d in "${compiler_vpfx}${DEBUG_SFX}" "${compiler_pfx}${DEBUG_SFX}" \
               "${DEBUG_SFX}" lib; do
         for sfx in "$mt_sfx$bit64_sfx" "$bit64_sfx$mt_sfx" "$bit64_sfx" \
                    "$mt_sfx" ""; do
            BERKELEYDB_LIBPATH=${BERKELEYDB_PATH}/$d$sfx
            test -d "${BERKELEYDB_LIBPATH}"  &&  break
         done
         test -d "${BERKELEYDB_LIBPATH}"  &&  break
      done
   fi
   if test -d "$BERKELEYDB_LIBPATH"; then
      ncbi_fix_dir_tmp=`if cd $BERKELEYDB_LIBPATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $BERKELEYDB_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            BERKELEYDB_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$BERKELEYDB_LIBPATH" in
               /*) ;;
               * ) BERKELEYDB_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) BERKELEYDB_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
      if test -z "${BERKELEYDB_LIBS:+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in ${BERKELEYDB_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BERKELEYDB_LIBS="${ncbi_rp_L_flags} -ldb"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in ${BERKELEYDB_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    BERKELEYDB_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -ldb"
 fi
 fi
   else
      : ${BERKELEYDB_LIBS:="-ldb"}
   fi
   if test -f "${BERKELEYDB_LIBPATH}/libdb-static.a"; then
      BERKELEYDB_STATIC_LIBS="-L${BERKELEYDB_LIBPATH} -ldb-static"
   else
      BERKELEYDB_STATIC_LIBS=${BERKELEYDB_LIBS}
   fi
   echo "$as_me:$LINENO: checking for Berkeley DB libraries in $BERKELEYDB_PATH" >&5
echo $ECHO_N "checking for Berkeley DB libraries in $BERKELEYDB_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_berkeley_db+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BERKELEYDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$BERKELEYDB_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <db.h>
int
main ()
{
 DB* dbp;  db_create(&dbp, NULL, 0);  dbp->app_private = 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_berkeley_db=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_berkeley_db=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_berkeley_db" >&5
echo "${ECHO_T}$ncbi_cv_lib_berkeley_db" >&6
   if test "$ncbi_cv_lib_berkeley_db" = "no"; then
      if test "${with_bdb:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-bdb explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-bdb explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   else
      echo "$as_me:$LINENO: checking Berkeley DB version (4.3 or newer required)" >&5
echo $ECHO_N "checking Berkeley DB version (4.3 or newer required)... $ECHO_C" >&6
if test "${ncbi_cv_lib_berkeley_db_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <db.h>
ncbi_cv_lib_berkeley_db_version=DB_VERSION_MAJOR.DB_VERSION_MINOR.DB_VERSION_PATCH

_ACEOF
          eval "$ac_cpp $BERKELEYDB_INCLUDE conftest.$ac_ext" \
             2>&5 | grep '^ncbi_cv_' | tr -d ' 	' > conftest.sh
          . ./conftest.sh
          rm -f contest*

fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_berkeley_db_version" >&5
echo "${ECHO_T}$ncbi_cv_lib_berkeley_db_version" >&6
      case "$ncbi_cv_lib_berkeley_db_version" in
         1.* | 2.* | 3.* | 4.[0-2].* )
            { echo "$as_me:$LINENO: WARNING: Your Berkeley DB version is too old to use.  (Needed >= 4.3.)" >&5
echo "$as_me: WARNING: Your Berkeley DB version is too old to use.  (Needed >= 4.3.)" >&2;}
            if test -n "$with_bdb"; then
               { { echo "$as_me:$LINENO: error: --with-bdb:  Berkeley DB library is too old" >&5
echo "$as_me: error: --with-bdb:  Berkeley DB library is too old" >&2;}
   { (exit 1); exit 1; }; }
            fi
            with_bdb=no
            ;;
         4.[3-6].* ) ;;
         * )
            { echo "$as_me:$LINENO: WARNING: Untested Berkeley DB version; may prove incompatible." >&5
echo "$as_me: WARNING: Untested Berkeley DB version; may prove incompatible." >&2;}
            { echo "$as_me:$LINENO: WARNING: If so, please re-run this script with the flag --without-bdb." >&5
echo "$as_me: WARNING: If so, please re-run this script with the flag --without-bdb." >&2;}
            ;;
      esac
   fi
fi
if test "$with_bdb" = "no" ; then
   BERKELEYDB_PATH="No_BerkeleyDB"
   BERKELEYDB_INCLUDE=
   BERKELEYDB_LIBS=
   BERKELEYDB_STATIC_LIBS=
   BERKELEYDB_CXX_LIBS=
   BERKELEYDB_CXX_STATIC_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}BerkeleyDB"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_BERKELEY_DB 1
_ACEOF

   if test -d "$BERKELEYDB_LIBPATH"; then
      if test -z "${BERKELEYDB_CXX_LIBS:+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in ${BERKELEYDB_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BERKELEYDB_CXX_LIBS="${ncbi_rp_L_flags} -ldb_cxx -ldb"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in ${BERKELEYDB_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    BERKELEYDB_CXX_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -ldb_cxx -ldb"
 fi
 fi
   else
      : ${BERKELEYDB_CXX_LIBS:="-ldb_cxx -ldb"}
   fi
   if test -f "${BERKELEYDB_LIBPATH}/libdb_cxx-static.a"; then
      BERKELEYDB_CXX_STATIC_LIBS="-L${BERKELEYDB_LIBPATH} -ldb_cxx-static -ldb-static"
   else
      BERKELEYDB_CXX_STATIC_LIBS=${BERKELEYDB_CXX_LIBS}
   fi
   echo "$as_me:$LINENO: checking for native Berkeley DB C++ wrappers (optional)" >&5
echo $ECHO_N "checking for native Berkeley DB C++ wrappers (optional)... $ECHO_C" >&6
if test "${ncbi_cv_lib_berkeley_db_cxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BERKELEYDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$BERKELEYDB_CXX_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <db_cxx.h>
int
main ()
{
DbEnv env(0);  Db db(&env, 0);  db.set_app_private(NULL);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_berkeley_db_cxx=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_berkeley_db_cxx=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_berkeley_db_cxx" >&5
echo "${ECHO_T}$ncbi_cv_lib_berkeley_db_cxx" >&6
   if test "$ncbi_cv_lib_berkeley_db_cxx" = "yes"; then
                WithPackages="$WithPackages${WithPackagesSep}BerkeleyDB++"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_BERKELEY_DB_CXX 1
_ACEOF

   else
      BERKELEYDB_CXX_LIBS=
      BERKELEYDB_CXX_STATIC_LIBS=
   fi
fi


## ODBC
case "$with_odbc" in
   yes | ""   ) : ${ODBC_PATH:=dbapi/driver/odbc/unix_odbc} ;;
   internal | no ) ODBC_PATH=dbapi/driver/odbc/unix_odbc       ;;
   *          ) ODBC_PATH=$with_odbc                        ;;
esac

case "$ODBC_PATH" in
 dbapi/* ) ;;
 *)
   ODBC_INCLUDE="-I$ODBC_PATH/include"
   ODBC_LIBPATH="${ODBC_PATH}/lib"
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in ${ODBC_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ODBC_LIBS="${ncbi_rp_L_flags} -lodbc -lodbcinst"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in ${ODBC_LIBPATH}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    ODBC_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lodbc -lodbcinst"
 fi
   CPPFLAGS="$ODBC_INCLUDE $orig_CPPFLAGS"
   LIBS="$ODBC_LIBS $orig_LIBS"
   echo "$as_me:$LINENO: checking for ODBC libraries in $ODBC_PATH" >&5
echo $ECHO_N "checking for ODBC libraries in $ODBC_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_odbc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sql.h>
int
main ()
{
SQLHDBC hdbc;  SQLCHAR* cp = (SQLCHAR*) "x";
            SQLRETURN x = SQLConnect(hdbc, cp, 1, cp, 2, cp, 3);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_odbc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_odbc=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_odbc" >&5
echo "${ECHO_T}$ncbi_cv_lib_odbc" >&6
   if test "$ncbi_cv_lib_odbc" = "no"; then
                  if test "${with_odbc:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-odbc explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-odbc explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   else
      # odbcss.h isn't self-contained :-/

for ac_header in odbcss.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sql.h>

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



for ac_func in SQLGetPrivateProfileString
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

      echo "$as_me:$LINENO: checking for SQLLEN" >&5
echo $ECHO_N "checking for SQLLEN... $ECHO_C" >&6
if test "${ac_cv_type_SQLLEN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sqltypes.h>

int
main ()
{
if ((SQLLEN *) 0)
  return 0;
if (sizeof (SQLLEN))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_SQLLEN=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<_ACEOF
#define HAVE_SQLLEN 1
_ACEOF


fi


      echo "$as_me:$LINENO: checking whether SQLColAttribute's last argument is an SQLLEN *" >&5
echo $ECHO_N "checking whether SQLColAttribute's last argument is an SQLLEN *... $ECHO_C" >&6
if test "${ncbi_cv_func_sqlcolattribute_sqllen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sql.h>>
              SQLRETURN SQL_API SQLColAttribute
                (SQLHSTMT sh, SQLUSMALLINT cn, SQLUSMALLINT fi, SQLPOINTER ca,
                 SQLSMALLINT bl, SQLSMALLINT *sl, SQLLEN *na);
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_func_sqlcolattribute_sqllen=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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

cat >>confdefs.h <<\_ACEOF
#define NCBI_SQLCOLATTRIBUTE_SQLLEN 1
_ACEOF

      fi
   fi
   ;;
esac

case "$ODBC_PATH" in
 dbapi/*)
   # ODBC_PATH="No_ODBC"
   # Point to a local copy of unixODBC's headers, required by FreeTDS 0.64+.
   ODBC_INCLUDE="-I\$(includedir)/$ODBC_PATH -I\$(includedir0)/$ODBC_PATH"
   ODBC_LIBS=
      cat >>confdefs.h <<\_ACEOF
#define HAVE_SQLLEN 1
_ACEOF

   ;;
 *)
             WithPackages="$WithPackages${WithPackagesSep}ODBC"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_ODBC 1
_ACEOF

   ;;
esac

## Python
if test "$with_python" != "no" ; then
   case "$with_python" in
      yes | "" ) ;;
      */*      ) PYTHON_PATH=$with_python ;;
   esac
   # Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PYTHON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PYTHON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PYTHON_PATH/bin:$PATH:/usr/local/python-/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
PYTHON=$ac_cv_path_PYTHON

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

 if test -x "$PYTHON"; then
    PYTHON_VERSION=`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("VERSION")' 2>/dev/null`
 else
    PYTHON_VERSION=
    ncbi_cv_lib_python=no
 fi
 if test -n "$PYTHON_VERSION"; then
    PYTHON_INCLUDE=`$PYTHON -c 'from distutils import sysconfig; f=sysconfig.get_python_inc; print "-I%s -I%s" % (f(), f(True))'`
    PYTHON_LIBPATH=`$PYTHON -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBDIR", "LIBPL"))'`
    PYTHON_DEPS=`$PYTHON -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBS", "SYSLIBS"))'`
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PYTHON_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON_LIBS="${ncbi_rp_L_flags} -lpython$PYTHON_VERSION $PYTHON_DEPS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PYTHON_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lpython$PYTHON_VERSION $PYTHON_DEPS"
 fi
    CPPFLAGS="$PYTHON_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON_LIBS $orig_LIBS"
    echo "$as_me:$LINENO: checking for usable Python $PYTHON_VERSION libraries" >&5
echo $ECHO_N "checking for usable Python $PYTHON_VERSION libraries... $ECHO_C" >&6
if test "${ncbi_cv_lib_python+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_python=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_python=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_python" >&5
echo "${ECHO_T}$ncbi_cv_lib_python" >&6
 else
    ncbi_cv_lib_python=no
 fi
 if test "$ncbi_cv_lib_python" = "no"; then
    PYTHON_INCLUDE=
    PYTHON_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_PYTHON 1
_ACEOF

 fi



   # Extract the first word of "python2.3", so it can be a program name with args.
set dummy python2.3; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PYTHON23+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PYTHON23 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON23="$PYTHON23" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PYTHON_PATH/bin:$PATH:/usr/local/python-2.3/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON23="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
PYTHON23=$ac_cv_path_PYTHON23

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

 if test -x "$PYTHON23"; then
    PYTHON23_VERSION=`$PYTHON23 -c 'from distutils import sysconfig; print sysconfig.get_config_var("VERSION")' 2>/dev/null`
 else
    PYTHON23_VERSION=
    ncbi_cv_lib_python23=no
 fi
 if test -n "$PYTHON23_VERSION"; then
    PYTHON23_INCLUDE=`$PYTHON23 -c 'from distutils import sysconfig; f=sysconfig.get_python_inc; print "-I%s -I%s" % (f(), f(True))'`
    PYTHON23_LIBPATH=`$PYTHON23 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBDIR", "LIBPL"))'`
    PYTHON23_DEPS=`$PYTHON23 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBS", "SYSLIBS"))'`
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PYTHON23_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON23_LIBS="${ncbi_rp_L_flags} -lpython$PYTHON23_VERSION $PYTHON23_DEPS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON23_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PYTHON23_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lpython$PYTHON23_VERSION $PYTHON23_DEPS"
 fi
    CPPFLAGS="$PYTHON23_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON23_LIBS $orig_LIBS"
    echo "$as_me:$LINENO: checking for usable Python $PYTHON23_VERSION libraries" >&5
echo $ECHO_N "checking for usable Python $PYTHON23_VERSION libraries... $ECHO_C" >&6
if test "${ncbi_cv_lib_python23+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_python23=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_python23=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_python23" >&5
echo "${ECHO_T}$ncbi_cv_lib_python23" >&6
 else
    ncbi_cv_lib_python23=no
 fi
 if test "$ncbi_cv_lib_python23" = "no"; then
    PYTHON23_INCLUDE=
    PYTHON23_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON23"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_PYTHON23 1
_ACEOF

 fi



   : ${PYTHON_PATH:="/usr/local/python-2.4.4"}
   # Extract the first word of "python2.4", so it can be a program name with args.
set dummy python2.4; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PYTHON24+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PYTHON24 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON24="$PYTHON24" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PYTHON_PATH/bin:$PATH:/usr/local/python-2.4/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON24="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
PYTHON24=$ac_cv_path_PYTHON24

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

 if test -x "$PYTHON24"; then
    PYTHON24_VERSION=`$PYTHON24 -c 'from distutils import sysconfig; print sysconfig.get_config_var("VERSION")' 2>/dev/null`
 else
    PYTHON24_VERSION=
    ncbi_cv_lib_python24=no
 fi
 if test -n "$PYTHON24_VERSION"; then
    PYTHON24_INCLUDE=`$PYTHON24 -c 'from distutils import sysconfig; f=sysconfig.get_python_inc; print "-I%s -I%s" % (f(), f(True))'`
    PYTHON24_LIBPATH=`$PYTHON24 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBDIR", "LIBPL"))'`
    PYTHON24_DEPS=`$PYTHON24 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBS", "SYSLIBS"))'`
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PYTHON24_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON24_LIBS="${ncbi_rp_L_flags} -lpython$PYTHON24_VERSION $PYTHON24_DEPS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON24_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PYTHON24_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lpython$PYTHON24_VERSION $PYTHON24_DEPS"
 fi
    CPPFLAGS="$PYTHON24_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON24_LIBS $orig_LIBS"
    echo "$as_me:$LINENO: checking for usable Python $PYTHON24_VERSION libraries" >&5
echo $ECHO_N "checking for usable Python $PYTHON24_VERSION libraries... $ECHO_C" >&6
if test "${ncbi_cv_lib_python24+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_python24=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_python24=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_python24" >&5
echo "${ECHO_T}$ncbi_cv_lib_python24" >&6
 else
    ncbi_cv_lib_python24=no
 fi
 if test "$ncbi_cv_lib_python24" = "no"; then
    PYTHON24_INCLUDE=
    PYTHON24_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON24"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_PYTHON24 1
_ACEOF

 fi



   # Extract the first word of "python2.5", so it can be a program name with args.
set dummy python2.5; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PYTHON25+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PYTHON25 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON25="$PYTHON25" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PYTHON_PATH/bin:$PATH:/usr/local/python-2.5/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON25="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
PYTHON25=$ac_cv_path_PYTHON25

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

 if test -x "$PYTHON25"; then
    PYTHON25_VERSION=`$PYTHON25 -c 'from distutils import sysconfig; print sysconfig.get_config_var("VERSION")' 2>/dev/null`
 else
    PYTHON25_VERSION=
    ncbi_cv_lib_python25=no
 fi
 if test -n "$PYTHON25_VERSION"; then
    PYTHON25_INCLUDE=`$PYTHON25 -c 'from distutils import sysconfig; f=sysconfig.get_python_inc; print "-I%s -I%s" % (f(), f(True))'`
    PYTHON25_LIBPATH=`$PYTHON25 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBDIR", "LIBPL"))'`
    PYTHON25_DEPS=`$PYTHON25 -c 'from distutils import sysconfig; print " ".join(sysconfig.get_config_vars("LIBS", "SYSLIBS"))'`
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PYTHON25_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON25_LIBS="${ncbi_rp_L_flags} -lpython$PYTHON25_VERSION $PYTHON25_DEPS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON25_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PYTHON25_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lpython$PYTHON25_VERSION $PYTHON25_DEPS"
 fi
    CPPFLAGS="$PYTHON25_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON25_LIBS $orig_LIBS"
    echo "$as_me:$LINENO: checking for usable Python $PYTHON25_VERSION libraries" >&5
echo $ECHO_N "checking for usable Python $PYTHON25_VERSION libraries... $ECHO_C" >&6
if test "${ncbi_cv_lib_python25+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_python25=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_python25=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_python25" >&5
echo "${ECHO_T}$ncbi_cv_lib_python25" >&6
 else
    ncbi_cv_lib_python25=no
 fi
 if test "$ncbi_cv_lib_python25" = "no"; then
    PYTHON25_INCLUDE=
    PYTHON25_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON25"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_PYTHON25 1
_ACEOF

 fi



   if test "$ncbi_cv_lib_python" = "no"; then
      # Favor python 2.4 as the only version configure historically
      # recognized, but otherwise prefer newer versions.
      if test "$ncbi_cv_lib_python24" = "yes"; then
         PYTHON_INCLUDE=$PYTHON24_INCLUDE
         PYTHON_LIBS=$PYTHON24_LIBS
      elif test "$ncbi_cv_lib_python25" = "yes"; then
         PYTHON_INCLUDE=$PYTHON25_INCLUDE
         PYTHON_LIBS=$PYTHON25_LIBS
      elif test "$ncbi_cv_lib_python23" = "yes"; then
         PYTHON_INCLUDE=$PYTHON23_INCLUDE
         PYTHON_LIBS=$PYTHON23_LIBS
      fi
      if test -n "$PYTHON_LIBS"; then
                   WithPackages="$WithPackages${WithPackagesSep}PYTHON"; WithPackagesSep=" "
         cat >>confdefs.h <<\_ACEOF
#define HAVE_PYTHON 1
_ACEOF

      else
         if test "${with_python:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-python explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-python explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      fi
   fi
fi

## Java
if test "${with_jni-no}" != "no"; then
   case "$with_jni:${JAVAC+set}" in
      yes: | : )
         if test -d "$JAVA_HOME"; then
            JAVAC=$JAVA_HOME/bin/javac
         else
            JAVAC=javac
         fi
         ;;
      * )
         JAVAC=$with_jni/bin/javac
         ;;
   esac


JNI_INCLUDE_DIRS=""

test "x$JAVAC" = x && { { echo "$as_me:$LINENO: error: '\$JAVAC' undefined" >&5
echo "$as_me: error: '\$JAVAC' undefined" >&2;}
   { (exit 1); exit 1; }; }
# Extract the first word of "$JAVAC", so it can be a program name with args.
set dummy $JAVAC; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path__ACJNI_JAVAC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $_ACJNI_JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path__ACJNI_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_path__ACJNI_JAVAC" && ac_cv_path__ACJNI_JAVAC="no"
  ;;
esac
fi
_ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC

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

test "x$_ACJNI_JAVAC" = xno && { { echo "$as_me:$LINENO: error: $JAVAC could not be found in path" >&5
echo "$as_me: error: $JAVAC could not be found in path" >&2;}
   { (exit 1); exit 1; }; }


# find the include directory relative to the javac executable
_cur=""$_ACJNI_JAVAC""
while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
        echo "$as_me:$LINENO: checking symlink for $_cur" >&5
echo $ECHO_N "checking symlink for $_cur... $ECHO_C" >&6
        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
        case "$_slink" in
        /*) _cur="$_slink";;
        # 'X' avoids triggering unwanted echo options.
        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[^/]*$::'`"$_slink";;
        esac
        echo "$as_me:$LINENO: result: $_cur" >&5
echo "${ECHO_T}$_cur" >&6
done
_ACJNI_FOLLOWED="$_cur"

_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
case "$host_os" in
        darwin*)        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
                        _JINC="$_JTOPDIR/Headers";;
        *)              _JINC="$_JTOPDIR/include";;
esac
if test -f "$_JINC/jni.h"; then
        JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
else
        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
        if test -f "$_JTOPDIR/include/jni.h"; then
                JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
        else
                { { echo "$as_me:$LINENO: error: cannot find java include files" >&5
echo "$as_me: error: cannot find java include files" >&2;}
   { (exit 1); exit 1; }; }
        fi
fi

# get the likely subdirectories for system specific java includes
case "$host_os" in
bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
linux*)         _JNI_INC_SUBDIRS="linux genunix";;
osf*)           _JNI_INC_SUBDIRS="alpha";;
solaris*)       _JNI_INC_SUBDIRS="solaris";;
mingw*)			_JNI_INC_SUBDIRS="win32";;
cygwin*)		_JNI_INC_SUBDIRS="win32";;
*)              _JNI_INC_SUBDIRS="genunix";;
esac

# add any subdirectories that are present
for JINCSUBDIR in $_JNI_INC_SUBDIRS
do
        if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
                JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
        fi
done

   JDK_INCLUDE=''
   sep=''
   for x in $JNI_INCLUDE_DIRS; do
      JDK_INCLUDE=$JDK_INCLUDE$sep-I$x
      sep=' '
   done
   { echo "$as_me:$LINENO: setting JDK_INCLUDE = $JDK_INCLUDE" >&5
echo "$as_me: setting JDK_INCLUDE = $JDK_INCLUDE" >&6;}
   CPPFLAGS="$JDK_INCLUDE $orig_CPPFLAGS"
   if test "${ac_cv_header_jni_h+set}" = set; then
  echo "$as_me:$LINENO: checking for jni.h" >&5
echo $ECHO_N "checking for jni.h... $ECHO_C" >&6
if test "${ac_cv_header_jni_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5
echo "${ECHO_T}$ac_cv_header_jni_h" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking jni.h usability" >&5
echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <jni.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking jni.h presence" >&5
echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <jni.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: jni.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: jni.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: checking for jni.h" >&5
echo $ECHO_N "checking for jni.h... $ECHO_C" >&6
if test "${ac_cv_header_jni_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_jni_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5
echo "${ECHO_T}$ac_cv_header_jni_h" >&6

fi
if test $ac_cv_header_jni_h = yes; then

cat >>confdefs.h <<\_ACEOF
#define NCBI_JNI 1
_ACEOF

                 WithFeatures="$WithFeatures${WithFeaturesSep}JDK Ncbi-JNI"; WithFeaturesSep=" "
       JDK_PATH=$_JTOPDIR
       ncbi_java=ncbi_java
else
  JDK_INCLUDE=''
       JDK_PATH=''
       ncbi_java=''
fi


fi


## Boost
if test "$with_boost" != "no"; then
   if test "${with_boost-yes}" = yes; then
      : ${BOOST_PATH=$NCBI/boost}
   else
      BOOST_PATH=$with_boost
   fi
   if test -d "$BOOST_PATH"; then
      ncbi_fix_dir_tmp=`if cd $BOOST_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $BOOST_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            BOOST_PATH=$ncbi_fix_dir_tmp2
         else
            case "$BOOST_PATH" in
               /*) ;;
               * ) BOOST_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) BOOST_PATH=$ncbi_fix_dir_tmp ;;
 esac
      : ${BOOST_INCLUDE=-I$BOOST_PATH/include}
   fi
   BOOST_LIBPATH_=$BOOST_PATH/lib
   if test -z "${BOOST_LIBPATH+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $BOOST_LIBPATH_; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BOOST_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $BOOST_LIBPATH_; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    BOOST_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
 fi
   test -d "$BOOST_PATH"  ||  BOOST_LIBPATH_=/usr/lib
   boost_path_digits=`basename $BOOST_PATH | sed -e 's/.0$//' | tr -cd 0123456789`
   if test -n "$boost_path_digits"; then
      boost_version_digits=`echo $ncbi_cv_lib_boost_version | sed -e 's/.0$//' | tr -cd 0123456789`
      if test $boost_path_digits != "$boost_version_digits"; then
         # presumably stale, particularly if boost_version WASN'T cached;
         # uncache all relevant settings
         $as_unset ncbi_cv_lib_boost_version || test "${ncbi_cv_lib_boost_version+set}" != set || { ncbi_cv_lib_boost_version=; export ncbi_cv_lib_boost_version; }
         $as_unset ncbi_cv_lib_boost_regex || test "${ncbi_cv_lib_boost_regex+set}" != set || { ncbi_cv_lib_boost_regex=; export ncbi_cv_lib_boost_regex; }
         $as_unset ncbi_cv_lib_boost_spirit || test "${ncbi_cv_lib_boost_spirit+set}" != set || { ncbi_cv_lib_boost_spirit=; export ncbi_cv_lib_boost_spirit; }
         $as_unset ncbi_cv_lib_boost_test || test "${ncbi_cv_lib_boost_test+set}" != set || { ncbi_cv_lib_boost_test=; export ncbi_cv_lib_boost_test; }
         $as_unset ncbi_cv_lib_boost_thread || test "${ncbi_cv_lib_boost_thread+set}" != set || { ncbi_cv_lib_boost_thread=; export ncbi_cv_lib_boost_thread; }
      fi
   fi
      echo "$as_me:$LINENO: checking Boost version" >&5
echo $ECHO_N "checking Boost version... $ECHO_C" >&6
if test "${ncbi_cv_lib_boost_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <boost/version.hpp>
ncbi_cv_lib_boost_version=BOOST_LIB_VERSION

_ACEOF
          eval "$ac_cpp $BOOST_INCLUDE conftest.$ac_ext" \
             2>&5 | grep '^ncbi_cv_' | tr -d ' 	' > conftest.sh
          . ./conftest.sh
          rm -f contest*

fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_version" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_version" >&6
   if test -d `echo $BOOST_INCLUDE | sed -e 's/^-I//'`/boost-${ncbi_cv_lib_boost_version}/boost; then
      BOOST_INCLUDE=$BOOST_INCLUDE/boost-${ncbi_cv_lib_boost_version}
   fi
   case "$ncbi_compiler" in
      MIPSPRO)
         BOOST_INCLUDE="$BOOST_INCLUDE $BOOST_INCLUDE/boost/compatibility/cpp_c_headers"
         ;;
      WORKSHOP)
         # Boost.Test's macros yield a *lot* of spurious "should not initialize
         # a non-const reference with a temporary" warnings, to the point of
         # overwhelming the compiler in some cases; turn them off altogether
         # when using Boost at all.
         BOOST_INCLUDE="$BOOST_INCLUDE -erroff=reftotemp"
         ;;
   esac
   case "$ncbi_cv_lib_boost_version" in
      0_* | 1_[0-9] | 1_[0-9]_* | 1_[0-2][0-9] | 1_[0-2][0-9]_* ) ;;
      1_3[0-4] | 1_3[0-4]_* )
         { echo "$as_me:$LINENO: WARNING: Your Boost version is too old to use.  (Needed >= 1.35.)" >&5
echo "$as_me: WARNING: Your Boost version is too old to use.  (Needed >= 1.35.)" >&2;}
         if test -n "$with_boost"; then
            { { echo "$as_me:$LINENO: error: --with-boost:  Boost library is too old" >&5
echo "$as_me: error: --with-boost:  Boost library is too old" >&2;}
   { (exit 1); exit 1; }; }
         fi
         with_boost=no
         ;;
      1_3[5-9] | 1_3[5-9]_* | 1_4[0-5] | 1_4[0-5]_* ) ;;
      * )
         { echo "$as_me:$LINENO: WARNING: Untested Boost version; may prove incompatible." >&5
echo "$as_me: WARNING: Untested Boost version; may prove incompatible." >&2;}
         { echo "$as_me:$LINENO: WARNING: If so, please re-run this script with the flag --without-boost." >&5
echo "$as_me: WARNING: If so, please re-run this script with the flag --without-boost." >&2;}
         ;;
   esac
   echo "$as_me:$LINENO: checking for Boost library name tag" >&5
echo $ECHO_N "checking for Boost library name tag... $ECHO_C" >&6
   case "$with_boost_tag" in
      yes | "" )
         case "$host_os:$ncbi_compiler" in
            darwin*:GCC) BOOST_TAG=""     ;;
            *:GCC)       BOOST_TAG="-gcc" ;;
            *:KCC)       BOOST_TAG="-kcc" ;;
            linux*:ICC)  BOOST_TAG="-il"  ;;
            *:WORKSHOP)  BOOST_TAG="-sw"  ;;
            *:MIPSPRO)   BOOST_TAG="-mp"  ;;
            *:VISUALAGE) BOOST_TAG="-xlc" ;;
            *:COMPAQ)    BOOST_TAG="-tru" ;;
            *:MSVC)      BOOST_TAG="-vc"  ;;
         esac
         case "$BOOST_TAG" in
            -gcc|-il ) boost_comp_vers=`echo $compiler_version | cut -c1-2` ;;
            *        ) boost_comp_vers='' ;;
         esac
         test "$with_mt"    = "yes"  &&  BOOST_MT=-mt
         test "$with_debug" = "yes"  &&  BOOST_D=-d
         test "$bit64_sfx"  = "64"   &&  BOOST_64=-64
         found=no
         for base in "$BOOST_TAG$boost_comp_vers" "$BOOST_TAG" ''; do
           for bvers in "-$ncbi_cv_lib_boost_version" ''; do
             for b64 in $BOOST_64 ''; do
               for bmt in "$BOOST_MT" '-mt' ''; do
                 for bd in "$BOOST_D" '' '-d'; do
                   bsfx=$cvers$bmt$bd$bvers$b64
                   if ls $BOOST_LIBPATH_/libboost*$base$bsfx.* >/dev/null 2>&1;
                   then
                     found=yes
                     break
                   fi
                 done
                 test "$found" = yes  &&  break
               done
               test "$found" = yes  &&  break
             done
             test "$found" = yes  &&  break
           done
           test "$found" = yes  &&  break
         done

         if test "$found" = no; then
            base=$BOOST_TAG
            cvers=$boost_comp_vers
            bvers=-$ncbi_cv_lib_boost_version
            b64=$BOOST_64
            bmt=$BOOST_MT
            bd=$BOOST_D
            bsfx=$cvers$bmt$bd$bvers$b64
         fi

         BOOST_TAG=$base$bsfx
         echo "$as_me:$LINENO: result: $BOOST_TAG (autodetected)" >&5
echo "${ECHO_T}$BOOST_TAG (autodetected)" >&6
         ;;
      no )
         BOOST_TAG=""
         echo "$as_me:$LINENO: result: none (by explicit request)" >&5
echo "${ECHO_T}none (by explicit request)" >&6
         ;;
      *)
         BOOST_TAG=$with_boost_tag
         echo "$as_me:$LINENO: result: $BOOST_TAG (by explicit request)" >&5
echo "${ECHO_T}$BOOST_TAG (by explicit request)" >&6
         ;;
   esac

   test "$with_mt" = yes  || \
      BOOST_INCLUDE="$BOOST_INCLUDE -DBOOST_DISABLE_THREADS"

   BOOST_REGEX_LIBS=-lboost_regex${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_regex${BOOST_TAG}-static.a"; then
       BOOST_REGEX_STATIC_LIBS=-lboost_regex${BOOST_TAG}-static
   else
       BOOST_REGEX_STATIC_LIBS=$BOOST_REGEX_LIBS
   fi

   echo "$as_me:$LINENO: checking for Boost.Regex in $BOOST_PATH" >&5
echo $ECHO_N "checking for Boost.Regex in $BOOST_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_boost_regex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_REGEX_LIBS $RT_LIBS $orig_LIBS"
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <boost/regex.hpp>
int
main ()
{
throw boost::regex_error(boost::regex_constants::error_stack);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_regex=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_boost_regex=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_regex" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_regex" >&6

   echo "$as_me:$LINENO: checking for Boost.Spirit in $BOOST_PATH" >&5
echo $ECHO_N "checking for Boost.Spirit in $BOOST_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_boost_spirit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$RT_LIBS $orig_LIBS"
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <boost/spirit.hpp>
int
main ()
{
boost::spirit::parse("123", boost::spirit::int_p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_spirit=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_boost_spirit=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_spirit" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_spirit" >&6

   BOOST_TEST_PEM_LIBS=-lboost_prg_exec_monitor${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_prg_exec_monitor${BOOST_TAG}-static.a"; then
       BOOST_TEST_PEM_STATIC_LIBS=-lboost_prg_exec_monitor${BOOST_TAG}-static
   else
       BOOST_TEST_PEM_STATIC_LIBS=$BOOST_TEST_PEM_LIBS
   fi

   BOOST_TEST_TEM_LIBS=-lboost_test_exec_monitor${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_test_exec_monitor${BOOST_TAG}-static.a"; then
       BOOST_TEST_TEM_STATIC_LIBS=-lboost_test_exec_monitor${BOOST_TAG}-static
   else
       BOOST_TEST_TEM_STATIC_LIBS=$BOOST_TEST_TEM_LIBS
   fi

   BOOST_TEST_UTF_LIBS=-lboost_unit_test_framework${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_unit_test_framework${BOOST_TAG}-static.a"; then
       BOOST_TEST_UTF_STATIC_LIBS=-lboost_unit_test_framework${BOOST_TAG}-static
   else
       BOOST_TEST_UTF_STATIC_LIBS=$BOOST_TEST_UTF_LIBS
            fi

   BOOST_TEST_PEM_LIBS=$BOOST_TEST_PEM_STATIC_LIBS
   BOOST_TEST_TEM_LIBS=$BOOST_TEST_TEM_STATIC_LIBS
   BOOST_TEST_UTF_LIBS=$BOOST_TEST_UTF_STATIC_LIBS

   echo "$as_me:$LINENO: checking for Boost.Test in $BOOST_PATH" >&5
echo $ECHO_N "checking for Boost.Test in $BOOST_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_boost_test+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$RT_LIBS $orig_LIBS"
      found=
      for mode in included external; do
        if test "$mode" = external; then
          CPPFLAGS="-DNCBI_BOOST_NOT_INCLUDED $CPPFLAGS"
          LIBS="$BOOST_LIBPATH $BOOST_TEST_UTF_LIBS $LIBS"
        fi
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef NCBI_BOOST_NOT_INCLUDED
                #  include <boost/test/unit_test.hpp>
                #else
                #  include <boost/test/included/unit_test.hpp>
                #endif
                using boost::unit_test::test_suite;
                static void s_Test1(void) { BOOST_CHECK(1 == 1); }
                test_suite* init_unit_test_suite(int, char*[])
                {
                    test_suite* test = BOOST_TEST_SUITE("foo");
                    test->add(BOOST_TEST_CASE(&s_Test1), 0);
                    return test;
                }
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  found="$found:$mode"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
      done
      case "$found" in
        :included:external ) ncbi_cv_lib_boost_test=yes           ;;
        :included          ) ncbi_cv_lib_boost_test=included-only ;;
        :external          ) ncbi_cv_lib_boost_test=external-only ;;
        ''                 ) ncbi_cv_lib_boost_test=no            ;;
      esac
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_test" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_test" >&6

   BOOST_THREAD_LIBS=-lboost_thread${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_thread${BOOST_TAG}-static.a"; then
       BOOST_THREAD_STATIC_LIBS=-lboost_thread${BOOST_TAG}-static
   else
       BOOST_THREAD_STATIC_LIBS=$BOOST_THREAD_LIBS
   fi

   echo "$as_me:$LINENO: checking for Boost.Threads in $BOOST_PATH" >&5
echo $ECHO_N "checking for Boost.Threads in $BOOST_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_boost_thread+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_THREAD_LIBS $RT_LIBS $orig_LIBS"
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <boost/thread.hpp>
int
main ()
{
boost::mutex m; boost::mutex::scoped_lock l(m);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_thread=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_boost_thread=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_thread" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_thread" >&6
else
   BOOST_INCLUDE=
   BOOST_LIBPATH=
   BOOST_TAG=
   ncbi_cv_lib_boost_regex=no
   ncbi_cv_lib_boost_spirit=no
   ncbi_cv_lib_boost_test=no
   ncbi_cv_lib_boost_thread=no
fi

if test "$ncbi_cv_lib_boost_regex" != "no"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_BOOST_REGEX 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}Boost.Regex"; WithPackagesSep=" "
else
   BOOST_REGEX_LIBS=
   BOOST_REGEX_STATIC_LIBS=
fi

if test "$ncbi_cv_lib_boost_spirit" != "no"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_BOOST_SPIRIT 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}Boost.Spirit"; WithPackagesSep=" "
fi

if test "$ncbi_cv_lib_boost_test" != "no"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_BOOST_TEST 1
_ACEOF

   if test "$ncbi_cv_lib_boost_test" != "included-only"; then
                WithPackages="$WithPackages${WithPackagesSep}Boost.Test"; WithPackagesSep=" "
   fi
   if test "$ncbi_cv_lib_boost_test" != "external-only"; then
                WithPackages="$WithPackages${WithPackagesSep}Boost.Test.Included"; WithPackagesSep=" "
   fi
else
   BOOST_TEST_PEM_LIBS=
   BOOST_TEST_PEM_STATIC_LIBS=
   BOOST_TEST_TEM_LIBS=
   BOOST_TEST_TEM_STATIC_LIBS=
   BOOST_TEST_UTF_LIBS=
   BOOST_TEST_UTF_STATIC_LIBS=
fi

if test "$ncbi_cv_lib_boost_thread" != "no"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_BOOST_THREAD 1
_ACEOF

             WithPackages="$WithPackages${WithPackagesSep}Boost.Threads"; WithPackagesSep=" "
else
   BOOST_THREAD_LIBS=
   BOOST_THREAD_STATIC_LIBS=
fi

case "$with_boost:$ncbi_cv_lib_boost_test" in
   :* | no:* | *:yes | *:included-only ) ;; # no problem
   * ) { { echo "$as_me:$LINENO: error: Boost explicitly requested, but Boost.Test.Included unavailable." >&5
echo "$as_me: error: Boost explicitly requested, but Boost.Test.Included unavailable." >&2;}
   { (exit 1); exit 1; }; } ;;
esac


## NCBI C Toolkit
if test "$with_ncbi_c" != "no" ; then
   NCBI_C_PATH=${NCBI_C_PATH:="$NCBI"}
   if test "$ncbi_compiler" = ICC -a -d "$NCBI_C_PATH/ncbi_icc"; then
      NCBI_C_PATH=$NCBI_C_PATH/ncbi_icc
   fi

   NCBI_C_INCLUDE="-I$NCBI_C_PATH/include${bit64_sfx}"
   if test "$with_debug" = "no" ; then
     NCBI_C_LIBPATH="$NCBI_C_PATH/lib${bit64_sfx}"
   else
     NCBI_C_LIBPATH="$NCBI_C_PATH/altlib${bit64_sfx}"
   fi
   if test "$with_mt" = "yes" ; then
     NCBI_C_LIBPATH="$NCBI_C_LIBPATH $NCBI_C_LIBPATH/ncbithr.o"
   fi
   if test -n "$NCBI_C_ncbi" ; then
     :
   elif test "$OSTYPE" = "darwin" ; then
     NCBI_C_ncbi="-lncbi -Wl,-framework,AppKit"
   else
     NCBI_C_ncbi="-lncbi"
   fi
   NCBI_C_LIBPATH="-L$NCBI_C_LIBPATH"
   echo "$as_me:$LINENO: checking for the NCBI C toolkit in $NCBI_C_PATH" >&5
echo $ECHO_N "checking for the NCBI C toolkit in $NCBI_C_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_ctools+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$NCBI_C_INCLUDE $orig_CPPFLAGS"
       LIBS="$NCBI_C_LIBPATH $NCBI_C_ncbi $NETWORK_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ncbi.h>
int
main ()
{
 Nlm_Boolean b = Nlm_GetArgs("fake", -1, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_ctools=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_ctools=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_ctools" >&5
echo "${ECHO_T}$ncbi_cv_lib_ctools" >&6
   if test "$ncbi_cv_lib_ctools" = no; then
      if test "${with_ncbi_c:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-ncbi-c explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-ncbi-c explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_ncbi_c" = "no" ; then
   if test "$with_ctools" = "yes"; then
      { { echo "$as_me:$LINENO: error: --with-ctools:  NCBI C Toolkit is missing" >&5
echo "$as_me: error: --with-ctools:  NCBI C Toolkit is missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   NCBI_C_PATH="No_NCBI_CToolkit"
   NCBI_C_INCLUDE=
   NCBI_C_LIBPATH=
   NCBI_C_ncbi=
else
             WithPackages="$WithPackages${WithPackagesSep}C-Toolkit"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_NCBI_C 1
_ACEOF

fi

# X11
LIBS="$orig_LIBS"
CPPFLAGS="$orig_CPPFLAGS"
# Look in /usr/X11R6/lib64 if necessary
xlib=`ls -d /usr/X11R6/lib$bit64_sfx/libX11.* 2>/dev/null | sed -ne 1p`
if test -f "$xlib" -a "${x_libraries-NONE}" = NONE \
  -a "${x_includes-NONE}" = NONE; then
   base=`basename $xlib`
   cmp -s /usr/X11R6/lib/$base $xlib  || \
      cmp -s /usr/lib/$base $xlib  || \
      cmp -s /usr/lib$bit64_sfx/$base $xlib  || \
      x_libraries=/usr/X11R6/lib$bit64_sfx x_includes=/usr/X11R6/include
fi
echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6


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

fi;
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
    if test "${ac_cv_have_x+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
rm -fr conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat >Imakefile <<'_ACEOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
_ACEOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
	 test -f $ac_im_libdir/libX11.$ac_extension; then
	ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case $ac_im_incroot in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
    esac
    case $ac_im_usrlibdir in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
    esac
  fi
  cd ..
  rm -fr conftest.dir
fi

# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include

/usr/include/X11
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4

/usr/local/X11/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include

/usr/local/include/X11
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4

/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11

/usr/include
/usr/local/include
/usr/unsupported/include
/usr/athena/include
/usr/local/x11r5/include
/usr/lpp/Xamples/include

/usr/openwin/include
/usr/openwin/share/include'

if test "$ac_x_includes" = no; then
  # Guess where to find include files, by looking for Intrinsic.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Intrinsic.h"; then
    ac_x_includes=$ac_dir
    break
  fi
done
fi
rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no

if test "$ac_x_libraries" = no; then
  # Check for the libraries.
  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-lXt $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Intrinsic.h>
int
main ()
{
XtMalloc (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
  # Don't even attempt the hair of trying to link an X program!
  for ac_extension in a so sl; do
    if test -r $ac_dir/libXt.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi

  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$as_me:$LINENO: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.

cat >>confdefs.h <<\_ACEOF
#define X_DISPLAY_MISSING 1
_ACEOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case `(uname -sr) 2>/dev/null` in
    "SunOS 5"*)
      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_nospace=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_R_nospace=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
      if test $ac_R_nospace = yes; then
	echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_space=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_R_space=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
	if test $ac_R_space = yes; then
	  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:$LINENO: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
	fi
      fi
      LIBS=$ac_xsave_LIBS
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn Johnson says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And Karl Berry says
    # the Alpha needs dnet_stub (dnet does not exist).
    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
    LIBS="$ac_xsave_LIBS"

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to T.E. Dickey.
    # The functions gethostbyname, getservbyname, and inet_addr are
    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
    echo "$as_me:$LINENO: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define gethostbyname innocuous_gethostbyname

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef gethostbyname

/* 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 ();
/* 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) || defined (__stub___gethostbyname)
choke me
#else
char (*f) () = gethostbyname;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != gethostbyname;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then
      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
	echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi

      fi
    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says Simon Leinen: it contains gethostby*
    # variants that don't use the name server (or something).  -lsocket
    # must be given before -lnsl if both are needed.  We assume that
    # if connect needs -lnsl, so does gethostbyname.
    echo "$as_me:$LINENO: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define connect to an innocuous variant, in case <limits.h> declares connect.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define connect innocuous_connect

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef connect

/* 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 connect ();
/* 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_connect) || defined (__stub___connect)
choke me
#else
char (*f) () = connect;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != connect;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then
      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 connect ();
int
main ()
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_socket_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    echo "$as_me:$LINENO: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define remove to an innocuous variant, in case <limits.h> declares remove.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define remove innocuous_remove

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef remove

/* 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 remove ();
/* 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_remove) || defined (__stub___remove)
choke me
#else
char (*f) () = remove;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != remove;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_remove=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then
      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 remove ();
int
main ()
{
remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_posix_remove=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo "$as_me:$LINENO: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define shmat innocuous_shmat

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef shmat

/* 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 shmat ();
/* 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_shmat) || defined (__stub___shmat)
choke me
#else
char (*f) () = shmat;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != shmat;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_shmat=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then
      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 shmat ();
int
main ()
{
shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS=$LDFLAGS
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  # John Interrante, Karl Berry
  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 IceConnectionNumber ();
int
main ()
{
IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi

x_libraries=`echo "$x_libraries" | sed -e "s,^$usr_lib\$,,"`
X_LIBS=`echo "$X_LIBS " | sed -e "$no_usr_lib"`
echo "$as_me:$LINENO: checking for XextCreateExtension in -lXext" >&5
echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 XextCreateExtension ();
int
main ()
{
XextCreateExtension ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xext_XextCreateExtension=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_Xext_XextCreateExtension=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
  Xext="-lXext"
else
  Xext=
fi

echo "$as_me:$LINENO: checking for XtMainLoop in -lXt" >&5
echo $ECHO_N "checking for XtMainLoop in -lXt... $ECHO_C" >&6
if test "${ac_cv_lib_Xt_XtMainLoop+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 XtMainLoop ();
int
main ()
{
XtMainLoop ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xt_XtMainLoop=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_Xt_XtMainLoop=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_XtMainLoop" >&5
echo "${ECHO_T}$ac_cv_lib_Xt_XtMainLoop" >&6
if test $ac_cv_lib_Xt_XtMainLoop = yes; then
  Xt="-lXt"
else
  Xt=
fi

echo "$as_me:$LINENO: checking for XmuMakeAtom in -lXmu" >&5
echo $ECHO_N "checking for XmuMakeAtom in -lXmu... $ECHO_C" >&6
if test "${ac_cv_lib_Xmu_XmuMakeAtom+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXmu $Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 XmuMakeAtom ();
int
main ()
{
XmuMakeAtom ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xmu_XmuMakeAtom=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_Xmu_XmuMakeAtom=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuMakeAtom" >&5
echo "${ECHO_T}$ac_cv_lib_Xmu_XmuMakeAtom" >&6
if test $ac_cv_lib_Xmu_XmuMakeAtom = yes; then
  Xmu="-lXmu"
else
  Xmu=
fi

LDFLAGS=$orig_LDFLAGS
X_ALL_LIBS="$Xmu $Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"

## OpenGL
if test "$with_opengl" != "no"; then
   if test "${with_opengl-yes}" = yes; then
      if test -d $NCBI/MesaGL; then
         : ${OPENGL_PATH=$NCBI/MesaGL}
      fi
   else
      OPENGL_PATH=$with_opengl
   fi
   if test -d "$OPENGL_PATH"; then
      ncbi_fix_dir_tmp=`if cd $OPENGL_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $OPENGL_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            OPENGL_PATH=$ncbi_fix_dir_tmp2
         else
            case "$OPENGL_PATH" in
               /*) ;;
               * ) OPENGL_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) OPENGL_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   case "$OSTYPE" in
      darwin) # Use native interface
         OPENGL_LIBS="-framework AGL -framework OpenGL"
         ;;
      # cygwin) ... ;;
      *) # Default -- assume X-based
         LIBS="$orig_LIBS"
         CPPFLAGS="$orig_CPPFLAGS"
         LDFLAGS="$orig_LDFLAGS $X_LIBS"
         if test -d "$OPENGL_PATH/include/GL"; then
            OPENGL_INCLUDE="-I$OPENGL_PATH/include $X_CFLAGS"
         else
            OPENGL_INCLUDE=$X_CFLAGS
         fi
         if test -n "$OPENGL_PATH" -a -d "$OPENGL_PATH/lib${bit64_sfx}"; then
            ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OPENGL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENGL_LIBPATH="${ncbi_rp_L_flags} $X_LIBS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENGL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OPENGL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags} $X_LIBS"
 fi
         elif test -f /usr/lib/mesa/libGL.so; then
            ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in /usr/lib/mesa; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENGL_LIBPATH="${ncbi_rp_L_flags} $X_LIBS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in /usr/lib/mesa; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OPENGL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags} $X_LIBS"
 fi
         else
            OPENGL_LIBPATH=$X_LIBS
         fi
         OPENGL_LIBS="$OPENGL_LIBPATH -lGLU -lGL $X_ALL_LIBS"
         ;;
   esac
   case "${OPENGL_PATH}" in
      */*) where=" in $OPENGL_PATH" ;;
      *  ) where= ;;
   esac
   echo "$as_me:$LINENO: checking for OpenGL$where" >&5
echo $ECHO_N "checking for OpenGL$where... $ECHO_C" >&6
if test "${ncbi_cv_lib_opengl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$orig_CPPFLAGS $OPENGL_INCLUDE"
       LIBS="$OPENGL_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

           #ifdef NCBI_OS_DARWIN
           #  include <OpenGL/gl.h>
           #else
           #  include <GL/gl.h>
           #endif

int
main ()
{
glBegin(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_opengl=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_opengl=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_opengl" >&5
echo "${ECHO_T}$ncbi_cv_lib_opengl" >&6
fi

if test "$with_opengl" = "no" -o "$ncbi_cv_lib_opengl" = "no"; then
   OPENGL_INCLUDE=
   OPENGL_LIBS=
   OPENGL_STATIC_LIBS=
   OSMESA_INCLUDE=
   OSMESA_LIBS=
   OSMESA_STATIC_LIBS=
   GLUT_INCLUDE=
   GLUT_LIBS=
   GLEW_INCLUDE=
   GLEW_LIBS=
   GLEW_STATIC_LIBS=
   if test "${with_opengl:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-opengl explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-opengl explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
else
             WithPackages="$WithPackages${WithPackagesSep}OpenGL"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_OPENGL 1
_ACEOF

   if test -f "$OPENGL_PATH/lib${bit64_sfx}/libGLU-static.a"; then
      OPENGL_STATIC_LIBS="$OPENGL_LIBPATH -lGLU-static -lGL-static $X_ALL_LIBS"
   else
      OPENGL_STATIC_LIBS=$OPENGL_LIBS
   fi
   : ${OSMESA_PATH=$OPENGL_PATH}
   if test "$with_mesa" != "no"; then
      if test "${with_mesa-yes}" != "yes"; then
         OSMESA_PATH=$with_mesa
      fi
      if test -d "$OSMESA_PATH"; then
         OSMESA_INCLUDE=-I$OSMESA_PATH/include
         if test "$OSMESA_PATH" != "$OPENGL_PATH"; then
            ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OSMESA_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OSMESA_LDFLAGS="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OSMESA_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OSMESA_LDFLAGS="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
         fi
      fi
      LDFLAGS="$orig_LDFLAGS $OSMESA_LDFLAGS $OPENGL_LIBPATH"
      echo "$as_me:$LINENO: checking for OSMesaCreateContext in -lOSMesa" >&5
echo $ECHO_N "checking for OSMesaCreateContext in -lOSMesa... $ECHO_C" >&6
if test "${ac_cv_lib_OSMesa_OSMesaCreateContext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lOSMesa $OPENGL_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 OSMesaCreateContext ();
int
main ()
{
OSMesaCreateContext ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_OSMesa_OSMesaCreateContext=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_OSMesa_OSMesaCreateContext=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_OSMesaCreateContext" >&5
echo "${ECHO_T}$ac_cv_lib_OSMesa_OSMesaCreateContext" >&6
if test $ac_cv_lib_OSMesa_OSMesaCreateContext = yes; then
            WithPackages="$WithPackages${WithPackagesSep}MESA"; WithPackagesSep=" ";
          OSMESA_LIBS="$OSMESA_LDFLAGS $OPENGL_LIBPATH -lOSMesa -lGLU -lGL $X_ALL_LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBOSMESA 1
_ACEOF

else
  OSMESA_LIBS=
fi

   fi
   if test -z "$OSMESA_LIBS"; then
      if test "${with_mesa:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-mesa explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-mesa explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   elif test -f "$OSMESA_PATH/lib${bit64_sfx}/libOSMesa-static.a"; then
      OSMESA_STATIC_LIBS="$OSMESA_LDFLAGS $OPENGL_LIBPATH -lOSMesa-static -lGLU-static -lGL-static $X_ALL_LIBS"
   else
      OSMESA_STATIC_LIBS=$OSMESA_LIBS
   fi
   : ${GLUT_PATH=$NCBI/glut}
   if test "$with_glut" != "no"; then
      if test "${with_glut-yes}" != "yes"; then
         GLUT_PATH=$with_glut
      fi
      if test -d "GLUT_PATH"; then
         GLUT_INCLUDE=-I$GLUT_PATH/include
         ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $GLUT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GLUT_LDFLAGS="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GLUT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GLUT_LDFLAGS="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
      fi
      LDFLAGS="$orig_LDFLAGS $GLUT_LDFLAGS $OPENGL_LIBPATH"
      echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
if test "${ac_cv_lib_glut_glutInit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lglut $OPENGL_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 glutInit ();
int
main ()
{
glutInit ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_glut_glutInit=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_glut_glutInit=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5
echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6
if test $ac_cv_lib_glut_glutInit = yes; then
            WithPackages="$WithPackages${WithPackagesSep}GLUT"; WithPackagesSep=" ";
          GLUT_LIBS="$GLUT_LDFLAGS $OPENGL_LIBPATH -lglut -lGLU -lGL $X_ALL_LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGLUT 1
_ACEOF

else
  GLUT_LIBS=
fi

      if test -z "$GLUT_LIBS"; then
         if test "${with_glut:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-glut explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-glut explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      fi
   fi
   : ${GLEW_PATH=$NCBI/glew}
   if test "$with_glew" != "no"; then
      if test "${with_glew-yes}" != "yes"; then
         GLEW_PATH=$with_glew
      fi
      if test -d "$GLEW_PATH"; then
         if test -d "$GLEW_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx"; then
            GLEW_PATH=$GLEW_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx
         elif test -d "$GLEW_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx"; then
            GLEW_PATH=$GLEW_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx
         elif test -d "$GLEW_PATH/$DEBUG_SFX$bit64_sfx"; then
            GLEW_PATH=$GLEW_PATH/$DEBUG_SFX$bit64_sfx
         fi
         ncbi_fix_dir_tmp=`if cd $GLEW_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GLEW_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GLEW_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GLEW_PATH" in
               /*) ;;
               * ) GLEW_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GLEW_PATH=$ncbi_fix_dir_tmp ;;
 esac
         GLEW_LIBDIR=$GLEW_PATH/lib
         if test -n "$bit64_sfx" -a -d $GLEW_LIBDIR$bit64_sfx; then
            if test -d $GLEW_LIBDIR; then
               for x in $GLEW_LIBDIR/libGLEW*; do
                  if cmp -s "$x" "$GLEW_LIBDIR$bit64_sfx/`basename \"$x\"`"; then
                     :
                  else
                     GLEW_LIBDIR=$GLEW_LIBDIR$bit64_sfx
                     break
                  fi
               done
            else
               GLEW_LIBDIR=$GLEW_LIBDIR$bit64_sfx
            fi
         fi
         glew_config="eval PKG_CONFIG_PATH=\"$GLEW_LIBDIR/pkgconfig\" pkg-config"
      else
         glew_config=pkg-config
      fi
      if pkg-config --version >/dev/null 2>&1; then
         if $glew_config glewmx --exists >/dev/null 2>&1 \
           && test -n "`$glew_config glewmx --libs 2>/dev/null`"; then
            glew_config="$glew_config glewmx"
         elif $glew_config glew --exists >/dev/null 2>&1 \
           && test -n "`$glew_config glew --libs 2>/dev/null`"; then
            glew_config="$glew_config glew"
         else
            glew_config=
         fi
         if test -n "$glew_config"; then
            GLEW_INCLUDE=`$glew_config --cflags | sed 's:/GL *$::'`
            GLEW_LDFLAGS=`$glew_config --libs-only-L`
            glew_libname=`$glew_config --libs-only-l | sed -e 's/-l//'`
         fi
      fi
      if test -z "$glew_libname" -a -d "$GLEW_PATH"; then
         GLEW_INCLUDE=-I$GLEW_PATH/include
         GLEW_LDFLAGS=-L$GLEW_LIBDIR
      fi
      LDFLAGS="$orig_LDFLAGS $GLEW_LDFLAGS"
      LIBS="$OPENGL_LIBS $DL_LIBS $orig_LIBS"
      saved_LIBS=$LIBS
 echo "$as_me:$LINENO: checking for library containing glewGetExtension" >&5
echo $ECHO_N "checking for library containing glewGetExtension... $ECHO_C" >&6
if test "${ac_cv_search_glewGetExtension+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_glewGetExtension=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 glewGetExtension ();
int
main ()
{
glewGetExtension ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_glewGetExtension="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_glewGetExtension" = no; then
  for ac_lib in "$GLEW_LIBS" $glew_libname GLEWmx GLEW; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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 glewGetExtension ();
int
main ()
{
glewGetExtension ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_glewGetExtension="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_glewGetExtension" >&5
echo "${ECHO_T}$ac_cv_search_glewGetExtension" >&6
if test "$ac_cv_search_glewGetExtension" != no; then
  test "$ac_cv_search_glewGetExtension" = "none required" || LIBS="$ac_cv_search_glewGetExtension $LIBS"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGLEW 1
_ACEOF

   test "x$ac_cv_search_glewGetExtension" = "xnone required" || GLEW_LIBS=$ac_cv_search_glewGetExtension
fi

 LIBS=$saved_LIBS

      if test "$ac_cv_search_glewGetExtension" = no; then
         GLEW_INCLUDE=
         GLEW_LIBS=
         if test "${with_glew:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-glew explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-glew explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
         if test "${with_glew_mx:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-glew-mx explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-glew-mx explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      else
         if test -z "${tmp_LIBS+set}"; then
    if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    tmp_LIBS=`echo $GLEW_LDFLAGS $GLEW_LIBS | sed -e ""`
 else
    tmp_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `echo $GLEW_LDFLAGS $GLEW_LIBS | sed -e ""`; do
       case "$x" in
          -L*)
             tmp_LIBS="$tmp_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             tmp_LIBS="$tmp_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    tmp_LIBS="$tmp_LIBS${ncbi_rp_R_flags}"
 fi
 fi
         GLEW_LIBS=$tmp_LIBS
                   WithPackages="$WithPackages${WithPackagesSep}GLEW"; WithPackagesSep=" "
         CPPFLAGS="$orig_CPPFLAGS $GLEW_INCLUDE $OPENGL_INCLUDE"
         LIBS="$GLEW_LIBS $OPENGL_LIBS $DL_LIBS $orig_LIBS"
         echo "$as_me:$LINENO: checking for GLEW multi-context (MX) support (recommended)" >&5
echo $ECHO_N "checking for GLEW multi-context (MX) support (recommended)... $ECHO_C" >&6
if test "${ncbi_cv_lib_glew_mx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define GLEW_MX 1
                 #include <GL/glew.h>
int
main ()
{
glewContextInit(NULL);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_glew_mx=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_glew_mx=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_glew_mx" >&5
echo "${ECHO_T}$ncbi_cv_lib_glew_mx" >&6
          if test $ncbi_cv_lib_glew_mx = yes; then
             GLEW_INCLUDE="$GLEW_INCLUDE -DGLEW_MX"
          else
             if test "${with_glew_mx:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-glew-mx explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-glew-mx explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
          fi
          : ${GLEW_STATIC_LIBS=$GLEW_LIBDIR/libGLEW-static.a}
          test -f "$GLEW_STATIC_LIBS"  ||  GLEW_STATIC_LIBS=$GLEW_LIBS
      fi
   fi
fi

LDFLAGS=$orig_LDFLAGS


## FLTK
if test "$with_fltk" != "no"; then
   case "$with_fltk" in
      yes | "" ) : ${FLTK_PATH=$NCBI/fltk} ;;
      *        ) FLTK_PATH=$with_fltk ;;
   esac
   if test -d "$FLTK_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
        -a -z "$FLTK_ARCH_PATH"; then
      FLTK_ARCH_PATH="$FLTK_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   elif test -d "$FLTK_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
        -a -z "$FLTK_ARCH_PATH"; then
      FLTK_ARCH_PATH="$FLTK_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   else
      FLTK_ARCH_PATH="$FLTK_PATH"
   fi
   FLTK_BINPATH=${FLTK_BINPATH:="$FLTK_ARCH_PATH/bin"}
   FLTK_LIBPATH=${FLTK_LIBPATH:="$FLTK_ARCH_PATH/lib"}
   FLTK_INCLUDE=
   case "$host_os:$compiler" in
      solaris2.10:GCC ) extrased='s/-lpthread//g; ' ;;
      *               ) extrased= ;;
   esac
   echo "$as_me:$LINENO: checking for FLTK in $FLTK_ARCH_PATH" >&5
echo $ECHO_N "checking for FLTK in $FLTK_ARCH_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_fltk+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -x "$FLTK_BINPATH/fltk-config" ; then
          FLTK_INCLUDE=`$FLTK_BINPATH/fltk-config --cxxflags --use-gl`
          if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_LIBS=`$FLTK_BINPATH/fltk-config --ldflags | sed -e "$extrased"`
 else
    FLTK_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldflags | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_LIBS="$FLTK_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_LIBS="$FLTK_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_LIBS="$FLTK_LIBS${ncbi_rp_R_flags}"
 fi

          CPPFLAGS="$FLTK_INCLUDE $orig_CPPFLAGS"
          LIBS="$FLTK_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <FL/Fl.H>
int
main ()
{
 Fl::run();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_fltk=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_fltk=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       else
          ncbi_cv_lib_fltk=no
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_fltk" >&5
echo "${ECHO_T}$ncbi_cv_lib_fltk" >&6
   if test "$ncbi_cv_lib_fltk" = "no"; then
      if test "${with_fltk:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-fltk explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-fltk explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi

if test "$with_fltk" = "no" ; then
   FLTK_LIBPATH="No_FLTK"
   FLTK_INCLUDE=
   FLTK_LIBS=
   FLTK_LIBS_GL=
else
             WithPackages="$WithPackages${WithPackagesSep}FLTK"; WithPackagesSep=" "
   FLTK_CONFIG="$FLTK_BINPATH/fltk-config"
   # The "yes" may have been cached; get the actual settings again if needed
   if test -z "$FLTK_INCLUDE"; then
      FLTK_INCLUDE=`$FLTK_CONFIG --cxxflags --use-gl`
      if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_LIBS=`$FLTK_BINPATH/fltk-config --ldflags | sed -e "$extrased"`
 else
    FLTK_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldflags | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_LIBS="$FLTK_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_LIBS="$FLTK_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_LIBS="$FLTK_LIBS${ncbi_rp_R_flags}"
 fi
   fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_LIBS_GL=`$FLTK_BINPATH/fltk-config --ldflags --use-gl | sed -e "$extrased"`
 else
    FLTK_LIBS_GL=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldflags --use-gl | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_LIBS_GL="$FLTK_LIBS_GL${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_LIBS_GL="$FLTK_LIBS_GL${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_LIBS_GL="$FLTK_LIBS_GL${ncbi_rp_R_flags}"
 fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_LIBS_IMAGES=`$FLTK_BINPATH/fltk-config --ldflags --use-images | sed -e "$extrased"`
 else
    FLTK_LIBS_IMAGES=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldflags --use-images | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_LIBS_IMAGES="$FLTK_LIBS_IMAGES${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_LIBS_IMAGES="$FLTK_LIBS_IMAGES${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_LIBS_IMAGES="$FLTK_LIBS_IMAGES${ncbi_rp_R_flags}"
 fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_LIBS_ALL=`$FLTK_BINPATH/fltk-config --ldflags --use-gl --use-images | sed -e "$extrased"`
 else
    FLTK_LIBS_ALL=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldflags --use-gl --use-images | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_LIBS_ALL="$FLTK_LIBS_ALL${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_LIBS_ALL="$FLTK_LIBS_ALL${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_LIBS_ALL="$FLTK_LIBS_ALL${ncbi_rp_R_flags}"
 fi
   # Also supply static versions for use in CGIs to be deployed to servers
   # without access to the shared libraries.
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_STATIC_LIBS=`$FLTK_BINPATH/fltk-config --ldstaticflags | sed -e "$extrased"`
 else
    FLTK_STATIC_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldstaticflags | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_STATIC_LIBS="$FLTK_STATIC_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_STATIC_LIBS="$FLTK_STATIC_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_STATIC_LIBS="$FLTK_STATIC_LIBS${ncbi_rp_R_flags}"
 fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_STATIC_LIBS_GL=`$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl | sed -e "$extrased"`
 else
    FLTK_STATIC_LIBS_GL=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_STATIC_LIBS_GL="$FLTK_STATIC_LIBS_GL${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_STATIC_LIBS_GL="$FLTK_STATIC_LIBS_GL${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_STATIC_LIBS_GL="$FLTK_STATIC_LIBS_GL${ncbi_rp_R_flags}"
 fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_STATIC_LIBS_IMAGES=`$FLTK_BINPATH/fltk-config --ldstaticflags --use-images | sed -e "$extrased"`
 else
    FLTK_STATIC_LIBS_IMAGES=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldstaticflags --use-images | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_STATIC_LIBS_IMAGES="$FLTK_STATIC_LIBS_IMAGES${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_STATIC_LIBS_IMAGES="$FLTK_STATIC_LIBS_IMAGES${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_STATIC_LIBS_IMAGES="$FLTK_STATIC_LIBS_IMAGES${ncbi_rp_R_flags}"
 fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FLTK_STATIC_LIBS_ALL=`$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl --use-images | sed -e "$extrased"`
 else
    FLTK_STATIC_LIBS_ALL=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$FLTK_BINPATH/fltk-config --ldstaticflags --use-gl --use-images | sed -e "$extrased"`; do
       case "$x" in
          -L*)
             FLTK_STATIC_LIBS_ALL="$FLTK_STATIC_LIBS_ALL${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FLTK_STATIC_LIBS_ALL="$FLTK_STATIC_LIBS_ALL${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FLTK_STATIC_LIBS_ALL="$FLTK_STATIC_LIBS_ALL${ncbi_rp_R_flags}"
 fi

cat >>confdefs.h <<\_ACEOF
#define HAVE_FLTK 1
_ACEOF

fi


## wxWidgets
# Insist on single-byte builds by default, per various projects' expectations.
: ${with_wxwidgets_ucs=no}
if test "$with_wxwidgets" != "no" ; then
   case "$with_wxwidgets" in
      yes | "" ) : ${WXWIDGETS_PATH=$NCBI/wxwidgets} ;;
      *        ) WXWIDGETS_PATH=$with_wxwidgets ;;
   esac
   if test -d "$WXWIDGETS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
        -a -z "$WXWIDGETS_ARCH_PATH"; then
      WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   elif test -d "$WXWIDGETS_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
        -a -z "$WXWIDGETS_ARCH_PATH"; then
      WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   else
      WXWIDGETS_ARCH_PATH="$WXWIDGETS_PATH"
   fi
   WXWIDGETS_BINPATH=${WXWIDGETS_BINPATH:="$WXWIDGETS_ARCH_PATH/bin"}
   WXWIDGETS_LIBPATH=${WXWIDGETS_LIBPATH:="$WXWIDGETS_ARCH_PATH/lib"}
   WXWIDGETS_INCLUDE=
   $as_unset wxconf || test "${wxconf+set}" != set || { wxconf=; export wxconf; }
   # Extract the first word of "wx-config", so it can be a program name with args.
set dummy wx-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_wxconf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $wxconf in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_wxconf="$wxconf" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$WXWIDGETS_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_wxconf="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
wxconf=$ac_cv_path_wxconf

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

   if test -x "$wxconf"; then
      WXWIDGETS_ARCH_PATH=`$wxconf --exec-prefix`
      if test -n "$with_wxwidgets_ucs"; then
         wxcfflags=--unicode=$with_wxwidgets_ucs
      else
         wxcfflags=
      fi
      for x in `"$wxconf" $wxcfflags --libs --static 2>&5`; do
         case "$x" in
            -L*)
                d=`echo $x | sed -e 's/^-L//'`
                pcd=$d/pkgconfig
                if test -d "$pcd"; then
                   PKG_CONFIG_PATH="${PKG_CONFIG_PATH+$PKG_CONFIG_PATH:}$pcd"
                fi
                ;;
         esac
      done
      export PKG_CONFIG_PATH
   else
      $as_unset wxconf || test "${wxconf+set}" != set || { wxconf=; export wxconf; }
   fi
   if test -x "$wxconf" \
     &&  "$wxconf" $wxcfflags --list 2>/dev/null \
       | grep 'Default config is gtk2' >/dev/null; then
      gtkconf="pkg-config gtk+-2.0"
   elif test -x "$WXWIDGETS_BINPATH/gtk-config"; then
      gtkconf=$WXWIDGETS_BINPATH/gtk-config
   elif gtk-config --version >/dev/null 2>&1; then
      gtkconf=gtk-config
   else
      # May work without gtk-config (e.g., on Mac OS X)
      gtkconf=:
   fi
   case "$host_os" in
      darwin* )
         baseflags=""
         basesed='s/-isysroot [^ ]*//g; s/-arch [^ ]*//g'
         if test -n "$SYSROOT"; then
            deps=`"$wxconf" $wxcfflags --libs --static 2>/dev/null \
                  | sed -e 's/.*\.a//'`
            libsed="$basesed; s/\$/ $deps/"
         else
            libsed=$basesed
         fi
         ;;
      * )
         baseflags=`$gtkconf --cflags 2>/dev/null`
         basesed=$no_usr_lib
         libsed=$basesed
         ;;
   esac
   echo "$as_me:$LINENO: checking for wxWidgets in $WXWIDGETS_ARCH_PATH" >&5
echo $ECHO_N "checking for wxWidgets in $WXWIDGETS_ARCH_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_wxwidgets+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -x "$wxconf" ; then
          WXWIDGETS_INCLUDE="$baseflags `"$wxconf" $wxcfflags --cflags`"
          if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    WXWIDGETS_LIBS=`"$wxconf" $wxcfflags --libs | sed -e "$libsed; "`
 else
    WXWIDGETS_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `"$wxconf" $wxcfflags --libs | sed -e "$libsed; "`; do
       case "$x" in
          -L*)
             WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_R_flags}"
 fi

          CPPFLAGS="$WXWIDGETS_INCLUDE $orig_CPPFLAGS"
          LIBS="$WXWIDGETS_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <wx/wx.h>
int
main ()
{
 wxExit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_wxwidgets=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_wxwidgets=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       else
          ncbi_cv_lib_wxwidgets=no
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_wxwidgets" >&5
echo "${ECHO_T}$ncbi_cv_lib_wxwidgets" >&6
   if test "$ncbi_cv_lib_wxwidgets" = "no"; then
      if test "${with_wxwidgets:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-wxwidgets explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-wxwidgets explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi

if test "$with_wxwidgets" = "no" ; then
   WXWIDGETS_LIBPATH="No_wxWidgets"
   WXWIDGETS_INCLUDE=
   WXWIDGETS_LIBS=
   WXWIDGETS_STATIC_LIBS=
   WXWIDGETS_GL_LIBS=
   WXWIDGETS_GL_STATIC_LIBS=
   WXWIDGETS_POST_LINK=:
else
             WithPackages="$WithPackages${WithPackagesSep}wxWidgets"; WithPackagesSep=" "
   case "`"$wxconf" $wxcfflags --version`" in
      2.[89].* | 2.[0-9][0-9]* )
                   WithPackages="$WithPackages${WithPackagesSep}wx2.8"; WithPackagesSep=" "
         wxlibs=std,richtext,aui
         ;;
      *)
         wxlibs=std
         ;;
   esac
   # The "yes" may have been cached; get the actual settings again if needed
   if test -z "$WXWIDGETS_INCLUDE"; then
      WXWIDGETS_INCLUDE="$baseflags `"$wxconf" $wxcfflags --cflags`"
   fi
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    WXWIDGETS_LIBS=`$wxconf $wxcfflags --libs $wxlibs | sed -e "$libsed; "`
 else
    WXWIDGETS_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$wxconf $wxcfflags --libs $wxlibs | sed -e "$libsed; "`; do
       case "$x" in
          -L*)
             WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    WXWIDGETS_LIBS="$WXWIDGETS_LIBS${ncbi_rp_R_flags}"
 fi
   WXWIDGETS_STATIC_LIBS=`"$wxconf" $wxcfflags --libs --static $wxlibs \
      2>/dev/null | sed -e "$basesed"`
   if test -n "$WXWIDGETS_STATIC_LIBS"; then
      # Allow direct use of underlying libraries with strict linkers
      WXWIDGETS_LIBS="$WXWIDGETS_LIBS `echo $WXWIDGETS_STATIC_LIBS | sed -e 's/.*\.a *//'`"
   else
      WXWIDGETS_STATIC_LIBS=$WXWIDGETS_LIBS
   fi
   WXWIDGETS_GL_LIBS=`"$wxconf" $wxcfflags --libs gl | sed -e "$basesed"`
   WXWIDGETS_GL_STATIC_LIBS=`"$wxconf" $wxcfflags --libs gl --static \
      2>/dev/null | sed -e "$basesed; s|-lGLU* -lGLU*|$OPENGL_STATIC_LIBS|"`
   : ${WXWIDGETS_GL_STATIC_LIBS:=$WXWIDGETS_GL_LIBS}
   WXWIDGETS_POST_LINK=`"$wxconf" $wxcfflags --rezflags 2>/dev/null`
   test -n "$WXWIDGETS_POST_LINK"  ||  WXWIDGETS_POST_LINK=:

cat >>confdefs.h <<\_ACEOF
#define HAVE_WXWIDGETS 1
_ACEOF

fi


## In-house Fast-CGI library
if test "$with_fastcgi" != "no" ; then
   case "$with_fastcgi" in
      yes | "" ) : ${FASTCGI_PATH:="$NCBI/fcgi-current"} ;;
      */*      ) FASTCGI_PATH=$with_fastcgi              ;;
      *        ) FASTCGI_PATH=$NCBI/fcgi-${with_fastcgi} ;;
   esac
   if test -d "$FASTCGI_PATH"; then
      ncbi_fix_dir_tmp=`if cd $FASTCGI_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $FASTCGI_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            FASTCGI_PATH=$ncbi_fix_dir_tmp2
         else
            case "$FASTCGI_PATH" in
               /*) ;;
               * ) FASTCGI_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) FASTCGI_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   FASTCGI_INCLUDE="-I$FASTCGI_PATH/include${bit64_sfx}"
   if test "$with_debug" = "no" ; then
      FASTCGI_LIBDIR="$FASTCGI_PATH/lib${bit64_sfx}"
   else
      FASTCGI_LIBDIR="$FASTCGI_PATH/altlib${bit64_sfx}"
   fi
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $FASTCGI_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FASTCGI_LIBS="${ncbi_rp_L_flags} -lfcgi $NETWORK_LIBS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FASTCGI_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    FASTCGI_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lfcgi $NETWORK_LIBS"
 fi
   FASTCGI_OBJS="fcgibuf"
   LIBS="$FASTCGI_LIBS $orig_LIBS"
   echo "$as_me:$LINENO: checking for FastCGI libraries in $FASTCGI_PATH" >&5
echo $ECHO_N "checking for FastCGI libraries in $FASTCGI_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_fcgi+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$FASTCGI_INCLUDE $orig_CPPFLAGS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fcgiapp.h>
int
main ()
{
 (void) FCGX_IsCGI();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_fcgi=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_fcgi=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_fcgi" >&5
echo "${ECHO_T}$ncbi_cv_lib_fcgi" >&6
   if test "$ncbi_cv_lib_fcgi" = "no"; then
      if test "${with_fastcgi:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-fastcgi explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-fastcgi explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi

for ac_func in FCGX_Accept_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

fi
if test "$with_fastcgi" = "no" ; then
   FASTCGI_PATH="No_FastCgi"
   FASTCGI_INCLUDE=
   FASTCGI_LIBS=
   FASTCGI_OBJS=
else
             WithPackages="$WithPackages${WithPackagesSep}Fast-CGI"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBFASTCGI 1
_ACEOF

fi


## NCBI SSS libraries
if test "$with_sybase" = "no" ; then
   if test "${with_sssdb:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sssdb explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sssdb explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
fi

case "$host_os:$compiler:$compiler_version" in
   linux*:GCC:*)
      : ${with_included_sss=yes}
   ;;
esac

if test "$with_sss" != "no" ; then
   local_sss=${real_srcdir}/src/internal/sss
   if test "${with_included_sss-no}" = "yes" \
       -a -f "$local_sss/utils/sssdebug.hpp" \
       -a -f "${local_sss}srv/cli/sssconnection.cpp"; then
      with_included_sss=yes
      NCBI_SSS_PATH=$local_sss
      NCBI_SSS_INCLUDE="\$(incdir)/sss"
      NCBI_SSS_LIBPATH="\$(libdir)"
                WithPackages="$WithPackages${WithPackagesSep}LocalSSS"; WithPackagesSep=" "
      if test -f "$local_sss/../msgmail2/asn/msgmail.asn"; then
                   WithPackages="$WithPackages${WithPackagesSep}LocalMSGMAIL2"; WithPackagesSep=" "
      fi
   else
      with_included_sss=no
   fi
   NCBI_SSS_PATH=${NCBI_SSS_PATH:="$NCBI/sss/BUILD"}
   NCBI_SSS_INCLUDE=${NCBI_SSS_INCLUDE:="$NCBI_SSS_PATH/include"}
   if test -z "$NCBI_SSS_LIBPATH" ; then
      NCBI_SSS_LIBPATH="${NCBI_SSS_PATH}/lib/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}"
      if test "$with_mt" = "yes" ; then
         NCBI_SSS_LIBPATH="${NCBI_SSS_LIBPATH}mt"
      fi
   fi
   echo "$as_me:$LINENO: checking for NCBI SSS directories in $NCBI_SSS_PATH" >&5
echo $ECHO_N "checking for NCBI SSS directories in $NCBI_SSS_PATH... $ECHO_C" >&6
   if test "$with_included_sss" = "yes"; then
      echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6 # duh
   elif test ! -d "${NCBI_SSS_LIBPATH}"  -o  ! -d "${NCBI_SSS_INCLUDE}" ; then
      echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
      if test "${with_sss:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sss explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sss explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   else
      echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
   fi
fi

if test "$with_sss" = "no" ; then
   if test "${with_sssutils:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sssutils explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sssutils explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   if test "${with_sssdb:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sssdb explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sssdb explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   NCBI_SSS_INCLUDE=
   NCBI_SSS_LIBPATH=
   LIBSSSUTILS=
   LIBSSSDB=
else
   if test "$with_included_sss" = "yes"; then
      NCBI_SSS_LIBPATH= # Not needed
      ncbi_cv_lib_sssutils=yes
      ncbi_cv_lib_sssdb=yes
      sssutils=sssutils
   else
      NCBI_SSS_LIBPATH="-L${NCBI_SSS_LIBPATH}"
   fi
   NCBI_SSS_INCLUDE="-I${NCBI_SSS_INCLUDE}"

   # SSS UTILS
   if test "$with_sssutils" != "no" ; then
      LIBSSSUTILS="-lsssutils"
      echo "$as_me:$LINENO: checking for the NCBI SSS UTILS library" >&5
echo $ECHO_N "checking for the NCBI SSS UTILS library... $ECHO_C" >&6
if test "${ncbi_cv_lib_sssutils+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$NCBI_SSS_INCLUDE $SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$NCBI_SSS_LIBPATH $LIBSSSUTILS $SYBASE_LIBS $NETWORK_LIBS $DL_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hashtab.hpp>
int
main ()
{
 (new C_HashTab(123))->Clear();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sssutils=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sssutils=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sssutils" >&5
echo "${ECHO_T}$ncbi_cv_lib_sssutils" >&6
      if test "$ncbi_cv_lib_sssutils" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSSSUTILS 1
_ACEOF

                   WithPackages="$WithPackages${WithPackagesSep}SSSUTILS"; WithPackagesSep=" "
         if test -f "$local_sss/../ncbils2/asn/login.asn"; then
            if test "$with_included_sss" = yes  || \
               grep vformat $NCBI_SSS_INCLUDE/String.hpp >/dev/null 2>&1; then
                         WithPackages="$WithPackages${WithPackagesSep}LocalNCBILS"; WithPackagesSep=" " # temporary compatibility measure
                         WithPackages="$WithPackages${WithPackagesSep}NCBILS2"; WithPackagesSep=" "
            fi
         fi
      else
         if test "${with_sssutils:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sssutils explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sssutils explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
         if test "${with_sss:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sss explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sss explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
         LIBSSSUTILS=""
      fi
   fi

   # SSS DB
   if test "$with_sssdb" != "no" ; then
      if test "$with_mt" = "yes" ; then
         LIBSSSDB="-lsssdb -lssssys"
      else
         LIBSSSDB="-lsssdb"
      fi
      echo "$as_me:$LINENO: checking for the NCBI SSS DB library" >&5
echo $ECHO_N "checking for the NCBI SSS DB library... $ECHO_C" >&6
if test "${ncbi_cv_lib_sssdb+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$NCBI_SSS_INCLUDE $SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$NCBI_SSS_LIBPATH $LIBSSSDB $SYBASE_LIBS $NETWORK_LIBS $DL_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cslink.hpp>
int
main ()
{
 (new CSLink)->connect2server("srv", "user", "pwd", "db");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sssdb=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sssdb=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sssdb" >&5
echo "${ECHO_T}$ncbi_cv_lib_sssdb" >&6
      if test "$ncbi_cv_lib_sssdb" = "yes"; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSSSDB 1
_ACEOF

                   WithPackages="$WithPackages${WithPackagesSep}SSSDB"; WithPackagesSep=" "
      else
         if test "${with_sssdb:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sssdb explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sssdb explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
         if test "${with_sss:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sss explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sss explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
         LIBSSSDB=""
      fi
   fi
fi


# SP
if test "$with_sp" != "no" ; then
   SP_PATH=${SP_PATH:="$NCBI/SP"}
   if test -n "$SP_INCLUDE"; then
      SP_GENERIC="$SP_INCLUDE/../generic"
   else
      SP_INCLUDE="$SP_PATH/include"
      SP_GENERIC="$SP_PATH/generic"
   fi
   if test -z "$SP_LIBPATH" ; then
      SP_LIBPATH="${SP_PATH}/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   fi
   echo "$as_me:$LINENO: checking for SP directories in $SP_PATH" >&5
echo $ECHO_N "checking for SP directories in $SP_PATH... $ECHO_C" >&6
   if test ! -d "${SP_LIBPATH}"  -o  ! -d "${SP_INCLUDE}" ; then
      echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
      if test "${with_sp:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sp explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sp explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   else
      echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
   fi
fi

if test "$with_sp" != "no" ; then
   if test -d "$SP_GENERIC"; then
      SP_INCLUDE="-I${SP_INCLUDE} -I${SP_GENERIC}"
   else
      SP_INCLUDE="-I${SP_INCLUDE}"
   fi
   SP_LIBS="-L$SP_LIBPATH -lsp"
   echo "$as_me:$LINENO: checking for the SP SGML library" >&5
echo $ECHO_N "checking for the SP SGML library... $ECHO_C" >&6
if test "${ncbi_cv_lib_sp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$SP_INCLUDE $orig_CPPFLAGS"
       LIBS="$SP_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <SGMLApplication.h>
int
main ()
{
 SP_API::SGMLApplication app;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sp=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sp=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sp" >&5
echo "${ECHO_T}$ncbi_cv_lib_sp" >&6
   if test "$ncbi_cv_lib_sp" = "no"; then
      if test "${with_sp:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sp explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sp explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi

if test "$with_sp" = "no" ; then
   SP_INCLUDE=
   SP_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}SP"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSP 1
_ACEOF

fi


## ORBacus CORBA
if test "${with_orbacus:-yes}" = yes; then
   if test -d $NCBI/corba/${compiler_vpfx}Release${bit64_sfx}MT; then
      : ${ORBACUS_PATH=$NCBI/corba/${compiler_vpfx}Release${bit64_sfx}MT}
   else
      : ${ORBACUS_PATH=$NCBI/corba/OB-4.0.1}
   fi
elif test "$with_orbacus" != no; then
    ORBACUS_PATH=$with_orbacus
fi
if test -d "$ORBACUS_PATH"; then
   ncbi_fix_dir_tmp=`if cd $ORBACUS_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $ORBACUS_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ORBACUS_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ORBACUS_PATH" in
               /*) ;;
               * ) ORBACUS_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ORBACUS_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_orbacus" != no; then
   fullpath=${ORBACUS_PATH}/${DEBUG_SFX}${mt_sfx}${bit64_sfx}
   if test -f ${fullpath}/inc/OB/Config.h ; then
      : ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include -I$fullpath/inc"}
      if test -z "${ORBACUS_LIBPATH+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $fullpath/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ORBACUS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $fullpath/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    ORBACUS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
 fi
   elif test -f ${ORBACUS_PATH}/include/OB/Config.h ; then
     : ${ORBACUS_INCLUDE="-I$ORBACUS_PATH/include"}
     if test -z "${ORBACUS_LIBPATH+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $ORBACUS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ORBACUS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ORBACUS_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    ORBACUS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
 fi
   fi
   case "$host_os:$with_mt" in
       linux*:no) LIBJTC="-lJTC -pthread" ;;
       *)         LIBJTC="-lJTC"          ;;
   esac

   case "$with_mt:$ORBACUS_LIBPATH" in
      yes:* | *:-L*MT/lib* )
         LIBOB="-lOB $LIBJTC"
         LIBIMR="-lIMR"
         ;;
      * )
         LIBOB="-lOB"
         LIBIMR=
         ;;
   esac
   echo "$as_me:$LINENO: checking for ORBacus in $ORBACUS_PATH" >&5
echo $ECHO_N "checking for ORBacus in $ORBACUS_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_orbacus+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$ORBACUS_INCLUDE $orig_CPPFLAGS"
       LIBS="$ORBACUS_LIBPATH $LIBOB $NETWORK_LIBS $DL_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <OB/CORBA.h>
int
main ()
{

            int c = 0;
            char* v[] = { NULL };
            CORBA::ORB_var orb = CORBA::ORB_init(c, v);
            if (!CORBA::is_nil(orb)) orb->destroy();

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_orbacus=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_orbacus=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_orbacus" >&5
echo "${ECHO_T}$ncbi_cv_lib_orbacus" >&6
   if test "$ncbi_cv_lib_orbacus" = "no"; then
      if test "${with_orbacus:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-orbacus explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-orbacus explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_orbacus" = no; then
   ORBACUS_PATH=No_ORBacus
   ORBACUS_INCLUDE=
   ORBACUS_LIBPATH=
   LIBOB=
   LIBIMR=
else
             WithPackages="$WithPackages${WithPackagesSep}ORBacus"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_ORBACUS 1
_ACEOF

fi
# Sigh... without this, the linker pulls in the contents of the cache
# and then gripes about missing JTC stuff.
test -d SunWS_cache  &&  rm -r SunWS_cache


## International Components for Unicode (ICU)
if test -z "$ICU_PATH"  &&  icu-config --version >/dev/null 2>&1; then
    ICU_PATH=`icu-config --prefix`
fi

if test "$with_icu" != "no" ; then
   case "$with_icu" in
      yes | "" ) : ${ICU_PATH=$NCBI/icu} ;;
      *        ) ICU_PATH=$with_icu ;;
   esac
   if test -d "$ICU_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}/lib" \
        -a -z "$ICU_ARCH_PATH"; then
      ICU_ARCH_PATH="$ICU_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
   elif test -d "$ICU_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}/lib" \
        -a -z "$ICU_ARCH_PATH"; then
      ICU_ARCH_PATH="$ICU_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
   else
      ICU_ARCH_PATH="$ICU_PATH"
   fi
   ICU_BINPATH=${ICU_BINPATH:="$ICU_ARCH_PATH/bin"}
   ICU_LIBPATH=${ICU_LIBPATH:="$ICU_ARCH_PATH/lib"}
   ICU_INCLUDE=
   echo "$as_me:$LINENO: checking for ICU in $ICU_ARCH_PATH" >&5
echo $ECHO_N "checking for ICU in $ICU_ARCH_PATH... $ECHO_C" >&6
if test "${ncbi_cv_lib_icu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ICU_CONFIG=`$ICU_BINPATH/icu-config --bindir 2>/dev/null`/icu-config
       if test -x "$ICU_CONFIG" ; then
          ICU_INCLUDE=`$ICU_CONFIG --cppflags-searchpath`
          if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    ICU_LIBS=`$ICU_CONFIG --ldflags | sed -e ""`
 else
    ICU_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$ICU_CONFIG --ldflags | sed -e ""`; do
       case "$x" in
          -L*)
             ICU_LIBS="$ICU_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             ICU_LIBS="$ICU_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    ICU_LIBS="$ICU_LIBS${ncbi_rp_R_flags}"
 fi

          CPPFLAGS="$ICU_INCLUDE $orig_CPPFLAGS"
          LIBS="$ICU_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <unicode/unistr.h>
int
main ()
{
int32_t i = UNICODE_STRING_SIMPLE("foo").indexOf('f');
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_icu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_icu=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       else
          ncbi_cv_lib_icu=no
       fi
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_icu" >&5
echo "${ECHO_T}$ncbi_cv_lib_icu" >&6
   if test "$ncbi_cv_lib_icu" = "no"; then
      if test "${with_icu:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-icu explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-icu explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi

if test "$with_icu" = "no" ; then
   ICU_PATH="No_ICU"
   ICU_INCLUDE=
   ICU_LIBS=
   ICU_STATIC_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}ICU"; WithPackagesSep=" "
   ICU_CONFIG="`$ICU_BINPATH/icu-config --bindir`/icu-config"
   # The "yes" may have been cached; get the actual settings again if needed
   if test -z "$ICU_INCLUDE"; then
      ICU_INCLUDE=`$ICU_CONFIG --cppflags-searchpath`
      if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    ICU_LIBS=`$ICU_CONFIG --ldflags | sed -e ""`
 else
    ICU_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$ICU_CONFIG --ldflags | sed -e ""`; do
       case "$x" in
          -L*)
             ICU_LIBS="$ICU_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             ICU_LIBS="$ICU_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    ICU_LIBS="$ICU_LIBS${ncbi_rp_R_flags}"
 fi
   fi
   ICU_STATIC_LIBS=`$ICU_CONFIG --ldflags | sed -e 's/-licu/-lsicu/g'`

cat >>confdefs.h <<\_ACEOF
#define HAVE_ICU 1
_ACEOF

fi


### XML/XSL libraries
if test -d "$NCBI/expat/include"; then
   : ${EXPAT_PATH=$NCBI/expat}
fi
if test "$with_expat" != "no"; then
    case "$with_expat" in
       yes | "" ) ;;
       *        ) EXPAT_PATH=$with_expat ;;
    esac
    if test -d "$EXPAT_PATH"; then
       in_path=" in $EXPAT_PATH"
       if test -z "$EXPAT_INCLUDE" -a -d "$EXPAT_PATH/include"; then
          EXPAT_INCLUDE="-I$EXPAT_PATH/include"
       fi
       if test -n "$EXPAT_LIBPATH"; then
          :
       elif test -d "$EXPAT_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $EXPAT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    EXPAT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $EXPAT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    EXPAT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$EXPAT_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $EXPAT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    EXPAT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $EXPAT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    EXPAT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       EXPAT_LIBS="$EXPAT_LIBPATH -lexpat "
    else
       EXPAT_INCLUDE=""
       EXPAT_LIBS="-lexpat "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libexpat$in_path" >&5
echo $ECHO_N "checking for libexpat$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_expat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $EXPAT_INCLUDE $orig_CPPFLAGS"
       LIBS="$EXPAT_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <expat.h>
int
main ()
{
XML_Parser parser = XML_ParserCreate("utf-8");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_expat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_expat=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_expat" >&5
echo "${ECHO_T}$ncbi_cv_lib_expat" >&6
    if test "$ncbi_cv_lib_expat" = "no"; then
       if test "${with_expat:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-expat explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-expat explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_expat" = "no"; then
    EXPAT_PATH="No_EXPAT"
    EXPAT_INCLUDE=
    EXPAT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}EXPAT"; WithPackagesSep=" "
    EXPAT_INCLUDE=" $EXPAT_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBEXPAT 1
_ACEOF

 fi



if test -f "${EXPAT_PATH}/lib${bit64_sfx}/libexpat-static.a"; then
   EXPAT_STATIC_LIBS="-L${EXPAT_PATH}/lib${bit64_sfx} -lexpat-static"
else
   EXPAT_STATIC_LIBS=${EXPAT_LIBS}
fi
: ${SABLOT_PATH=$NCBI/Sablot}
vpath="$SABLOT_PATH/${compiler_vpfx}build"
test -d "$vpath"  &&  SABLOT_PATH=$vpath
if test -d "$SABLOT_PATH"; then
   ncbi_fix_dir_tmp=`if cd $SABLOT_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $SABLOT_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            SABLOT_PATH=$ncbi_fix_dir_tmp2
         else
            case "$SABLOT_PATH" in
               /*) ;;
               * ) SABLOT_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) SABLOT_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_sablot" != "no"; then
    case "$with_sablot" in
       yes | "" ) ;;
       *        ) SABLOT_PATH=$with_sablot ;;
    esac
    if test -d "$SABLOT_PATH"; then
       in_path=" in $SABLOT_PATH"
       if test -z "$SABLOT_INCLUDE" -a -d "$SABLOT_PATH/include"; then
          SABLOT_INCLUDE="-I$SABLOT_PATH/include"
       fi
       if test -n "$SABLOT_LIBPATH"; then
          :
       elif test -d "$SABLOT_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SABLOT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SABLOT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SABLOT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SABLOT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$SABLOT_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SABLOT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SABLOT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SABLOT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SABLOT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       SABLOT_LIBS="$SABLOT_LIBPATH -lsablot $EXPAT_LIBS"
    else
       SABLOT_INCLUDE=""
       SABLOT_LIBS="-lsablot $EXPAT_LIBS"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libsablot$in_path" >&5
echo $ECHO_N "checking for libsablot$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_sablot+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $SABLOT_INCLUDE $orig_CPPFLAGS"
       LIBS="$SABLOT_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sablot.h>
int
main ()
{
SDOM_Document* D; int x = SablotParse(NULL, "file:/dev/null", D);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sablot=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sablot=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sablot" >&5
echo "${ECHO_T}$ncbi_cv_lib_sablot" >&6
    if test "$ncbi_cv_lib_sablot" = "no"; then
       if test "${with_sablot:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sablot explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sablot explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_sablot" = "no"; then
    SABLOT_PATH="No_SABLOT"
    SABLOT_INCLUDE=
    SABLOT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}SABLOT"; WithPackagesSep=" "
    SABLOT_INCLUDE=" $SABLOT_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSABLOT 1
_ACEOF

 fi



test -d SunWS_cache  &&  rm -r SunWS_cache
if test -f "${SABLOT_PATH}/lib${bit64_sfx}/libsablot-static.a"; then
   SABLOT_STATIC_LIBS="-L${SABLOT_PATH}/lib${bit64_sfx} -lsablot-static $EXPAT_STATIC_LIBS"
else
   SABLOT_STATIC_LIBS=${SABLOT_LIBS}
fi

: ${LIBXML_PATH=$NCBI/libxml}
# test -d "$LIBXML_PATH" || LIBXML_PATH=`xml2-config --prefix 2>/dev/null`
if test "$with_libxml" != "no"; then
   case "$with_libxml" in
      yes | "" ) ;;
      *        ) LIBXML_PATH=$with_libxml ;;
   esac
   for pfx in "$compiler_vpfx" "$compiler_pfx" "" ; do
      vpath=$LIBXML_PATH/$pfx${DEBUG_SFX}${mt_sfx}${bit64_sfx}
      if test -d "$vpath" ; then
         LIBXML_PATH=$vpath
         break
      fi
   done
   if test -d "$LIBXML_PATH"; then
      ncbi_fix_dir_tmp=`if cd $LIBXML_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBXML_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBXML_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBXML_PATH" in
               /*) ;;
               * ) LIBXML_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBXML_PATH=$ncbi_fix_dir_tmp ;;
 esac
      in_path=" in $LIBXML_PATH"
      if test -n "$LIBXML_INCLUDE"; then
         :
      elif test -d "$LIBXML_PATH/include/libxml2/libxml"; then
         LIBXML_INCLUDE="-I$LIBXML_PATH/include/libxml2 -I$LIBXML_PATH/include"
      elif test -d "$LIBXML_PATH/include/libxml"; then
         LIBXML_INCLUDE="-I$LIBXML_PATH/include";
      fi
      if test -d "$LIBXML_PATH/lib${bit64_sfx}"; then
         LIBXML_LIBPATH_="$LIBXML_PATH/lib${bit64_sfx}"
      elif test -d "$LIBXML_PATH/lib"; then
         LIBXML_LIBPATH_="$LIBXML_PATH/lib"
      fi
      if test -z "${LIBXML_LIBPATH+set}"; then
    ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $LIBXML_LIBPATH_; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBXML_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBXML_LIBPATH_; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    LIBXML_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
 fi
      LIBXML_LIBS="$LIBXML_LIBPATH -lxml2"
   else
      LIBXML_INCLUDE="-I/usr/include/libxml2"
      LIBXML_LIBS="-lxml2"
      in_path=
   fi
   LIBXML_LIBS="$LIBXML_LIBS $ICONV_LIBS"
   echo "$as_me:$LINENO: checking for libxml2$in_path" >&5
echo $ECHO_N "checking for libxml2$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_libxml+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$LIBXML_INCLUDE $orig_CPPFLAGS"
      LIBS="$LIBXML_LIBS $orig_LIBS"
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <libxml/parser.h>
int
main ()
{
xmlDocPtr doc = xmlParseFile("foo.xml");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_libxml=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_libxml=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_libxml" >&5
echo "${ECHO_T}$ncbi_cv_lib_libxml" >&6
   if test "$ncbi_cv_lib_libxml" = "no"; then
      if test "${with_libxml:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-libxml explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-libxml explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_libxml" = "no"; then
   LIBXML_PATH="No_LIBXML"
   LIBXML_INCLUDE=
   LIBXML_LIBPATH_=
   LIBXML_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}LIBXML"; WithPackagesSep=" "
   LIBXML_INCLUDE="$LIBXML_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXML 1
_ACEOF

fi



if test -f "${LIBXML_LIBPATH_}/libxml2-static.a"; then
   LIBXML_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lxml2-static"
else
   LIBXML_STATIC_LIBS=${LIBXML_LIBS}
fi

: ${LIBXSLT_PATH=$LIBXML_PATH}
if test "$with_libxslt" != "no"; then
    case "$with_libxslt" in
       yes | "" ) ;;
       *        ) LIBXSLT_PATH=$with_libxslt ;;
    esac
    if test -d "$LIBXSLT_PATH"; then
       in_path=" in $LIBXSLT_PATH"
       if test -z "$LIBXSLT_INCLUDE" -a -d "$LIBXSLT_PATH/include"; then
          LIBXSLT_INCLUDE="-I$LIBXSLT_PATH/include"
       fi
       if test -n "$LIBXSLT_LIBPATH"; then
          :
       elif test -d "$LIBXSLT_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $LIBXSLT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBXSLT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBXSLT_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    LIBXSLT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBXSLT_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $LIBXSLT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBXSLT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBXSLT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    LIBXSLT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBXSLT_LIBS="$LIBXSLT_LIBPATH -lxslt "
    else
       LIBXSLT_INCLUDE=""
       LIBXSLT_LIBS="-lxslt "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libxslt$in_path" >&5
echo $ECHO_N "checking for libxslt$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_libxslt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$LIBXML_INCLUDE $LIBXSLT_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBXSLT_LIBS $LIBXML_LIBS $Z_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <libxslt/xslt.h>
int
main ()
{
xsltInit()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_libxslt=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_libxslt=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_libxslt" >&5
echo "${ECHO_T}$ncbi_cv_lib_libxslt" >&6
    if test "$ncbi_cv_lib_libxslt" = "no"; then
       if test "${with_libxslt:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-libxslt explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-libxslt explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_libxslt" = "no"; then
    LIBXSLT_PATH="No_LIBXSLT"
    LIBXSLT_INCLUDE=
    LIBXSLT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBXSLT"; WithPackagesSep=" "
    LIBXSLT_INCLUDE="$LIBXML_INCLUDE $LIBXSLT_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXSLT 1
_ACEOF

 fi




# XXX - they might be in different directories in some setups
if test -f "${LIBXML_LIBPATH_}/libxslt-static.a"; then
   LIBXSLT_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lxslt-static"
else
   LIBXSLT_STATIC_LIBS=${LIBXSLT_LIBS}
fi

# Extract the first word of "xsltproc", so it can be a program name with args.
set dummy xsltproc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XSLTPROC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $XSLTPROC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$LIBXSLT_PATH/bin:`dirname $LIBXML_LIBPATH_ 2>/dev/null`/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC=":"
  ;;
esac
fi
XSLTPROC=$ac_cv_path_XSLTPROC

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


: ${XERCES_PATH=$NCBI/xerces}
if test "$with_xerces" != no; then
   if test "${with_xerces-yes}" != yes; then
      XERCES_PATH=$with_xerces
   fi
   if test -d "$XERCES_PATH"; then
      ncbi_fix_dir_tmp=`if cd $XERCES_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XERCES_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XERCES_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XERCES_PATH" in
               /*) ;;
               * ) XERCES_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XERCES_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   vpath="$XERCES_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
   if test -d "$vpath/lib"; then
      XERCES_PATH=$vpath
      ncbi_fix_dir_tmp=`if cd $XERCES_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XERCES_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XERCES_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XERCES_PATH" in
               /*) ;;
               * ) XERCES_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XERCES_PATH=$ncbi_fix_dir_tmp ;;
 esac
   elif test -d "$vpath"; then
      : ${XERCES_LIBPATH=$vpath}
      ncbi_fix_dir_tmp=`if cd $XERCES_LIBPATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XERCES_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XERCES_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$XERCES_LIBPATH" in
               /*) ;;
               * ) XERCES_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XERCES_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
   else
      vpath="$XERCES_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
      if test -d "$vpath/lib"; then
         XERCES_PATH=$vpath
         ncbi_fix_dir_tmp=`if cd $XERCES_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XERCES_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XERCES_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XERCES_PATH" in
               /*) ;;
               * ) XERCES_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XERCES_PATH=$ncbi_fix_dir_tmp ;;
 esac
      elif test -d "$vpath"; then
         XERCES_LIBPATH=$vpath
         ncbi_fix_dir_tmp=`if cd $XERCES_LIBPATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XERCES_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XERCES_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$XERCES_LIBPATH" in
               /*) ;;
               * ) XERCES_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XERCES_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
      fi
   fi
   if test -d $XERCES_PATH; then
      in_path=" in $XERCES_PATH"
      : ${XERCES_INCLUDE=-I$XERCES_PATH/include}
      : ${XERCES_LIBPATH=$XERCES_PATH/lib}
   else
      in_path=''
   fi
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $XERCES_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    XERCES_LIBPATH_="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $XERCES_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    XERCES_LIBPATH_="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   XERCES_LIBS="$XERCES_LIBPATH_ -lxerces-c"
   echo "$as_me:$LINENO: checking for Xerces-C++$in_path" >&5
echo $ECHO_N "checking for Xerces-C++$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_xerces_c+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$XERCES_INCLUDE $orig_CPPFLAGS"
       LIBS="$XERCES_LIBS $ICU_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <xercesc/dom/DOM.hpp>
int
main ()
{
xercesc::DOMImplementation* impl
               = xercesc::DOMImplementationRegistry::getDOMImplementation
                 (xercesc::XMLString::transcode("XML 1.0"));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_xerces_c=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_xerces_c=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_xerces_c" >&5
echo "${ECHO_T}$ncbi_cv_lib_xerces_c" >&6
   if test $ncbi_cv_lib_xerces_c = yes; then
      if test -f "$XERCES_LIBPATH/libxerces-c-static.a"; then
         XERCES_STATIC_LIBS="-L$XERCES_LIBPATH -lxerces-c-static"
      else
         XERCES_STATIC_LIBS=$XERCES_LIBS
      fi
   else
      if test "${with_xerces:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-xerces explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-xerces explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_xerces" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Xerces"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_XERCES 1
_ACEOF

else
   XERCES_INCLUDE=
   XERCES_LIBS=
   XERCES_STATIC_LIBS=
fi

: ${XALAN_PATH=$NCBI/xalan}
if test "$with_xalan" != no; then
   if test "${with_xalan-yes}" != yes; then
      XALAN_PATH=$with_xalan
   fi
   if test -d "$XALAN_PATH"; then
      ncbi_fix_dir_tmp=`if cd $XALAN_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XALAN_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XALAN_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XALAN_PATH" in
               /*) ;;
               * ) XALAN_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XALAN_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   vpath="$XALAN_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
   if test -d "$vpath/lib"; then
      XALAN_PATH=$vpath
      ncbi_fix_dir_tmp=`if cd $XALAN_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XALAN_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XALAN_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XALAN_PATH" in
               /*) ;;
               * ) XALAN_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XALAN_PATH=$ncbi_fix_dir_tmp ;;
 esac
   elif test -d "$vpath"; then
      : ${XALAN_LIBPATH=$vpath}
      ncbi_fix_dir_tmp=`if cd $XALAN_LIBPATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XALAN_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XALAN_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$XALAN_LIBPATH" in
               /*) ;;
               * ) XALAN_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XALAN_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
   else
      vpath="$XALAN_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}${mt_sfx}"
      if test -d "$vpath/lib"; then
         XALAN_PATH=$vpath
         ncbi_fix_dir_tmp=`if cd $XALAN_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XALAN_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XALAN_PATH=$ncbi_fix_dir_tmp2
         else
            case "$XALAN_PATH" in
               /*) ;;
               * ) XALAN_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XALAN_PATH=$ncbi_fix_dir_tmp ;;
 esac
      elif test -d "$vpath"; then
         XALAN_LIBPATH=$vpath
         ncbi_fix_dir_tmp=`if cd $XALAN_LIBPATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $XALAN_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            XALAN_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$XALAN_LIBPATH" in
               /*) ;;
               * ) XALAN_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) XALAN_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
      fi
   fi
   if test -d $XALAN_PATH; then
      in_path=" in $XALAN_PATH"
      : ${XALAN_INCLUDE=-I$XALAN_PATH/include}
      : ${XALAN_LIBPATH=$XALAN_PATH/lib}
   else
      in_path=''
   fi
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $XALAN_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    XALAN_LIBPATH_="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $XALAN_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    XALAN_LIBPATH_="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   XALAN_LIBS="$XALAN_LIBPATH_ -lxalan-c -lxalanMsg"
   echo "$as_me:$LINENO: checking for Xalan-C++$in_path" >&5
echo $ECHO_N "checking for Xalan-C++$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_xalan_c+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$XALAN_INCLUDE $XERCES_INCLUDE $orig_CPPFLAGS"
       LIBS="$XALAN_LIBS $XERCES_LIBS $ICU_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <xalanc/XalanEXSLT/XalanEXSLTMath.hpp>
int
main ()
{
xalanc::XalanEXSLTMathFunctionsInstaller::installGlobal();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_xalan_c=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_xalan_c=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_xalan_c" >&5
echo "${ECHO_T}$ncbi_cv_lib_xalan_c" >&6
   if test $ncbi_cv_lib_xalan_c = yes; then
      if test -f "$XALAN_LIBPATH/libxalan-c-static.a"; then
         XALAN_STATIC_LIBS="-L$XALAN_LIBPATH -lxalan-c-static -lxalanMsg-static"
      else
         XALAN_STATIC_LIBS=$XALAN_LIBS
      fi
   else
      if test "${with_xalan:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-xalan explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-xalan explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_xalan" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Xalan"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_XALAN 1
_ACEOF

else
   XALAN_INCLUDE=
   XALAN_LIBS=
   XALAN_STATIC_LIBS=
fi

test -d SunWS_cache  &&  rm -r SunWS_cache

### SQLite
case "$with_sqlite3" in
   yes | '' ) : ${SQLITE3_PATH=$NCBI/sqlite3} ;;
   *        ) SQLITE3_PATH=$with_sqlite3 ;;
esac

if test -d "$SQLITE3_PATH"; then
   ncbi_fix_dir_tmp=`if cd $SQLITE3_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $SQLITE3_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            SQLITE3_PATH=$ncbi_fix_dir_tmp2
         else
            case "$SQLITE3_PATH" in
               /*) ;;
               * ) SQLITE3_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) SQLITE3_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d "$SQLITE3_PATH/${compiler_pfx}${DEBUG_SFX}${MT_SFX}${bit64_sfx}/lib"; then
   SQLITE3_LIBDIR=$SQLITE3_PATH/${compiler_pfx}${DEBUG_SFX}${MT_SFX}${bit64_sfx}/lib
elif test -d $SQLITE3_PATH/lib${bit64_sfx}; then
   SQLITE3_LIBDIR=$SQLITE3_PATH/lib${bit64_sfx}
else
   SQLITE3_LIBDIR=$SQLITE3_PATH/lib
fi
ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SQLITE3_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SQLITE3_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_sqlite3" != "no"; then
    case "$with_sqlite3" in
       yes | "" ) ;;
       *        ) SQLITE3_PATH=$with_sqlite3 ;;
    esac
    if test -d "$SQLITE3_PATH"; then
       in_path=" in $SQLITE3_PATH"
       if test -z "$SQLITE3_INCLUDE" -a -d "$SQLITE3_PATH/include"; then
          SQLITE3_INCLUDE="-I$SQLITE3_PATH/include"
       fi
       if test -n "$SQLITE3_LIBPATH"; then
          :
       elif test -d "$SQLITE3_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SQLITE3_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SQLITE3_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$SQLITE3_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SQLITE3_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SQLITE3_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SQLITE3_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       SQLITE3_LIBS="$SQLITE3_LIBPATH -lsqlite3 "
    else
       SQLITE3_INCLUDE=""
       SQLITE3_LIBS="-lsqlite3 "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libsqlite3$in_path" >&5
echo $ECHO_N "checking for libsqlite3$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_sqlite3+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $SQLITE3_INCLUDE $orig_CPPFLAGS"
       LIBS="$SQLITE3_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sqlite3.h>
int
main ()
{
sqlite3_pcache_methods m;
     int status = sqlite3_config(SQLITE_CONFIG_GETPCACHE, &m);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sqlite3=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sqlite3=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sqlite3" >&5
echo "${ECHO_T}$ncbi_cv_lib_sqlite3" >&6
    if test "$ncbi_cv_lib_sqlite3" = "no"; then
       if test "${with_sqlite3:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sqlite3 explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sqlite3 explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_sqlite3" = "no"; then
    SQLITE3_PATH="No_SQLITE3"
    SQLITE3_INCLUDE=
    SQLITE3_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}SQLITE3"; WithPackagesSep=" "
    SQLITE3_INCLUDE=" $SQLITE3_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSQLITE3 1
_ACEOF

 fi



if test -n "$SQLITE3_LIBS"; then
   CPPFLAGS="$SQLITE3_INCLUDE $orig_CPPFLAGS"
   if test "${ac_cv_header_sqlite3async_h+set}" = set; then
  echo "$as_me:$LINENO: checking for sqlite3async.h" >&5
echo $ECHO_N "checking for sqlite3async.h... $ECHO_C" >&6
if test "${ac_cv_header_sqlite3async_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3async_h" >&5
echo "${ECHO_T}$ac_cv_header_sqlite3async_h" >&6
else
  # Is the header compilable?
echo "$as_me:$LINENO: checking sqlite3async.h usability" >&5
echo $ECHO_N "checking sqlite3async.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <sqlite3async.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6

# Is the header present?
echo "$as_me:$LINENO: checking sqlite3async.h presence" >&5
echo $ECHO_N "checking sqlite3async.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sqlite3async.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: sqlite3async.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: sqlite3async.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: sqlite3async.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: sqlite3async.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: sqlite3async.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: sqlite3async.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: sqlite3async.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlite3async.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3async.h: in the future, the compiler will take precedence" >&2;}
    (
      cat <<\_ASBOX
## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##
_ASBOX
    ) |
      sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
echo "$as_me:$LINENO: checking for sqlite3async.h" >&5
echo $ECHO_N "checking for sqlite3async.h... $ECHO_C" >&6
if test "${ac_cv_header_sqlite3async_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_sqlite3async_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3async_h" >&5
echo "${ECHO_T}$ac_cv_header_sqlite3async_h" >&6

fi
if test $ac_cv_header_sqlite3async_h = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_SQLITE3ASYNC_H 1
_ACEOF

                 WithPackages="$WithPackages${WithPackagesSep}SQLITE3ASYNC"; WithPackagesSep=" "
fi


   LIBS="$SQLITE3_LIBS $orig_LIBS"

for ac_func in sqlite3_unlock_notify
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: 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 <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

fi
if test -n "$SQLITE3_LIBS" -a -f "$SQLITE3_LIBDIR/libsqlite3-static.a"; then
   SQLITE3_STATIC_LIBS="-L$SQLITE3_LIBDIR -lsqlite3-static"
else
   SQLITE3_STATIC_LIBS=$SQLITE3_LIBS
fi


### OEChem
# somewhat kludgish, as we now wanto to add in oeiupac and oedepict,
# which depend on oechem....
: ${OECHEM_PATH=$NCBI/oechem}
if test "$with_oechem" != "no"; then
    case "$with_oechem" in
       yes | "" ) ;;
       *        ) OECHEM_PATH=$with_oechem ;;
    esac
    if test -d "$OECHEM_PATH"; then
       in_path=" in $OECHEM_PATH"
       if test -z "$OECHEM_INCLUDE" -a -d "$OECHEM_PATH/include"; then
          OECHEM_INCLUDE="-I$OECHEM_PATH/include"
       fi
       if test -n "$OECHEM_LIBPATH"; then
          :
       elif test -d "$OECHEM_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OECHEM_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OECHEM_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OECHEM_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OECHEM_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$OECHEM_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $OECHEM_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OECHEM_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OECHEM_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    OECHEM_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       OECHEM_LIBS="$OECHEM_LIBPATH -loechem -loeiupac -loedepict -loechem -loesystem -loeplatform -lz"
    else
       OECHEM_INCLUDE=""
       OECHEM_LIBS="-loechem -loeiupac -loedepict -loechem -loesystem -loeplatform -lz"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for liboechem$in_path" >&5
echo $ECHO_N "checking for liboechem$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_oechem+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $OECHEM_INCLUDE $orig_CPPFLAGS"
       LIBS="$OECHEM_LIBS $NETWORK_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <oechem.h>
int
main ()
{
OEChem::OEMol mol; OEChem::OEConfBase* c = mol.GetActive();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_oechem=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_oechem=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_oechem" >&5
echo "${ECHO_T}$ncbi_cv_lib_oechem" >&6
    if test "$ncbi_cv_lib_oechem" = "no"; then
       if test "${with_oechem:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-oechem explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-oechem explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_oechem" = "no"; then
    OECHEM_PATH="No_OECHEM"
    OECHEM_INCLUDE=
    OECHEM_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}OECHEM"; WithPackagesSep=" "
    OECHEM_INCLUDE=" $OECHEM_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBOECHEM 1
_ACEOF

 fi



if test -n "$OECHEM_LIBS"; then
   OECHEM_LIBS=`echo $OECHEM_LIBS | sed -e 's/-loechem \(.*-loechem .*\)/\1/'`
fi
test -d SunWS_cache  &&  rm -r SunWS_cache


### Sun Grid Engine
case "$with_sge" in
   yes | "" ) ;;
   *        ) SGE_PATH=$with_sge ;;
esac
if test -d "$SGE_PATH" -a -z "$SGE_LIBPATH"; then
   case "$host:$NCBI_PLATFORM_BITS" in
      i?86-*-darwin*      ) SGE_LIBPATH=$SGE_PATH/lib/darwin-x86  ;;
      i?86-*-linux*       ) SGE_LIBPATH=$SGE_PATH/lib/lx24-x86    ;;
      i?86-*-solaris*:32  ) SGE_LIBPATH=$SGE_PATH/lib/sol-x86     ;;
      i?86-*-solaris*:64  ) SGE_LIBPATH=$SGE_PATH/lib/sol-amd64   ;;
      powerpc-*-darwin*   ) SGE_LIBPATH=$SGE_PATH/lib/darwin-ppc  ;;
      sparc-*-solaris*:32 ) SGE_LIBPATH=$SGE_PATH/lib/sol-sparc   ;;
      sparc-*-solaris*:64 ) SGE_LIBPATH=$SGE_PATH/lib/sol-sparc64 ;;
      x86_64-*-linux*     ) SGE_LIBPATH=$SGE_PATH/lib/lx24-amd64  ;;
   esac
   ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SGE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SGE_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
fi
if test "$with_sge" != "no"; then
    case "$with_sge" in
       yes | "" ) ;;
       *        ) SGE_PATH=$with_sge ;;
    esac
    if test -d "$SGE_PATH"; then
       in_path=" in $SGE_PATH"
       if test -z "$SGE_INCLUDE" -a -d "$SGE_PATH/include"; then
          SGE_INCLUDE="-I$SGE_PATH/include"
       fi
       if test -n "$SGE_LIBPATH"; then
          :
       elif test -d "$SGE_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SGE_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SGE_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$SGE_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $SGE_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SGE_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    SGE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       SGE_LIBS="$SGE_LIBPATH -ldrmaa "
    else
       SGE_INCLUDE=""
       SGE_LIBS="-ldrmaa "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libdrmaa$in_path" >&5
echo $ECHO_N "checking for libdrmaa$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_sge+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $SGE_INCLUDE $orig_CPPFLAGS"
       LIBS="$SGE_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
                      #include <drmaa.h>
int
main ()
{
char buf[1024]; drmaa_init("SGE", buf, sizeof(buf));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_sge=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_sge=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_sge" >&5
echo "${ECHO_T}$ncbi_cv_lib_sge" >&6
    if test "$ncbi_cv_lib_sge" = "no"; then
       if test "${with_sge:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-sge explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-sge explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_sge" = "no"; then
    SGE_PATH="No_SGE"
    SGE_INCLUDE=
    SGE_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}SGE"; WithPackagesSep=" "
    SGE_INCLUDE=" $SGE_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSGE 1
_ACEOF

 fi





### muParser
case "$with_muparser" in
   yes | '' ) : ${MUPARSER_PATH=$NCBI/muParser} ;;
   *        ) MUPARSER_PATH=$with_muparser ;;
esac

if test -d "$MUPARSER_PATH"; then
   ncbi_fix_dir_tmp=`if cd $MUPARSER_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $MUPARSER_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            MUPARSER_PATH=$ncbi_fix_dir_tmp2
         else
            case "$MUPARSER_PATH" in
               /*) ;;
               * ) MUPARSER_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) MUPARSER_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d "$MUPARSER_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib"; then
   MUPARSER_LIBPATH=-L$MUPARSER_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib
elif test -d "$MUPARSER_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib"; then
   MUPARSER_LIBPATH=-L$MUPARSER_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib
fi

if test "$with_muparser" != "no"; then
    case "$with_muparser" in
       yes | "" ) ;;
       *        ) MUPARSER_PATH=$with_muparser ;;
    esac
    if test -d "$MUPARSER_PATH"; then
       in_path=" in $MUPARSER_PATH"
       if test -z "$MUPARSER_INCLUDE" -a -d "$MUPARSER_PATH/include"; then
          MUPARSER_INCLUDE="-I$MUPARSER_PATH/include"
       fi
       if test -n "$MUPARSER_LIBPATH"; then
          :
       elif test -d "$MUPARSER_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $MUPARSER_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MUPARSER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MUPARSER_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    MUPARSER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MUPARSER_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $MUPARSER_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MUPARSER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MUPARSER_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    MUPARSER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MUPARSER_LIBS="$MUPARSER_LIBPATH -lmuparser "
    else
       MUPARSER_INCLUDE=""
       MUPARSER_LIBS="-lmuparser "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libmuparser$in_path" >&5
echo $ECHO_N "checking for libmuparser$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_muparser+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $MUPARSER_INCLUDE $orig_CPPFLAGS"
       LIBS="$MUPARSER_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <muParser.h>
int
main ()
{
mu::Parser parser;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_muparser=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_muparser=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_muparser" >&5
echo "${ECHO_T}$ncbi_cv_lib_muparser" >&6
    if test "$ncbi_cv_lib_muparser" = "no"; then
       if test "${with_muparser:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-muparser explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-muparser explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_muparser" = "no"; then
    MUPARSER_PATH="No_MUPARSER"
    MUPARSER_INCLUDE=
    MUPARSER_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MUPARSER"; WithPackagesSep=" "
    MUPARSER_INCLUDE=" $MUPARSER_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBMUPARSER 1
_ACEOF

 fi





### hdf5
case "$with_hdf5" in
   yes | '' ) : ${HDF5_PATH=$NCBI/hdf5} ;;
   *        ) HDF5_PATH=$with_hdf5 ;;
esac

if test -d "$HDF5_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}"; then
   HDF5_PATH=$HDF5_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}
elif test -d "$HDF5_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}"; then
   HDF5_PATH=$HDF5_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}
fi
if test -d "$HDF5_PATH"; then
   ncbi_fix_dir_tmp=`if cd $HDF5_PATH; then $as_unset PWD || test "${PWD+set}" != set || { PWD=; export PWD; }; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $HDF5_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            HDF5_PATH=$ncbi_fix_dir_tmp2
         else
            case "$HDF5_PATH" in
               /*) ;;
               * ) HDF5_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) HDF5_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi

if test "$with_hdf5" != "no"; then
    case "$with_hdf5" in
       yes | "" ) ;;
       *        ) HDF5_PATH=$with_hdf5 ;;
    esac
    if test -d "$HDF5_PATH"; then
       in_path=" in $HDF5_PATH"
       if test -z "$HDF5_INCLUDE" -a -d "$HDF5_PATH/include"; then
          HDF5_INCLUDE="-I$HDF5_PATH/include"
       fi
       if test -n "$HDF5_LIBPATH"; then
          :
       elif test -d "$HDF5_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $HDF5_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    HDF5_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $HDF5_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    HDF5_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$HDF5_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $HDF5_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    HDF5_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $HDF5_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    HDF5_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       HDF5_LIBS="$HDF5_LIBPATH -lhdf5_cpp -lhdf5"
    else
       HDF5_INCLUDE=""
       HDF5_LIBS="-lhdf5_cpp -lhdf5"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libhdf5_cpp$in_path" >&5
echo $ECHO_N "checking for libhdf5_cpp$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_hdf5+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $HDF5_INCLUDE $orig_CPPFLAGS"
       LIBS="$HDF5_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <H5Cpp.h>
int
main ()
{
H5::H5Library::open();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_hdf5=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_hdf5=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_hdf5" >&5
echo "${ECHO_T}$ncbi_cv_lib_hdf5" >&6
    if test "$ncbi_cv_lib_hdf5" = "no"; then
       if test "${with_hdf5:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-hdf5 explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-hdf5 explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_hdf5" = "no"; then
    HDF5_PATH="No_HDF5"
    HDF5_INCLUDE=
    HDF5_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}HDF5"; WithPackagesSep=" "
    HDF5_INCLUDE=" $HDF5_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBHDF5 1
_ACEOF

 fi





### Image libraries
# : ${JPEG_PATH=/usr/sfw}
# Grr... jpeglib.h isn't especially well-behaved.
if test "$with_jpeg" != "no"; then
    case "$with_jpeg" in
       yes | "" ) ;;
       *        ) JPEG_PATH=$with_jpeg ;;
    esac
    if test -d "$JPEG_PATH"; then
       in_path=" in $JPEG_PATH"
       if test -z "$JPEG_INCLUDE" -a -d "$JPEG_PATH/include"; then
          JPEG_INCLUDE="-I$JPEG_PATH/include"
       fi
       if test -n "$JPEG_LIBPATH"; then
          :
       elif test -d "$JPEG_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $JPEG_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    JPEG_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $JPEG_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    JPEG_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$JPEG_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $JPEG_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    JPEG_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $JPEG_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    JPEG_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       JPEG_LIBS="$JPEG_LIBPATH -ljpeg "
    else
       JPEG_INCLUDE=""
       JPEG_LIBS="-ljpeg "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libjpeg$in_path" >&5
echo $ECHO_N "checking for libjpeg$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_jpeg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $JPEG_INCLUDE $orig_CPPFLAGS"
       LIBS="$JPEG_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
                  #include <stdio.h>
                  extern "C" {
                  #include <jpeglib.h>
                  }
int
main ()
{
struct jpeg_decompress_struct cinfo;
     struct jpeg_error_mgr         jerr;
     cinfo.err = jpeg_std_error(&jerr);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_jpeg=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_jpeg=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_jpeg" >&5
echo "${ECHO_T}$ncbi_cv_lib_jpeg" >&6
    if test "$ncbi_cv_lib_jpeg" = "no"; then
       if test "${with_jpeg:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-jpeg explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-jpeg explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_jpeg" = "no"; then
    JPEG_PATH="No_JPEG"
    JPEG_INCLUDE=
    JPEG_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}JPEG"; WithPackagesSep=" "
    JPEG_INCLUDE=" $JPEG_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF

 fi




# : ${PNG_PATH=/usr/sfw}
if test "$with_png" != "no"; then
    case "$with_png" in
       yes | "" ) ;;
       *        ) PNG_PATH=$with_png ;;
    esac
    if test -d "$PNG_PATH"; then
       in_path=" in $PNG_PATH"
       if test -z "$PNG_INCLUDE" -a -d "$PNG_PATH/include"; then
          PNG_INCLUDE="-I$PNG_PATH/include"
       fi
       if test -n "$PNG_LIBPATH"; then
          :
       elif test -d "$PNG_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PNG_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PNG_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PNG_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PNG_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$PNG_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $PNG_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PNG_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PNG_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    PNG_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       PNG_LIBS="$PNG_LIBPATH -lpng $Z_LIBS"
    else
       PNG_INCLUDE=""
       PNG_LIBS="-lpng $Z_LIBS"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libpng$in_path" >&5
echo $ECHO_N "checking for libpng$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_png+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$Z_INCLUDE $PNG_INCLUDE $orig_CPPFLAGS"
       LIBS="$PNG_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <png.h>
int
main ()
{
png_structp png_ptr
      = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_png=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_png=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_png" >&5
echo "${ECHO_T}$ncbi_cv_lib_png" >&6
    if test "$ncbi_cv_lib_png" = "no"; then
       if test "${with_png:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-png explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-png explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_png" = "no"; then
    PNG_PATH="No_PNG"
    PNG_INCLUDE=
    PNG_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PNG"; WithPackagesSep=" "
    PNG_INCLUDE="$Z_INCLUDE $PNG_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPNG 1
_ACEOF

 fi




# : ${TIFF_PATH=/usr/sfw}
if test "$with_tiff" != "no"; then
    case "$with_tiff" in
       yes | "" ) ;;
       *        ) TIFF_PATH=$with_tiff ;;
    esac
    if test -d "$TIFF_PATH"; then
       in_path=" in $TIFF_PATH"
       if test -z "$TIFF_INCLUDE" -a -d "$TIFF_PATH/include"; then
          TIFF_INCLUDE="-I$TIFF_PATH/include"
       fi
       if test -n "$TIFF_LIBPATH"; then
          :
       elif test -d "$TIFF_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $TIFF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    TIFF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $TIFF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    TIFF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$TIFF_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $TIFF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    TIFF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $TIFF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    TIFF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       TIFF_LIBS="$TIFF_LIBPATH -ltiff $Z_LIBS"
    else
       TIFF_INCLUDE=""
       TIFF_LIBS="-ltiff $Z_LIBS"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libtiff$in_path" >&5
echo $ECHO_N "checking for libtiff$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_tiff+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $TIFF_INCLUDE $orig_CPPFLAGS"
       LIBS="$TIFF_LIBS $JPEG_LIBS $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <tiffio.h>
int
main ()
{
TIFF* tiff = TIFFOpen("foo", "r");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_tiff=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_tiff=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_tiff" >&5
echo "${ECHO_T}$ncbi_cv_lib_tiff" >&6
    if test "$ncbi_cv_lib_tiff" = "no"; then
       if test "${with_tiff:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-tiff explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-tiff explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_tiff" = "no"; then
    TIFF_PATH="No_TIFF"
    TIFF_INCLUDE=
    TIFF_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}TIFF"; WithPackagesSep=" "
    TIFF_INCLUDE=" $TIFF_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBTIFF 1
_ACEOF

 fi



## etc.

# Paths?
with_ungif=$with_gif
if test "$with_ungif" != "no"; then
    case "$with_ungif" in
       yes | "" ) ;;
       *        ) UNGIF_PATH=$with_ungif ;;
    esac
    if test -d "$UNGIF_PATH"; then
       in_path=" in $UNGIF_PATH"
       if test -z "$UNGIF_INCLUDE" -a -d "$UNGIF_PATH/include"; then
          UNGIF_INCLUDE="-I$UNGIF_PATH/include"
       fi
       if test -n "$UNGIF_LIBPATH"; then
          :
       elif test -d "$UNGIF_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $UNGIF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    UNGIF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $UNGIF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    UNGIF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$UNGIF_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $UNGIF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    UNGIF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $UNGIF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    UNGIF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       UNGIF_LIBS="$UNGIF_LIBPATH -lungif $X_LIBS -lX11"
    else
       UNGIF_INCLUDE=""
       UNGIF_LIBS="-lungif $X_LIBS -lX11"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libungif$in_path" >&5
echo $ECHO_N "checking for libungif$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_ungif+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $UNGIF_INCLUDE $orig_CPPFLAGS"
       LIBS="$UNGIF_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
extern "C" {
                  #include <gif_lib.h>
                  }
int
main ()
{
GifFileType* fp = DGifOpenFileName("foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_ungif=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_ungif=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_ungif" >&5
echo "${ECHO_T}$ncbi_cv_lib_ungif" >&6
    if test "$ncbi_cv_lib_ungif" = "no"; then
       if test "${with_ungif:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-ungif explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-ungif explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_ungif" = "no"; then
    UNGIF_PATH="No_UNGIF"
    UNGIF_INCLUDE=
    UNGIF_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}UNGIF"; WithPackagesSep=" "
    UNGIF_INCLUDE=" $UNGIF_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBUNGIF 1
_ACEOF

 fi



if test "$with_ungif" = "no"; then
   if test "$with_gif" != "no"; then
    case "$with_gif" in
       yes | "" ) ;;
       *        ) GIF_PATH=$with_gif ;;
    esac
    if test -d "$GIF_PATH"; then
       in_path=" in $GIF_PATH"
       if test -z "$GIF_INCLUDE" -a -d "$GIF_PATH/include"; then
          GIF_INCLUDE="-I$GIF_PATH/include"
       fi
       if test -n "$GIF_LIBPATH"; then
          :
       elif test -d "$GIF_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $GIF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GIF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GIF_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GIF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GIF_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $GIF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GIF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GIF_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GIF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GIF_LIBS="$GIF_LIBPATH -lgif $X_LIBS -lX11"
    else
       GIF_INCLUDE=""
       GIF_LIBS="-lgif $X_LIBS -lX11"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libgif$in_path" >&5
echo $ECHO_N "checking for libgif$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_gif+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $GIF_INCLUDE $orig_CPPFLAGS"
       LIBS="$GIF_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
extern "C" {
                     #include <gif_lib.h>
                     }
int
main ()
{
GifFileType* fp = DGifOpenFileName("foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_gif=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_gif=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_gif" >&5
echo "${ECHO_T}$ncbi_cv_lib_gif" >&6
    if test "$ncbi_cv_lib_gif" = "no"; then
       if test "${with_gif:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-gif explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-gif explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_gif" = "no"; then
    GIF_PATH="No_GIF"
    GIF_INCLUDE=
    GIF_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GIF"; WithPackagesSep=" "
    GIF_INCLUDE=" $GIF_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGIF 1
_ACEOF

 fi



else

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGIF 1
_ACEOF

   GIF_INCLUDE=$UNGIF_INCLUDE
   GIF_LIBS=$UNGIF_LIBS
fi

test -n "$x_libraries"  &&  : ${XPM_PATH=`dirname "$x_libraries"`}
if test "$with_xpm" != "no"; then
    case "$with_xpm" in
       yes | "" ) ;;
       *        ) XPM_PATH=$with_xpm ;;
    esac
    if test -d "$XPM_PATH"; then
       in_path=" in $XPM_PATH"
       if test -z "$XPM_INCLUDE" -a -d "$XPM_PATH/include"; then
          XPM_INCLUDE="-I$XPM_PATH/include"
       fi
       if test -n "$XPM_LIBPATH"; then
          :
       elif test -d "$XPM_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $XPM_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    XPM_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $XPM_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    XPM_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$XPM_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $XPM_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    XPM_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $XPM_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    XPM_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       XPM_LIBS="$XPM_LIBPATH -lXpm $X_LIBS -lX11"
    else
       XPM_INCLUDE=""
       XPM_LIBS="-lXpm $X_LIBS -lX11"
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libXpm$in_path" >&5
echo $ECHO_N "checking for libXpm$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_xpm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$X_CFLAGS $XPM_INCLUDE $orig_CPPFLAGS"
       LIBS="$XPM_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/xpm.h>
int
main ()
{
XpmImage image; XpmInfo info;
     XpmReadFileToXpmImage("foo", &image, &info);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_xpm=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_xpm=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_xpm" >&5
echo "${ECHO_T}$ncbi_cv_lib_xpm" >&6
    if test "$ncbi_cv_lib_xpm" = "no"; then
       if test "${with_xpm:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-xpm explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-xpm explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_xpm" = "no"; then
    XPM_PATH="No_XPM"
    XPM_INCLUDE=
    XPM_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}XPM"; WithPackagesSep=" "
    XPM_INCLUDE="$X_CFLAGS $XPM_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXPM 1
_ACEOF

 fi



# The use of X_CFLAGS is probably redundant, but shouldn't hurt.

## FreeType
if test "$with_freetype" != "no" ; then
   : ${FREETYPE_BINPATH=$FREETYPE_PATH/bin}
   # Extract the first word of "freetype-config", so it can be a program name with args.
set dummy freetype-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_freetype_config+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $freetype_config in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_freetype_config="$freetype_config" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$FREETYPE_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_freetype_config="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
freetype_config=$ac_cv_path_freetype_config

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

   if test -n "$freetype_config" ; then
      : ${FREETYPE_BINPATH=`dirname $freetype_config`}
      : ${FREETYPE_INCLUDE=`$freetype_config --cflags`}
      if test -z "${FREETYPE_LIBS+set}"; then
    if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    FREETYPE_LIBS=`$freetype_config --libs | sed -e "$no_usr_lib"`
 else
    FREETYPE_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$freetype_config --libs | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L*)
             FREETYPE_LIBS="$FREETYPE_LIBS${ncbi_rp_L_sep}$x"
             x=`echo $x | sed -e "s/^-L//; $ncbi_rpath_sed"`
             ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
             ncbi_rp_R_sep=:
             ;;
          *)
             FREETYPE_LIBS="$FREETYPE_LIBS${ncbi_rp_R_flags}${ncbi_rp_L_sep}$x"
             ncbi_rp_R_flags=
             ncbi_rp_R_sep=" $CONF_f_runpath"
             ;;
       esac
       ncbi_rp_L_sep=" "
    done
    FREETYPE_LIBS="$FREETYPE_LIBS${ncbi_rp_R_flags}"
 fi
 fi
      echo "$as_me:$LINENO: checking whether FREETYPE_INCLUDE needs doctoring" >&5
echo $ECHO_N "checking whether FREETYPE_INCLUDE needs doctoring... $ECHO_C" >&6
if test "${ncbi_cv_lib_freetype_fix_include+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_freetype_fix_include=no
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_freetype_fix_include=yes
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_freetype_fix_include" >&5
echo "${ECHO_T}$ncbi_cv_lib_freetype_fix_include" >&6
      if test "$ncbi_cv_lib_freetype_fix_include" = yes; then
         FREETYPE_INCLUDE=`echo "$FREETYPE_INCLUDE" |\
             sed -e 's:\(-I[^ ]*\)\(/freetype2\):\1 \1\2:g'`
      fi
      echo "$as_me:$LINENO: checking whether FreeType works" >&5
echo $ECHO_N "checking whether FreeType works... $ECHO_C" >&6
if test "${ncbi_cv_lib_freetype+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS"
          LIBS="$FREETYPE_LIBS $orig_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
                   #include FT_FREETYPE_H
int
main ()
{
FT_Select_Charmap(NULL, ft_encoding_unicode);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_freetype=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_freetype=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_freetype" >&5
echo "${ECHO_T}$ncbi_cv_lib_freetype" >&6
      if test "$ncbi_cv_lib_freetype" = no; then
         if test "${with_freetype:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-freetype explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-freetype explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      fi
   else
      if test "${with_freetype:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-freetype explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-freetype explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_freetype" = "no" ; then
   FREETYPE_PATH="No_FREETYPE"
   FREETYPE_INCLUDE=
   FREETYPE_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}FreeType"; WithPackagesSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_FREETYPE 1
_ACEOF

fi


if test "$with_magic" != "no"; then
    case "$with_magic" in
       yes | "" ) ;;
       *        ) MAGIC_PATH=$with_magic ;;
    esac
    if test -d "$MAGIC_PATH"; then
       in_path=" in $MAGIC_PATH"
       if test -z "$MAGIC_INCLUDE" -a -d "$MAGIC_PATH/include"; then
          MAGIC_INCLUDE="-I$MAGIC_PATH/include"
       fi
       if test -n "$MAGIC_LIBPATH"; then
          :
       elif test -d "$MAGIC_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $MAGIC_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MAGIC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MAGIC_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    MAGIC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MAGIC_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $MAGIC_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MAGIC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MAGIC_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    MAGIC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MAGIC_LIBS="$MAGIC_LIBPATH -lmagic "
    else
       MAGIC_INCLUDE=""
       MAGIC_LIBS="-lmagic "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libmagic$in_path" >&5
echo $ECHO_N "checking for libmagic$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_magic+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $MAGIC_INCLUDE $orig_CPPFLAGS"
       LIBS="$MAGIC_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <magic.h>
int
main ()
{
magic_t m = magic_open(17);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_magic=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_magic=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_magic" >&5
echo "${ECHO_T}$ncbi_cv_lib_magic" >&6
    if test "$ncbi_cv_lib_magic" = "no"; then
       if test "${with_magic:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-magic explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-magic explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_magic" = "no"; then
    MAGIC_PATH="No_MAGIC"
    MAGIC_INCLUDE=
    MAGIC_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MAGIC"; WithPackagesSep=" "
    MAGIC_INCLUDE=" $MAGIC_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBMAGIC 1
_ACEOF

 fi





if test "$with_curl" != "no"; then
    case "$with_curl" in
       yes | "" ) ;;
       *        ) CURL_PATH=$with_curl ;;
    esac
    if test -d "$CURL_PATH"; then
       in_path=" in $CURL_PATH"
       if test -z "$CURL_INCLUDE" -a -d "$CURL_PATH/include"; then
          CURL_INCLUDE="-I$CURL_PATH/include"
       fi
       if test -n "$CURL_LIBPATH"; then
          :
       elif test -d "$CURL_PATH/lib${bit64_sfx}"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $CURL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CURL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CURL_PATH/lib${bit64_sfx}; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    CURL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$CURL_PATH/lib"; then
          ncbi_rp_L_flags=
 ncbi_rp_L_sep=$CONF_f_libpath
 if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    for x in $CURL_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CURL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CURL_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    CURL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       CURL_LIBS="$CURL_LIBPATH -lcurl "
    else
       CURL_INCLUDE=""
       CURL_LIBS="-lcurl "
       in_path=
    fi
    echo "$as_me:$LINENO: checking for libcurl$in_path" >&5
echo $ECHO_N "checking for libcurl$in_path... $ECHO_C" >&6
if test "${ncbi_cv_lib_curl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $CURL_INCLUDE $orig_CPPFLAGS"
       LIBS="$CURL_LIBS  $orig_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <curl/curl.h>
int
main ()
{
char* v = curl_version();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_curl=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ncbi_cv_lib_curl=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ncbi_cv_lib_curl" >&5
echo "${ECHO_T}$ncbi_cv_lib_curl" >&6
    if test "$ncbi_cv_lib_curl" = "no"; then
       if test "${with_curl:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-curl explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-curl explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_curl" = "no"; then
    CURL_PATH="No_CURL"
    CURL_INCLUDE=
    CURL_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}CURL"; WithPackagesSep=" "
    CURL_INCLUDE=" $CURL_INCLUDE"

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBCURL 1
_ACEOF

 fi





### Restore original compiler/linker flags
LIBS="$orig_LIBS"
CPPFLAGS="$orig_CPPFLAGS"


### Optional projects
### --------------------------------------------


## `local_lbsm' support

local_lbsm="ncbi_lbsm ncbi_lbsm_ipc ncbi_lbsmd"

## requires semaphores (lacking on older versions of Cygwin and Darwin)
if test $ncbi_cv_sys_semaphores = no; then
    if test "${with_local_lbsm:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-local-lbsm explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-local-lbsm explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
fi
## disable by default even on newer Cygwin, as its semaphores don't
## actually work very well
test $OSTYPE = cygwin  &&  : ${with_local_lbsm=no}

for fff in $local_lbsm ; do
   if test ! -f ${real_srcdir}/src/connect/${fff}.c ; then
      if test "$with_local_lbsm" = "yes" ; then
         { { echo "$as_me:$LINENO: error: --with-local-lbsm:  src/connect/${fff}.c is  missing" >&5
echo "$as_me: error: --with-local-lbsm:  src/connect/${fff}.c is  missing" >&2;}
   { (exit 1); exit 1; }; }
      fi
      with_local_lbsm="no"
      break
   fi
done

if test "$with_local_lbsm" = "no" ; then
   local_lbsm="ncbi_lbsmd_stub"
else
             WithProjects="$WithProjects${WithProjectsSep}local_lbsm"; WithProjectsSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_LOCAL_LBSM 1
_ACEOF

fi


## `connext' support

connext="ncbi_dblb ncbi_ifconf ncbi_localnet"

for fff in $connext ; do
   if test ! -f ${real_srcdir}/src/connect/ext/${fff}.c ; then
      if test "$with_connext" = "yes" ; then
         { { echo "$as_me:$LINENO: error: --with-connext:  src/connect/ext/${fff}.c is missing" >&5
echo "$as_me: error: --with-connext:  src/connect/ext/${fff}.c is missing" >&2;}
   { (exit 1); exit 1; }; }
      fi
      with_connext="no"
      break
   fi
done

if test "$with_connext" = "no"; then
   if test "$with_ncbi_crypt" = "yes" ; then
      { { echo "$as_me:$LINENO: error: --with-ncbi-crypt specified, but CONNECT extensions are unavailable" >&5
echo "$as_me: error: --with-ncbi-crypt specified, but CONNECT extensions are unavailable" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_ncbi_crypt=no
fi

if test "$with_connext" = "no" ; then
   CONNEXT=
   XCONNEXT=
else
             WithProjects="$WithProjects${WithProjectsSep}connext"; WithProjectsSep=" "
   CONNEXT=connext
   XCONNEXT=xconnext

cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBCONNEXT 1
_ACEOF

fi


## `ncbi_crypt' support

ncbi_crypt="ncbi_crypt"

for fff in $ncbi_crypt ; do
   if test ! -f ${real_srcdir}/src/connect/ext/${fff}.c ; then
      if test "$with_ncbi_crypt" = "yes" ; then
         { { echo "$as_me:$LINENO: error: --with-ncbi-crypt:  src/connect/ext/${fff}.c is missing" >&5
echo "$as_me: error: --with-ncbi-crypt:  src/connect/ext/${fff}.c is missing" >&2;}
   { (exit 1); exit 1; }; }
      fi
      with_ncbi_crypt="no"
      break
   fi
done

if test "$with_ncbi_crypt" = "no" ; then
   ncbi_crypt="ncbi_crypt_stub"
else
             WithProjects="$WithProjects${WithProjectsSep}ncbi_crypt"; WithProjectsSep=" "

cat >>confdefs.h <<\_ACEOF
#define HAVE_NCBI_CRYPT 1
_ACEOF

fi


## `serial' projects

if test "$with_serial" = "no" ; then
   serial=
else
             WithProjects="$WithProjects${WithProjectsSep}serial"; WithProjectsSep=" "
   serial="serial"
fi


## `objects' projects

if test "$with_objects" = "no"  -o  -z "$serial" ; then
   objects=
else
             WithProjects="$WithProjects${WithProjectsSep}objects"; WithProjectsSep=" "
   objects="objects"
fi


## `bdb' projects

if test "$with_bdb" = "no" ; then
   NoConfProjects="$NoConfProjects bdb"
fi

if test ! -f ${real_srcdir}/src/db/bdb/Makefile.in  -o  \
        ! -d ${real_srcdir}/include/db/bdb ; then
   if test "${with_bdb-no}" != "no" ; then
      { { echo "$as_me:$LINENO: error: --with-bdb:  BDB sources are missing" >&5
echo "$as_me: error: --with-bdb:  BDB sources are missing" >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_bdb="no"
fi


if test "$with_bdb" = "no" ; then
   bdb=
   BDB_LIB=
   BDB_CACHE_LIB=
else
             WithProjects="$WithProjects${WithProjectsSep}bdb"; WithProjectsSep=" "
   bdb="bdb"
   BDB_LIB="bdb"

cat >>confdefs.h <<\_ACEOF
#define HAVE_BDB 1
_ACEOF

   bdb_cache="ncbi_xcache_bdb"
   BDB_CACHE_LIB="ncbi_xcache_bdb"

cat >>confdefs.h <<\_ACEOF
#define HAVE_BDB_CACHE 1
_ACEOF

fi


## `dbapi' projects

DBAPI_DRIVER=
DBAPI_CTLIB=
DBAPI_DBLIB=
DBAPI_MYSQL=
DBAPI_ODBC=
if test "$with_dbapi" = "no" ; then
   dbapi=
else
             WithProjects="$WithProjects${WithProjectsSep}dbapi"; WithProjectsSep=" "
   dbapi="dbapi"
   DBAPI_DRIVER=dbapi_driver
   test -n "$SYBASE_LIBS"    &&  DBAPI_CTLIB=ncbi_xdbapi_ctlib
   test -n "$SYBASE_DBLIBS"  &&  DBAPI_DBLIB=ncbi_xdbapi_dblib
   test -n "$MYSQL_LIBS"     &&  DBAPI_MYSQL=ncbi_xdbapi_mysql
   test -n "$ODBC_LIBS"      &&  DBAPI_ODBC=ncbi_xdbapi_odbc
fi


## `app' projects

if test "$with_app" = "no" ; then
   app=
else
             WithProjects="$WithProjects${WithProjectsSep}app"; WithProjectsSep=" "
   app="app"
fi


## `ctools' project cluster

if test "$with_ctools" != "no" ; then
             WithProjects="$WithProjects${WithProjectsSep}ctools"; WithProjectsSep=" "
fi


## `gui' projects

if test "$with_gui" = "no" ; then
   gui=
else
             WithProjects="$WithProjects${WithProjectsSep}gui"; WithProjectsSep=" "
   gui="gui"
fi


## `algo' projects

if test "$with_algo" = "no" -o -z "$objects" ; then
   algo=
else
             WithProjects="$WithProjects${WithProjectsSep}algo"; WithProjectsSep=" "
   algo="algo"
fi


## Sequence Read Archive SDK, which may be attached on either the
## public or the internal side

if test -f "${real_srcdir}/src/sra/sdk/Makefile.sra_macros.mk"; then
   sra=sra
else
   sra=
fi


## `internal' project cluster

if test "$with_internal" = "no"  \
    -o  ! -f "${real_srcdir}/src/internal/Makefile.in"; then
   NoConfProjects="$NoConfProjects internal"
   internal=
else
   reason=""
   sep=
   if test ! -d "${real_srcdir}/include/internal"; then
     reason="$reason${sep}headers"
     sep=", "
   fi
   if test "$with_sybase" = "no"; then
     reason="$reason${sep}Sybase"
     sep=", "
   fi
   if test "$with_ncbi_c" = "no"; then
     reason="$reason${sep}C-Toolkit"
     sep=", "
   fi
   if test "$with_sss" = "no"; then
     reason="$reason${sep}SSS"
     sep=", "
   fi
   if test -n "$reason" -a "$with_internal" = "yes"; then
      if test -z "$with_projects"  -o  "$with_projects" = "no"; then
         { { echo "$as_me:$LINENO: error: --with-internal:  Cannot build INTERNAL projects: missing $reason" >&5
echo "$as_me: error: --with-internal:  Cannot build INTERNAL projects: missing $reason" >&2;}
   { (exit 1); exit 1; }; }
      else
         { echo "$as_me:$LINENO: WARNING: --with-internal:  Cannot build all INTERNAL projects: missing $reason" >&5
echo "$as_me: WARNING: --with-internal:  Cannot build all INTERNAL projects: missing $reason" >&2;}
         OPT_GROUPS="$OPT_GROUPS internal"
         internal="internal"
      fi
   elif test -n "$reason"; then
      NoConfProjects="$NoConfProjects internal"
      internal=
   else
      OPT_GROUPS="$OPT_GROUPS internal"
      internal="internal"
   fi
fi

## Genome Workbench

if test "$with_gbench" != "no"  -a  -d "$real_srcdir/src/app/gbench"; then
   reason=""
   sep=
   if test "$with_wxwidgets" = "no"; then
     reason="$reason${sep}wxWidgets"
     sep=", "
   fi
   if test ! -d "$real_srcdir/src/gui/packages"; then
     reason="$reason${sep}internal packages"
     sep=", "
   fi
   if test "$with_opengl" = "no"; then
     reason="$reason${sep}OpenGL"
     sep=", "
   fi
   if test "$with_sqlite3" = "no"; then
     reason="$reason${sep}SQLite 3.x"
     sep=", "
   fi
   if test "$with_bdb" = "no"; then
     reason="$reason${sep}Berkeley DB"
     sep=", "
   fi
   if test "$with_mt" = "no"; then
     reason="$reason${sep}multithreading"
     sep=", "
   fi
   if test "$with_dll" != "yes"; then
     reason="$reason${sep}full-DLL setup"
     sep=", "
   fi
   if test "$with_algo" = "no"; then
     reason="$reason${sep}other required subtrees"
     sep=","
   fi
   # Anything else?
   if test -n "$reason" -a "$with_gbench" = "yes"; then
      { { echo "$as_me:$LINENO: error: --with-gbench:  Cannot build Genome Workbench: missing $reason" >&5
echo "$as_me: error: --with-gbench:  Cannot build Genome Workbench: missing $reason" >&2;}
   { (exit 1); exit 1; }; }
   elif test -z "$reason"; then
                WithProjects="$WithProjects${WithProjectsSep}gbench"; WithProjectsSep=" "
   fi
fi



### Miscellanea
### --------------------------------------------

if test "$with_execopy" = "no" ; then
   APP_NOCOPY="BINCOPY=@:"
else
   APP_NOCOPY=
fi

if test "$with_exe" = "no" ; then
   APP_OR_NULL=null
else
   APP_OR_NULL=app
fi

IF_REBUILDING_LIBS="#"
IF_REBUILDING_CONDITIONALLY="#"
case "$with_lib_rebuilds" in
  yes) IF_REBUILDING_LIBS="" ;;
  ask) IF_REBUILDING_CONDITIONALLY="" ;;
esac

case "$with_deactivation" in
  no) IF_DEACTIVATING="#" ;;
  * ) IF_DEACTIVATING=""  ;;
esac

case "$with_makefile_auto_update" in
  no) configurables_mfname=configurables.null ;;
  * ) configurables_mfname=configurables      ;;
esac

# Run the test suite after the build?

if test -n "$with_check"  -a  "$with_check" != "no" ; then
   check="check"
   if test "$with_check" != "yes" ; then
      CHECK_ARG=`echo "$with_check" | sed 's/%/ /g'`
   fi
             WithFeatures="$WithFeatures${WithFeaturesSep}check"; WithFeaturesSep=" "
fi
CHECK_TOOLS=$with_check_tools
case "$CHECK_TOOLS" in
   *[Vv][Aa][Ll][Gg][Rr][Ii][Nn][Dd]* )           WithFeatures="$WithFeatures${WithFeaturesSep}Valgrind"; WithFeaturesSep=" " ;;
esac
CHECK_OS_NAME=
: ${CHECK_TIMEOUT_MULT=1}
case "$host_os" in
   linux* )
      if test -x /usr/bin/lsb_release; then
         CHECK_OS_NAME=`lsb_release -is | tr A-Z a-z`
      elif test -r /etc/SuSE-release; then
         CHECK_OS_NAME=suse
      elif test -r /etc/redhat-release; then
         CHECK_OS_NAME=`cut -d' ' -f1 /etc/redhat-release | tr A-Z a-z`
      elif test -d /usr/share/doc/ubuntu-keyring; then
         CHECK_OS_NAME=ubuntu
      fi
      ;;
esac

FEATURES="$WithFeatures $WithPackages $WithProjects"

### Compute Without{Features,Packages,Projects}.  Takes quadratic time,
### but that's life.
for x in GCC KCC ICC VisualAge CompaqCompiler WorkShop MIPSpro MSVC MT DLL DLL_BUILD MSWin unix WinMain AIX BSD Cygwin CygwinMT Darwin XCODE IRIX Linux OSF Solaris MacOS in-house-resources PubSeqOS JDK Ncbi-JNI check Valgrind; do
      case " $WithFeatures " in
         *" $x "*) ;;
         *) WithoutFeatures="$WithoutFeatures$WithoutFeaturesSep$x"
            WithoutFeaturesSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done
  for x in UUID FUSE Z LocalZ BZ2 LocalBZ2 LZO PCRE LocalPCRE GNUTLS OPENSSL Sybase DBLib FreeTDS MySQL BerkeleyDB BerkeleyDB++ ODBC PYTHON PYTHON23 PYTHON24 PYTHON25 Boost.Regex Boost.Spirit Boost.Test Boost.Test.Included Boost.Threads C-Toolkit OpenGL MESA GLUT GLEW FLTK wxWidgets wx2.8 Fast-CGI LocalSSS LocalMSGMAIL2 SSSUTILS LocalNCBILS NCBILS2 SSSDB SP ORBacus ICU EXPAT SABLOT LIBXML LIBXSLT Xerces Xalan SQLITE3 SQLITE3ASYNC OECHEM SGE MUPARSER HDF5 JPEG PNG TIFF UNGIF GIF XPM FreeType MAGIC CURL; do
      case " $WithPackages " in
         *" $x "*) ;;
         *) WithoutPackages="$WithoutPackages$WithoutPackagesSep$x"
            WithoutPackagesSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done
  for x in cgi local_lbsm connext ncbi_crypt serial objects bdb dbapi app ctools gui algo gbench; do
      case " $WithProjects " in
         *" $x "*) ;;
         *) WithoutProjects="$WithoutProjects$WithoutProjectsSep$x"
            WithoutProjectsSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done


### Cleanup
### ---------------------------------

case "$compiler" in
 WorkShop* )
   test -d SunWS_cache  &&  rm -r SunWS_cache
   ;;
 MIPSpro73 )
   test -d ii_files     &&  rm -r ii_files
   ;;
 KCC )
   test -d ti_files     &&  rm -r ti_files
   ;;
esac


### Get rid of the KCC "anti-license-warning" filter
if test "$KCC" = "yes"  -a  -n "$kcc_license" ; then
   CC="$kcc_CC"
   CXXCPP="$kcc_CXX -E"
   CXX="$kcc_CXX"
fi

### Get rid of the ICC "anti-license-warning" filter
if test "$ICC" = "yes"  -a  -n "$icc_license" ; then
   CC="$icc_CC"
   CXXCPP="$icc_CXX -E"
   CXX="$icc_CXX"
fi

### Adjust paths to wrapper.*.sh
case "$CC"     in compilers/*)     CC="\$(top_srcdir)/$CC"     ;; esac
case "$CXX"    in compilers/*)    CXX="\$(top_srcdir)/$CXX"    ;; esac
case "$CXXCPP" in compilers/*) CXXCPP="\$(top_srcdir)/$CXXCPP" ;; esac
case "$AR"     in compilers/*)     AR="\$(top_srcdir)/$AR"     ;; esac

### Get Insure++ to honor the Toolkit's psrc file
case "$CC" in
   */insure*)
      CC="$CC -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__"
      CXX="$CXX -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__"
      CXXCPP="$CXXCPP -Zop \$(top_srcdir)/compilers/unix/psrc -D__INSURE__"
      LINK_DLL=`echo "$LINK_DLL" | sed -e 's:insure:& -Zop \$(top_srcdir)/compilers/unix/psrc:'`
   ;;
esac


#############################################################################
### Compose a list of configurables("*.in" -- makefiles, shell scripts, etc.)
### in subdirs to configure
### Compose their target counterparts
### Configure

{ echo "$as_me:$LINENO: looking for configurables below $real_srcdir..." >&5
echo "$as_me: looking for configurables below $real_srcdir..." >&6;}
tmp_sed="`pwd`/config.tmp.$$"
for x in $NoConfProjects dll; do
   echo "/^\\.\\/$x/d"
done > $tmp_sed
cat >>$tmp_sed <<EOF
s%^.\\(/build-system.*/Makefile*\\)\\.in\$%$builddir\\1:./src\\1\\.in%
s%^.\\(/build-system\\)\\(/.*\\)\\.in\$%$builddir\\2:./src\\1\\2\\.in%
s%^.\\(/[^:]*\\)\\.in\$%$builddir\\1:./src\\1\\.in%
EOF
cat $tmp_sed >&5
configurables=`cd "${real_srcdir}/src"  &&  find . -name '.svn' -prune -o -name '*.in' -print | sed -f $tmp_sed`
rm $tmp_sed

if test -z "$configurables" ; then
  { { echo "$as_me:$LINENO: error: cannot find any configurables below \"${real_srcdir}\"!" >&5
echo "$as_me: error: cannot find any configurables below \"${real_srcdir}\"!" >&2;}
   { (exit 1); exit 1; }; }
else
  { echo "$as_me:$LINENO: ...done" >&5
echo "$as_me: ...done" >&6;}
fi

ncbi_runpath=`eval echo "$pure_runpath"`
c_ncbi_runpath=`echo "$ncbi_runpath" | sed -e 's:\\$\\$:\\$:g'`

### Template substitutions






#AC_SUBST(real_srcdir)


























































































































































































































































#############################################################################
### Create output files and do some post-configuration

## Compose a list of target files
x_configurables=`echo "$configurables" | sed 's/:[^:][^:]*\.in//g'`

## Deploy the target directory tree
echo "$x_configurables" | while read x_file ; do
   x_dir=`dirname $x_file`
   test -d "$x_dir"  ||  mkdir -p "$x_dir"
done

## Create ncbicfg.c.last if necessary
ncbicfg="$builddir/corelib/ncbicfg.c"
test -f "$ncbicfg" -a ! -f "$ncbicfg.last" && cp -p "$ncbicfg" "$ncbicfg.last"

test -d "$status_dir"  ||  mkdir -p "$status_dir"
CONFIG_STATUS=$status_dir/config.status

## Configure the compiler/flag-dependent header
          ac_config_headers="$ac_config_headers ${ncbiconf}:src/build-system/config.h.in"


##
## Configure makefiles, shell scripts, etc.
##
                    ac_config_files="$ac_config_files $configurables $srcdir/./Makefile:src/build-system/Makefile.in.top"


          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 overridden 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 diff $cache_file confcache >/dev/null 2>&1; 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

ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_i=`echo "$ac_i" |
	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
  # 2. Add them.
  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# 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
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh

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


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# 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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    for as_base in sh ksh sh5 bash; do
      as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
         /*)
           if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
             CONFIG_SHELL=$as_dir/$as_base
             export CONFIG_SHELL
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
           fi;;
         esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


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

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

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_executable_p="test -f"

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

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


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

# CDPATH.
$as_unset CDPATH

exec 6>&1

# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.  Logging --version etc. is OK.
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by ncbi-tools++ $as_me 0.0, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
_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 <<\_ACEOF

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
  -q, --quiet      do not print progress messages
  -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>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
ncbi-tools++ config.status 0.0
configured by $0, generated by GNU Autoconf 2.59,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2003 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"
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# 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[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  -*)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_option=$1
     ac_need_defaults=false;;
  esac

  case $ac_option in
  # Handling of the options.
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:$LINENO: 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 )
    $ac_shift
    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
    ac_need_defaults=false;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) { { echo "$as_me:$LINENO: 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

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS section.
#


status_dir='$status_dir'
builddir='$builddir'
build_root='$build_root'
x_configurables='$x_configurables'
ncbiconf='$ncbiconf'
CFLAGS='$CFLAGS'
CXXFLAGS='$CXXFLAGS'
CPPFLAGS='$CPPFLAGS'
LDFLAGS='$LDFLAGS'
LIB_OR_DLL='$LIB_OR_DLL'
with_dll='$with_dll'
WithFeatures='$WithFeatures'
WithoutFeatures='$WithoutFeatures'
WithPackages='$WithPackages'
WithoutPackages='$WithoutPackages'
WithProjects='$WithProjects $OPT_GROUPS'
WithoutProjects='$WithoutProjects'
with_extra_action='$with_extra_action'
with_projects='$with_projects'
with_flat_makefile='$with_flat_makefile'
with_configure_dialog='$with_configure_dialog'
with_saved_settings='$with_saved_settings'
smart_pwd='$smart_pwd'
real_srcdir='$real_srcdir'


_ACEOF



cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "$configurables" ) CONFIG_FILES="$CONFIG_FILES $configurables" ;;
  "$srcdir/./Makefile" ) CONFIG_FILES="$CONFIG_FILES $srcdir/./Makefile:src/build-system/Makefile.in.top" ;;
  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
  "${ncbiconf}" ) CONFIG_HEADERS="$CONFIG_HEADERS ${ncbiconf}:src/build-system/config.h.in" ;;
  *) { { echo "$as_me:$LINENO: 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

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# 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.

{
  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./confstat$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF

#
# 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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;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,@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,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@DEFS@,$DEFS,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@PROJECTS@,$PROJECTS,;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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;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,@MT_SFX@,$MT_SFX,;t t
s,@DLL@,$DLL,;t t
s,@DLL_LIB_SETTING@,$DLL_LIB_SETTING,;t t
s,@IF_WITH_DLL@,$IF_WITH_DLL,;t t
s,@UNLESS_WITH_DLL@,$UNLESS_WITH_DLL,;t t
s,@STATIC@,$STATIC,;t t
s,@USUAL_AND_DLL@,$USUAL_AND_DLL,;t t
s,@USUAL_AND_LIB@,$USUAL_AND_LIB,;t t
s,@LN_S@,$LN_S,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@AR@,$AR,;t t
s,@STRIP@,$STRIP,;t t
s,@DISTCC@,$DISTCC,;t t
s,@CCACHE@,$CCACHE,;t t
s,@TAIL@,$TAIL,;t t
s,@EGREP@,$EGREP,;t t
s,@VALGRIND_PATH@,$VALGRIND_PATH,;t t
s,@CXXCPP@,$CXXCPP,;t t
s,@TCHECK_CL@,$TCHECK_CL,;t t
s,@AMQ@,$AMQ,;t t
s,@CPP@,$CPP,;t t
s,@Z_INCLUDE@,$Z_INCLUDE,;t t
s,@Z_LIBS@,$Z_LIBS,;t t
s,@BZ2_INCLUDE@,$BZ2_INCLUDE,;t t
s,@BZ2_LIBS@,$BZ2_LIBS,;t t
s,@LZO_INCLUDE@,$LZO_INCLUDE,;t t
s,@LZO_LIBS@,$LZO_LIBS,;t t
s,@PCRE_INCLUDE@,$PCRE_INCLUDE,;t t
s,@PCRE_LIBS@,$PCRE_LIBS,;t t
s,@LIBGNUTLS_CONFIG@,$LIBGNUTLS_CONFIG,;t t
s,@GNUTLS_INCLUDE@,$GNUTLS_INCLUDE,;t t
s,@GNUTLS_LIBS@,$GNUTLS_LIBS,;t t
s,@OPENSSL_INCLUDE@,$OPENSSL_INCLUDE,;t t
s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t
s,@FTDS64_INCLUDE@,$FTDS64_INCLUDE,;t t
s,@FTDS64_LIBS@,$FTDS64_LIBS,;t t
s,@FTDS64_LIB@,$FTDS64_LIB,;t t
s,@FTDS64_CTLIB_INCLUDE@,$FTDS64_CTLIB_INCLUDE,;t t
s,@FTDS64_CTLIB_LIBS@,$FTDS64_CTLIB_LIBS,;t t
s,@FTDS64_CTLIB_LIB@,$FTDS64_CTLIB_LIB,;t t
s,@FTDS_INCLUDE@,$FTDS_INCLUDE,;t t
s,@FTDS_LIBS@,$FTDS_LIBS,;t t
s,@FTDS_LIB@,$FTDS_LIB,;t t
s,@freetds@,$freetds,;t t
s,@ftds64@,$ftds64,;t t
s,@mysql_config@,$mysql_config,;t t
s,@PYTHON@,$PYTHON,;t t
s,@PYTHON_INCLUDE@,$PYTHON_INCLUDE,;t t
s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t
s,@PYTHON23@,$PYTHON23,;t t
s,@PYTHON23_INCLUDE@,$PYTHON23_INCLUDE,;t t
s,@PYTHON23_LIBS@,$PYTHON23_LIBS,;t t
s,@PYTHON24@,$PYTHON24,;t t
s,@PYTHON24_INCLUDE@,$PYTHON24_INCLUDE,;t t
s,@PYTHON24_LIBS@,$PYTHON24_LIBS,;t t
s,@PYTHON25@,$PYTHON25,;t t
s,@PYTHON25_INCLUDE@,$PYTHON25_INCLUDE,;t t
s,@PYTHON25_LIBS@,$PYTHON25_LIBS,;t t
s,@_ACJNI_JAVAC@,$_ACJNI_JAVAC,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@wxconf@,$wxconf,;t t
s,@EXPAT_INCLUDE@,$EXPAT_INCLUDE,;t t
s,@EXPAT_LIBS@,$EXPAT_LIBS,;t t
s,@SABLOT_INCLUDE@,$SABLOT_INCLUDE,;t t
s,@SABLOT_LIBS@,$SABLOT_LIBS,;t t
s,@LIBXML_INCLUDE@,$LIBXML_INCLUDE,;t t
s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t
s,@LIBXSLT_INCLUDE@,$LIBXSLT_INCLUDE,;t t
s,@LIBXSLT_LIBS@,$LIBXSLT_LIBS,;t t
s,@XSLTPROC@,$XSLTPROC,;t t
s,@SQLITE3_INCLUDE@,$SQLITE3_INCLUDE,;t t
s,@SQLITE3_LIBS@,$SQLITE3_LIBS,;t t
s,@OECHEM_INCLUDE@,$OECHEM_INCLUDE,;t t
s,@OECHEM_LIBS@,$OECHEM_LIBS,;t t
s,@SGE_INCLUDE@,$SGE_INCLUDE,;t t
s,@SGE_LIBS@,$SGE_LIBS,;t t
s,@MUPARSER_INCLUDE@,$MUPARSER_INCLUDE,;t t
s,@MUPARSER_LIBS@,$MUPARSER_LIBS,;t t
s,@HDF5_INCLUDE@,$HDF5_INCLUDE,;t t
s,@HDF5_LIBS@,$HDF5_LIBS,;t t
s,@JPEG_INCLUDE@,$JPEG_INCLUDE,;t t
s,@JPEG_LIBS@,$JPEG_LIBS,;t t
s,@PNG_INCLUDE@,$PNG_INCLUDE,;t t
s,@PNG_LIBS@,$PNG_LIBS,;t t
s,@TIFF_INCLUDE@,$TIFF_INCLUDE,;t t
s,@TIFF_LIBS@,$TIFF_LIBS,;t t
s,@UNGIF_INCLUDE@,$UNGIF_INCLUDE,;t t
s,@UNGIF_LIBS@,$UNGIF_LIBS,;t t
s,@GIF_INCLUDE@,$GIF_INCLUDE,;t t
s,@GIF_LIBS@,$GIF_LIBS,;t t
s,@XPM_INCLUDE@,$XPM_INCLUDE,;t t
s,@XPM_LIBS@,$XPM_LIBS,;t t
s,@freetype_config@,$freetype_config,;t t
s,@MAGIC_INCLUDE@,$MAGIC_INCLUDE,;t t
s,@MAGIC_LIBS@,$MAGIC_LIBS,;t t
s,@CURL_INCLUDE@,$CURL_INCLUDE,;t t
s,@CURL_LIBS@,$CURL_LIBS,;t t
s,@signature@,$signature,;t t
s,@build_root@,$build_root,;t t
s,@top_srcdir@,$top_srcdir,;t t
s,@srcdir@,$srcdir,;t t
s,@status_dir@,$status_dir,;t t
s,@builddir@,$builddir,;t t
s,@runpath@,$runpath,;t t
s,@ncbi_runpath@,$ncbi_runpath,;t t
s,@c_ncbi_runpath@,$c_ncbi_runpath,;t t
s,@LINK@,$LINK,;t t
s,@C_LINK@,$C_LINK,;t t
s,@TAIL_N@,$TAIL_N,;t t
s,@EGREP_Q@,$EGREP_Q,;t t
s,@FAST_CFLAGS@,$FAST_CFLAGS,;t t
s,@FAST_CXXFLAGS@,$FAST_CXXFLAGS,;t t
s,@OBJCXX_CXXFLAGS@,$OBJCXX_CXXFLAGS,;t t
s,@DEPFLAGS@,$DEPFLAGS,;t t
s,@DEPFLAGS_POST@,$DEPFLAGS_POST,;t t
s,@FAST_LDFLAGS@,$FAST_LDFLAGS,;t t
s,@APP_LDFLAGS@,$APP_LDFLAGS,;t t
s,@DLL_LDFLAGS@,$DLL_LDFLAGS,;t t
s,@C_LIBS@,$C_LIBS,;t t
s,@OBJCXX_LIBS@,$OBJCXX_LIBS,;t t
s,@GCCPCH@,$GCCPCH,;t t
s,@RUNPATH_ORIGIN@,$RUNPATH_ORIGIN,;t t
s,@NO_STRICT_ALIASING@,$NO_STRICT_ALIASING,;t t
s,@D_SFX@,$D_SFX,;t t
s,@DEBUG_SFX@,$DEBUG_SFX,;t t
s,@LIB_OR_DLL@,$LIB_OR_DLL,;t t
s,@FORCE_STATIC_LIB@,$FORCE_STATIC_LIB,;t t
s,@APP_LIB_SETTING@,$APP_LIB_SETTING,;t t
s,@APP_LIBS_SETTING@,$APP_LIBS_SETTING,;t t
s,@LINK_DLL@,$LINK_DLL,;t t
s,@has_dll_loadable@,$has_dll_loadable,;t t
s,@LINK_LOADABLE@,$LINK_LOADABLE,;t t
s,@CFLAGS_DLL@,$CFLAGS_DLL,;t t
s,@CXXFLAGS_DLL@,$CXXFLAGS_DLL,;t t
s,@ALLOW_UNDEF@,$ALLOW_UNDEF,;t t
s,@FORBID_UNDEF@,$FORBID_UNDEF,;t t
s,@OPT_GROUPS@,$OPT_GROUPS,;t t
s,@local_lbsm@,$local_lbsm,;t t
s,@ncbi_crypt@,$ncbi_crypt,;t t
s,@CONNEXT@,$CONNEXT,;t t
s,@XCONNEXT@,$XCONNEXT,;t t
s,@serial@,$serial,;t t
s,@bdb@,$bdb,;t t
s,@dbapi@,$dbapi,;t t
s,@objects@,$objects,;t t
s,@gui@,$gui,;t t
s,@algo@,$algo,;t t
s,@app@,$app,;t t
s,@internal@,$internal,;t t
s,@sra@,$sra,;t t
s,@check@,$check,;t t
s,@CHECK_ARG@,$CHECK_ARG,;t t
s,@CHECK_TOOLS@,$CHECK_TOOLS,;t t
s,@CHECK_TIMEOUT_MULT@,$CHECK_TIMEOUT_MULT,;t t
s,@CHECK_OS_NAME@,$CHECK_OS_NAME,;t t
s,@FEATURES@,$FEATURES,;t t
s,@script_shell@,$script_shell,;t t
s,@make_shell@,$make_shell,;t t
s,@obj_ext@,$obj_ext,;t t
s,@lib_pre@,$lib_pre,;t t
s,@lib_l_pre@,$lib_l_pre,;t t
s,@lib_ext@,$lib_ext,;t t
s,@dll_ext@,$dll_ext,;t t
s,@loadable_ext@,$loadable_ext,;t t
s,@lib_l_ext@,$lib_l_ext,;t t
s,@exe_ext@,$exe_ext,;t t
s,@f_compile@,$f_compile,;t t
s,@f_outobj@,$f_outobj,;t t
s,@f_outlib@,$f_outlib,;t t
s,@f_libpath@,$f_libpath,;t t
s,@f_runpath@,$f_runpath,;t t
s,@f_outexe@,$f_outexe,;t t
s,@BDB_LIB@,$BDB_LIB,;t t
s,@BDB_CACHE_LIB@,$BDB_CACHE_LIB,;t t
s,@DBAPI_DRIVER@,$DBAPI_DRIVER,;t t
s,@DBAPI_CTLIB@,$DBAPI_CTLIB,;t t
s,@DBAPI_DBLIB@,$DBAPI_DBLIB,;t t
s,@DBAPI_MYSQL@,$DBAPI_MYSQL,;t t
s,@DBAPI_ODBC@,$DBAPI_ODBC,;t t
s,@THREAD_LIBS@,$THREAD_LIBS,;t t
s,@NCBIATOMIC_LIB@,$NCBIATOMIC_LIB,;t t
s,@NETWORK_LIBS@,$NETWORK_LIBS,;t t
s,@NETWORK_PURE_LIBS@,$NETWORK_PURE_LIBS,;t t
s,@RESOLVER_LIBS@,$RESOLVER_LIBS,;t t
s,@MATH_LIBS@,$MATH_LIBS,;t t
s,@KSTAT_LIBS@,$KSTAT_LIBS,;t t
s,@RPCSVC_LIBS@,$RPCSVC_LIBS,;t t
s,@CRYPT_LIBS@,$CRYPT_LIBS,;t t
s,@DL_LIBS@,$DL_LIBS,;t t
s,@RT_LIBS@,$RT_LIBS,;t t
s,@UUID_LIBS@,$UUID_LIBS,;t t
s,@DEMANGLE_LIBS@,$DEMANGLE_LIBS,;t t
s,@ICONV_LIBS@,$ICONV_LIBS,;t t
s,@Z_LIB@,$Z_LIB,;t t
s,@BZ2_LIB@,$BZ2_LIB,;t t
s,@PCREPOSIX_LIBS@,$PCREPOSIX_LIBS,;t t
s,@PCRE_LIB@,$PCRE_LIB,;t t
s,@OPENSSL_STATIC_LIBS@,$OPENSSL_STATIC_LIBS,;t t
s,@TLS_INCLUDE@,$TLS_INCLUDE,;t t
s,@TLS_LIBS@,$TLS_LIBS,;t t
s,@SYBASE_PATH@,$SYBASE_PATH,;t t
s,@SYBASE_LCL_PATH@,$SYBASE_LCL_PATH,;t t
s,@SYBASE_INCLUDE@,$SYBASE_INCLUDE,;t t
s,@SYBASE_LIBS@,$SYBASE_LIBS,;t t
s,@SYBASE_DLLS@,$SYBASE_DLLS,;t t
s,@SYBASE_DBLIBS@,$SYBASE_DBLIBS,;t t
s,@MYSQL_INCLUDE@,$MYSQL_INCLUDE,;t t
s,@MYSQL_LIBS@,$MYSQL_LIBS,;t t
s,@BERKELEYDB_INCLUDE@,$BERKELEYDB_INCLUDE,;t t
s,@BERKELEYDB_LIBS@,$BERKELEYDB_LIBS,;t t
s,@BERKELEYDB_STATIC_LIBS@,$BERKELEYDB_STATIC_LIBS,;t t
s,@BERKELEYDB_CXX_LIBS@,$BERKELEYDB_CXX_LIBS,;t t
s,@BERKELEYDB_CXX_STATIC_LIBS@,$BERKELEYDB_CXX_STATIC_LIBS,;t t
s,@ODBC_INCLUDE@,$ODBC_INCLUDE,;t t
s,@ODBC_LIBS@,$ODBC_LIBS,;t t
s,@BOOST_INCLUDE@,$BOOST_INCLUDE,;t t
s,@BOOST_LIBPATH@,$BOOST_LIBPATH,;t t
s,@BOOST_TAG@,$BOOST_TAG,;t t
s,@BOOST_REGEX_LIBS@,$BOOST_REGEX_LIBS,;t t
s,@BOOST_REGEX_STATIC_LIBS@,$BOOST_REGEX_STATIC_LIBS,;t t
s,@BOOST_TEST_PEM_LIBS@,$BOOST_TEST_PEM_LIBS,;t t
s,@BOOST_TEST_PEM_STATIC_LIBS@,$BOOST_TEST_PEM_STATIC_LIBS,;t t
s,@BOOST_TEST_TEM_LIBS@,$BOOST_TEST_TEM_LIBS,;t t
s,@BOOST_TEST_TEM_STATIC_LIBS@,$BOOST_TEST_TEM_STATIC_LIBS,;t t
s,@BOOST_TEST_UTF_LIBS@,$BOOST_TEST_UTF_LIBS,;t t
s,@BOOST_TEST_UTF_STATIC_LIBS@,$BOOST_TEST_UTF_STATIC_LIBS,;t t
s,@BOOST_THREAD_LIBS@,$BOOST_THREAD_LIBS,;t t
s,@BOOST_THREAD_STATIC_LIBS@,$BOOST_THREAD_STATIC_LIBS,;t t
s,@NCBI_C_INCLUDE@,$NCBI_C_INCLUDE,;t t
s,@NCBI_C_LIBPATH@,$NCBI_C_LIBPATH,;t t
s,@OPENGL_INCLUDE@,$OPENGL_INCLUDE,;t t
s,@OPENGL_LIBS@,$OPENGL_LIBS,;t t
s,@OPENGL_STATIC_LIBS@,$OPENGL_STATIC_LIBS,;t t
s,@OSMESA_INCLUDE@,$OSMESA_INCLUDE,;t t
s,@OSMESA_LIBS@,$OSMESA_LIBS,;t t
s,@OSMESA_STATIC_LIBS@,$OSMESA_STATIC_LIBS,;t t
s,@GLUT_INCLUDE@,$GLUT_INCLUDE,;t t
s,@GLUT_LIBS@,$GLUT_LIBS,;t t
s,@GLEW_INCLUDE@,$GLEW_INCLUDE,;t t
s,@GLEW_LIBS@,$GLEW_LIBS,;t t
s,@GLEW_STATIC_LIBS@,$GLEW_STATIC_LIBS,;t t
s,@FLTK_INCLUDE@,$FLTK_INCLUDE,;t t
s,@FLTK_LIBS@,$FLTK_LIBS,;t t
s,@FLTK_LIBS_GL@,$FLTK_LIBS_GL,;t t
s,@FLTK_LIBS_IMAGES@,$FLTK_LIBS_IMAGES,;t t
s,@FLTK_LIBS_ALL@,$FLTK_LIBS_ALL,;t t
s,@FLTK_STATIC_LIBS@,$FLTK_STATIC_LIBS,;t t
s,@FLTK_STATIC_LIBS_GL@,$FLTK_STATIC_LIBS_GL,;t t
s,@FLTK_STATIC_LIBS_IMAGES@,$FLTK_STATIC_LIBS_IMAGES,;t t
s,@FLTK_STATIC_LIBS_ALL@,$FLTK_STATIC_LIBS_ALL,;t t
s,@FLTK_CONFIG@,$FLTK_CONFIG,;t t
s,@WXWIDGETS_INCLUDE@,$WXWIDGETS_INCLUDE,;t t
s,@WXWIDGETS_LIBS@,$WXWIDGETS_LIBS,;t t
s,@WXWIDGETS_STATIC_LIBS@,$WXWIDGETS_STATIC_LIBS,;t t
s,@WXWIDGETS_GL_LIBS@,$WXWIDGETS_GL_LIBS,;t t
s,@WXWIDGETS_GL_STATIC_LIBS@,$WXWIDGETS_GL_STATIC_LIBS,;t t
s,@WXWIDGETS_POST_LINK@,$WXWIDGETS_POST_LINK,;t t
s,@FASTCGI_INCLUDE@,$FASTCGI_INCLUDE,;t t
s,@FASTCGI_LIBS@,$FASTCGI_LIBS,;t t
s,@FASTCGI_OBJS@,$FASTCGI_OBJS,;t t
s,@NCBI_SSS_INCLUDE@,$NCBI_SSS_INCLUDE,;t t
s,@NCBI_SSS_LIBPATH@,$NCBI_SSS_LIBPATH,;t t
s,@LIBSSSUTILS@,$LIBSSSUTILS,;t t
s,@LIBSSSDB@,$LIBSSSDB,;t t
s,@sssutils@,$sssutils,;t t
s,@SP_INCLUDE@,$SP_INCLUDE,;t t
s,@SP_LIBS@,$SP_LIBS,;t t
s,@ORBACUS_INCLUDE@,$ORBACUS_INCLUDE,;t t
s,@ORBACUS_LIBPATH@,$ORBACUS_LIBPATH,;t t
s,@LIBOB@,$LIBOB,;t t
s,@LIBIMR@,$LIBIMR,;t t
s,@ICU_CONFIG@,$ICU_CONFIG,;t t
s,@ICU_INCLUDE@,$ICU_INCLUDE,;t t
s,@ICU_LIBS@,$ICU_LIBS,;t t
s,@ICU_STATIC_LIBS@,$ICU_STATIC_LIBS,;t t
s,@EXPAT_STATIC_LIBS@,$EXPAT_STATIC_LIBS,;t t
s,@SABLOT_STATIC_LIBS@,$SABLOT_STATIC_LIBS,;t t
s,@LIBXML_STATIC_LIBS@,$LIBXML_STATIC_LIBS,;t t
s,@LIBXSLT_STATIC_LIBS@,$LIBXSLT_STATIC_LIBS,;t t
s,@XERCES_INCLUDE@,$XERCES_INCLUDE,;t t
s,@XERCES_LIBS@,$XERCES_LIBS,;t t
s,@XERCES_STATIC_LIBS@,$XERCES_STATIC_LIBS,;t t
s,@XALAN_INCLUDE@,$XALAN_INCLUDE,;t t
s,@XALAN_LIBS@,$XALAN_LIBS,;t t
s,@XALAN_STATIC_LIBS@,$XALAN_STATIC_LIBS,;t t
s,@SQLITE3_STATIC_LIBS@,$SQLITE3_STATIC_LIBS,;t t
s,@FREETYPE_INCLUDE@,$FREETYPE_INCLUDE,;t t
s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t
s,@ncbi_xreader_pubseqos@,$ncbi_xreader_pubseqos,;t t
s,@ncbi_xreader_pubseqos2@,$ncbi_xreader_pubseqos2,;t t
s,@UNLESS_PUBSEQOS@,$UNLESS_PUBSEQOS,;t t
s,@JDK_PATH@,$JDK_PATH,;t t
s,@JDK_INCLUDE@,$JDK_INCLUDE,;t t
s,@ncbi_java@,$ncbi_java,;t t
s,@NCBI_C_ncbi@,$NCBI_C_ncbi,;t t
s,@BINCOPY@,$BINCOPY,;t t
s,@APP_NOCOPY@,$APP_NOCOPY,;t t
s,@APP_OR_NULL@,$APP_OR_NULL,;t t
s,@IF_REBUILDING_LIBS@,$IF_REBUILDING_LIBS,;t t
s,@IF_REBUILDING_CONDITIONALLY@,$IF_REBUILDING_CONDITIONALLY,;t t
s,@IF_DEACTIVATING@,$IF_DEACTIVATING,;t t
s,@configurables_mfname@,$configurables_mfname,;t t
s,@CC_FILTER@,$CC_FILTER,;t t
s,@CXX_FILTER@,$CXX_FILTER,;t t
s,@AR_FILTER@,$AR_FILTER,;t t
s,@LINK_FILTER@,$LINK_FILTER,;t t
s,@CC_WRAPPER@,$CC_WRAPPER,;t t
s,@CXX_WRAPPER@,$CXX_WRAPPER,;t t
s,@AR_WRAPPER@,$AR_WRAPPER,;t t
s,@LINK_WRAPPER@,$LINK_WRAPPER,;t t
s,@KeepStateTarget@,$KeepStateTarget,;t t
s,@Rules@,$Rules,;t t
s,@serial_ws50_rtti_kludge@,$serial_ws50_rtti_kludge,;t t
s,@ncbicntr@,$ncbicntr,;t t
s,@UNIX_SRC@,$UNIX_SRC,;t t
s,@UNIX_USR_PROJ@,$UNIX_USR_PROJ,;t t
s,@compiler@,$compiler,;t t
s,@compiler_root@,$compiler_root,;t t
s,@compiler_version@,$compiler_version,;t t
s,@COMPILER@,$COMPILER,;t t
s,@OSTYPE@,$OSTYPE,;t t
s,@NCBI_PLATFORM_BITS@,$NCBI_PLATFORM_BITS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF

_ACEOF

  cat >>$CONFIG_STATUS <<\_ACEOF
  # 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"

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
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=`(dirname "$ac_file") 2>/dev/null ||
$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 $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

  #ac_builddir=. # Useless!
ac_builddir=$builddir
if test -n "$ac_file_in"; then
   ac_dir_in=`(dirname "$ac_file_in") 2>/dev/null ||
$as_expr X"$ac_file_in" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file_in" : 'X\(//\)[^/]' \| \
	 X"$ac_file_in" : 'X\(//\)$' \| \
	 X"$ac_file_in" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file_in" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
else
   ac_dir_in="$ac_dir"
fi

if test $ac_dir_in != .; then
  ac_dir_suffix=`echo $ac_dir_in | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=../`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir/$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir/$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case $builddir in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=$builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=$builddir/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_dir_in in
.) ac_abs_top_srcdir=$real_srcdir;;
*)
  case $real_srcdir in
  .) ac_abs_top_srcdir=$ac_dir_in;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$real_srcdir;;
  *) ac_abs_top_srcdir=$ac_dir_in/$real_srcdir;;
  esac;;
esac
case $ac_abs_top_srcdir in
.) ac_abs_srcdir=$ac_dir_suffix;;
*)
  case $ac_dir_suffix in
  .) ac_abs_srcdir=$ac_abs_top_srcdir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_dir_suffix;;
  *) ac_abs_srcdir=$ac_abs_top_srcdir/$ac_dir_suffix;;
  esac;;
esac


  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:$LINENO: 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 by config.status.  */
  if test x"$ac_file" = x-; then
    configure_input=
  else
    configure_input="$ac_file.  "
  fi
  configure_input=$configure_input"Generated 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:$LINENO: 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:$LINENO: 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; }
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
  sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;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
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

#
# 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:$LINENO: 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:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
	 # Do quote $f, to prevent DOS paths from being IFS'd.
	 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:$LINENO: 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

_ACEOF

# 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 <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# 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 <<\_ACEOF
s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF

# 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 grep "^[	 ]*#[	 ]*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 # grep' >>$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 <<\_ACEOF
  # 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 by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$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 $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

#
# 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,[^:]*:,,'`
  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_dest" : 'X\(//\)[^/]' \| \
	 X"$ac_dest" : 'X\(//\)$' \| \
	 X"$ac_dest" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  { if $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

  #ac_builddir=. # Useless!
ac_builddir=$builddir
if test -n "$ac_file_in"; then
   ac_dir_in=`(dirname "$ac_file_in") 2>/dev/null ||
$as_expr X"$ac_file_in" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file_in" : 'X\(//\)[^/]' \| \
	 X"$ac_file_in" : 'X\(//\)$' \| \
	 X"$ac_file_in" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file_in" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
else
   ac_dir_in="$ac_dir"
fi

if test $ac_dir_in != .; then
  ac_dir_suffix=`echo $ac_dir_in | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=../`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir/$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir/$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case $builddir in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=$builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=$builddir/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_dir_in in
.) ac_abs_top_srcdir=$real_srcdir;;
*)
  case $real_srcdir in
  .) ac_abs_top_srcdir=$ac_dir_in;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$real_srcdir;;
  *) ac_abs_top_srcdir=$ac_dir_in/$real_srcdir;;
  esac;;
esac
case $ac_abs_top_srcdir in
.) ac_abs_srcdir=$ac_dir_suffix;;
*)
  case $ac_dir_suffix in
  .) ac_abs_srcdir=$ac_abs_top_srcdir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_dir_suffix;;
  *) ac_abs_srcdir=$ac_abs_top_srcdir/$ac_dir_suffix;;
  esac;;
esac


  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
  case $ac_dest in
    default )
find "$build_root/." -name '*.sh' -print | while read x_file ; do
   chmod a+x "$x_file"
done

if test -f config.cache -a -f config.log ; then
   test -d  "$status_dir"  ||  mkdir -p "$status_dir"
   exec 5>/dev/null
   mv config.cache config.log "$status_dir"/
   exec 5>>"$status_dir/config.log"
fi

rm -f "$status_dir"/*.enabled
for p in $WithPackages $WithProjects $WithFeatures ; do
   touch "$status_dir"/$p.enabled
done
for p in $WithoutPackages $WithoutProjects $WithoutFeatures ; do
   touch "$status_dir"/-$p.enabled
done

# test -f "$status_dir"/LocalZ.enabled  ||  \
#    touch -t 197001010000 $status_dir/.z.dep
# test -f "$status_dir"/LocalBZ2.enabled  ||  \
#    touch -t 197001010000 $status_dir/.bz2.dep

find "$srcdir"/src/* -name .svn -prune -o -name 'Makefile.*.mk' -print \
   | while read x; do
      echo
      echo "### Extra macro definitions from $x"
      echo
      echo "#line 1 \"$x\""
      cat "$x"
   done >> "$builddir/Makefile.mk"
$srcdir/scripts/common/impl/report_duplicates.awk \
   src="$srcdir/src/build-system/Makefile.mk.in" "$builddir/Makefile.mk"
find "$srcdir"/src/* -name .svn -prune -o -name 'ncbiconf.*.h' -print \
   | while read x; do
      echo
      echo "/*** Extra macro definitions from $x ***/"
      echo
      echo "#line 1 \"$x\""
      cat "$x"
   done > "$build_root/inc/ncbiconf_extra.h"
if test -s "$build_root/inc/ncbiconf_extra.h"; then
   ncbiconf=$build_root/inc/ncbiconf_unix.h
   newconf=$ncbiconf.extra.new
   savedconf=$ncbiconf.extra.prev
   cat "$ncbiconf" "$build_root/inc/ncbiconf_extra.h" > "$newconf"
   $srcdir/scripts/common/impl/report_duplicates.awk \
      src="$srcdir/src/build-system/config.h.in" "$newconf"
   if test -f "$savedconf"  &&  cmp "$newconf" "$savedconf" >/dev/null; then
      echo "$ncbiconf is unchanged"
   else
      cp -pf "$newconf" "$savedconf"
   fi
   cp -pf "$savedconf" "$ncbiconf"
else
   rm -f "$build_root/inc/ncbiconf_extra.h"
fi

ncbicfg="$builddir/corelib/ncbicfg.c"
if test -f "$ncbicfg.last" && cmp -s "$ncbicfg.last" "$ncbicfg"; then
   echo "$ncbicfg" is unchanged
   touch -r "$ncbicfg.last" "$ncbicfg"
elif test -f "$ncbicfg"; then
   echo "$ncbicfg" is updated
   rm -f "$ncbicfg.last"
   cp -p "$ncbicfg" "$ncbicfg.last"
else
   echo "$ncbicfg" is not present
fi

if test "$with_configure_dialog" = yes; then
   if test "$with_flat_makefile" = no; then
      { { echo "$as_me:$LINENO: error: incompatible options: --without-flat-makefile but --with-configure-dialog." >&5
echo "$as_me: error: incompatible options: --without-flat-makefile but --with-configure-dialog." >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_flat_makefile=yes
elif test "${with_saved_settings:-no}" != no; then
   if test "$with_flat_makefile" = no; then
      { { echo "$as_me:$LINENO: error: incompatible options: --without-flat-makefile but --with-saved-settings." >&5
echo "$as_me: error: incompatible options: --without-flat-makefile but --with-saved-settings." >&2;}
   { (exit 1); exit 1; }; }
   fi
   with_flat_makefile=yes
fi
if test "$with_flat_makefile" != "no"; then
   if test "$with_flat_makefile" = yes; then
      cfm_flags=''
   else
      cfm_flags='-remoteptb'
   fi
   case "$with_projects" in
      yes     ) cfm_flags="$cfm_flags -p projects" ;;
      no | '' ) ;;
      *       ) cfm_flags="$cfm_flags -p $with_projects" ;;
   esac
   if test "$with_configure_dialog" = yes; then
      cfm_flags="$cfm_flags -cfg"
   fi
   if test "${with_saved_settings-no}" != no; then
      cfm_flags="$cfm_flags -saved $with_saved_settings"
   fi
   if $real_srcdir/scripts/common/impl/create_flat_makefile.sh "$build_root" \
       -s "$real_srcdir" $cfm_flags  &&  test -f "$builddir/Makefile.flat"; then
      build_flat="Alternatively, cd $builddir && make -f Makefile.flat"
   elif test -f "$builddir/Flat.configuration_log"; then
      grep 'already defined' "$builddir/Flat.configuration_log"
      { { echo "$as_me:$LINENO: error: flat makefile generation failed." >&5
echo "$as_me: error: flat makefile generation failed." >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test -n "$with_extra_action" ; then
   with_extra_action=`echo "$with_extra_action" | sed "s%{}%$build_root%g"`
   echo
   echo "executing:  $with_extra_action..."
   eval $with_extra_action
   exit_code="$?"
   if test $exit_code -ne 0 ; then
      { echo "$as_me:$LINENO: WARNING: non-zero exit code ($exit_code):  $with_extra_action" >&5
echo "$as_me: WARNING: non-zero exit code ($exit_code):  $with_extra_action" >&2;}
   fi
   echo
fi

case "$LIB_OR_DLL" in
both) DLL_USAGE="LIBRARIES:  build both static and dynamic by default" ;;
dll)  DLL_USAGE="LIBRARIES:  build as dynamic by default" ;;
lib)
   if test "$with_dll" = "no" ; then
      DLL_USAGE="LIBRARIES:  build as static only"
   else
      DLL_USAGE="LIBRARIES:  build as static by default"
   fi
   ;;
esac

if test -n "$with_projects"; then
    build_proj="To build selected projects:  cd $builddir && make all_p"
fi

cat << EOCONF
===============================================================================
NCBI C++ Toolkit documentation:  doc/index.html,  doc/config.html#ref_Running
For the available configuration flags run:  ./configure --help

CFLAGS   = $CFLAGS
CXXFLAGS = $CXXFLAGS
CPPFLAGS = $CPPFLAGS
LDFLAGS  = $LDFLAGS

$DLL_USAGE
FEATURES:   $WithFeatures
PACKAGES:
  enabled:  $WithPackages
  disabled: $WithoutPackages
PROJECTS:
  enabled:  $WithProjects
  disabled: $WithoutProjects

Tools / flags / paths:  $builddir/Makefile.mk
Configuration  header:  $ncbiconf

To build everything:  cd $builddir && make all_r
or simply run make in the current directory
$build_proj
$build_flat
******* CONFIGURATION SUCCESSFUL *******
EOCONF
 ;;
  esac
done
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF

{ (exit 0); exit 0; }
_ACEOF
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=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || 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

