#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.60 for ncbi-tools++ 0.0.
#
# Report bugs to <cpp-core@ncbi.nlm.nih.gov>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## 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+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh


# PATH needs CR
# 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

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
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
IFS=$as_save_IFS

     ;;
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_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
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) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; 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'`

# CDPATH.
$as_unset CDPATH

$as_unset ZSH_VERSION || test "${ZSH_VERSION+set}" != set || { ZSH_VERSION=; export ZSH_VERSION; }

if test "x$CONFIG_SHELL" = x; then
  if (eval "test -z \"\${ZSH_VERSION+set}\" || exit \$?; :") 2>/dev/null; then
  as_have_required=yes
else
  as_have_required=no
fi

  if test $as_have_required = yes && 	 (eval "test -z \"\${ZSH_VERSION+set}\" || exit \$?; :
(as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=\$LINENO
  as_lineno_2=\$LINENO
  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
") 2> /dev/null; then
  :
else
  as_candidate_shells=
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
	 /*)
	   for as_base in sh ksh sh5 bash; do
	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
	   done;;
       esac
done
IFS=$as_save_IFS


      for as_shell in $as_candidate_shells $SHELL; do
	 # Try only shells that exist, to save several forks.
	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		{ ("$as_shell") 2> /dev/null <<\_ASEOF
# 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+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

test -z "${ZSH_VERSION+set}" || exit $?; :
_ASEOF
}; then
  CONFIG_SHELL=$as_shell
	       as_have_required=yes
	       if { "$as_shell" 2> /dev/null <<\_ASEOF
# 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+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

test -z "${ZSH_VERSION+set}" || exit $?; :
(as_func_return () {
  (exit $1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = "$1" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test $exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }

_ASEOF
}; then
  break
fi

fi

      done

      if test "x$CONFIG_SHELL" != x; then
  for as_var in BASH_ENV ENV
        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
        done
        export CONFIG_SHELL
        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi


    if test $as_have_required = no; then
  echo This script requires a shell more modern than all the
      echo shells that I found on your system.  Please install a
      echo modern shell, or manually run the script under such a
      echo shell if you do have one.
      { (exit 1); exit 1; }
fi


fi

fi

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



(eval "test -z \"\${ZSH_VERSION+set}\" || exit \$?; as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0") || {
  echo No shell found that supports shell functions.
  echo Please tell autoconf@gnu.org about your system,
  echo including any error possibly output before this
  echo message
}



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # 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 after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, 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
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\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 sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
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$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

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

# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
# systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
  as_executable_p="test -x"
else
  as_executable_p=:
fi
rm -f conf$$.file

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



exec 7<&0 </dev/null 6>&1

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

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

# 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>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#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
datarootdir
datadir
sysconfdir
sharedstatedir
localstatedir
includedir
oldincludedir
docdir
infodir
htmldir
dvidir
pdfdir
psdir
libdir
localedir
mandir
DEFS
ECHO_C
ECHO_N
ECHO_T
LIBS
build_alias
host_alias
target_alias
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
AR
STRIP
DISTCC
CCACHE
TAIL
SED
TOUCH
GREP
EGREP
VALGRIND_PATH
LDD
CXXCPP
TCHECK_CL
AMQ
CPP
Z_INCLUDE
Z_LIBS
BZ2_INCLUDE
BZ2_LIBS
LZO_INCLUDE
LZO_LIBS
PCRE_INCLUDE
PCRE_LIBS
LIBGCRYPT_CONFIG
GCRYPT_INCLUDE
GCRYPT_LIBS
LIBGNUTLS_CONFIG
GNUTLS_INCLUDE
GNUTLS_LIBS
OPENSSL_INCLUDE
OPENSSL_LIBS
KRB5_CONFIG
KRB5_INCLUDE
KRB5_LIBS
CURL_INCLUDE
CURL_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
PERL
_ACJNI_JAVAC
XMKMF
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
LIBEXSLT_INCLUDE
LIBEXSLT_LIBS
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
FTGL_INCLUDE
FTGL_LIBS
MAGIC_INCLUDE
MAGIC_LIBS
MIMETIC_INCLUDE
MIMETIC_LIBS
GSOAP_SOAPCPP2
GSOAP_WSDL2H
GSOAP_INCLUDE
GSOAP_LIBS
AVRO_INCLUDE
AVRO_LIBS
AVROGENCPP
MONGODB_INCLUDE
MONGODB_LIBS
signature
build_root
top_srcdir
srcdir
status_dir
builddir
runpath
ncbi_runpath
c_ncbi_runpath
LINK
C_LINK
TAIL_N
EGREP_Q
LDD_R
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
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
OPENMP_FLAGS
UNSAFE_MATH_FLAG
SSE4_1_FLAG
AES_FLAG
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_FILESYSTEM_LIBS
BOOST_FILESYSTEM_STATIC_LIBS
BOOST_IOSTREAMS_LIBS
BOOST_IOSTREAMS_STATIC_LIBS
BOOST_PROGRAM_OPTIONS_LIBS
BOOST_PROGRAM_OPTIONS_STATIC_LIBS
BOOST_REGEX_LIBS
BOOST_REGEX_STATIC_LIBS
BOOST_SYSTEM_LIBS
BOOST_SYSTEM_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
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
LIBEXSLT_STATIC_LIBS
XERCES_INCLUDE
XERCES_LIBS
XERCES_STATIC_LIBS
XALAN_INCLUDE
XALAN_LIBS
XALAN_STATIC_LIBS
ZORBA_INCLUDE
ZORBA_LIBS
ZORBA_STATIC_LIBS
SQLITE3_STATIC_LIBS
FREETYPE_INCLUDE
FREETYPE_LIBS
GSOAP_PATH
AVRO_STATIC_LIBS
MONGODB_STATIC_LIBS
ncbi_xreader_pubseqos
ncbi_xreader_pubseqos2
UNLESS_PUBSEQOS
PERL_INCLUDE
PERL_LIBS
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=''
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
CPPFLAGS
CXX
CXXFLAGS
CCC
CXXCPP
CPP
XMKMF'


# 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.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

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

  case $ac_option in
  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *)	ac_optarg=yes ;;
  esac

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

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -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)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$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 ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -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'`
    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 ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$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'`
    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; }; }
    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 directory names.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; }
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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  { echo "$as_me: error: Working directory cannot be determined" >&2
   { (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  { echo "$as_me: error: pwd does not report name of working directory" >&2
   { (exit 1); exit 1; }; }


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$0" ||
$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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
   { (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
   { (exit 1); exit 1; }; }
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac


#### Check the passed arguments against the list of available ones
x_with_list="\
debug max-debug symbols optimization profiling tcheck dll static static-exe \
plugin-auto-load bundles bin-release mt 64 universal exe runpath hard-runpath \
lfs limited-linker openmp \
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 gcrypt gnutls openssl krb5 sybase sybase-local sybase-new \
ftds mysql orbacus freetype ftgl opengl mesa glut glew glew-mx \
bdb python perl jni sqlite3 icu boost boost-tag \
sp expat sablot libxml libxslt libexslt xerces xalan zorba \
oechem sge muparser hdf5 \
gif jpeg tiff png xpm magic curl mimetic gsoap avro mongodb 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: 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-ncbi-c=* | --with-sss=* \
      | --with-gcrypt=* | --with-gnutls=* | --with-openssl=* | --with-krb5=* \
      | --with-curl=* | --with-gsoap=* | --with-avro=* | --with-mongodb=* \
      | --with-sybase-local=* | --with-wxwidgets=* | --with-mimetic=* \
      | --with-ftds=* | --with-mysql=* | --with-fastcgi=* \
      | --with-sqlite3=* | --with-expat=* | --with-sablot=* \
      | --with-icu=* | --with-xerces=* | --with-xalan=* | --with-zorba=* \
      | --with-libxml=* | --with-libxslt=* | --with-exslt=* \
      | --with-bdb=* | --with-odbc=* | --with-python=* | --with-perl=* \
      | --with-freetype=* | --with-ftgl=* | --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=* \
      | --help | --no-create | --no-recursion)
      ;;

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

for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# 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 \`..']

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]
  --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]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/ncbi-tools--]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]
_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-max-debug        enable extra runtime checks (esp. of STL usage)
 --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
 --without-mt            support only single-threaded operation
 --with-openmp           enable OpenMP extensions for all projects
 --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-limited-linker   don't attempt to build especially large projects
 --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
 --with-ncbi-c=DIR       use NCBI C Toolkit installation in DIR
 --without-ncbi-c        do not use NCBI C Toolkit
 --with-sss=DIR          use NCBI SSS installation in DIR
 --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-gcrypt=DIR       use gcrypt installation in DIR
 --without-gcrypt        do not use gcrypt
 --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
 --with-krb5=DIR         use Kerberos 5 installation in DIR
 --without-krb5          do not use Kerberos 5
 --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-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-ftgl          do not use FTGL
 --with-ftgl=DIR         use FTGL 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-perl=DIR         use Perl installation in DIR
 --without-perl          do not use Perl
 --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 libxslt
 --with-libexslt=DIR     use libexslt installation in DIR
 --without-libexslt      do not use libexslt
 --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-zorba=DIR        use Zorba installation in DIR
 --without-zorba         do not use Zorba
 --with-oechem=DIR       use OpenEye OEChem installation in DIR
 --without-oechem        do not use OEChem
 --with-sge=DIR          use Sun/Univa Grid Engine installation in DIR
 --without-sge           do not use Sun/Univa 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-mimetic=DIR      use libmimetic installation in DIR
 --without-mimetic       do not use libmimetic
 --with-gsoap=DIR        use gSOAP++ installation in DIR
 --without-gsoap         do not use gSOAP++
 --with-avro=DIR         use Apache Avro installation in DIR
 --without-avro          do not use Apache Avro
 --with-mongodb=DIR      use MongoDB installation in DIR
 --without-mongodb       do not use MongoDB
 --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
 --with-internal         always try to build internal projects
 --without-internal      never 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++/Objective 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
  XMKMF       Path to xmkmf, Makefile generator for X Window System

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
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" || continue
    # Base source directories on path to *input* file.
if test -n "$ac_f"; then
   ac_dir_in=`$as_dirname -- "$ac_f" ||
$as_expr X"$ac_f" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_f" : 'X\(//\)[^/]' \| \
	 X"$ac_f" : 'X\(//\)$' \| \
	 X"$ac_f" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$ac_f" |
    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

ac_builddir=.

case "$ac_dir_in" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir_in" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


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
ac_builddir=$builddir

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested 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
    else
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

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

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 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
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_gcrypt-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-gcrypt but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_gcrypt=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_krb5-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-krb5 but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_krb5=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_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_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_ftgl-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-ftgl but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_ftgl=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_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_perl-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-perl but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_perl=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_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_mimetic-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-mimetic but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_mimetic=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_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_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_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_libexslt-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-libexslt but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_libexslt=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_zorba-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-zorba but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_zorba=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_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
        if test "${with_gsoap-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-gsoap but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_gsoap=no
         fi
        if test "${with_avro-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-avro but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_avro=no
         fi
        if test "${with_mongodb-no}" != "no"; then
            { echo "$as_me: error: incompatible options: --with-mongodb but --without-3psw" >&2
   { (exit 1); exit 1; }; }
         else
            with_mongodb=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
cat >config.log <<_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.60.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
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`
/usr/bin/hostinfo      = `(/usr/bin/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
IFS=$as_save_IFS

} >&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_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_arg'"
      ;;
    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: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
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,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------------- ##
## File substitutions. ##
## ------------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      echo "$as_me: caught signal $ac_signal"
    echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then
  set x "$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  set x "$prefix/share/config.site" "$prefix/etc/config.site"
else
  set x "$ac_default_prefix/share/config.site" \
	"$ac_default_prefix/etc/config.site"
fi
shift
for ac_site_file
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 $ac_precious_vars; 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 was given.
if test "${with_title0+set}" = set; then
  withval=$with_title0;
fi


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


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


## Code generation

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


# Check whether --with-max-debug was given.
if test "${with_max_debug+set}" = set; then
  withval=$with_max_debug;
fi


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-openmp was given.
if test "${with_openmp+set}" = set; then
  withval=$with_openmp;
fi


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


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


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


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


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


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


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


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


# Check whether --with-limited-linker was given.
if test "${with_limited_linker+set}" = set; then
  withval=$with_limited_linker;
fi


## Scripts, make features, and directory naming

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


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


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


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


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


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


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


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


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


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


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


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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


## NCBI packages

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


# Check whether --with-ncbi-c2 was given.
if test "${with_ncbi_c2+set}" = set; then
  withval=$with_ncbi_c2;
fi


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


# Check whether --with-sss2 was given.
if test "${with_sss2+set}" = set; then
  withval=$with_sss2;
fi


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


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


# Check whether --with-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 was given.
if test "${with_z+set}" = set; then
  withval=$with_z;
fi


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


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


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


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


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


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


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


# Check whether --with-gcrypt was given.
if test "${with_gcrypt+set}" = set; then
  withval=$with_gcrypt;
fi


# Check whether --with-gcrypt2 was given.
if test "${with_gcrypt2+set}" = set; then
  withval=$with_gcrypt2;
fi


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


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


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


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


# Check whether --with-krb5 was given.
if test "${with_krb5+set}" = set; then
  withval=$with_krb5;
fi


# Check whether --with-krb5b was given.
if test "${with_krb5b+set}" = set; then
  withval=$with_krb5b;
fi


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-ftgl was given.
if test "${with_ftgl+set}" = set; then
  withval=$with_ftgl;
fi


# Check whether --with-ftgl2 was given.
if test "${with_ftgl2+set}" = set; then
  withval=$with_ftgl2;
fi


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-perl was given.
if test "${with_perl+set}" = set; then
  withval=$with_perl;
fi


# Check whether --with-perl2 was given.
if test "${with_perl2+set}" = set; then
  withval=$with_perl2;
fi


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-libexslt was given.
if test "${with_libexslt+set}" = set; then
  withval=$with_libexslt;
fi


# Check whether --with-libexslt2 was given.
if test "${with_libexslt2+set}" = set; then
  withval=$with_libexslt2;
fi


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


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


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


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


# Check whether --with-zorba was given.
if test "${with_zorba+set}" = set; then
  withval=$with_zorba;
fi


# Check whether --with-zorba2 was given.
if test "${with_zorba2+set}" = set; then
  withval=$with_zorba2;
fi


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-mimetic was given.
if test "${with_mimetic+set}" = set; then
  withval=$with_mimetic;
fi


# Check whether --with-mimetic2 was given.
if test "${with_mimetic2+set}" = set; then
  withval=$with_mimetic2;
fi


# Check whether --with-gsoap was given.
if test "${with_gsoap+set}" = set; then
  withval=$with_gsoap;
fi


# Check whether --with-gsoap2 was given.
if test "${with_gsoap2+set}" = set; then
  withval=$with_gsoap2;
fi


# Check whether --with-avro was given.
if test "${with_avro+set}" = set; then
  withval=$with_avro;
fi


# Check whether --with-avro2 was given.
if test "${with_avro2+set}" = set; then
  withval=$with_avro2;
fi


# Check whether --with-mongodb was given.
if test "${with_mongodb+set}" = set; then
  withval=$with_mongodb;
fi


# Check whether --with-mongodb2 was given.
if test "${with_mongodb2+set}" = set; then
  withval=$with_mongodb2;
fi


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


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


## Optional projects

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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-internal2 was given.
if test "${with_internal2+set}" = set; then
  withval=$with_internal2;
fi


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


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


## Manuals

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






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}
    if test "$with_max_debug" = yes; then
       { { echo "$as_me:$LINENO: error: incompatible options: --without-debug but --with-max-debug" >&5
echo "$as_me: error: incompatible options: --without-debug but --with-max-debug" >&2;}
   { (exit 1); exit 1; }; }
    fi
else
    : ${with_symbols=yes}
    : ${with_optimization=no}
fi

if test "$with_openmp" = yes; then
   if test "$with_mt" = no; then
      { { echo "$as_me:$LINENO: error: incompatible options: --without-mt but --with-openmp" >&5
echo "$as_me: error: incompatible options: --without-mt but --with-openmp" >&2;}
   { (exit 1); exit 1; }; }
   fi
   : ${with_mt=yes}
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
 ""|yes)
     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

if test -n "$with_projects"; then
   case "$with_projects" in
      /* ) abs_projects=$with_projects         ;;
      yes) abs_projects=$srcdir/projects       ;;
      *  ) abs_projects=$srcdir/$with_projects ;;
   esac
   test -r "$abs_projects"  ||  \
      { { echo "$as_me:$LINENO: error: unable to read requested projects file \"$abs_projects\"." >&5
echo "$as_me: error: unable to read requested projects file \"$abs_projects\"." >&2;}
   { (exit 1); exit 1; }; }
fi

# Check for custom optimization flags before potentially going with defaults.
skip_fast_flags=no
if test -z "${DEF_FAST_FLAGS}${FAST_CXXFLAGS}"; then
   case " $CFLAGS $CXXFLAGS" in
      *\ -O* | *\ -xO* ) skip_fast_flags=yes ;;
   esac
fi
# Generally save any originally specified flags.
USER_CFLAGS=$CFLAGS
USER_CXXFLAGS=$CXXFLAGS
USER_LDFLAGS=$LDFLAGS

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

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.


# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; }
case $ac_cv_build in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
echo "$as_me: error: invalid value of canonical build" >&2;}
   { (exit 1); exit 1; }; };;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ 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
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi

fi
{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
echo "$as_me: error: invalid value of canonical host" >&2;}
   { (exit 1); exit 1; }; };;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac



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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $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
IFS=$as_save_IFS


fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    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'


#### Point ICC at a suitable GCC version ASAP.
case "/$CXX" in
   */icpc )
      if test -d /usr/local/gcc; then
         case "`$CXX -dumpversion`:$host_cpu" in
            *:i?86)           v=4.4.5 ;;
            ?.* | 1[01].* ) v=4.0.1 ;;
            *)                v=4.4.2 ;;
         esac
         gcc=/usr/local/gcc/$v/bin/gcc
         if test -x $gcc; then
            CC="$CC -gcc-name=$gcc"
            CXX="$CXX -gcc-name=$gcc"
         fi
      fi
      ;;
esac

#### C and C++ compilers
ac_ext=cpp
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 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.exe
  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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.exe
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
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`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&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[^ ]*//'`
#
# List of possible output files, starting from the most likely.
# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
# only as a last resort.  b.out is created by i960 compilers.
ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
#
# The IRIX 6 linker writes into existing files which may not be
# executable, retaining their permissions.  Remove them first so a
# subsequent execution test works.
ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { (ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

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 that 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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
    *) 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
{ 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
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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

	CFLAGS=""
      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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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

	ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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


fi

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

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
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 ISO C89" >&5
echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_c89=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 -std 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 -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 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
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_c89=$ac_arg
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6; } ;;
  xno)
    { echo "$as_me:$LINENO: result: unsupported" >&5
echo "${ECHO_T}unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac


ac_ext=cpp
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=cpp
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 -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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 g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
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`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
{ 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
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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

	CXXFLAGS=""
      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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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

	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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


fi

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

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
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
ac_ext=cpp
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 Cray compiler
if test "$GCC" != "yes"  -a  "$KCC" != "yes"  -a  "$ICC" != "yes" \
  -a  "$VAC" != "yes" -a  "$CCC" != "yes"; then
   cce_ver="`$real_CXX -V 2>&1 | grep '^Cray'`"
   case "$cce_ver" in
      *Cray* ) CCE="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=" "
elif test "$CCE" = "yes" ; then
   compiler_ver="$cce_ver"
   compiler="Cray"
   ncbi_compiler="CRAY"
   ncbi_compiler_ver="`echo $cce_ver | sed 's%.*Version \([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}Cray"; 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/' ;;
    ICC:??.?.? | \
    ICC:??.?.?.* ) ncbi_compiler_sed='s/\([0-9][0-9]\)\.\([0-9]\)\.\([0-9]\).*/\1\2\3/' ;;
    *:?.?.?)    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/' ;;
    *)    { { echo "$as_me:$LINENO: error: Do not know how to parse $compiler version number $ncbi_compiler_ver" >&5
echo "$as_me: error: Do not know how to parse $compiler version number $ncbi_compiler_ver" >&2;}
   { (exit 1); exit 1; }; } ;;
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_CRAY 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 <& 7
       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
# Historically off by default; respect that when reconfiguring old builds.
if test -z "$with_mt" -a -f "$NCBI_OLD_STATUS_DIR/-MT.enabled"; then
    with_mt=no
fi

if test "$with_mt" != "no" ; then
   with_mt=yes
   case "$host_os:$compiler" in
    darwin* | irix* | cygwin* | *:Cray ) ;;
    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"} ;;
    * )
       msg="Do not know how to build MT-safe with compiler $CXX $compiler_ver"
       case "$with_mt" in
          yes ) { { echo "$as_me:$LINENO: error: $msg" >&5
echo "$as_me: error: $msg" >&2;}
   { (exit 1); exit 1; }; } ;;
          ''  ) { echo "$as_me:$LINENO: WARNING: $msg" >&5
echo "$as_me: WARNING: $msg" >&2;}; with_mt=no ;;
       esac
       ;;
   esac
fi

if test "$with_mt" != "no" ; then
   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
   case "$compiler" in
      GCC )
         if $CC -v 2>&1 | grep clang >/dev/null; then
            :
            # Will allegedly support -openmp at some point, but as of 3.4,
            # just parses it as specifying an output filename: -o penmp.
         else
            case "$compiler_version" in
               [123]?? | 4[01]? ) ;;
               * ) : ${OPENMP_FLAGS=-fopenmp} ;;
            esac
         fi
         ;;
      ICC )
         : ${OPENMP_FLAGS=-openmp}
         ;;
      WorkShop* )
         : ${OPENMP_FLAGS=-xopenmp=parallel}
         ;;
   esac
   if test "$with_openmp" = yes; then
      MT_FLAG="$MT_FLAG $OPENMP_FLAGS"
      OPENMP_FLAGS=
   fi
   mt_sfx="MT"
             WithFeatures="$WithFeatures${WithFeaturesSep}MT"; WithFeaturesSep=" "
else
   CPPFLAGS="$CPPFLAGS -DNCBI_WITHOUT_MT"
   MT_FLAG=
   THREAD_LIBS=
   NCBIATOMIC_LIB=
   OPENMP_FLAGS=
   mt_sfx=""
fi
MT_SFX="${mt_sfx}"


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

APP_LDFLAGS=
DLL_LDFLAGS=

#### 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 )
   STRIP="@:"
   ;;

 linux*:ICC )
   # "incomplete type is not allowed" should be an error, not a warning!
   CFLAGS="-we70 $CFLAGS"
   CXXFLAGS="-we70 $CXXFLAGS"
   case "$compiler_version" in
      1[1-9]?? ) MATH_LIBS=-Wl,-lm ;; # avoid static libimf in shared libs
   esac
   ;;

 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)
   case `uname -m` in
      *64 ) : ${with_64=yes} ;;
      *   ) : ${with_64=no}  ;;
   esac
   # 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="-fpascal-strings $CXXFLAGS"
      if $CXX -v 2>&1 | grep -q clang; then
         try_old_sdks=no
      else
         try_old_sdks=$with_ncbi_public
         CXXFLAGS="-fno-permissive $CXXFLAGS"
      fi
      # -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 "$try_old_sdks" = yes; then
         sdks='/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk'
         case "$host_os" in
            darwin?.* | darwin10.* ) # Mac OS X 10.6.x or older
               TARGET='-mmacosx-version-min=10.5'
               sdks="/Developer/SDKs/MacOSX10.6.sdk"
               if test "$with_64:${with_universal-no}" != "yes:no"; then
                  sdks="/Developer/SDKs/MacOSX10.5.sdk $sdks"
               fi
               ;;
            * )
               TARGET='-mmacosx-version-min=10.7'
               ;;
         esac
         for sdk in $sdks; do
            if test -d "$sdk"; then
               TARGET="-isysroot $sdk $TARGET"
               break
            fi
         done
         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'
   ;;
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 <& 7
       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


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"

### Should go before any test compiler runs

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



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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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


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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 has an option to export all symbols" >&5
echo $ECHO_N "checking whether $CC has an option to export all symbols... $ECHO_C" >&6; }
if test "${ncbi_cv_prog_cc_export_all+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_LDFLAGS=$LDFLAGS
          ncbi_cv_prog_cc_export_all=no
          for x in -Wl,--export-all-symbols -Wl,-export-dynamic -rdynamic \
                   -Wl,-E; do
             LDFLAGS="$x $orig_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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cc_export_all=$x
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
             test "x$ncbi_cv_prog_cc_export_all" = "xno"  ||  break
          done
          LDFLAGS=$orig_LDFLAGS
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_prog_cc_export_all" >&5
echo "${ECHO_T}$ncbi_cv_prog_cc_export_all" >&6; }
      test "$ncbi_cv_prog_cc_export_all" = no  || \
         LDFLAGS="$ncbi_cv_prog_cc_export_all $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

if $CXX -v 2>&1 | grep -q clang; then
   CFLAGS="$CFLAGS -Wno-deprecated-register"
   CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"

   case "$host_os:$CXX" in
      darwin[0-9].*:/usr/bin/* | darwin1[0-2].*:/usr/bin/* )
         ncbi_cv_prog_cxx_stdlib_libcxx=no
         ;;
   esac

   { echo "$as_me:$LINENO: checking whether $CXX supports -stdlib=libc++" >&5
echo $ECHO_N "checking whether $CXX supports -stdlib=libc++... $ECHO_C" >&6; }
if test "${ncbi_cv_prog_cxx_stdlib_libcxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_CXX=$CXX
       CXX="$orig_CXX -stdlib=libc++"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdexcept>
int
main ()
{
std::logic_error le("Inconceivable!");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cxx_stdlib_libcxx=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_prog_cxx_stdlib_libcxx=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
       CXX=$orig_CXX
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_prog_cxx_stdlib_libcxx" >&5
echo "${ECHO_T}$ncbi_cv_prog_cxx_stdlib_libcxx" >&6; }
   test "$ncbi_cv_prog_cxx_stdlib_libcxx" = no  ||  CXX="$CXX -stdlib=libc++"
fi

{ echo "$as_me:$LINENO: checking whether _LIBCPP_VERSION is declared" >&5
echo $ECHO_N "checking whether _LIBCPP_VERSION is declared... $ECHO_C" >&6; }
if test "${ac_cv_have_decl__LIBCPP_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 <iosfwd>

int
main ()
{
#ifndef _LIBCPP_VERSION
  char *p = (char *) _LIBCPP_VERSION;
  return !p;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_have_decl__LIBCPP_VERSION=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_have_decl__LIBCPP_VERSION=no
fi

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


case "$ac_cv_have_decl__LIBCPP_VERSION:$compiler:$compiler_version" in
   no:GCC:4[0-6]? | no:ICC:1[01]?? )
     ncbi_cv_prog_cxx_11=no
     ncbi_cv_prog_c_99=no
     ;;
   *:ICC:* )
     ncbi_cv_prog_c_99='-std=gnu99 -fgnu89-inline'
     ;;
esac

{ echo "$as_me:$LINENO: checking how to enable C++ '11 features in $CXX" >&5
echo $ECHO_N "checking how to enable C++ '11 features in $CXX... $ECHO_C" >&6; }
if test "${ncbi_cv_prog_cxx_11+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_CXX=$CXX
    ncbi_cv_prog_cxx_11=no
    for x in -std=gnu++11 -std=gnu++0x; do
       CXX="$orig_CXX $x"
       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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_cxx_11=$x
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
          test "x$ncbi_cv_prog_cxx_11" = "xno"  ||  break
       done
       CXX=$orig_CXX
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_prog_cxx_11" >&5
echo "${ECHO_T}$ncbi_cv_prog_cxx_11" >&6; }
test "$ncbi_cv_prog_cxx_11" = no  ||  CXX="$CXX $ncbi_cv_prog_cxx_11"

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 enable C '11 or at least '99 features in $CC" >&5
echo $ECHO_N "checking how to enable C '11 or at least '99 features in $CC... $ECHO_C" >&6; }
if test "${ncbi_cv_prog_c_99+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  orig_CC=$CC
    ncbi_cv_prog_c_99=no
    for x in -xc99=all "-std=gnu11 -fgnu89-inline" \
             "-std=gnu1x -fgnu89-inline" \
             "-std=gnu99 -fgnu89-inline" \
             "-std=gnu9x -fgnu89-inline"; do
       CC="$orig_CC $x"
       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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_prog_c_99=$x
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
          test "x$ncbi_cv_prog_c_99" = "xno"  ||  break
       done
       CC=$orig_CC
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_prog_c_99" >&5
echo "${ECHO_T}$ncbi_cv_prog_c_99" >&6; }
ac_ext=cpp
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

test "$ncbi_cv_prog_c_99" = no  ||  CC="$CC $ncbi_cv_prog_c_99"

case "$host_os:$compiler" in
 solaris*:GCC )
   # On Solaris, GCC defaults to setting _XOPEN_SOURCE (to 500) only
   # in C++ mode.  Set it for C code as well to ensure consistent
   # header behavior, taking care to match the C standard version
   # (as enforced by <sys/feature_tests.h>).
   case "$ncbi_cv_prog_c_99" in
      no) CC="$CC -D_XOPEN_SOURCE=500" ;;
      *)  CC="$CC -D_XOPEN_SOURCE=600" ;;
   esac
   ;;
esac


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

if test "$with_lfs" = "yes" ; then
   LFSFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
   # Modern BSD-based systems (including Mac OS X) already use a 64-bit
   # off_t, but don't necessarily provide explicit ...64 variants of all
   # relevant functions.
   case "$host_os" in
      *bsd* | darwin* ) ;;
      * ) LFSFLAGS="$LFSFLAGS -D_LARGEFILE64_SOURCE" ;;
   esac
   CPPFLAGS="$LFSFLAGS $CPPFLAGS"
fi

tabchar='	'
wschars=" $tabchar"
wsrx="[$wschars]"

#### Flags to enable (potentially unsafe) extra optimization.
if test "$skip_fast_flags" = no -a -z "$DEF_FAST_FLAGS" ; 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="-O3 -finline-functions -fstrict-aliasing"
        case "$host_os:$host_cpu:$compiler_version" in
           freebsd* | solaris*:*86*:* | *:4[5-9]? | *:[5-9]?? ) ;;
           * ) 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/$wsrx-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:[1-8]?? )
        DEF_FAST_FLAGS="-O2"
        ;;
      ICC:9?? )
        DEF_FAST_FLAGS="-O3 -axP -ip" # optimized for Core or P4 w/SSE3 (max)
        ;;
      ICC:10?? )
        DEF_FAST_FLAGS="-O3 -axT -ip" # Core 2 w/SSSE3; axS would cover SSE 4.1
        ;;
      ICC:* )
        # Core 2; ICC 11 goes up to SSE4.2 (i7), ICC 12 up to CORE-AVX-I
        DEF_FAST_FLAGS="-O3 -axSSSE3 -ip"
        ;;
      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
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*:[GI]CC | *bsd*:GCC | cygwin*:GCC | osf*:GCC )
      CONF_f_runpath="-Wl,-rpath,"
      ;;
    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:"
              ;;
           solaris*)
              # avoid interference from possible older versions in /usr/sfw.
              LDFLAGS="-L$dir $LDFLAGS"
              ;;
        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???:* )
    # Suppress "warning #10237: -lcilkrts linked in dynamically, static
    # library not available" which is not a problem in practice due to
    # as-needed linkage.
    APP_LDFLAGS="-static-intel -diag-disable 10237 $APP_LDFLAGS"
    DLL_LDFLAGS="-static-intel -diag-disable 10237 -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 <& 7
       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

case "$LN_S" in
    /*) ;;
    * ) LN_S=/bin/$LN_S ;;
esac

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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    RANLIB=$ac_ct_RANLIB
  fi
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  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 <& 7
       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_path_DISTCC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DISTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DISTCC="$DISTCC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_DISTCC="$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
IFS=$as_save_IFS

  test -z "$ac_cv_path_DISTCC" && ac_cv_path_DISTCC="distcc"
  ;;
esac
fi
DISTCC=$ac_cv_path_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_path_CCACHE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CCACHE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CCACHE="$CCACHE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CCACHE="$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
IFS=$as_save_IFS

  ;;
esac
fi
CCACHE=$ac_cv_path_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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

# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; 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_SED+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SED in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SED="$SED" # Let the user override the test with a path.
  ;;
  *)
  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_SED="$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
IFS=$as_save_IFS

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


# Extract the first word of "touch", so it can be a program name with args.
set dummy touch; 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_TOUCH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TOUCH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/bin:/usr/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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_TOUCH="$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
IFS=$as_save_IFS

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


{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # Extract the first word of "grep ggrep" to use in msg output
if test -z "$GREP"; then
set dummy grep ggrep; ac_prog_name=$2
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in grep ggrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
    # Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_GREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

GREP="$ac_cv_path_GREP"
if test -z "$GREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_GREP=$GREP
fi


fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
if test "${ac_cv_path_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_path_EGREP="$GREP -E"
   else
     # Extract the first word of "egrep" to use in msg output
if test -z "$EGREP"; then
set dummy egrep; ac_prog_name=$2
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in egrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
    # Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_EGREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

EGREP="$ac_cv_path_EGREP"
if test -z "$EGREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_EGREP=$EGREP
fi


   fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

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



# Extract the first word of "ldd", so it can be a program name with args.
set dummy ldd; 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_LDD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LDD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/bin:/usr/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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_LDD="$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
IFS=$as_save_IFS

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


if test -n "$LDD"; then
   { echo "$as_me:$LINENO: checking whether $LDD accepts -r" >&5
echo $ECHO_N "checking whether $LDD accepts -r... $ECHO_C" >&6; }
   if $LDD -r /bin/ls >/dev/null 2>&1; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
      LDD_R="$LDD -r"
   else
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   fi
fi

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

signature_compiler=$compiler
signature_compiler_version=$compiler_version
if test "$compiler" = "GCC"; then
   llvm_version=`$CXX -v 2>&1 | $EGREP 'clang|LLVM'`
   case "$llvm_version" in
      *clang* )
         # Take the LLVM version from both "clang version X.Y (...) ..." and
         # "$Vendor (LLVM|clang) version ... (...) (based on LLVM X.Y)"
         sed='s/.*[Mn] \([1-9][0-9.]*\).*/\1/; s/\.//g; s/^..$/&0/'
         signature_compiler=Clang
         signature_compiler_version=`echo $llvm_version | sed -e "$sed"`
         ;;
      *LLVM* )
         signature_compiler=LLVMGCC
         ;;
   esac
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}/${signature_compiler}"
   case "$signature_compiler:$with_version" in
      *[0-9]:* | *:no) ;;
      *) build_root=${build_root}${signature_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


#### Determine whether this is implicitly a 64-bit platform
ac_ext=cpp
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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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=cpp
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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { as_var=$as_ac_Header; eval "test \"\${$as_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.  */
$ac_includes_default

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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
typedef size_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 int
_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
typedef size_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef size_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef size_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef size_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef size_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef size_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef size_t ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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

if test "$bit64_sfx" = 64 -o "$with_lfs" = "yes"; then
             WithFeatures="$WithFeatures${WithFeaturesSep}LFS"; WithFeaturesSep=" "
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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_hostname=`(hostname || uname -n) 2>/dev/null \
    | sed 's/\..*//; s/-/_/g; 1q'`
signature="${signature_compiler}_${signature_compiler_version}-${release_debug}${mt_sfx}${dll_sfx}${bit64_sfx}${prof_sfx}--${verbose_host}-${signature_hostname}"

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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 -Wl,-rpath-link,\$(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 | egrep -q 'Apple|clang'; 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="$LINK $ARCH_CFLAGS -nostartfiles -Wl,-dynamic -Wl,-dylib -Wl,-install_name,${pure_runpath%%:*}/\$(XDLL) -o"
           LINK_LOADABLE="$LINK $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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, as such inclusion can otherwise
   # result in linker errors.
   DLL_LDFLAGS="$DLL_LDFLAGS $CXXFLAGS_DLL"
   CFLAGS="$CFLAGS $CFLAGS_DLL"
   CFLAGS_DLL=
   CXXFLAGS="$CXXFLAGS $CXXFLAGS_DLL"
   CXXFLAGS_DLL=

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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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=cpp
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 <& 7
       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="/bin/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="/bin/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)-(max-)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_max_debug" = "yes"; then
      case "$compiler" in
         GCC )
            CPPFLAGS="-D_GLIBCXX_DEBUG $CPPFLAGS"
            CFLAGS="-fstack-check $CFLAGS"
            CXXFLAGS="-fstack-check $CXXFLAGS"
            ;;
         ICC )
            CPPFLAGS="-D_GLIBCXX_DEBUG $CPPFLAGS"
            CFLAGS="-debug all -fstack-security-check -ftrapuv $CFLAGS"
            CXXFLAGS="-debug all -fstack-security-check -ftrapuv $CXXFLAGS"
            ;;
         WorkShop* )
            CFLAGS="-xcheck=%all $CFLAGS"
            CXXFLAGS="-xcheck=%all $CXXFLAGS"
            ;;
      esac
                WithFeatures="$WithFeatures${WithFeaturesSep}MaxDebug"; WithFeaturesSep=" "
   fi
   dbgrx1="$wsrx-g[^cx$wschars]*$wsrx"
   dbgrx2="$wsrx-gx*coff[0-9+]*$wsrx"
   optrx="$wsrx-x*O[0-9s]*$wsrx"
   NDEB_CFLAGS=`  echo " $CFLAGS "   | sed "s/$dbgrx1/ /g; s/$dbgrx2/ /g"`
   NDEB_CXXFLAGS=`echo " $CXXFLAGS " | sed "s/$dbgrx1/ /g; s/$dbgrx2/ /g"`
   NDEB_LDFLAGS=` echo " $LDFLAGS "  | sed "s/$dbgrx1/ /g; s/$dbgrx2/ /g"`
   if test "$with_symbols" = "no" ; then
      CFLAGS=$NDEB_CFLAGS
      CXXFLAGS=$NDEB_CXXFLAGS
      LDFLAGS=$NDEB_LDFLAGS
   else
      echo " $CFLAGS "  | $EGREP_Q "$dbgrx1|$dbgrx2" || CFLAGS="$CFLAGS -g"
      echo " $CXXFLAGS "| $EGREP_Q "$dbgrx1|$dbgrx2" || CXXFLAGS="$CXXFLAGS -g"
      echo " $LDFLAGS " | $EGREP_Q "$dbgrx1|$dbgrx2" || LDFLAGS="$LDFLAGS -g"
      STRIP="@:"
      case "$compiler:$compiler_version" in
         GCC:4[89]? | GCC:[5-9]? | GCC:???? )
            # GCC 4.8 defaults to DWARF 4, which Totalview for one
            # can't handle; roll back to version 3 by default.
            echo " $USER_CFLAGS " | $EGREP_Q "$dbgrx1|$dbgrx2" || \
               CFLAGS="$NDEB_CFLAGS -gdwarf-3"
            echo " $USER_CXXFLAGS " | $EGREP_Q "$dbgrx1|$dbgrx2" || \
               CXXFLAGS="$NDEB_CXXFLAGS -gdwarf-3"
            echo " $USER_LDFLAGS " | $EGREP_Q "$dbgrx1|$dbgrx2" || \
               LDFLAGS="$NDEB_LDFLAGS -gdwarf-3"
            ;;
      esac
   fi

   NOPT_CFLAGS=`  echo " $CFLAGS "    | sed "s/$optrx/ /g"`
   NOPT_CXXFLAGS=`echo " $CXXFLAGS "  | sed "s/$optrx/ /g"`
   NOPT_LDFLAGS=` echo " $LDFLAGS "   | sed "s/$optrx/ /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 "$optrx" >/dev/null ; then
         CFLAGS="$CFLAGS -O" ; fi
      if echo " $CXXFLAGS " | grep -v "$optrx" >/dev/null ; then
         CXXFLAGS="$CXXFLAGS -O" ; fi
      if echo " $LDFLAGS "  | grep -v "$optrx" >/dev/null ; then
         LDFLAGS="$LDFLAGS -O" ; fi
      if test "$skip_fast_flags" = yes ; then
         FAST_CFLAGS="$CFLAGS"
         FAST_CXXFLAGS="$CXXFLAGS"
         FAST_LDFLAGS="$LDFLAGS"
      else
         FAST_CFLAGS="$NOPT_CFLAGS $FAST_CFLAGS"
         FAST_CXXFLAGS="$NOPT_CXXFLAGS $FAST_CXXFLAGS"
         FAST_LDFLAGS="$NOPT_LDFLAGS $FAST_LDFLAGS"
      fi
   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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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>

typedef socklen_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 \
                 x86intrin.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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

case "$host_os" in
   cygwin*)
for ac_header in winternl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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
 ;;
esac
# 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return _doprnt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 getgrouplist \
               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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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=cpp
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>

int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=int
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_signal=void
fi

rm -f core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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;
    if (s) return 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;
    if (!foo) return 0;
  }
  return !x[0] && !zero.x;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short int 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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.  */
$ac_includes_default
int
main ()
{

  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long int l;
    char c[sizeof (long int)];
  } u;
  u.l = 1;
  return u.c[sizeof (long int) - 1] == 1;

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi

rm -f core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
typedef char ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef char ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef char ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef char ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef char ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef char ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef char ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef double ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef double ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef float ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef float ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef float ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef float ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef float ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef float ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef float ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef int ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef int ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef int ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef int ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef int ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef int ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef int ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef long ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef long ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef long double ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef long double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef long double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef long double ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef long double ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef long long ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef long long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef long long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef long long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef long long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef long long ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef short ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef short ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef short ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef short ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef short ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef short ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef short ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef void* ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef void* ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef void* ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef void* ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef void* ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef void* ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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*)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void*)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef void* ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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*)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void*)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef __int64 ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 long int 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
		   typedef __int64 ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef __int64 ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
		   typedef __int64 ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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
		   typedef __int64 ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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
		   typedef __int64 ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (__int64)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; } ;;
esac
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
		   typedef __int64 ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

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

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (__int64)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
typedef intptr_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
typedef uintptr_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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>

typedef union semun ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=cpp
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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 __always_inline "inline __attribute__((always_inline))" \
       forceinline __forceinline__ __forceinline 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=cpp
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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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


{ echo "$as_me:$LINENO: checking syntax for declaring thread-local variables" >&5
echo $ECHO_N "checking syntax for declaring thread-local variables... $ECHO_C" >&6; }
if test "${ncbi_cv_c_tls_var+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ncbi_cv_c_tls_var=none
    for tls_var in __thread '__declspec(thread)' _Thread_local; do
       test "$ncbi_cv_c_tls_var" = "none" || break
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$tls_var int i;
int
main ()
{
static $tls_var int j;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_c_tls_var=$tls_var
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_c_tls_var" >&5
echo "${ECHO_T}$ncbi_cv_c_tls_var" >&6; }
tls_var=$ncbi_cv_c_tls_var
if test "$tls_var" != "none"; then

cat >>confdefs.h <<_ACEOF
#define NCBI_TLS_VAR $tls_var
_ACEOF

fi

# 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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

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

orig_CFLAGS=$CFLAGS

{ echo "$as_me:$LINENO: checking whether $CC supports SIMD vector arithmetic" >&5
echo $ECHO_N "checking whether $CC supports SIMD vector arithmetic... $ECHO_C" >&6; }
if test "${ncbi_cv_cc_vector_math+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.  */
typedef int TVector __attribute__((vector_size(16)));
          TVector f(TVector v1, TVector v2) { return v1 ^ v2 };
int
main ()
{
TVector v1, v2, v3;  v3 = f(v1, v2);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cc_vector_math=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_cc_vector_math=no
fi

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

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

fi

{ echo "$as_me:$LINENO: checking whether $CC supports -funsafe-math-optimizations" >&5
echo $ECHO_N "checking whether $CC supports -funsafe-math-optimizations... $ECHO_C" >&6; }
if test "${ncbi_cv_cc_unsafe_math+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CFLAGS="$orig_CFLAGS -funsafe-math-optimizations"
    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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cc_unsafe_math=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_cc_unsafe_math=no
fi

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

{ echo "$as_me:$LINENO: checking whether $CC supports -msse4.1" >&5
echo $ECHO_N "checking whether $CC supports -msse4.1... $ECHO_C" >&6; }
if test "${ncbi_cv_cc_sse4_1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CFLAGS="$orig_CFLAGS -msse4.1"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <emmintrin.h>
int
main ()
{
double v __attribute__((__vector_size__(16)));
           __builtin_ia32_shufpd(v, v, 1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cc_sse4_1=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_cc_sse4_1=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_cc_sse4_1" >&5
echo "${ECHO_T}$ncbi_cv_cc_sse4_1" >&6; }

{ echo "$as_me:$LINENO: checking whether $CC supports -maes" >&5
echo $ECHO_N "checking whether $CC supports -maes... $ECHO_C" >&6; }
if test "${ncbi_cv_cc_aes+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CFLAGS="$orig_CFLAGS -maes"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <wmmintrin.h>
           typedef long long TAESVec __attribute__((__vector_size__(16)));
           TAESVec f(TAESVec v, TAESVec w) {
              return __builtin_ia32_aesdec128(v, w);
           }
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_cc_aes=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_cc_aes=no
fi

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

CFLAGS=$orig_CFLAGS
ac_ext=cpp
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 $ncbi_cv_cc_unsafe_math = yes; then
   UNSAFE_MATH_FLAG=-funsafe-math-optimizations
else
   UNSAFE_MATH_FLAG=
fi

if test $ncbi_cv_cc_sse4_1 = yes; then
   SSE4_1_FLAG=-msse4.1
else
   SSE4_1_FLAG=
fi

if test $ncbi_cv_cc_sse4_1 = yes -a $ncbi_cv_cc_aes = yes; then
   AES_FLAG=-maes
else
   AES_FLAG=
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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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

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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char kstat_open ();
int
main ()
{
return kstat_open ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$KSTAT_LIBS" kstat; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_kstat_open=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_kstat_open+set}" = set; then
  break
fi
done
if test "${ac_cv_search_kstat_open+set}" = set; then
  :
else
  ac_cv_search_kstat_open=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_kstat_open
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char rstat ();
int
main ()
{
return rstat ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$RPCSVC_LIBS" rpcsvc; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_rstat=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_rstat+set}" = set; then
  break
fi
done
if test "${ac_cv_search_rstat+set}" = set; then
  :
else
  ac_cv_search_rstat=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_rstat
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char setkey ();
int
main ()
{
return setkey ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$CRYPT_LIBS" crypt crypt_i; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_setkey=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_setkey+set}" = set; then
  break
fi
done
if test "${ac_cv_search_setkey+set}" = set; then
  :
else
  ac_cv_search_setkey=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_setkey
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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=cpp
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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$DL_LIBS" dl; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_dlopen=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_dlopen+set}" = set; then
  break
fi
done
if test "${ac_cv_search_dlopen+set}" = set; then
  :
else
  ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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

orig_LIBS="$DL_LIBS $orig_LIBS"
# Left alone for the sake of anything using $(C_LIBS) in lieu of $(ORIG_LIBS).
# DL_LIBS=
{ 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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char uuid_generate ();
int
main ()
{
return uuid_generate ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' uuid; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_uuid_generate=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_uuid_generate+set}" = set; then
  break
fi
done
if test "${ac_cv_search_uuid_generate+set}" = set; then
  :
else
  ac_cv_search_uuid_generate=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_uuid_generate
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fuse_loop ();
int
main ()
{
return fuse_loop ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' fuse; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_fuse_loop=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_fuse_loop+set}" = set; then
  break
fi
done
if test "${ac_cv_search_fuse_loop+set}" = set; then
  :
else
  ac_cv_search_fuse_loop=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_fuse_loop
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
            WithPackages="$WithPackages${WithPackagesSep}FUSE"; WithPackagesSep=" "
fi

LIBS=$orig_LIBS
# Temporarily drop OpenMP flags for this test, as some toolchains count
# its support library's indirect use of librt when building applications
# but not when building shared libraries with --no-undefined.
orig_CXXFLAGS=$CXXFLAGS
orig_LDFLAGS=$LDFLAGS
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/[^ ]*openmp[^ ]*//g'`
LDFLAGS=`echo $LDFLAGS | sed -e 's/[^ ]*openmp[^ ]*//g'`
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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char clock_gettime ();
int
main ()
{
return clock_gettime ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$RT_LIBS" rt posix4; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_clock_gettime=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_clock_gettime+set}" = set; then
  break
fi
done
if test "${ac_cv_search_clock_gettime+set}" = set; then
  :
else
  ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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

CXXFLAGS=$orig_CXXFLAGS
LDFLAGS=$orig_LDFLAGS
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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char cplus_demangle ();
int
main ()
{
return cplus_demangle ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$DEMANGLE_LIBS" demangle; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_cplus_demangle=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_cplus_demangle+set}" = set; then
  break
fi
done
if test "${ac_cv_search_cplus_demangle+set}" = set; then
  :
else
  ac_cv_search_cplus_demangle=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_cplus_demangle
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

#### Set compiler prefix (empty for vendor compilers)
case "$signature_compiler:$ac_cv_have_decl__LIBCPP_VERSION" in
   Clang:yes | LLVMGCC:yes )
      compiler_pfx="${signature_compiler}-"
      compiler_vpfx="${signature_compiler}${signature_compiler_version}-"
      ;;
   Clang:* | *[GIK]CC:* )
      compiler_pfx="${compiler}-"
      compiler_vpfx="${compiler}${compiler_version}-"
      ;;
esac

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 "$Z_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$BZ2_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

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 "$LZO_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$PCRE_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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_gcrypt" in
   no )       ac_cv_path_LIBGCRYPT_CONFIG=no ;;
   yes | '' )                                ;;
   * )        GCRYPT_PATH=$with_gcrypt       ;;
esac
if test -d "$GCRYPT_PATH"; then
   ncbi_fix_dir_tmp=`if cd $GCRYPT_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 $GCRYPT_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GCRYPT_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GCRYPT_PATH" in
               /*) ;;
               * ) GCRYPT_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GCRYPT_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
# Extract the first word of "libgcrypt-config", so it can be a program name with args.
set dummy libgcrypt-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_LIBGCRYPT_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LIBGCRYPT_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${GCRYPT_BIN-$GCRYPT_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/bin}:$GCRYPT_PATH/bin${bit64_sfx}:$GCRYPT_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_LIBGCRYPT_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
IFS=$as_save_IFS

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



if test "x$with_gcrypt" != xno; then
   if test -x "$LIBGCRYPT_CONFIG"; then
      if test -z "$GCRYPT_PATH"; then
         p=`libgcrypt-config --prefix`
         test "x$p" = "x/usr"  ||  GCRYPT_PATH=$p
      fi
      if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GCRYPT_LIBPATH=`$LIBGCRYPT_CONFIG --exec-prefix | sed -e "s,^,-L,; s,$,/lib,;"`
 else
    GCRYPT_LIBPATH=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$LIBGCRYPT_CONFIG --exec-prefix | sed -e "s,^,-L,; s,$,/lib,;"`; do
       case "$x" in
          -L*)
             GCRYPT_LIBPATH="$GCRYPT_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=:
             ;;
          *)
             GCRYPT_LIBPATH="$GCRYPT_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
    GCRYPT_LIBPATH="$GCRYPT_LIBPATH${ncbi_rp_R_flags}"
 fi
      GCRYPT_INCLUDE=`$LIBGCRYPT_CONFIG --cflags`
      GCRYPT_CONFIG_LIBS="`$LIBGCRYPT_CONFIG --libs` $Z_LIBS"
   fi
else
   $as_unset GCRYPT_CONFIG_LIBS || test "${GCRYPT_CONFIG_LIBS+set}" != set || { GCRYPT_CONFIG_LIBS=; export GCRYPT_CONFIG_LIBS; }
fi
if test "$with_gcrypt" != "no"; then
    case "$with_gcrypt" in
       yes | "" ) ;;
       *        ) GCRYPT_PATH=$with_gcrypt ;;
    esac
    if test "$GCRYPT_PATH" != /usr -a -d "$GCRYPT_PATH"; then
       in_path=" in $GCRYPT_PATH"
       if test -z "$GCRYPT_INCLUDE" -a -d "$GCRYPT_PATH/include"; then
          GCRYPT_INCLUDE="-I$GCRYPT_PATH/include"
       fi
       if test -n "$GCRYPT_LIBPATH"; then
          :
       elif test -d "$GCRYPT_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 $GCRYPT_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
    GCRYPT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GCRYPT_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
    GCRYPT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GCRYPT_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 $GCRYPT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GCRYPT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GCRYPT_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
    GCRYPT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GCRYPT_LIBS="$GCRYPT_LIBPATH -lgcrypt $GCRYPT_CONFIG_LIBS"
    else
       GCRYPT_INCLUDE=""
       GCRYPT_LIBS="-lgcrypt $GCRYPT_CONFIG_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libgcrypt$in_path" >&5
echo $ECHO_N "checking for libgcrypt$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_gcrypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $GCRYPT_INCLUDE $orig_CPPFLAGS"
       LIBS="$GCRYPT_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 <gcrypt.h>
                     #include <pthread.h>
                     #include <errno.h>
                     GCRY_THREAD_OPTION_PTHREAD_IMPL;
int
main ()
{
gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_gcrypt=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_gcrypt=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_gcrypt" >&5
echo "${ECHO_T}$ncbi_cv_lib_gcrypt" >&6; }
    if test "$ncbi_cv_lib_gcrypt" = "no"; then
       if test "${with_gcrypt:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-gcrypt explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-gcrypt explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_gcrypt" = "no"; then
    GCRYPT_PATH="No_GCRYPT"
    GCRYPT_INCLUDE=
    GCRYPT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GCRYPT"; WithPackagesSep=" "
    GCRYPT_INCLUDE=" $GCRYPT_INCLUDE"

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

 fi



if test "x$with_gcrypt" != xno -a -n "$GCRYPT_CONFIG_LIBS"; then
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GCRYPT_LIBS=`echo $GCRYPT_CONFIG_LIBS | sed -e "$no_usr_lib"`
 else
    GCRYPT_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `echo $GCRYPT_CONFIG_LIBS | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L*)
             GCRYPT_LIBS="$GCRYPT_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=:
             ;;
          *)
             GCRYPT_LIBS="$GCRYPT_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
    GCRYPT_LIBS="$GCRYPT_LIBS${ncbi_rp_R_flags}"
 fi
fi

case "$with_gnutls" in
   no )       ac_cv_path_LIBGNUTLS_CONFIG=no ;;
   yes | '' )                                ;;
   * )        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
   gnutls_config_path=${GNUTLS_BIN-$GNUTLS_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/bin}:$GNUTLS_PATH/bin${bit64_sfx}:$GNUTLS_PATH/bin
else
   gnutls_config_path=$PATH
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
for as_dir in $gnutls_config_path
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 --static"
      $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 "$GNUTLS_PATH" != /usr -a -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 $GCRYPT_LIBS"
    else
       GNUTLS_INCLUDE=""
       GNUTLS_LIBS="-lgnutls $GNUTLS_CONFIG_LIBS $GCRYPT_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>
int
main ()
{
gnutls_session_t s; gnutls_init(&s, GNUTLS_CLIENT);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "x$with_gnutls" != xno -a -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
   # Conservatively build against gcrypt if available even when gnutls
   # uses nettle instead, because gcrypt needs explicit initialization
   # to be thread-safe, but gnutls's headers don't indicate which
   # underlying crypto library it's actually using.
   case "$GNUTLS_INCLUDE" in
       *$GCRYPT_INCLUDE* ) ;;
       *                 ) GNUTLS_INCLUDE="$GNUTLS_INCLUDE $GCRYPT_INCLUDE" ;;
   esac
   case "$GNUTLS_LIBS" in
       *\ -lgcrypt* ) ;;
       *            ) GNUTLS_LIBS="$GNUTLS_LIBS $GCRYPT_LIBS" ;;
   esac
fi

if test "$with_openssl" != "no"; then
    case "$with_openssl" in
       yes | "" ) ;;
       *        ) OPENSSL_PATH=$with_openssl ;;
    esac
    if test "$OPENSSL_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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


case "$with_krb5" in
   no )       ac_cv_path_KRB5_CONFIG=no    ;;
   yes | '' ) : ${KRB5_PATH=/usr/kerberos} ;;
   * )        KRB5_PATH=$with_krb5         ;;
esac
# Extract the first word of "krb5-config", so it can be a program name with args.
set dummy krb5-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_KRB5_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $KRB5_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${KRB5_BIN-$KRB5_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_KRB5_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
IFS=$as_save_IFS

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



if test "x$with_krb5" != xno; then
   if test -x "$KRB5_CONFIG"; then
      KRB5_PATH=`$KRB5_CONFIG --prefix`
      KRB5_INCLUDE=`$KRB5_CONFIG --cflags | \
         sed -e 's/$/ /; s,-I/usr/include ,,'`
      KRB5_CONFIG_LIBS=`$KRB5_CONFIG --libs gssapi | \
         sed -e 's/^/ /; s/ -[^Ll][^ ]*//g'`
   fi
else
      KRB5_CONFIG_LIBS=$KRB5_LIBS
fi
if test "$with_krb5" != "no"; then
    case "$with_krb5" in
       yes | "" ) ;;
       *        ) KRB5_PATH=$with_krb5 ;;
    esac
    if test "$KRB5_PATH" != /usr -a -d "$KRB5_PATH"; then
       in_path=" in $KRB5_PATH"
       if test -z "$KRB5_INCLUDE" -a -d "$KRB5_PATH/include"; then
          KRB5_INCLUDE="-I$KRB5_PATH/include"
       fi
       if test -n "$KRB5_LIBPATH"; then
          :
       elif test -d "$KRB5_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 $KRB5_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
    KRB5_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $KRB5_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
    KRB5_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$KRB5_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 $KRB5_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    KRB5_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $KRB5_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
    KRB5_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       KRB5_LIBS="$KRB5_LIBPATH -lgssapi_krb5 $KRB5_CONFIG_LIBS"
    else
       KRB5_INCLUDE=""
       KRB5_LIBS="-lgssapi_krb5 $KRB5_CONFIG_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libgssapi_krb5$in_path" >&5
echo $ECHO_N "checking for libgssapi_krb5$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_krb5+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $KRB5_INCLUDE $orig_CPPFLAGS"
       LIBS="$KRB5_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 <time.h>
#ifdef HAVE_INTTYPES_H
#  include <inttypes.h>
#endif
extern "C" {
#include <gssapi/gssapi_krb5.h>
}
int
main ()
{
OM_uint32 min_stat;
     gss_buffer_desc buf;
     gss_release_buffer(&min_stat, &buf);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_krb5=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_krb5=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_krb5" >&5
echo "${ECHO_T}$ncbi_cv_lib_krb5" >&6; }
    if test "$ncbi_cv_lib_krb5" = "no"; then
       if test "${with_krb5:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-krb5 explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-krb5 explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_krb5" = "no"; then
    KRB5_PATH="No_KRB5"
    KRB5_INCLUDE=
    KRB5_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}KRB5"; WithPackagesSep=" "
    KRB5_INCLUDE=" $KRB5_INCLUDE"

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

 fi



if test "x$with_krb5" != xno; then
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    KRB5_LIBS=`echo $KRB5_CONFIG_LIBS | sed -e "$no_usr_lib"`
 else
    KRB5_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `echo $KRB5_CONFIG_LIBS | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L*)
             KRB5_LIBS="$KRB5_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=:
             ;;
          *)
             KRB5_LIBS="$KRB5_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
    KRB5_LIBS="$KRB5_LIBS${ncbi_rp_R_flags}"
 fi
fi


if test "$with_curl" != "no"; then
    case "$with_curl" in
       yes | "" ) ;;
       *        ) CURL_PATH=$with_curl ;;
    esac
    if test "$CURL_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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





## 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${SYBASE_PATH:+ in $SYBASE_PATH}" >&5
echo $ECHO_N "checking for Sybase${SYBASE_PATH:+ 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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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) $(KRB5_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${FTDS_PATH:+ in $FTDS_PATH}" >&5
echo $ECHO_N "checking for FreeTDS${FTDS_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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; $no_usr_lib"`
 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; $no_usr_lib"`; 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=$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${BERKELEYDB_PATH:+ in $BERKELEYDB_PATH}" >&5
echo $ECHO_N "checking for Berkeley DB libraries${BERKELEYDB_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$wschars" > 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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${ODBC_PATH:+ in $ODBC_PATH}" >&5
echo $ECHO_N "checking for ODBC libraries${ODBC_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_Header; eval "test \"\${$as_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.  */
#include <sql.h>

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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>

typedef SQLLEN ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

## Perl
if test "$with_perl" != "no" ; then
   case "$with_perl" in
      yes | "" ) ;;
      */*      ) PERL_PATH=$with_perl ;;
   esac
   # Extract the first word of "perl", so it can be a program name with args.
set dummy perl; 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_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PERL_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PERL="$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
IFS=$as_save_IFS

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


   if test -x "$PERL"; then
      PERL_ARCHLIB=`$PERL -MConfig -e 'print \$Config{archlibexp};'`
      PERL_FLAGS=`$PERL -MConfig -e 'print join " ", grep /^-[DI]/, split /\\s+/, \$Config{cppflags};'`
      PERL_INCLUDE="-I$PERL_ARCHLIB/CORE $PERL_FLAGS"
      PERL_DEPS=`$PERL -MConfig -e 'print \$Config{libs};'`
      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 $PERL_ARCHLIB/CORE; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PERL_LIBS="${ncbi_rp_L_flags} -lperl $PERL_DEPS"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PERL_ARCHLIB/CORE; 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
    PERL_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lperl $PERL_DEPS"
 fi
      CPPFLAGS="$PERL_INCLUDE $orig_CPPFLAGS"
      LIBS="$PERL_LIBS $orig_LIBS"
      { echo "$as_me:$LINENO: checking for usable Perl libraries" >&5
echo $ECHO_N "checking for usable Perl libraries... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_perl+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 <EXTERN.h>
#include <perl.h>
int
main ()
{
PerlInterpreter* p = perl_alloc();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_perl=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_perl=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_perl" >&5
echo "${ECHO_T}$ncbi_cv_lib_perl" >&6; }
   fi
   if test "$ncbi_cv_lib_perl" = yes; then
                WithPackages="$WithPackages${WithPackagesSep}PERL"; WithPackagesSep=" "
         else
      if test "${with_perl:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-perl explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-perl explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
      PERL_INCLUDE=
      PERL_LIBS=
   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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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=$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/-ncbi[0-9]*$//; 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_system || test "${ncbi_cv_lib_boost_system+set}" != set || { ncbi_cv_lib_boost_system=; export ncbi_cv_lib_boost_system; }
         $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 "$wschars" > 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 "$compiler:$ncbi_compiler_ver" 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"
         ;;
      GCC*:4[7-9]* | GCC*:5*)
         # Some portions of Boost also have a lot of "unused" typedefs
         # from concept checking.
         BOOST_INCLUDE="$BOOST_INCLUDE -Wno-unused-local-typedefs"
         ;;
   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* | 1_5[0-3] | 1_5[0-3]_* ) ;;
      '' ) with_boost=no ;;
      * )
         { 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="-xgcc" ;;
            *: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
         case "$llvm_version:$ac_cv_have_decl__LIBCPP_VERSION" in
            *clang*:yes )
                case "$host_os" in
                   darwin*) BOOST_TAG="-clang-darwin" ;;
                   *)       BOOST_TAG="-clang" ;;
                esac
                boost_comp_vers=`echo $signature_compiler_version | cut -c1-2`
            ;;
         esac
         test "$with_mt"    = "yes"  &&  BOOST_MT=-mt
         test "$with_debug" = "no"   ||  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

   in_path=${BOOST_PATH:+ in $BOOST_PATH}

   { echo "$as_me:$LINENO: checking for Boost.Regex$in_path" >&5
echo $ECHO_N "checking for Boost.Regex$in_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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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_path" >&5
echo $ECHO_N "checking for Boost.Spirit$in_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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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_SYSTEM_LIBS=-lboost_system${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_system${BOOST_TAG}-static.a"; then
       BOOST_SYSTEM_STATIC_LIBS=-lboost_system${BOOST_TAG}-static
   else
       BOOST_SYSTEM_STATIC_LIBS=$BOOST_SYSTEM_LIBS
   fi

   { echo "$as_me:$LINENO: checking for Boost.System$in_path" >&5
echo $ECHO_N "checking for Boost.System$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_boost_system+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_SYSTEM_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/system/error_code.hpp>
int
main ()
{
const char * s = boost::system::system_category().name();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_system=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_boost_system=no
           BOOST_SYSTEM_LIBS=
           BOOST_SYSTEM_STATIC_LIBS=
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_system" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_system" >&6; }

   boost_fs_lib=-lboost_filesystem${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_filesystem${BOOST_TAG}-static.a"; then
       boost_fs_static_lib=-lboost_filesystem${BOOST_TAG}-static
   else
       boost_fs_static_lib=$boost_fs_lib
   fi
   BOOST_FILESYSTEM_LIBS="$boost_fs_lib $BOOST_SYSTEM_LIBS"
   BOOST_FILESYSTEM_STATIC_LIBS="$boost_fs_static_lib $BOOST_SYSTEM_STATIC_LIBS"

   { echo "$as_me:$LINENO: checking for Boost.Filesystem$in_path" >&5
echo $ECHO_N "checking for Boost.Filesystem$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_boost_filesystem+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_FILESYSTEM_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/filesystem.hpp>
int
main ()
{
return boost::filesystem::portable_name("foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_filesystem=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_boost_filesystem=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_filesystem" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_filesystem" >&6; }

   BOOST_IOSTREAMS_LIBS=-lboost_iostreams${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_iostreams${BOOST_TAG}-static.a"; then
       BOOST_IOSTREAMS_STATIC_LIBS=-lboost_iostreams${BOOST_TAG}-static
   else
       BOOST_IOSTREAMS_STATIC_LIBS=$BOOST_IOSTREAMS_LIBS
   fi

   { echo "$as_me:$LINENO: checking for Boost.Iostreams$in_path" >&5
echo $ECHO_N "checking for Boost.Iostreams$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_boost_iostreams+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_IOSTREAMS_LIBS $Z_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 <boost/iostreams/device/file_descriptor.hpp>
int
main ()
{
boost::iostreams::file_descriptor fd;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_iostreams=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_boost_iostreams=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_iostreams" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_iostreams" >&6; }

   BOOST_PROGRAM_OPTIONS_LIBS=-lboost_program_options${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_program_options${BOOST_TAG}-static.a"; then
       BOOST_PROGRAM_OPTIONS_STATIC_LIBS=-lboost_program_options${BOOST_TAG}-static
   else
       BOOST_PROGRAM_OPTIONS_STATIC_LIBS=$BOOST_PROGRAM_OPTIONS_LIBS
   fi

   { echo "$as_me:$LINENO: checking for Boost.Program-Options$in_path" >&5
echo $ECHO_N "checking for Boost.Program-Options$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_boost_program_options+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_PROGRAM_OPTIONS_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/program_options.hpp>
int
main ()
{
boost::program_options::option_description od;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_boost_program_options=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_boost_program_options=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_boost_program_options" >&5
echo "${ECHO_T}$ncbi_cv_lib_boost_program_options" >&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_path" >&5
echo $ECHO_N "checking for Boost.Test$in_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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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} $BOOST_SYSTEM_LIBS"
   if test -f "$BOOST_LIBPATH_/libboost_thread${BOOST_TAG}-static.a"; then
       BOOST_THREAD_STATIC_LIBS="-lboost_thread${BOOST_TAG}-static $BOOST_SYSTEM_STATIC_LIBS"
   else
       BOOST_THREAD_STATIC_LIBS=$BOOST_THREAD_LIBS
   fi

   { echo "$as_me:$LINENO: checking for Boost.Threads$in_path" >&5
echo $ECHO_N "checking for Boost.Threads$in_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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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_filesystem=no
   ncbi_cv_lib_boost_iostreams=no
   ncbi_cv_lib_boost_program_options=no
   ncbi_cv_lib_boost_regex=no
   ncbi_cv_lib_boost_spirit=no
   ncbi_cv_lib_boost_system=no
   ncbi_cv_lib_boost_test=no
   ncbi_cv_lib_boost_thread=no
fi

if test "$ncbi_cv_lib_boost_filesystem" != "no"; then
                   WithPackages="$WithPackages${WithPackagesSep}Boost.Filesystem"; WithPackagesSep=" "
else
   boost_fs_lib=
   boost_fs_static_lib=
   BOOST_FILESYSTEM_LIBS=
   BOOST_FILESYSTEM_STATIC_LIBS=
fi

if test "$ncbi_cv_lib_boost_iostreams" != "no"; then
                   WithPackages="$WithPackages${WithPackagesSep}Boost.Iostreams"; WithPackagesSep=" "
else
   BOOST_IOSTREAMS_LIBS=
   BOOST_IOSTREAMS_STATIC_LIBS=
fi

if test "$ncbi_cv_lib_boost_program_options" != "no"; then
                   WithPackages="$WithPackages${WithPackagesSep}Boost.Program-Options"; WithPackagesSep=" "
else
   BOOST_PROGRAM_OPTIONS_LIBS=
   BOOST_PROGRAM_OPTIONS_STATIC_LIBS=
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_system" != "no"; then
                   WithPackages="$WithPackages${WithPackagesSep}Boost.System"; WithPackagesSep=" "
# BOOST_SYSTEM(_STATIC)_LIBS already conditionally cleared above
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
   if test "${with_ncbi_c-yes}" != yes; then
      NCBI_C_PATH=$with_ncbi_c
   fi
   : ${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${NCBI_C_PATH:+ in $NCBI_C_PATH}" >&5
echo $ECHO_N "checking for the NCBI C toolkit${NCBI_C_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 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
  case $x_includes,$x_libraries in #(
    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
echo "$as_me: error: Cannot use X directory names containing '" >&2;}
   { (exit 1); exit 1; }; };; #(
    *,NONE | NONE,*) 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 -f -r conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  cat >Imakefile <<'_ACEOF'
incroot:
	@echo incroot='${INCROOT}'
usrlibdir:
	@echo usrlibdir='${USRLIBDIR}'
libdir:
	@echo libdir='${LIBDIR}'
_ACEOF
  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    for ac_var in incroot usrlibdir libdir; do
      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
    done
    # 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) ac_x_includes= ;;
	*) 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 -f -r 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 Xlib.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/Xlib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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/Xlib.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/Xlib.h>
int
main ()
{
XrmInitialize ()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

case $ac_x_includes,$ac_x_libraries in #(
  no,* | *,no | *\'*)
    # Didn't find X, or a directory has "'" in its name.
    ac_cv_have_x="have_x=no";; #(
  *)
    # 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'"
esac
fi
;; #(
    *) have_x=yes;;
  esac
  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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char remove ();
int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shmat ();
int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char IceConnectionNumber ();
int
main ()
{
return IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XextCreateExtension ();
int
main ()
{
return XextCreateExtension ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XtMainLoop ();
int
main ()
{
return XtMainLoop ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XmuMakeAtom ();
int
main ()
{
return XmuMakeAtom ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
      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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char OSMesaCreateContext ();
int
main ()
{
return OSMesaCreateContext ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
   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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char glutInit ();
int
main ()
{
return glutInit ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
   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 $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
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char glewGetExtension ();
int
main ()
{
return glewGetExtension ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' "$GLEW_LIBS" $glew_libname GLEWmx GLEW; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_glewGetExtension=$ac_res
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
  if test "${ac_cv_search_glewGetExtension+set}" = set; then
  break
fi
done
if test "${ac_cv_search_glewGetExtension+set}" = set; then
  :
else
  ac_cv_search_glewGetExtension=no
fi
rm conftest.$ac_ext
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; }
ac_res=$ac_cv_search_glewGetExtension
if test "$ac_res" != no; then
  test "$ac_res" = "none required" || LIBS="$ac_res $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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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


## 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=$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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${WXWIDGETS_ARCH_PATH:+ in $WXWIDGETS_ARCH_PATH}" >&5
echo $ECHO_N "checking for wxWidgets${WXWIDGETS_ARCH_PATH:+ 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; s/ -lm / /g;"`
 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; s/ -lm / /g;"`; 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
      1.* | 2.[0-7].*)
         wxlibs=std
         ;;
      * )
                   WithPackages="$WithPackages${WithPackagesSep}wx2.8"; WithPackagesSep=" "
         wxlibs=std,richtext,aui,propgrid
         ;;
   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; s/ -lm / /g;"`
 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; s/ -lm / /g;"`; 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; s/ -lm / /g;"`
   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=$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${FASTCGI_PATH:+ in $FASTCGI_PATH}" >&5
echo $ECHO_N "checking for FastCGI libraries${FASTCGI_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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
   if test "${with_sss-yes}" = yes; then
      NCBI_SSS_PATH=${NCBI_SSS_PATH:="$NCBI/sss/BUILD"}
   else
      NCBI_SSS_PATH=$with_sss
   fi
   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${NCBI_SSS_PATH:+ in $NCBI_SSS_PATH}" >&5
echo $ECHO_N "checking for NCBI SSS directories${NCBI_SSS_PATH:+ 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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
   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${SP_PATH:+ in $SP_PATH}" >&5
echo $ECHO_N "checking for SP directories${SP_PATH:+ 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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" != no; then
   if test "$with_orbacus" != yes; 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
   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${ORBACUS_PATH:+ in $ORBACUS_PATH}" >&5
echo $ECHO_N "checking for ORBacus${ORBACUS_PATH:+ 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 $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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=$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${ICU_ARCH_PATH:+ in $ICU_ARCH_PATH}" >&5
echo $ECHO_N "checking for ICU${ICU_ARCH_PATH:+ 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-searchpath | 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-searchpath | 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
          ICU_LIBS="$ICU_LIBS `$ICU_CONFIG --ldflags-libsonly`"

          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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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-searchpath | 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-searchpath | 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
      ICU_LIBS="$ICU_LIBS `$ICU_CONFIG --ldflags-libsonly`"
   fi
   ICU_STATIC_LIBS=`$ICU_CONFIG --ldflags-libsonly | sed -e 's/-licu/-lsicu/g'`
   ICU_STATIC_LIBS="`$ICU_CONFIG --ldflags-searchpath` $ICU_STATIC_LIBS"

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

fi


### XML/XSL libraries
if test "$with_expat" != "no"; then
    case "$with_expat" in
       yes | "" ) ;;
       *        ) EXPAT_PATH=$with_expat ;;
    esac
    if test "$EXPAT_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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
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 "$SABLOT_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

# 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";
      else
         case "$host_os" in
            darwin* )
               LIBXML_INCLUDE="-iwithsysroot $LIBXML_PATH/include/libxml2"
               ;;
         esac
      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
      case "$host_os" in
         darwin* ) LIBXML_INCLUDE="-iwithsysroot /usr/include/libxml2" ;;
         *       ) LIBXML_INCLUDE="-I/usr/include/libxml2" ;;
      esac
      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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$LIBXSLT_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  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



: ${LIBEXSLT_PATH=$LIBXSLT_PATH}
if env PKG_CONFIG_PATH=$LIBEXSLT_PATH/lib/pkgconfig pkg-config libexslt --libs \
    2>/dev/null | $EGREP_Q gcrypt; then
   exslt_autodep=$GCRYPT_LIBS
else
   exslt_autodep=
fi
if test "$with_libexslt" != "no"; then
    case "$with_libexslt" in
       yes | "" ) ;;
       *        ) LIBEXSLT_PATH=$with_libexslt ;;
    esac
    if test "$LIBEXSLT_PATH" != /usr -a -d "$LIBEXSLT_PATH"; then
       in_path=" in $LIBEXSLT_PATH"
       if test -z "$LIBEXSLT_INCLUDE" -a -d "$LIBEXSLT_PATH/include"; then
          LIBEXSLT_INCLUDE="-I$LIBEXSLT_PATH/include"
       fi
       if test -n "$LIBEXSLT_LIBPATH"; then
          :
       elif test -d "$LIBEXSLT_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 $LIBEXSLT_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
    LIBEXSLT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBEXSLT_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
    LIBEXSLT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBEXSLT_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 $LIBEXSLT_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBEXSLT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBEXSLT_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
    LIBEXSLT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBEXSLT_LIBS="$LIBEXSLT_LIBPATH -lexslt $exslt_autodep"
    else
       LIBEXSLT_INCLUDE=""
       LIBEXSLT_LIBS="-lexslt $exslt_autodep"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libexslt$in_path" >&5
echo $ECHO_N "checking for libexslt$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_libexslt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$LIBXSLT_INCLUDE $LIBEXSLT_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBEXSLT_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 <libexslt/exslt.h>
int
main ()
{
exsltRegisterAll()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_libexslt=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_libexslt=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_libexslt" >&5
echo "${ECHO_T}$ncbi_cv_lib_libexslt" >&6; }
    if test "$ncbi_cv_lib_libexslt" = "no"; then
       if test "${with_libexslt:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-libexslt explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-libexslt explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_libexslt" = "no"; then
    LIBEXSLT_PATH="No_LIBEXSLT"
    LIBEXSLT_INCLUDE=
    LIBEXSLT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBEXSLT"; WithPackagesSep=" "
    LIBEXSLT_INCLUDE="$LIBXSLT_INCLUDE $LIBEXSLT_INCLUDE"

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

 fi




# XXX - they might be in different directories in some setups
if test -f "${LIBXML_LIBPATH_}/libexslt-static.a"; then
   LIBEXSLT_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lexslt-static $GCRYPT_LIBS"
else
   LIBEXSLT_STATIC_LIBS=${LIBEXSLT_LIBS}
fi

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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 $CURL_LIBS"
      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

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/XalanTransformer/XalanTransformer.hpp>
int
main ()
{
xalanc::XalanTransformer::initialize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

if test "$with_zorba" != no; then
   if test "${with_zorba-yes}" != yes; then
      ZORBA_PATH=$with_zorba
   fi
   if test -d "$ZORBA_PATH"; then
      ncbi_fix_dir_tmp=`if cd $ZORBA_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 $ZORBA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZORBA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ZORBA_PATH" in
               /*) ;;
               * ) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   vpath="$ZORBA_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   if test -d "$vpath/lib"; then
      ZORBA_PATH=$vpath
      ncbi_fix_dir_tmp=`if cd $ZORBA_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 $ZORBA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZORBA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ZORBA_PATH" in
               /*) ;;
               * ) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
 esac
   elif test -d "$vpath"; then
      : ${ZORBA_LIBPATH=$vpath}
      ncbi_fix_dir_tmp=`if cd $ZORBA_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 $ZORBA_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZORBA_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$ZORBA_LIBPATH" in
               /*) ;;
               * ) ZORBA_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZORBA_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
   else
      vpath="$ZORBA_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
      if test -d "$vpath/lib"; then
         ZORBA_PATH=$vpath
         ncbi_fix_dir_tmp=`if cd $ZORBA_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 $ZORBA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZORBA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ZORBA_PATH" in
               /*) ;;
               * ) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZORBA_PATH=$ncbi_fix_dir_tmp ;;
 esac
      elif test -d "$vpath"; then
         ZORBA_LIBPATH=$vpath
         ncbi_fix_dir_tmp=`if cd $ZORBA_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 $ZORBA_LIBPATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZORBA_LIBPATH=$ncbi_fix_dir_tmp2
         else
            case "$ZORBA_LIBPATH" in
               /*) ;;
               * ) ZORBA_LIBPATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZORBA_LIBPATH=$ncbi_fix_dir_tmp ;;
 esac
      fi
   fi
   ZORBA_CONFIG="$ZORBA_PATH/bin/zorba-config"
   if test -x "$ZORBA_CONFIG"; then
      ZORBA_PATH=`$ZORBA_CONFIG --prefix`
      : ${ZORBA_INCLUDE=`$ZORBA_CONFIG --cppflags`}
   fi
   if test -d "$ZORBA_PATH"; then
      in_path=" in $ZORBA_PATH"
      : ${ZORBA_INCLUDE=-I$ZORBA_PATH/include}
      : ${ZORBA_LIBPATH=$ZORBA_PATH/lib}
   else
      in_path=''
   fi
   if test -x "$ZORBA_CONFIG"; then
      ZORBA_LIBS=`$ZORBA_CONFIG --libs`
   else
      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 $ZORBA_LIBPATH; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ZORBA_LIBPATH_="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ZORBA_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
    ZORBA_LIBPATH_="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
      ZORBA_LIBS="$ZORBA_LIBPATH_ -lzorba_simplestore"
   fi
   { echo "$as_me:$LINENO: checking for Zorba$in_path" >&5
echo $ECHO_N "checking for Zorba$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_zorba+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$ZORBA_INCLUDE $orig_CPPFLAGS"
       LIBS="$ZORBA_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 <zorba/zorba.h>
int
main ()
{
zorba::Version v = zorba::Zorba::version();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_zorba=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_zorba=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_zorba" >&5
echo "${ECHO_T}$ncbi_cv_lib_zorba" >&6; }
   if test $ncbi_cv_lib_zorba = yes; then
      if test -x "$ZORBA_CONFIG"; then
         ZORBA_STATIC_LIBS=`$ZORBA_CONFIG --static-libs`
      elif test -f "$ZORBA_LIBPATH/libzorba_simplestore-static.a"; then
         ZORBA_STATIC_LIBS="-L$ZORBA_LIBPATH -lzorba_simplestore-static $XERCES_STATIC_LIBS $ICU_STATIC_LIBS $LIBXSLT_STATIC_LIBS $LIBXML_STATIC_LIBS"
      else
         ZORBA_STATIC_LIBS=$ZORBA_LIBS
      fi
   else
      if test "${with_zorba:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-zorba explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-zorba explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
   fi
fi
if test "$with_zorba" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Zorba"; WithPackagesSep=" "

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

else
   ZORBA_INCLUDE=
   ZORBA_LIBS=
   ZORBA_STATIC_LIBS=
fi

### SQLite
case "$with_sqlite3" in
   yes | '' ) ;;
   *        ) 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 "$SQLITE3_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&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....
if test "$with_oechem" != "no"; then
    case "$with_oechem" in
       yes | "" ) ;;
       *        ) OECHEM_PATH=$with_oechem ;;
    esac
    if test "$OECHEM_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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/Univa 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_PLATFORMS='darwin-x86'          ;;
      i?86-*-linux*       ) SGE_PLATFORMS='lx24-x86 lx-x86'     ;;
      i?86-*-solaris*:32  ) SGE_PLATFORMS='sol-x86'             ;;
      i?86-*-solaris*:64  ) SGE_PLATFORMS='sol-amd64'           ;;
      powerpc-*-darwin*   ) SGE_PLATFORMS='darwin-ppc'          ;;
      sparc-*-solaris*:32 ) SGE_PLATFORMS='sol-sparc'           ;;
      sparc-*-solaris*:64 ) SGE_PLATFORMS='sol-sparc64'         ;;
      x86_64-*-linux*     ) SGE_PLATFORMS='lx24-amd64 lx-amd64' ;;
   esac
   for x in $SGE_PLATFORMS; do
      if test -d "$SGE_PATH/lib/$x"; then
         SGE_LIBPATH="$SGE_PATH/lib/$x"
         break
      fi
   done
   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 "$SGE_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=$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 "$MUPARSER_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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=$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 "$HDF5_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$JPEG_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$PNG_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$TIFF_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$UNGIF_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 "$GIF_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

case "$x_libraries" in */*) : ${XPM_PATH=`dirname "$x_libraries"`} ;; esac
if test "$with_xpm" != "no"; then
    case "$with_xpm" in
       yes | "" ) ;;
       *        ) XPM_PATH=$with_xpm ;;
    esac
    if test "$XPM_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 and FTGL
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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $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
IFS=$as_save_IFS

  ;;
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
      case "$host_os:$bit64_sfx" in
         solaris*:64 )
            ftprefix=`$freetype_config --exec-prefix`
            if test -d "$ftprefix/lib/64"; then
               FREETYPE_LIBS=`echo $FREETYPE_LIBS \
                   | sed -e "s,$ftprefix/lib ,$ftprefix/lib/64 ,g"`
            fi
            ;;
      esac
      { 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 { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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

case "$with_ftgl" in
   yes | '' ) ;;
   *        ) FTGL_PATH=$with_ftgl ;;
esac

if test -d "$FTGL_PATH"; then
   ncbi_fix_dir_tmp=`if cd $FTGL_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 $FTGL_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            FTGL_PATH=$ncbi_fix_dir_tmp2
         else
            case "$FTGL_PATH" in
               /*) ;;
               * ) FTGL_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) FTGL_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d "$FTGL_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib"; then
   FTGL_LIBDIR=$FTGL_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib
elif test -d "$FTGL_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib"; then
   FTGL_LIBDIR=$FTGL_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib
fi
ncbi_fix_dir_tmp=`if cd $FTGL_LIBDIR; 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 $FTGL_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            FTGL_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$FTGL_LIBDIR" in
               /*) ;;
               * ) FTGL_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) FTGL_LIBDIR=$ncbi_fix_dir_tmp ;;
 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 $FTGL_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FTGL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FTGL_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
    FTGL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi

if test "$with_ftgl" != "no"; then
    case "$with_ftgl" in
       yes | "" ) ;;
       *        ) FTGL_PATH=$with_ftgl ;;
    esac
    if test "$FTGL_PATH" != /usr -a -d "$FTGL_PATH"; then
       in_path=" in $FTGL_PATH"
       if test -z "$FTGL_INCLUDE" -a -d "$FTGL_PATH/include"; then
          FTGL_INCLUDE="-I$FTGL_PATH/include"
       fi
       if test -n "$FTGL_LIBPATH"; then
          :
       elif test -d "$FTGL_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 $FTGL_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
    FTGL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FTGL_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
    FTGL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$FTGL_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 $FTGL_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FTGL_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FTGL_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
    FTGL_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       FTGL_LIBS="$FTGL_LIBPATH -lftgl $FREETYPE_LIBS"
    else
       FTGL_INCLUDE=""
       FTGL_LIBS="-lftgl $FREETYPE_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libftgl$in_path" >&5
echo $ECHO_N "checking for libftgl$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_ftgl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $FTGL_INCLUDE $orig_CPPFLAGS"
       LIBS="$FTGL_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 <FTGL/ftgl.h>
int
main ()
{
FTSimpleLayout layout;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_ftgl=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_ftgl=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_ftgl" >&5
echo "${ECHO_T}$ncbi_cv_lib_ftgl" >&6; }
    if test "$ncbi_cv_lib_ftgl" = "no"; then
       if test "${with_ftgl:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-ftgl explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-ftgl explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_ftgl" = "no"; then
    FTGL_PATH="No_FTGL"
    FTGL_INCLUDE=
    FTGL_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}FTGL"; WithPackagesSep=" "
    FTGL_INCLUDE="$FREETYPE_INCLUDE $FTGL_INCLUDE"

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

 fi





if test "$with_magic" != "no"; then
    case "$with_magic" in
       yes | "" ) ;;
       *        ) MAGIC_PATH=$with_magic ;;
    esac
    if test "$MAGIC_PATH" != /usr -a -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 { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core 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





# Mimetic
case "$with_mimetic" in
   yes | '' ) ;;
   *        ) MIMETIC_PATH=$with_mimetic ;;
esac
if test -d "$MIMETIC_PATH"; then
   ncbi_fix_dir_tmp=`if cd $MIMETIC_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 $MIMETIC_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            MIMETIC_PATH=$ncbi_fix_dir_tmp2
         else
            case "$MIMETIC_PATH" in
               /*) ;;
               * ) MIMETIC_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) MIMETIC_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
for d in "$MIMETIC_LIBDIR" \
         "$MIMETIC_PATH/${compiler_vpfx}${DEBUG_SFX}${bit64_sfx}/lib" \
         "$MIMETIC_PATH/${compiler_pfx}${DEBUG_SFX}${bit64_sfx}/lib" \
         "$MIMETIC_PATH/lib${bit64_sfx}" \
         "$MIMETIC_PATH/${compiler_vpfx}${DEBUG_SFX}/lib" \
         "$MIMETIC_PATH/${compiler_pfx}${DEBUG_SFX}/lib" \
         "$MIMETIC_PATH/lib"; do
   if test -d "$d"; then
      MIMETIC_LIBDIR=$d
      break
   fi
done
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 $MIMETIC_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MIMETIC_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
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi

if test "$with_mimetic" != "no"; then
    case "$with_mimetic" in
       yes | "" ) ;;
       *        ) MIMETIC_PATH=$with_mimetic ;;
    esac
    if test "$MIMETIC_PATH" != /usr -a -d "$MIMETIC_PATH"; then
       in_path=" in $MIMETIC_PATH"
       if test -z "$MIMETIC_INCLUDE" -a -d "$MIMETIC_PATH/include"; then
          MIMETIC_INCLUDE="-I$MIMETIC_PATH/include"
       fi
       if test -n "$MIMETIC_LIBPATH"; then
          :
       elif test -d "$MIMETIC_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 $MIMETIC_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
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MIMETIC_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
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MIMETIC_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 $MIMETIC_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MIMETIC_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
    MIMETIC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MIMETIC_LIBS="$MIMETIC_LIBPATH -lmimetic "
    else
       MIMETIC_INCLUDE=""
       MIMETIC_LIBS="-lmimetic "
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libmimetic$in_path" >&5
echo $ECHO_N "checking for libmimetic$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_mimetic+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $MIMETIC_INCLUDE $orig_CPPFLAGS"
       LIBS="$MIMETIC_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 <mimetic/mimetic.h>
int
main ()
{
mimetic::MimeEntity me;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_mimetic=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_mimetic=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_mimetic" >&5
echo "${ECHO_T}$ncbi_cv_lib_mimetic" >&6; }
    if test "$ncbi_cv_lib_mimetic" = "no"; then
       if test "${with_mimetic:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-mimetic explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-mimetic explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_mimetic" = "no"; then
    MIMETIC_PATH="No_MIMETIC"
    MIMETIC_INCLUDE=
    MIMETIC_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MIMETIC"; WithPackagesSep=" "
    MIMETIC_INCLUDE=" $MIMETIC_INCLUDE"

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

 fi





# gSOAP++
case "$with_gsoap" in
   yes | '' ) ;;
   *        ) GSOAP_PATH=$with_gsoap ;;
esac
if test -d "$GSOAP_PATH"; then
   ncbi_fix_dir_tmp=`if cd $GSOAP_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 $GSOAP_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GSOAP_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GSOAP_PATH" in
               /*) ;;
               * ) GSOAP_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GSOAP_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
for d in "$GSOAP_LIBDIR" \
         "$GSOAP_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
         "$GSOAP_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}/lib" \
         "$GSOAP_PATH/lib${bit64_sfx}" \
         "$GSOAP_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}/lib" \
         "$GSOAP_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}/lib" \
         "$GSOAP_PATH/lib"; do
   if test -d "$d"; then
      GSOAP_LIBDIR=$d
      ncbi_fix_dir_tmp=`if cd $GSOAP_LIBDIR; 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 $GSOAP_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GSOAP_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$GSOAP_LIBDIR" in
               /*) ;;
               * ) GSOAP_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GSOAP_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
      break
   fi
done
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 $GSOAP_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GSOAP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GSOAP_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
    GSOAP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi

: ${GSOAP_BINDIR=`dirname "$GSOAP_LIBDIR"`/bin}
# Extract the first word of "soapcpp2", so it can be a program name with args.
set dummy soapcpp2; 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_GSOAP_SOAPCPP2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $GSOAP_SOAPCPP2 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GSOAP_SOAPCPP2="$GSOAP_SOAPCPP2" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$GSOAP_BINDIR:$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_GSOAP_SOAPCPP2="$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
IFS=$as_save_IFS

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


# Extract the first word of "wsdl2h", so it can be a program name with args.
set dummy wsdl2h; 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_GSOAP_WSDL2H+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $GSOAP_WSDL2H in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GSOAP_WSDL2H="$GSOAP_WSDL2H" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$GSOAP_BINDIR:$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_GSOAP_WSDL2H="$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
IFS=$as_save_IFS

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



if test "$with_gsoap" != "no"; then
    case "$with_gsoap" in
       yes | "" ) ;;
       *        ) GSOAP_PATH=$with_gsoap ;;
    esac
    if test "$GSOAP_PATH" != /usr -a -d "$GSOAP_PATH"; then
       in_path=" in $GSOAP_PATH"
       if test -z "$GSOAP_INCLUDE" -a -d "$GSOAP_PATH/include"; then
          GSOAP_INCLUDE="-I$GSOAP_PATH/include"
       fi
       if test -n "$GSOAP_LIBPATH"; then
          :
       elif test -d "$GSOAP_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 $GSOAP_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
    GSOAP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GSOAP_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
    GSOAP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GSOAP_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 $GSOAP_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GSOAP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GSOAP_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
    GSOAP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GSOAP_LIBS="$GSOAP_LIBPATH -lgsoapssl++ $OPENSSL_LIBS $Z_LIBS"
    else
       GSOAP_INCLUDE=""
       GSOAP_LIBS="-lgsoapssl++ $OPENSSL_LIBS $Z_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libgsoapssl++$in_path" >&5
echo $ECHO_N "checking for libgsoapssl++$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_gsoap+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS=" $GSOAP_INCLUDE $orig_CPPFLAGS"
       LIBS="$GSOAP_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 <stdsoap2.h>
        SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultcode(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultsubcode(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultstring(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char** SOAP_FMAC4 soap_faultdetail(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultsubcode(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultdetail(struct soap*)
        { return NULL; }
        SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap*) { }
        SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap*) { return 0; }
        SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap*) { return 0; }
        SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap*) { }
        SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap*) { return 0; }
        SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap*) { return 0; }
int
main ()
{
soap s;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_gsoap=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_gsoap=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_gsoap" >&5
echo "${ECHO_T}$ncbi_cv_lib_gsoap" >&6; }
    if test "$ncbi_cv_lib_gsoap" = "no"; then
       if test "${with_gsoap:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-gsoap explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-gsoap explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_gsoap" = "no"; then
    GSOAP_PATH="No_GSOAP"
    GSOAP_INCLUDE=
    GSOAP_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GSOAP"; WithPackagesSep=" "
    GSOAP_INCLUDE=" $GSOAP_INCLUDE"

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

 fi





# Apache Avro
if test "$with_avro" != no; then
   case "$with_avro" in
      yes | '' ) ;;
      *        ) AVRO_PATH=$with_avro ;;
   esac
   for d in "$AVRO_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" \
            "$AVRO_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}${bit64_sfx}" \
            "$AVRO_PATH/${compiler_vpfx}${DEBUG_SFX}${mt_sfx}" \
            "$AVRO_PATH/${compiler_pfx}${DEBUG_SFX}${mt_sfx}"; do
      if test -d "$d"; then
         AVRO_PATH=$d
         break
      fi
   done
   if test -d "$AVRO_PATH"; then
      ncbi_fix_dir_tmp=`if cd $AVRO_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 $AVRO_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            AVRO_PATH=$ncbi_fix_dir_tmp2
         else
            case "$AVRO_PATH" in
               /*) ;;
               * ) AVRO_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) AVRO_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
fi
if test "$with_avro" != "no"; then
    case "$with_avro" in
       yes | "" ) ;;
       *        ) AVRO_PATH=$with_avro ;;
    esac
    if test "$AVRO_PATH" != /usr -a -d "$AVRO_PATH"; then
       in_path=" in $AVRO_PATH"
       if test -z "$AVRO_INCLUDE" -a -d "$AVRO_PATH/include"; then
          AVRO_INCLUDE="-I$AVRO_PATH/include"
       fi
       if test -n "$AVRO_LIBPATH"; then
          :
       elif test -d "$AVRO_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 $AVRO_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
    AVRO_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $AVRO_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
    AVRO_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$AVRO_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 $AVRO_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    AVRO_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $AVRO_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
    AVRO_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       AVRO_LIBS="$AVRO_LIBPATH -lavrocpp $BOOST_LIBPATH $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS $BOOST_PROGRAM_OPTIONS_LIBS $BOOST_IOSTREAMS_LIBS $RT_LIBS $Z_LIBS $BZ2_LIBS"
    else
       AVRO_INCLUDE=""
       AVRO_LIBS="-lavrocpp $BOOST_LIBPATH $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS $BOOST_PROGRAM_OPTIONS_LIBS $BOOST_IOSTREAMS_LIBS $RT_LIBS $Z_LIBS $BZ2_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libavrocpp$in_path" >&5
echo $ECHO_N "checking for libavrocpp$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_avro+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $AVRO_INCLUDE $orig_CPPFLAGS"
       LIBS="$AVRO_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 <avro/Node.hh>
int
main ()
{
avro::Name name("foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_avro=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_avro=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_avro" >&5
echo "${ECHO_T}$ncbi_cv_lib_avro" >&6; }
    if test "$ncbi_cv_lib_avro" = "no"; then
       if test "${with_avro:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-avro explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-avro explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_avro" = "no"; then
    AVRO_PATH="No_AVRO"
    AVRO_INCLUDE=
    AVRO_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}AVRO"; WithPackagesSep=" "
    AVRO_INCLUDE="$BOOST_INCLUDE $AVRO_INCLUDE"

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

 fi



if test -n "$AVRO_LIBS"; then
   if test -f "$AVRO_PATH/lib/libavrocpp_s.a"; then
      AVRO_STATIC_LIBS="$AVRO_LIBPATH -lavrocpp_s $BOOST_LIBPATH $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS $BOOST_PROGRAM_OPTIONS_LIBS $BOOST_IOSTREAMS_LIBS $RT_LIBS $Z_LIBS $BZ2_LIBS"
   else
      AVRO_STATIC_LIBS=$AVRO_LIBS
   fi
   # Extract the first word of "avrogencpp", so it can be a program name with args.
set dummy avrogencpp; 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_AVROGENCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $AVROGENCPP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AVROGENCPP="$AVROGENCPP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$AVRO_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_AVROGENCPP="$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
IFS=$as_save_IFS

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


fi

# MongoDB
case "$with_mongodb" in
   yes | no | '' ) ;;
   *             ) MONGODB_PATH=$with_mongodb ;;
esac
if test -d "$MONGODB_PATH"; then
   ncbi_fix_dir_tmp=`if cd $MONGODB_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 $MONGODB_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            MONGODB_PATH=$ncbi_fix_dir_tmp2
         else
            case "$MONGODB_PATH" in
               /*) ;;
               * ) MONGODB_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) MONGODB_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d $MONGODB_PATH/lib${bit64_sfx}; then
   MONGODB_LIBDIR=$MONGODB_PATH/lib${bit64_sfx}
else
   MONGODB_LIBDIR=$MONGODB_PATH/lib
fi
# need Boost rpath
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 $MONGODB_LIBDIR; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MONGODB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MONGODB_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
    MONGODB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_mongodb" != "no"; then
    case "$with_mongodb" in
       yes | "" ) ;;
       *        ) MONGODB_PATH=$with_mongodb ;;
    esac
    if test "$MONGODB_PATH" != /usr -a -d "$MONGODB_PATH"; then
       in_path=" in $MONGODB_PATH"
       if test -z "$MONGODB_INCLUDE" -a -d "$MONGODB_PATH/include"; then
          MONGODB_INCLUDE="-I$MONGODB_PATH/include"
       fi
       if test -n "$MONGODB_LIBPATH"; then
          :
       elif test -d "$MONGODB_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 $MONGODB_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
    MONGODB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MONGODB_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
    MONGODB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MONGODB_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 $MONGODB_PATH/lib; do
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MONGODB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MONGODB_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
    MONGODB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MONGODB_LIBS="$MONGODB_LIBPATH -lmongoclient $BOOST_LIBPATH $boost_fs_lib $BOOST_REGEX_LIBS $BOOST_THREAD_LIBS"
    else
       MONGODB_INCLUDE=""
       MONGODB_LIBS="-lmongoclient $BOOST_LIBPATH $boost_fs_lib $BOOST_REGEX_LIBS $BOOST_THREAD_LIBS"
       in_path=
    fi
    { echo "$as_me:$LINENO: checking for libmongoclient$in_path" >&5
echo $ECHO_N "checking for libmongoclient$in_path... $ECHO_C" >&6; }
if test "${ncbi_cv_lib_mongodb+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  CPPFLAGS="$BOOST_INCLUDE $MONGODB_INCLUDE $orig_CPPFLAGS"
       LIBS="$MONGODB_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 <mongo/client/dbclient.h>
int
main ()
{
std::vector<mongo::HostAndPort> v;
       mongo::DBClientReplicaSet client("foo", v);
       client.connect();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ncbi_cv_lib_mongodb=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ncbi_cv_lib_mongodb=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ncbi_cv_lib_mongodb" >&5
echo "${ECHO_T}$ncbi_cv_lib_mongodb" >&6; }
    if test "$ncbi_cv_lib_mongodb" = "no"; then
       if test "${with_mongodb:=no}" != no; then
       { { echo "$as_me:$LINENO: error: --with-mongodb explicitly specified, but no usable version found." >&5
echo "$as_me: error: --with-mongodb explicitly specified, but no usable version found." >&2;}
   { (exit 1); exit 1; }; }
    fi
    fi
 fi
 if test "$with_mongodb" = "no"; then
    MONGODB_PATH="No_MONGODB"
    MONGODB_INCLUDE=
    MONGODB_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MONGODB"; WithPackagesSep=" "
    MONGODB_INCLUDE="$BOOST_INCLUDE $MONGODB_INCLUDE"

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

 fi



# MongoDB's own library is normally static, but its supporting Boost
# libraries might not be by default.
if test -n "$MONGODB_LIBS"; then
   MONGODB_STATIC_LIBS="$MONGODB_LIBPATH -lmongodb $BOOST_LIBPATH $boost_fs_static_lib $BOOST_REGEXP_STATIC_LIBS $BOOST_THREAD_STATIC_LIBS"
else
   MONGODB_STATIC_LIBS=
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


## `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"; 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

if test "${with_limited_linker}" = "yes"; then
             WithFeatures="$WithFeatures${WithFeaturesSep}LimitedLinker"; WithFeaturesSep=" "
fi

FEATURES="$WithFeatures $WithPackages $WithProjects"

### Compute Without{Features,Packages,Projects}.  Takes quadratic time,
### but that's life.
for x in GCC KCC ICC VisualAge CompaqCompiler Cray WorkShop MIPSpro MSVC MT LFS DLL DLL_BUILD MaxDebug MSWin unix WinMain AIX BSD Cygwin CygwinMT Darwin XCODE IRIX Linux OSF Solaris MacOS in-house-resources PubSeqOS JDK Ncbi-JNI check Valgrind LimitedLinker; 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 GCRYPT GNUTLS OPENSSL KRB5 CURL Sybase DBLib FreeTDS MySQL BerkeleyDB BerkeleyDB++ ODBC PYTHON PYTHON23 PYTHON24 PYTHON25 PERL Boost.Filesystem Boost.Iostreams Boost.Program-Options Boost.Regex Boost.Spirit Boost.System Boost.Test Boost.Test.Included Boost.Threads C-Toolkit OpenGL MESA GLUT GLEW wxWidgets wx2.8 Fast-CGI LocalSSS LocalMSGMAIL2 SSSUTILS LocalNCBILS NCBILS2 SSSDB SP ORBacus ICU EXPAT SABLOT LIBXML LIBXSLT LIBEXSLT Xerces Xalan Zorba SQLITE3 SQLITE3ASYNC OECHEM SGE MUPARSER HDF5 JPEG PNG TIFF UNGIF GIF XPM FreeType FTGL MAGIC MIMETIC GSOAP AVRO MONGODB; 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     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 "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  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}'

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_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$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+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh


# PATH needs CR
# 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

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
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
IFS=$as_save_IFS

     ;;
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_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
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) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; 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'`

# CDPATH.
$as_unset CDPATH



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # 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 after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, 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
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\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 sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
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$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

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

# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
# systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
  as_executable_p="test -x"
else
  as_executable_p=:
fi
rm -f conf$$.file

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


exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ncbi-tools++ $as_me 0.0, which was
generated by GNU Autoconf 2.60.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"

_ACEOF

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.60,
  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
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
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    echo "$ac_cs_version"; exit ;;
  --debug | --debu | --deb | --de | --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;;
  --he | --h)
    # Conflict between --help and --header
    { 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 ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) { 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"
     ac_need_defaults=false ;;

  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 CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  CONFIG_SHELL=$SHELL
  export CONFIG_SHELL
  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS
#

PATH='/bin:/usr/bin:\$PATH'
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'
EGREP='$EGREP'


_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "${ncbiconf}") CONFIG_HEADERS="$CONFIG_HEADERS ${ncbiconf}:src/build-system/config.h.in" ;;
    "$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" ;;

  *) { { 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 against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp=
  trap 'exit_status=$?
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} ||
{
   echo "$me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

#
# Set up the sed scripts for 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

_ACEOF



ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
SHELL!$SHELL$ac_delim
PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
PACKAGE_NAME!$PACKAGE_NAME$ac_delim
PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
PACKAGE_STRING!$PACKAGE_STRING$ac_delim
PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
exec_prefix!$exec_prefix$ac_delim
prefix!$prefix$ac_delim
program_transform_name!$program_transform_name$ac_delim
bindir!$bindir$ac_delim
sbindir!$sbindir$ac_delim
libexecdir!$libexecdir$ac_delim
datarootdir!$datarootdir$ac_delim
datadir!$datadir$ac_delim
sysconfdir!$sysconfdir$ac_delim
sharedstatedir!$sharedstatedir$ac_delim
localstatedir!$localstatedir$ac_delim
includedir!$includedir$ac_delim
oldincludedir!$oldincludedir$ac_delim
docdir!$docdir$ac_delim
infodir!$infodir$ac_delim
htmldir!$htmldir$ac_delim
dvidir!$dvidir$ac_delim
pdfdir!$pdfdir$ac_delim
psdir!$psdir$ac_delim
libdir!$libdir$ac_delim
localedir!$localedir$ac_delim
mandir!$mandir$ac_delim
DEFS!$DEFS$ac_delim
ECHO_C!$ECHO_C$ac_delim
ECHO_N!$ECHO_N$ac_delim
ECHO_T!$ECHO_T$ac_delim
LIBS!$LIBS$ac_delim
build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim
PROJECTS!$PROJECTS$ac_delim
build!$build$ac_delim
build_cpu!$build_cpu$ac_delim
build_vendor!$build_vendor$ac_delim
build_os!$build_os$ac_delim
host!$host$ac_delim
host_cpu!$host_cpu$ac_delim
host_vendor!$host_vendor$ac_delim
host_os!$host_os$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
CC!$CC$ac_delim
CFLAGS!$CFLAGS$ac_delim
LDFLAGS!$LDFLAGS$ac_delim
CPPFLAGS!$CPPFLAGS$ac_delim
ac_ct_CC!$ac_ct_CC$ac_delim
EXEEXT!$EXEEXT$ac_delim
OBJEXT!$OBJEXT$ac_delim
CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
MT_SFX!$MT_SFX$ac_delim
DLL!$DLL$ac_delim
DLL_LIB_SETTING!$DLL_LIB_SETTING$ac_delim
IF_WITH_DLL!$IF_WITH_DLL$ac_delim
UNLESS_WITH_DLL!$UNLESS_WITH_DLL$ac_delim
STATIC!$STATIC$ac_delim
USUAL_AND_DLL!$USUAL_AND_DLL$ac_delim
USUAL_AND_LIB!$USUAL_AND_LIB$ac_delim
LN_S!$LN_S$ac_delim
RANLIB!$RANLIB$ac_delim
AR!$AR$ac_delim
STRIP!$STRIP$ac_delim
DISTCC!$DISTCC$ac_delim
CCACHE!$CCACHE$ac_delim
TAIL!$TAIL$ac_delim
SED!$SED$ac_delim
TOUCH!$TOUCH$ac_delim
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
VALGRIND_PATH!$VALGRIND_PATH$ac_delim
LDD!$LDD$ac_delim
CXXCPP!$CXXCPP$ac_delim
TCHECK_CL!$TCHECK_CL$ac_delim
AMQ!$AMQ$ac_delim
CPP!$CPP$ac_delim
Z_INCLUDE!$Z_INCLUDE$ac_delim
Z_LIBS!$Z_LIBS$ac_delim
BZ2_INCLUDE!$BZ2_INCLUDE$ac_delim
BZ2_LIBS!$BZ2_LIBS$ac_delim
LZO_INCLUDE!$LZO_INCLUDE$ac_delim
LZO_LIBS!$LZO_LIBS$ac_delim
PCRE_INCLUDE!$PCRE_INCLUDE$ac_delim
PCRE_LIBS!$PCRE_LIBS$ac_delim
LIBGCRYPT_CONFIG!$LIBGCRYPT_CONFIG$ac_delim
GCRYPT_INCLUDE!$GCRYPT_INCLUDE$ac_delim
GCRYPT_LIBS!$GCRYPT_LIBS$ac_delim
LIBGNUTLS_CONFIG!$LIBGNUTLS_CONFIG$ac_delim
GNUTLS_INCLUDE!$GNUTLS_INCLUDE$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
GNUTLS_LIBS!$GNUTLS_LIBS$ac_delim
OPENSSL_INCLUDE!$OPENSSL_INCLUDE$ac_delim
OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim
KRB5_CONFIG!$KRB5_CONFIG$ac_delim
KRB5_INCLUDE!$KRB5_INCLUDE$ac_delim
KRB5_LIBS!$KRB5_LIBS$ac_delim
CURL_INCLUDE!$CURL_INCLUDE$ac_delim
CURL_LIBS!$CURL_LIBS$ac_delim
FTDS64_INCLUDE!$FTDS64_INCLUDE$ac_delim
FTDS64_LIBS!$FTDS64_LIBS$ac_delim
FTDS64_LIB!$FTDS64_LIB$ac_delim
FTDS64_CTLIB_INCLUDE!$FTDS64_CTLIB_INCLUDE$ac_delim
FTDS64_CTLIB_LIBS!$FTDS64_CTLIB_LIBS$ac_delim
FTDS64_CTLIB_LIB!$FTDS64_CTLIB_LIB$ac_delim
FTDS_INCLUDE!$FTDS_INCLUDE$ac_delim
FTDS_LIBS!$FTDS_LIBS$ac_delim
FTDS_LIB!$FTDS_LIB$ac_delim
freetds!$freetds$ac_delim
ftds64!$ftds64$ac_delim
mysql_config!$mysql_config$ac_delim
PYTHON!$PYTHON$ac_delim
PYTHON_INCLUDE!$PYTHON_INCLUDE$ac_delim
PYTHON_LIBS!$PYTHON_LIBS$ac_delim
PYTHON23!$PYTHON23$ac_delim
PYTHON23_INCLUDE!$PYTHON23_INCLUDE$ac_delim
PYTHON23_LIBS!$PYTHON23_LIBS$ac_delim
PYTHON24!$PYTHON24$ac_delim
PYTHON24_INCLUDE!$PYTHON24_INCLUDE$ac_delim
PYTHON24_LIBS!$PYTHON24_LIBS$ac_delim
PYTHON25!$PYTHON25$ac_delim
PYTHON25_INCLUDE!$PYTHON25_INCLUDE$ac_delim
PYTHON25_LIBS!$PYTHON25_LIBS$ac_delim
PERL!$PERL$ac_delim
_ACJNI_JAVAC!$_ACJNI_JAVAC$ac_delim
XMKMF!$XMKMF$ac_delim
X_CFLAGS!$X_CFLAGS$ac_delim
X_PRE_LIBS!$X_PRE_LIBS$ac_delim
X_LIBS!$X_LIBS$ac_delim
X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
wxconf!$wxconf$ac_delim
EXPAT_INCLUDE!$EXPAT_INCLUDE$ac_delim
EXPAT_LIBS!$EXPAT_LIBS$ac_delim
SABLOT_INCLUDE!$SABLOT_INCLUDE$ac_delim
SABLOT_LIBS!$SABLOT_LIBS$ac_delim
LIBXML_INCLUDE!$LIBXML_INCLUDE$ac_delim
LIBXML_LIBS!$LIBXML_LIBS$ac_delim
LIBXSLT_INCLUDE!$LIBXSLT_INCLUDE$ac_delim
LIBXSLT_LIBS!$LIBXSLT_LIBS$ac_delim
XSLTPROC!$XSLTPROC$ac_delim
LIBEXSLT_INCLUDE!$LIBEXSLT_INCLUDE$ac_delim
LIBEXSLT_LIBS!$LIBEXSLT_LIBS$ac_delim
SQLITE3_INCLUDE!$SQLITE3_INCLUDE$ac_delim
SQLITE3_LIBS!$SQLITE3_LIBS$ac_delim
OECHEM_INCLUDE!$OECHEM_INCLUDE$ac_delim
OECHEM_LIBS!$OECHEM_LIBS$ac_delim
SGE_INCLUDE!$SGE_INCLUDE$ac_delim
SGE_LIBS!$SGE_LIBS$ac_delim
MUPARSER_INCLUDE!$MUPARSER_INCLUDE$ac_delim
MUPARSER_LIBS!$MUPARSER_LIBS$ac_delim
HDF5_INCLUDE!$HDF5_INCLUDE$ac_delim
HDF5_LIBS!$HDF5_LIBS$ac_delim
JPEG_INCLUDE!$JPEG_INCLUDE$ac_delim
JPEG_LIBS!$JPEG_LIBS$ac_delim
PNG_INCLUDE!$PNG_INCLUDE$ac_delim
PNG_LIBS!$PNG_LIBS$ac_delim
TIFF_INCLUDE!$TIFF_INCLUDE$ac_delim
TIFF_LIBS!$TIFF_LIBS$ac_delim
UNGIF_INCLUDE!$UNGIF_INCLUDE$ac_delim
UNGIF_LIBS!$UNGIF_LIBS$ac_delim
GIF_INCLUDE!$GIF_INCLUDE$ac_delim
GIF_LIBS!$GIF_LIBS$ac_delim
XPM_INCLUDE!$XPM_INCLUDE$ac_delim
XPM_LIBS!$XPM_LIBS$ac_delim
freetype_config!$freetype_config$ac_delim
FTGL_INCLUDE!$FTGL_INCLUDE$ac_delim
FTGL_LIBS!$FTGL_LIBS$ac_delim
MAGIC_INCLUDE!$MAGIC_INCLUDE$ac_delim
MAGIC_LIBS!$MAGIC_LIBS$ac_delim
MIMETIC_INCLUDE!$MIMETIC_INCLUDE$ac_delim
MIMETIC_LIBS!$MIMETIC_LIBS$ac_delim
GSOAP_SOAPCPP2!$GSOAP_SOAPCPP2$ac_delim
GSOAP_WSDL2H!$GSOAP_WSDL2H$ac_delim
GSOAP_INCLUDE!$GSOAP_INCLUDE$ac_delim
GSOAP_LIBS!$GSOAP_LIBS$ac_delim
AVRO_INCLUDE!$AVRO_INCLUDE$ac_delim
AVRO_LIBS!$AVRO_LIBS$ac_delim
AVROGENCPP!$AVROGENCPP$ac_delim
MONGODB_INCLUDE!$MONGODB_INCLUDE$ac_delim
MONGODB_LIBS!$MONGODB_LIBS$ac_delim
signature!$signature$ac_delim
build_root!$build_root$ac_delim
top_srcdir!$top_srcdir$ac_delim
srcdir!$srcdir$ac_delim
status_dir!$status_dir$ac_delim
builddir!$builddir$ac_delim
runpath!$runpath$ac_delim
ncbi_runpath!$ncbi_runpath$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
c_ncbi_runpath!$c_ncbi_runpath$ac_delim
LINK!$LINK$ac_delim
C_LINK!$C_LINK$ac_delim
TAIL_N!$TAIL_N$ac_delim
EGREP_Q!$EGREP_Q$ac_delim
LDD_R!$LDD_R$ac_delim
FAST_CFLAGS!$FAST_CFLAGS$ac_delim
FAST_CXXFLAGS!$FAST_CXXFLAGS$ac_delim
OBJCXX_CXXFLAGS!$OBJCXX_CXXFLAGS$ac_delim
DEPFLAGS!$DEPFLAGS$ac_delim
DEPFLAGS_POST!$DEPFLAGS_POST$ac_delim
FAST_LDFLAGS!$FAST_LDFLAGS$ac_delim
APP_LDFLAGS!$APP_LDFLAGS$ac_delim
DLL_LDFLAGS!$DLL_LDFLAGS$ac_delim
C_LIBS!$C_LIBS$ac_delim
OBJCXX_LIBS!$OBJCXX_LIBS$ac_delim
GCCPCH!$GCCPCH$ac_delim
RUNPATH_ORIGIN!$RUNPATH_ORIGIN$ac_delim
NO_STRICT_ALIASING!$NO_STRICT_ALIASING$ac_delim
D_SFX!$D_SFX$ac_delim
DEBUG_SFX!$DEBUG_SFX$ac_delim
LIB_OR_DLL!$LIB_OR_DLL$ac_delim
FORCE_STATIC_LIB!$FORCE_STATIC_LIB$ac_delim
APP_LIB_SETTING!$APP_LIB_SETTING$ac_delim
APP_LIBS_SETTING!$APP_LIBS_SETTING$ac_delim
LINK_DLL!$LINK_DLL$ac_delim
has_dll_loadable!$has_dll_loadable$ac_delim
LINK_LOADABLE!$LINK_LOADABLE$ac_delim
CFLAGS_DLL!$CFLAGS_DLL$ac_delim
CXXFLAGS_DLL!$CXXFLAGS_DLL$ac_delim
ALLOW_UNDEF!$ALLOW_UNDEF$ac_delim
FORBID_UNDEF!$FORBID_UNDEF$ac_delim
OPT_GROUPS!$OPT_GROUPS$ac_delim
local_lbsm!$local_lbsm$ac_delim
ncbi_crypt!$ncbi_crypt$ac_delim
CONNEXT!$CONNEXT$ac_delim
XCONNEXT!$XCONNEXT$ac_delim
serial!$serial$ac_delim
bdb!$bdb$ac_delim
dbapi!$dbapi$ac_delim
objects!$objects$ac_delim
gui!$gui$ac_delim
algo!$algo$ac_delim
app!$app$ac_delim
internal!$internal$ac_delim
check!$check$ac_delim
CHECK_ARG!$CHECK_ARG$ac_delim
CHECK_TOOLS!$CHECK_TOOLS$ac_delim
CHECK_TIMEOUT_MULT!$CHECK_TIMEOUT_MULT$ac_delim
CHECK_OS_NAME!$CHECK_OS_NAME$ac_delim
FEATURES!$FEATURES$ac_delim
script_shell!$script_shell$ac_delim
make_shell!$make_shell$ac_delim
obj_ext!$obj_ext$ac_delim
lib_pre!$lib_pre$ac_delim
lib_l_pre!$lib_l_pre$ac_delim
lib_ext!$lib_ext$ac_delim
dll_ext!$dll_ext$ac_delim
loadable_ext!$loadable_ext$ac_delim
lib_l_ext!$lib_l_ext$ac_delim
exe_ext!$exe_ext$ac_delim
f_compile!$f_compile$ac_delim
f_outobj!$f_outobj$ac_delim
f_outlib!$f_outlib$ac_delim
f_libpath!$f_libpath$ac_delim
f_runpath!$f_runpath$ac_delim
f_outexe!$f_outexe$ac_delim
BDB_LIB!$BDB_LIB$ac_delim
BDB_CACHE_LIB!$BDB_CACHE_LIB$ac_delim
DBAPI_DRIVER!$DBAPI_DRIVER$ac_delim
DBAPI_CTLIB!$DBAPI_CTLIB$ac_delim
DBAPI_DBLIB!$DBAPI_DBLIB$ac_delim
DBAPI_MYSQL!$DBAPI_MYSQL$ac_delim
DBAPI_ODBC!$DBAPI_ODBC$ac_delim
THREAD_LIBS!$THREAD_LIBS$ac_delim
NCBIATOMIC_LIB!$NCBIATOMIC_LIB$ac_delim
OPENMP_FLAGS!$OPENMP_FLAGS$ac_delim
UNSAFE_MATH_FLAG!$UNSAFE_MATH_FLAG$ac_delim
SSE4_1_FLAG!$SSE4_1_FLAG$ac_delim
AES_FLAG!$AES_FLAG$ac_delim
NETWORK_LIBS!$NETWORK_LIBS$ac_delim
NETWORK_PURE_LIBS!$NETWORK_PURE_LIBS$ac_delim
RESOLVER_LIBS!$RESOLVER_LIBS$ac_delim
MATH_LIBS!$MATH_LIBS$ac_delim
KSTAT_LIBS!$KSTAT_LIBS$ac_delim
RPCSVC_LIBS!$RPCSVC_LIBS$ac_delim
CRYPT_LIBS!$CRYPT_LIBS$ac_delim
DL_LIBS!$DL_LIBS$ac_delim
RT_LIBS!$RT_LIBS$ac_delim
UUID_LIBS!$UUID_LIBS$ac_delim
DEMANGLE_LIBS!$DEMANGLE_LIBS$ac_delim
ICONV_LIBS!$ICONV_LIBS$ac_delim
Z_LIB!$Z_LIB$ac_delim
BZ2_LIB!$BZ2_LIB$ac_delim
PCREPOSIX_LIBS!$PCREPOSIX_LIBS$ac_delim
PCRE_LIB!$PCRE_LIB$ac_delim
OPENSSL_STATIC_LIBS!$OPENSSL_STATIC_LIBS$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
TLS_INCLUDE!$TLS_INCLUDE$ac_delim
TLS_LIBS!$TLS_LIBS$ac_delim
SYBASE_PATH!$SYBASE_PATH$ac_delim
SYBASE_LCL_PATH!$SYBASE_LCL_PATH$ac_delim
SYBASE_INCLUDE!$SYBASE_INCLUDE$ac_delim
SYBASE_LIBS!$SYBASE_LIBS$ac_delim
SYBASE_DLLS!$SYBASE_DLLS$ac_delim
SYBASE_DBLIBS!$SYBASE_DBLIBS$ac_delim
MYSQL_INCLUDE!$MYSQL_INCLUDE$ac_delim
MYSQL_LIBS!$MYSQL_LIBS$ac_delim
BERKELEYDB_INCLUDE!$BERKELEYDB_INCLUDE$ac_delim
BERKELEYDB_LIBS!$BERKELEYDB_LIBS$ac_delim
BERKELEYDB_STATIC_LIBS!$BERKELEYDB_STATIC_LIBS$ac_delim
BERKELEYDB_CXX_LIBS!$BERKELEYDB_CXX_LIBS$ac_delim
BERKELEYDB_CXX_STATIC_LIBS!$BERKELEYDB_CXX_STATIC_LIBS$ac_delim
ODBC_INCLUDE!$ODBC_INCLUDE$ac_delim
ODBC_LIBS!$ODBC_LIBS$ac_delim
BOOST_INCLUDE!$BOOST_INCLUDE$ac_delim
BOOST_LIBPATH!$BOOST_LIBPATH$ac_delim
BOOST_TAG!$BOOST_TAG$ac_delim
BOOST_FILESYSTEM_LIBS!$BOOST_FILESYSTEM_LIBS$ac_delim
BOOST_FILESYSTEM_STATIC_LIBS!$BOOST_FILESYSTEM_STATIC_LIBS$ac_delim
BOOST_IOSTREAMS_LIBS!$BOOST_IOSTREAMS_LIBS$ac_delim
BOOST_IOSTREAMS_STATIC_LIBS!$BOOST_IOSTREAMS_STATIC_LIBS$ac_delim
BOOST_PROGRAM_OPTIONS_LIBS!$BOOST_PROGRAM_OPTIONS_LIBS$ac_delim
BOOST_PROGRAM_OPTIONS_STATIC_LIBS!$BOOST_PROGRAM_OPTIONS_STATIC_LIBS$ac_delim
BOOST_REGEX_LIBS!$BOOST_REGEX_LIBS$ac_delim
BOOST_REGEX_STATIC_LIBS!$BOOST_REGEX_STATIC_LIBS$ac_delim
BOOST_SYSTEM_LIBS!$BOOST_SYSTEM_LIBS$ac_delim
BOOST_SYSTEM_STATIC_LIBS!$BOOST_SYSTEM_STATIC_LIBS$ac_delim
BOOST_TEST_PEM_LIBS!$BOOST_TEST_PEM_LIBS$ac_delim
BOOST_TEST_PEM_STATIC_LIBS!$BOOST_TEST_PEM_STATIC_LIBS$ac_delim
BOOST_TEST_TEM_LIBS!$BOOST_TEST_TEM_LIBS$ac_delim
BOOST_TEST_TEM_STATIC_LIBS!$BOOST_TEST_TEM_STATIC_LIBS$ac_delim
BOOST_TEST_UTF_LIBS!$BOOST_TEST_UTF_LIBS$ac_delim
BOOST_TEST_UTF_STATIC_LIBS!$BOOST_TEST_UTF_STATIC_LIBS$ac_delim
BOOST_THREAD_LIBS!$BOOST_THREAD_LIBS$ac_delim
BOOST_THREAD_STATIC_LIBS!$BOOST_THREAD_STATIC_LIBS$ac_delim
NCBI_C_INCLUDE!$NCBI_C_INCLUDE$ac_delim
NCBI_C_LIBPATH!$NCBI_C_LIBPATH$ac_delim
OPENGL_INCLUDE!$OPENGL_INCLUDE$ac_delim
OPENGL_LIBS!$OPENGL_LIBS$ac_delim
OPENGL_STATIC_LIBS!$OPENGL_STATIC_LIBS$ac_delim
OSMESA_INCLUDE!$OSMESA_INCLUDE$ac_delim
OSMESA_LIBS!$OSMESA_LIBS$ac_delim
OSMESA_STATIC_LIBS!$OSMESA_STATIC_LIBS$ac_delim
GLUT_INCLUDE!$GLUT_INCLUDE$ac_delim
GLUT_LIBS!$GLUT_LIBS$ac_delim
GLEW_INCLUDE!$GLEW_INCLUDE$ac_delim
GLEW_LIBS!$GLEW_LIBS$ac_delim
GLEW_STATIC_LIBS!$GLEW_STATIC_LIBS$ac_delim
WXWIDGETS_INCLUDE!$WXWIDGETS_INCLUDE$ac_delim
WXWIDGETS_LIBS!$WXWIDGETS_LIBS$ac_delim
WXWIDGETS_STATIC_LIBS!$WXWIDGETS_STATIC_LIBS$ac_delim
WXWIDGETS_GL_LIBS!$WXWIDGETS_GL_LIBS$ac_delim
WXWIDGETS_GL_STATIC_LIBS!$WXWIDGETS_GL_STATIC_LIBS$ac_delim
WXWIDGETS_POST_LINK!$WXWIDGETS_POST_LINK$ac_delim
FASTCGI_INCLUDE!$FASTCGI_INCLUDE$ac_delim
FASTCGI_LIBS!$FASTCGI_LIBS$ac_delim
FASTCGI_OBJS!$FASTCGI_OBJS$ac_delim
NCBI_SSS_INCLUDE!$NCBI_SSS_INCLUDE$ac_delim
NCBI_SSS_LIBPATH!$NCBI_SSS_LIBPATH$ac_delim
LIBSSSUTILS!$LIBSSSUTILS$ac_delim
LIBSSSDB!$LIBSSSDB$ac_delim
sssutils!$sssutils$ac_delim
SP_INCLUDE!$SP_INCLUDE$ac_delim
SP_LIBS!$SP_LIBS$ac_delim
ORBACUS_INCLUDE!$ORBACUS_INCLUDE$ac_delim
ORBACUS_LIBPATH!$ORBACUS_LIBPATH$ac_delim
LIBOB!$LIBOB$ac_delim
LIBIMR!$LIBIMR$ac_delim
ICU_CONFIG!$ICU_CONFIG$ac_delim
ICU_INCLUDE!$ICU_INCLUDE$ac_delim
ICU_LIBS!$ICU_LIBS$ac_delim
ICU_STATIC_LIBS!$ICU_STATIC_LIBS$ac_delim
EXPAT_STATIC_LIBS!$EXPAT_STATIC_LIBS$ac_delim
SABLOT_STATIC_LIBS!$SABLOT_STATIC_LIBS$ac_delim
LIBXML_STATIC_LIBS!$LIBXML_STATIC_LIBS$ac_delim
LIBXSLT_STATIC_LIBS!$LIBXSLT_STATIC_LIBS$ac_delim
LIBEXSLT_STATIC_LIBS!$LIBEXSLT_STATIC_LIBS$ac_delim
XERCES_INCLUDE!$XERCES_INCLUDE$ac_delim
XERCES_LIBS!$XERCES_LIBS$ac_delim
XERCES_STATIC_LIBS!$XERCES_STATIC_LIBS$ac_delim
XALAN_INCLUDE!$XALAN_INCLUDE$ac_delim
XALAN_LIBS!$XALAN_LIBS$ac_delim
XALAN_STATIC_LIBS!$XALAN_STATIC_LIBS$ac_delim
ZORBA_INCLUDE!$ZORBA_INCLUDE$ac_delim
ZORBA_LIBS!$ZORBA_LIBS$ac_delim
ZORBA_STATIC_LIBS!$ZORBA_STATIC_LIBS$ac_delim
SQLITE3_STATIC_LIBS!$SQLITE3_STATIC_LIBS$ac_delim
FREETYPE_INCLUDE!$FREETYPE_INCLUDE$ac_delim
FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
GSOAP_PATH!$GSOAP_PATH$ac_delim
AVRO_STATIC_LIBS!$AVRO_STATIC_LIBS$ac_delim
MONGODB_STATIC_LIBS!$MONGODB_STATIC_LIBS$ac_delim
ncbi_xreader_pubseqos!$ncbi_xreader_pubseqos$ac_delim
ncbi_xreader_pubseqos2!$ncbi_xreader_pubseqos2$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-4.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
UNLESS_PUBSEQOS!$UNLESS_PUBSEQOS$ac_delim
PERL_INCLUDE!$PERL_INCLUDE$ac_delim
PERL_LIBS!$PERL_LIBS$ac_delim
JDK_PATH!$JDK_PATH$ac_delim
JDK_INCLUDE!$JDK_INCLUDE$ac_delim
ncbi_java!$ncbi_java$ac_delim
NCBI_C_ncbi!$NCBI_C_ncbi$ac_delim
BINCOPY!$BINCOPY$ac_delim
APP_NOCOPY!$APP_NOCOPY$ac_delim
APP_OR_NULL!$APP_OR_NULL$ac_delim
IF_REBUILDING_LIBS!$IF_REBUILDING_LIBS$ac_delim
IF_REBUILDING_CONDITIONALLY!$IF_REBUILDING_CONDITIONALLY$ac_delim
IF_DEACTIVATING!$IF_DEACTIVATING$ac_delim
configurables_mfname!$configurables_mfname$ac_delim
CC_FILTER!$CC_FILTER$ac_delim
CXX_FILTER!$CXX_FILTER$ac_delim
AR_FILTER!$AR_FILTER$ac_delim
LINK_FILTER!$LINK_FILTER$ac_delim
CC_WRAPPER!$CC_WRAPPER$ac_delim
CXX_WRAPPER!$CXX_WRAPPER$ac_delim
AR_WRAPPER!$AR_WRAPPER$ac_delim
LINK_WRAPPER!$LINK_WRAPPER$ac_delim
KeepStateTarget!$KeepStateTarget$ac_delim
Rules!$Rules$ac_delim
serial_ws50_rtti_kludge!$serial_ws50_rtti_kludge$ac_delim
ncbicntr!$ncbicntr$ac_delim
UNIX_SRC!$UNIX_SRC$ac_delim
UNIX_USR_PROJ!$UNIX_USR_PROJ$ac_delim
compiler!$compiler$ac_delim
compiler_root!$compiler_root$ac_delim
compiler_version!$compiler_version$ac_delim
COMPILER!$COMPILER$ac_delim
OSTYPE!$OSTYPE$ac_delim
NCBI_PLATFORM_BITS!$NCBI_PLATFORM_BITS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 36; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-5.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
:end
s/|#_!!_#|//g
CEOF$ac_eof
_ACEOF


# 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

cat >>$CONFIG_STATUS <<\_ACEOF
fi # test -n "$CONFIG_FILES"


for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
echo "$as_me: error: Invalid tag $ac_tag." >&2;}
   { (exit 1); exit 1; }; };;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
echo "$as_me: error: cannot find input file: $ac_f" >&2;}
   { (exit 1); exit 1; }; };;
      esac
      ac_file_inputs="$ac_file_inputs $ac_f"
    done

    # 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.  */
    configure_input="Generated from "`IFS=:
	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    fi

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin";;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$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'`
  { as_dir="$ac_dir"
  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$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'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
echo "$as_me: error: cannot create directory $as_dir" >&2;}
   { (exit 1); exit 1; }; }; }
  # Base source directories on path to *input* file.
if test -n "$ac_f"; then
   ac_dir_in=`$as_dirname -- "$ac_f" ||
$as_expr X"$ac_f" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_f" : 'X\(//\)[^/]' \| \
	 X"$ac_f" : 'X\(//\)$' \| \
	 X"$ac_f" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$ac_f" |
    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

ac_builddir=.

case "$ac_dir_in" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir_in" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


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
ac_builddir=$builddir


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  esac
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=

case `sed -n '/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p
' $ac_file_inputs` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
    s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
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&@top_builddir@&$ac_top_builddir_sub&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" | sed -f "$tmp/subs-5.sed" >$tmp/out

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&5
echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&2;}

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out"; rm -f "$tmp/out";;
  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
  esac
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
_ACEOF

# Transform confdefs.h into a sed script `conftest.defines', that
# substitutes the proper values into config.h.in to produce config.h.
rm -f conftest.defines conftest.tail
# First, append a space to every undef/define line, to ease matching.
echo 's/$/ /' >conftest.defines
# Then, protect against being on the right side of a sed subst, or in
# an unquoted here document, in config.status.  If some macros were
# called several times there might be several #defines for the same
# symbol, which is useless.  But do not sort them, since the last
# AC_DEFINE must be honored.
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
# NAME is the cpp macro being defined, VALUE is the value it is being given.
# PARAMS is the parameter list in the macro definition--in most cases, it's
# just an empty string.
ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
ac_dB='\\)[	 (].*,\\1define\\2'
ac_dC=' '
ac_dD=' ,'

uniq confdefs.h |
  sed -n '
	t rset
	:rset
	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
	t ok
	d
	:ok
	s/[\\&,]/\\&/g
	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
  ' >>conftest.defines

# Remove the space that was appended to ease matching.
# Then replace #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.
# (The regexp can be short, since the line contains either #define or #undef.)
echo 's/ $//
s,^[	 #]*u.*,/* & */,' >>conftest.defines

# Break up conftest.defines:
ac_max_sed_lines=50

# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
# et cetera.
ac_in='$ac_file_inputs'
ac_out='"$tmp/out1"'
ac_nxt='"$tmp/out2"'

while :
do
  # Write a here document:
    cat >>$CONFIG_STATUS <<_ACEOF
    # First, check the format of the line:
    cat >"\$tmp/defines.sed" <<\\CEOF
/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
b
:def
_ACEOF
  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
  grep . conftest.tail >/dev/null || break
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines conftest.tail

echo "ac_result=$ac_in" >>$CONFIG_STATUS
cat >>$CONFIG_STATUS <<\_ACEOF
  if test x"$ac_file" != x-; then
    echo "/* $configure_input  */" >"$tmp/config.h"
    cat "$ac_result" >>"$tmp/config.h"
    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
      rm -f $ac_file
      mv "$tmp/config.h" $ac_file
    fi
  else
    echo "/* $configure_input  */"
    cat "$ac_result"
  fi
  rm -f "$tmp/out12"
 ;;

  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
echo "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "default":C)
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 build-system -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
   if test -n "$with_projects"; then
      cfm_flags="$cfm_flags -p $with_projects"
   fi
   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
      $EGREP 'Error:|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 (as listed in \"$with_projects\"):
  cd $builddir && make all_p"
fi

cat << EOCONF
===============================================================================
NCBI C++ Toolkit documentation:
  Online:   http://www.ncbi.nlm.nih.gov/toolkit/doc/book/
  Local:    ./doc/public/index.html
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 # for ac_tag


{ (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

