#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ncbi-tools++ 0.0.
#
# Report bugs to <cpp-core@ncbi.nlm.nih.gov>.
#
#
# Copyright (C) 1992-1996, 1998-2012 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 more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do 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


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
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.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
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
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do 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
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :

else
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null; then :
  as_have_required=yes
else
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :

else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh ksh sh5 bash; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir/$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS


      if test "x$CONFIG_SHELL" != x; then :
  export CONFIG_SHELL
             # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi

    if test x$as_have_required = xno; then :
  $as_echo "$0: This script requires a shell more modern than all"
  $as_echo "$0: the shells that I found on your system."
  if test x${ZSH_VERSION+set} = xset ; then
    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  else
    $as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: cpp-core@ncbi.nlm.nih.gov about your system, including
$0: any error possibly output before this message. Then
$0: install a modern shell, or manually run the script
$0: under such a shell if you do have one."
  fi
  exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_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 ||
$as_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" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p

# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error

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

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

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

# 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


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # 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" ||
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # 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
}

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

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 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  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 -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
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='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_test_x='test -x'
as_executable_p=as_fn_executable_p

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


test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1

# Name of the host.
# hostname on some systems (SVR3.2, old GNU/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=

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

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

ac_subst_vars='LTLIBOBJS
LIBOBJS
NCBI_SC_VERSION
NCBI_SUBVERSION_REVISION
NCBI_GIT_BRANCH
NCBI_REVISION
NCBI_TEAMCITY_BUILD_ID
NCBI_TEAMCITY_BUILDCONF_NAME
NCBI_TEAMCITY_PROJECT_NAME
NCBI_TEAMCITY_BUILD_NUMBER
NCBI_PLATFORM_BITS
OSTYPE
COMPILER
compiler_version
compiler_root
compiler
UNIX_USR_PROJ
UNIX_SRC
ncbicntr
serial_ws50_rtti_kludge
Rules
KeepStateTarget
LINK_WRAPPER
AR_WRAPPER
CXX_WRAPPER
CC_WRAPPER
LINK_FILTER
AR_FILTER
CXX_FILTER
CC_FILTER
configurables_mfname
IF_DEACTIVATING
IF_REBUILDING_CONDITIONALLY
IF_REBUILDING_LIBS
APP_OR_NULL
APP_NOCOPY
BINCOPY
NCBI_C_ncbi
ncbi_java
JDK_INCLUDE
JDK_PATH
PERL_LIBS
PERL_INCLUDE
UNLESS_PUBSEQOS
ncbi_xreader_pubseqos2
ncbi_xreader_pubseqos
OPENTELEMETRY_STATIC_LIBS
JAEGER_STATIC_LIBS
OPENTRACING_STATIC_LIBS
YAML_CPP_STATIC_LIBS
NLOHMANN_JSON_INCLUDE
THRIFT_STATIC_LIBS
CPPKAFKA_STATIC_LIBS
LIBRDKAFKA_STATIC_LIBS
APACHE_ARROW_STATIC_LIBS
HIREDIS_STATIC_LIBS
CRC32C_STATIC_LIBS
AWS_SDK_STATIC_LIBS
MSGSL_INCLUDE
GRPC_BIN
GRPC_REFLECTION_LIBS
GRPC_UNSECURE_LIBS
PROTOBUF_BIN
LIBXLSXWRITER_STATIC_LIBS
INFLUXDB_INCLUDE
H2O_STATIC_LIBS
NGHTTP2_STATIC_LIBS
CASSANDRA_STATIC_LIBS
LIBSSH2_STATIC_LIBS
LIBSSH_STATIC_LIBS
LIBUV_STATIC_LIBS
LMDB_STATIC_LIBS
LMDB_LIB
GMOCK_STATIC_LIBS
MONGODB3_STATIC_LIBS
MONGODB_STATIC_LIBS
CEREAL_INCLUDE
AVRO_STATIC_LIBS
GSOAP_PATH
FREETYPE_LIBS
FREETYPE_INCLUDE
SQLITE3_STATIC_LIBS
ZORBA_STATIC_LIBS
ZORBA_LIBS
ZORBA_INCLUDE
XALAN_STATIC_LIBS
XALAN_LIBS
XALAN_INCLUDE
XERCES_STATIC_LIBS
XERCES_LIBS
XERCES_INCLUDE
LIBEXSLT_STATIC_LIBS
LIBXSLT_STATIC_LIBS
LIBXML_STATIC_LIBS
SABLOT_STATIC_LIBS
EXPAT_STATIC_LIBS
ICU_STATIC_LIBS
ICU_LIBS
ICU_INCLUDE
ICU_CONFIG
LIBIMR
LIBOB
ORBACUS_LIBPATH
ORBACUS_INCLUDE
SP_LIBS
SP_INCLUDE
NGS_STATIC_LIBS
VDB_POST_LINK
VDB_REQ
ncbi_xloader_wgs
ncbi_xloader_vdbgraph
ncbi_xloader_sra
ncbi_xloader_snp
ncbi_xloader_csra
ncbi_xloader_bam
ncbi_id2proc_wgs
ncbi_id2proc_snp
sraread
bamread
VDB_STATIC_LIBS
VDB_LIBS
VDB_INCLUDE
sssutils
LIBSSSDB
LIBSSSUTILS
NCBI_SSS_LIBPATH
NCBI_SSS_INCLUDE
FASTCGI_OBJS
FASTCGI_LIBS
FASTCGI_INCLUDE
WXWIDGETS_POST_LINK
WXWIDGETS_GL_STATIC_LIBS
WXWIDGETS_GL_LIBS
WXWIDGETS_STATIC_LIBS
WXWIDGETS_LIBS
WXWIDGETS_INCLUDE
GL2PS_STATIC_LIBS
GLEW_STATIC_LIBS
GLEW_LIBS
GLEW_INCLUDE
GLUT_LIBS
GLUT_INCLUDE
OSMESA_STATIC_LIBS
OSMESA_LIBS
OSMESA_INCLUDE
OPENGL_STATIC_LIBS
OPENGL_LIBS
OPENGL_INCLUDE
NCBI_C_LIBPATH
NCBI_C_INCLUDE
BOOST_THREAD_STATIC_LIBS
BOOST_THREAD_LIBS
BOOST_TEST_UTF_STATIC_LIBS
BOOST_TEST_UTF_LIBS
BOOST_TEST_TEM_STATIC_LIBS
BOOST_TEST_TEM_LIBS
BOOST_TEST_PEM_STATIC_LIBS
BOOST_TEST_PEM_LIBS
BOOST_SYSTEM_STATIC_LIBS
BOOST_SYSTEM_LIBS
BOOST_SERIALIZATION_STATIC_LIBS
BOOST_SERIALIZATION_LIBS
BOOST_REGEX_STATIC_LIBS
BOOST_REGEX_LIBS
BOOST_PROGRAM_OPTIONS_STATIC_LIBS
BOOST_PROGRAM_OPTIONS_LIBS
BOOST_IOSTREAMS_STATIC_LIBS
BOOST_IOSTREAMS_LIBS
BOOST_FILESYSTEM_STATIC_LIBS
BOOST_FILESYSTEM_LIBS
BOOST_CHRONO_STATIC_LIBS
BOOST_CHRONO_LIBS
BOOST_STATIC_TAG
BOOST_TAG
BOOST_LIBPATH
BOOST_INCLUDE
ODBC_LIBS
ODBC_INCLUDE
BERKELEYDB_CXX_STATIC_LIBS
BERKELEYDB_CXX_LIBS
BERKELEYDB_STATIC_LIBS
BERKELEYDB_LIBS
BERKELEYDB_INCLUDE
MYSQL_LIBS
MYSQL_INCLUDE
SYBASE_DBLIBS
SYBASE_DLLS
SYBASE_LIBS
SYBASE_INCLUDE
SYBASE_LCL_PATH
SYBASE_PATH
CURL_STATIC_LIBS
OPENSSL_STATIC_LIBS
PCRE_LEGACY_LIBS
PCRE_LIB
PCREPOSIX_LIBS
ZSTD_STATIC_LIBS
BZ2_LIB
Z_LIB
ICONV_LIBS
DEMANGLE_LIBS
UUID_LIBS
RT_LIBS
DL_LIBS
CRYPT_LIBS
RPCSVC_LIBS
KSTAT_LIBS
MATH_LIBS
RESOLVER_LIBS
NETWORK_PURE_LIBS
NETWORK_LIBS
ATOMIC64_LIBS
COLOR_DIAGNOSTICS
AES_FLAG
SSE4_1_FLAG
UNSAFE_MATH_FLAG
OPENMP_FLAGS
NCBIATOMIC_LIB
THREAD_LIBS
DBAPI_ODBC
DBAPI_MYSQL
DBAPI_FTDS14
DBAPI_FTDS100
DBAPI_FTDS
DBAPI_CTLIB
DBAPI_DRIVER
SQLITE3_WRAPPER
BDB_CACHE_LIB
BDB_LIB
f_outexe
f_runpath
f_libpath
f_outlib
f_outobj
f_compile
exe_ext
lib_l_ext
loadable_ext
dll_ext
lib_ext
lib_l_pre
lib_pre
obj_ext
make_shell
script_shell
FEATURES
CHECK_OS_NAME
CHECK_TIMEOUT_MULT
CHECK_TOOLS
CHECK_ARG
check
internal
app
algo
gui
objects
dbapi
bdb
serial
XCONNEXT
CONNEXT
OPT_GROUPS
NO_WHOLE_ARCHIVE
WHOLE_ARCHIVE
NO_AS_NEEDED
AS_NEEDED
FORBID_UNDEF
ALLOW_UNDEF
CXXFLAGS_DLL
CFLAGS_DLL
LINK_LOADABLE
has_dll_loadable
LINK_DLL
APP_LIBS_SETTING
APP_LIB_SETTING
FORCE_STATIC_LIB
LIB_OR_DLL
DEBUG_SFX
D_SFX
NO_STRICT_ALIASING
RUNPATH_ORIGIN
GCCPCH
FOUNDATION_LIBS
OBJCXX_LIBS
C_LIBS
DLL_LDFLAGS
APP_LDFLAGS
FAST_LDFLAGS
DEPFLAGS_POST
DEPFLAGS
OBJCXX_CXXFLAGS
FAST_CXXFLAGS
FAST_CFLAGS
LDD_R
EGREP_Q
TAIL_N
C_LINK
LINK
c_ncbi_runpath
ncbi_runpath
runpath
builddir
status_dir
srcdir
top_srcdir
build_root
signature
OPENTELEMETRY_LIBS
OPENTELEMETRY_INCLUDE
JAEGER_LIBS
JAEGER_INCLUDE
OPENTRACING_LIBS
OPENTRACING_INCLUDE
YAML_CPP_LIBS
YAML_CPP_INCLUDE
THRIFT_LIBS
THRIFT_INCLUDE
CPPKAFKA_LIBS
CPPKAFKA_INCLUDE
LIBRDKAFKA_LIBS
LIBRDKAFKA_INCLUDE
APACHE_ARROW_LIBS
APACHE_ARROW_INCLUDE
HIREDIS_LIBS
HIREDIS_INCLUDE
GOOGLE_CLOUD_LIBS
GOOGLE_CLOUD_INCLUDE
CRC32C_LIBS
CRC32C_INCLUDE
AWS_SDK_LIBS
AWS_SDK_INCLUDE
GRPC_CPP_PLUGIN
GRPC_LIBS
GRPC_INCLUDE
PROTOC
PROTOBUF_LIBS
PROTOBUF_INCLUDE
LIBXLSXWRITER_LIBS
LIBXLSXWRITER_INCLUDE
H2O_LIBS
H2O_INCLUDE
NGHTTP2_LIBS
NGHTTP2_INCLUDE
CASSANDRA_LIBS
CASSANDRA_INCLUDE
LIBSSH2_LIBS
LIBSSH2_INCLUDE
LIBSSH_LIBS
LIBSSH_INCLUDE
LIBUV_LIBS
LIBUV_INCLUDE
LMDB_LIBS
LMDB_INCLUDE
LAPACK_LIBS
LAPACK_INCLUDE
GMOCK_LIBS
GMOCK_INCLUDE
ROCKSDB_LIBS
ROCKSDB_INCLUDE
LIBURING_LIBS
LIBURING_INCLUDE
LEVELDB_LIBS
LEVELDB_INCLUDE
MONGODB3_LIBS
MONGODB3_INCLUDE
MONGODB_LIBS
MONGODB_INCLUDE
SASL2_LIBS
SASL2_INCLUDE
AVROGENCPP
AVRO_LIBS
AVRO_INCLUDE
GSOAP_LIBS
GSOAP_INCLUDE
GSOAP_WSDL2H
GSOAP_SOAPCPP2
MIMETIC_LIBS
MIMETIC_INCLUDE
MAGIC_LIBS
MAGIC_INCLUDE
FTGL_LIBS
FTGL_INCLUDE
freetype_config
GL2PS_LIBS
GL2PS_INCLUDE
XPM_LIBS
XPM_INCLUDE
UNGIF_LIBS
UNGIF_INCLUDE
GIF_LIBS
GIF_INCLUDE
TIFF_LIBS
TIFF_INCLUDE
PNG_LIBS
PNG_INCLUDE
JPEG_LIBS
JPEG_INCLUDE
HDF5_LIBS
HDF5_INCLUDE
MUPARSER_LIBS
MUPARSER_INCLUDE
DRMAA2_LIBS
DRMAA2_INCLUDE
SGE_LIBS
SGE_INCLUDE
OECHEM_LIBS
OECHEM_INCLUDE
NGS_LIBS
NGS_INCLUDE
SQLITE3_LIBS
SQLITE3_INCLUDE
LIBEXSLT_LIBS
LIBEXSLT_INCLUDE
XSLTPROC
LIBXSLT_LIBS
LIBXSLT_INCLUDE
LIBXML_LIBS
LIBXML_INCLUDE
SABLOT_LIBS
SABLOT_INCLUDE
EXPAT_LIBS
EXPAT_INCLUDE
FASTCGIPP_LIBS
FASTCGIPP_INCLUDE
wxconf
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
NCBICRYPT_LIBS
NCBICRYPT_INCLUDE
_ACJNI_JAVAC
PERL
PYTHON3_LIBS
PYTHON3_INCLUDE
PYTHON3
PYTHON27_LIBS
PYTHON27_INCLUDE
PYTHON27
PYTHON26_LIBS
PYTHON26_INCLUDE
PYTHON26
PYTHON25_LIBS
PYTHON25_INCLUDE
PYTHON25
PYTHON_LIBS
PYTHON_INCLUDE
PYTHON
mysql_config
freetds
FTDS_LIB
FTDS_LIBS
FTDS_INCLUDE
FTDS14_CTLIB_LIB
FTDS14_CTLIB_LIBS
FTDS14_CTLIB_INCLUDE
FTDS14_LIB
FTDS14_LIBS
FTDS14_INCLUDE
FTDS100_CTLIB_LIB
FTDS100_CTLIB_LIBS
FTDS100_CTLIB_INCLUDE
FTDS100_LIB
FTDS100_LIBS
FTDS100_INCLUDE
CURL_LIBS
CURL_INCLUDE
CURL_CONFIG
KRB5_LIBS
KRB5_INCLUDE
KRB5_CONFIG
OPENSSL_LIBS
OPENSSL_INCLUDE
GNUTLS_LIBS
GNUTLS_INCLUDE
LIBGNUTLS_CONFIG
NETTLE_LIBS
NETTLE_INCLUDE
GCRYPT_LIBS
GCRYPT_INCLUDE
LIBGCRYPT_CONFIG
GMP_LIBS
GMP_INCLUDE
MBEDTLS_LIBS
MBEDTLS_INCLUDE
PCRE2_LIBS
PCRE2_INCLUDE
PCRE_LIBS
PCRE_INCLUDE
ZSTD_LIBS
ZSTD_INCLUDE
LZO_LIBS
LZO_INCLUDE
BZ2_LIBS
BZ2_INCLUDE
Z_LIBS
Z_INCLUDE
BACKWARD_CPP_LIBS
BACKWARD_CPP_INCLUDE
LIBDW_LIBS
LIBDW_INCLUDE
LIBUNWIND_LIBS
LIBUNWIND_INCLUDE
ALLOCA
CXXCPP
AMQ
TCHECK_CL
CD_REPORTER
UUIDGEN
LDD
VALGRIND_PATH
TOUCH
SED
BASENAME
TAIL
CCACHE
DISTCC
STRIP
AR
RANLIB
LN_S
MAKE
ifGNUmake
AWK
USUAL_AND_LIB
USUAL_AND_DLL
STATIC
UNLESS_WITH_DLL
IF_WITH_DLL
DLL_LIB_SETTING
DLL
DPKG_ARCHITECTURE
EGREP
GREP
MT_SFX
ac_ct_CXX
CXXFLAGS
CXX
LDFLAGS_FOR_BUILD
CPPFLAGS_FOR_BUILD
CFLAGS_FOR_BUILD
BUILD_OBJEXT
BUILD_EXEEXT
CPP_FOR_BUILD
ac_ct_CC_FOR_BUILD
CC_FOR_BUILD
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
PROJECTS
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with__
with_debug
with_max_debug
with_symbols
with_optimization
with_sse42
with_profiling
with_code_coverage
with_tcheck
with_dll
with_static
with_static_exe
with_plugin_auto_load
with_bundles
with_bin_release
with_mt
with_openmp
with_64
with_exe
with_runpath
with_relative_runpath
with_hard_runpath
with_lfs
with_limited_linker
with_experimental
with_skew_guard
with_extra_action
with_autodep
with_build_root
with_fake_root
with_suffix
with_hostspec
with_version
with_build_root_sfx
with_execopy
with_bincopy
with_lib_rebuilds
with_deactivation
with_makefile_auto_update
with_projects
with_flat_makefile
with_configure_dialog
with_saved_settings
with_check
with_check_tools
with_ncbi_public
with_strip
with_pch
with_caution
with_ccache
with_distcc
with_ncbi_c
with_sss
with_sssutils
with_sssdb
with_included_sss
with_vdb
with_downloaded_vdb
with_static_vdb
with_ngs
with_ncbicrypt
with_libunwind
with_libdw
with_backward_cpp
with_backward_cpp_sig
with_z
with_bz2
with_lzo
with_zstd
with_pcre
with_pcre2
with_mbedtls
with_gmp
with_gcrypt
with_nettle
with_gnutls
with_static_gnutls
with_openssl
with_krb5
with_sybase
with_sybase_local
with_sybase_new
with_ftds
with_ftds_renamed
with_mysql
with_opengl
with_mesa
with_glut
with_glew
with_glew_mx
with_gl2ps
with_wxwidgets
with_wxwidgets_ucs
with_freetype
with_ftgl
with_fastcgi
with_fastcgipp
with_bdb
with_sp
with_orbacus
with_odbc
with_python
with_perl
with_jni
with_boost
with_boost_tag
with_sqlite3
with_icu
with_expat
with_sablot
with_libxml
with_libxslt
with_libexslt
with_xerces
with_xalan
with_zorba
with_oechem
with_sge
with_drmaa2
with_muparser
with_hdf5
with_gif
with_jpeg
with_png
with_tiff
with_xpm
with_magic
with_curl
with_mimetic
with_gsoap
with_avro
with_cereal
with_sasl2
with_mongodb
with_mongodb3
with_leveldb
with_liburing
with_rocksdb
with_gmock
with_lapack
with_lmdb
with_libuv
with_libssh
with_libssh2
with_cassandra
with_nghttp2
with_h2o
with_influxdb
with_libxlsxwriter
with_protobuf
with_grpc
with_msgsl
with_aws_sdk
with_crc32c
with_google_cloud
with_hiredis
with_apache_arrow
with_librdkafka
with_cppkafka
with_thrift
with_nlohmann_json
with_yaml_cpp
with_opentracing
with_jaeger
with_opentelemetry
with_3psw
with_app
with_ctools
with_gui
with_internal
with_gbench
with_manuals
with_x
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
CXX
CXXFLAGS
CCC
CXXCPP
XMKMF'


# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# 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= ;;
  *)    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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=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 ;;

  -*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      $as_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'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
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
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
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
  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 .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# 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 -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
    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 .."
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
	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 max-debug=thread symbols optimization sse42 \
profiling code-coverage tcheck dll static static-exe \
plugin-auto-load bundles bin-release mt 64 exe runpath hard-runpath \
lfs limited-linker skew-guard 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 fastcgipp \
sss sssdb sssutils included-sss \
geo included-geo vdb downloaded-vdb static-vdb ngs ncbicrypt libunwind libdw \
backward-cpp backward-cpp-sig \
z bz2 lzo zstd pcre pcre2 mbedtls \
gmp gcrypt nettle gnutls static-gnutls openssl krb5 \
sybase sybase-local sybase-new ftds mysql \
orbacus freetype ftgl opengl mesa glut glew glew-mx gl2ps \
bdb python perl jni sqlite3 icu boost boost-tag \
sp expat sablot libxml libxslt libexslt xerces xalan zorba \
oechem sge drmaa2 muparser hdf5 \
gif jpeg tiff png xpm \
magic curl mimetic gsoap avro cereal sasl2 \
mongodb mongodb3 leveldb liburing rocksdb gmock lapack lmdb \
libuv libssh libssh2 cassandra nghttp2 h2o influxdb \
libxlsxwriter protobuf grpc msgsl aws-sdk crc32c google-cloud hiredis \
apache-arrow librdkafka cppkafka \
thrift nlohmann-json yaml-cpp opentracing jaeger opentelemetry \
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= )
      as_fn_error $? "$x_arg:  requires value;  use --help to show usage"
      ;;

      --with-projects=* | --with-saved-settings=* )
      # Confirm that the specified file exists and is readable.
      file=`echo $x_arg | sed -e 's/^[^=]*=//'`
      case "$file" in
         /* ) ;;
         *  ) file=$srcdir/$file ;;
      esac
      if test -f "$file"; then
         if test -r "$file"; then
            :
         else
            as_fn_error $? "$x_arg:  requires a readable file; use --help to show usage"
         fi
      else
         as_fn_error $? "$x_arg:  requires a (readable) file; use --help to show usage"
      fi
      ;;

      --with-vdb=rc ) ;;

      --srcdir=* | --x-includes=* | --x-libraries=* | --with-tcheck=* \
      | --with-ncbi-c=* | --with-sss=* | --with-vdb=* | --with-ngs=* \
      | --with-ncbicrypt=* \
      | --with-libunwind=* | --with-libdw=* | --with-backward-cpp=* \
      | --with-z=* | --with-bz2=* | --with-lzo=* | --with-zstd=* \
      | --with-pcre=* | --with-pcre2=* | --with-mbedtls=* \
      | --with-gmp=* | --with-gcrypt=* | --with-nettle=* \
      | --with-gnutls=* | --with-openssl=* | --with-krb5=* \
      | --with-sybase-local=* | --with-ftds=*/* | --with-mysql=* \
      | --with-opengl=* | --with-mesa=* | --with-glut=* | --with-glew=* \
      | --with-gl2ps=* \
      | --with-wxwidgets=* | --with-freetype=* | --with-ftgl=* \
      | --with-fastcgi=*/* | --with-fastcgipp=* | --with-bdb=*/* \
      | --with-orbacus=* \
      | --with-odbc=* | --with-python=* | --with-perl=* | --with-jni=* \
      | --with-boost=* | --with-sqlite3=* | --with-icu=* | --with-expat=* \
      | --with-sablot=* | --with-libxml=* | --with-libxslt=* | --with-exslt=* \
      | --with-xerces=* | --with-xalan=* | --with-zorba=* | --with-oechem=* \
      | --with-sge=* | --with-drmaa2=* | --with-muparser=* \
      | --with-hdf5=* | --with-gif=* \
      | --with-jpeg=* | --with-png=* | --with-tiff=* | --with-xpm=* \
      | --with-magic=* | --with-curl=* | --with-mimetic=* | --with-gsoap=* \
      | --with-avro=* | --with-cereal=* | --with-sasl2=* \
      | --with-mongodb=* | --with-mongodb3=* | --with-leveldb=* \
      | --with-liburing=* | --with-rocksdb=* \
      | --with-gmock=* | --with-lapack=* | --with-lmdb=* | --with-libuv=* \
      | --with-libssh=* | --with-libssh2=* \
      | --with-cassandra=* | --with-nghttp2=* \
      | --with-h2o=* | --with-influxdb=* | --with-libxlsxwriter=* \
      | --with-protobuf=* | --with-grpc=* | --with-msgsl=* | --with-aws-sdk=* \
      | --with-crc32c=* | --with-google-cloud=* \
      | --with-hiredis=* | --with-librdkafka=* | --with-cppkafka=* \
      | --with-thrift=* | --with-nlohmann-json=* | --with-yaml-cpp=* \
      | --with-opentracing=* | --with-jaeger=* | --with-opentelemetry=* )
      # Confirm that the specified directory exists and is readable.
      dir=`echo $x_arg | sed -e 's/^[^=]*=//'`
      case "$x_arg" in
         --srcdir=* | --*=/* ) ;;
         *  ) dir=$srcdir/$dir ;;
      esac
      if test -d "$dir"; then
         if test -r "$dir"; then
            :
         else
            as_fn_error $? "$x_arg:  requires a readable directory; use --help to show usage"
         fi
      else
         as_fn_error $? "$x_arg:  requires a (readable) directory; use --help to show usage"
      fi
      ;;

      [A-Za-z]*=* | -h | --help | --help=* | -V | --version | -q | --quiet \
      | --silent | --cache-file=* | -C | --config-cache | -n | --no-create \
      | --no-recursion | --prefix=* | --exec-prefix=* | --bindir=* \
      | --libdir=* | --includedir=* | --build=* | --host=* | --target=* \
      | --mandir=* | --infodir=* | --docdir=* | --htmldir=* \
      | --datadir=* | --sysconfdir=* | --localstatedir=* \
      | --with-runpath=* | --with-relative-runpath=* \
      | --with-experimental=* | --with-extra-action=* | --with-build-root=* \
      | --with-fake-root=* | --with-build-root-sfx=* | --with-check=* \
      | --with-check-tools=* | --with-ftds=[0-9]* | --with-fastcgi=[0-9]* \
      | --with-bdb=[1-9]* | --with-boost-tag=* | --with-3psw=* )
      ;;

      * )
      as_fn_error $? "$x_arg:  unknown option;  use --help to show usage"
      ;;
   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-max-debug=thread ... including via GCC's thread sanitizer
 --with-symbols          retain debugging symbols in non-debug mode
 --without-optimization  turn off optimization flags in non-debug mode
 --without-sse42         don't enable SSE 4.2 when optimizing
 --with-profiling        build profiled versions of libs and apps
 --with-code-coverage    track which code blocks have been exercised
 --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
 --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-experimental=... enable named experimental feature(s): StrictGI,StrictEntrezId,StrictTaxId,BM64,C++20,C2X
 --with-skew-guard       catch incomplete rebuilds
 --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-vdb=DIR          use NCBI SRA/VDB Toolkit installation in DIR
 --without-vdb           do not use the NCBI SRA/VDB Toolkit
 --with-downloaded-vdb   download and build SRA/VDB from GitHub
 --with-static-vdb       always link statically against SRA/VDB
 --with-ngs=DIR          use NCBI NGS SDK installation in DIR
 --without-ngs           do not use the NCBI NGS SDK
 --with-ncbicrypt=DIR    use ncbicrypt installation in DIR
 --without-ncbicrypt     do not use ncbicrypt
 --with-libunwind(=DIR)  use libunwind (in DIR)
 --with-libdw=DIR        use elfutils libdw installation in DIR
 --without-libdw         do not use elfutils libdw
 --with-backward-cpp=DIR use backward-cpp installation in DIR
 --without-backward-cpp  do not use backward-cpp
 --with-backward-cpp-sig  allow backward-cpp to also handle signals
 --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-zstd=DIR         use Zstandard installation in DIR
 --without-zstd          do not use Zstandard
 --with-pcre=DIR         use PCRE installation in DIR
 --without-pcre          use internal copy of PCRE
 --with-pcre2=DIR        use PCRE2 installation in DIR
 --without-pcre2         do not use PCRE2
 --with-mbedtls(=DIR)    use external mbedTLS installation (in DIR)
 --with-gmp=DIR          use GMP installation in DIR
 --without-gmp           do not use GMP
 --with-gcrypt=DIR       use gcrypt installation in DIR
 --without-gcrypt        do not use gcrypt
 --with-nettle=DIR       use Nettle installation in DIR
 --without-nettle        do not use Nettle
 --with-gnutls=DIR       use GNUTLS installation in DIR
 --with-static-gnutls    link GNUTLS statically if possible
 --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-gl2ps         do not use GL2PS
 --with-gl2ps=DIR        use GL2PS installation in DIR
 --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-fastcgipp     do not use fastcgipp library
 --with-fastcgipp=DIR    use fastcgipp 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-drmaa2=DIR       use DRMAA2 grid API installation in DIR
 --without-drmaa2        do not use DRMAA2 grid API
 --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-cereal=DIR       use USC Cereal installation in DIR
 --without-cereal        do not use USC Cereal
 --with-sasl2=DIR        use SASL 2 installation in DIR
 --without-sasl2         do not use SASL 2
 --with-mongodb=DIR      use legacy MongoDB installation in DIR
 --without-mongodb       do not use legacy MongoDB
 --with-mongodb3=DIR     use MongoDB 3 installation in DIR
 --without-mongodb3      do not use MongoDB 3
 --with-leveldb=DIR      use LevelDB installation in DIR
 --without-leveldb       do not use LevelDB
 --with-liburing=DIR     use liburing installation in DIR
 --without-liburing      do not use liburing
 --with-rocksdb=DIR      use RocksDB installation in DIR
 --without-rocksdb       do not use RocksDB
 --with-gmock=DIR        use Google Mock installation in DIR
 --without-gmock         do not use Google Mock
 --with-lapack=DIR       use LAPACK installation in DIR
 --without-lapack        do not use LAPACK
 --with-lmdb=DIR         use LMDB installation in DIR
 --without-lmdb          use internal copy of LMDB
 --with-libuv=DIR        use libuv installation in DIR
 --without-libuv         do not use libuv
 --with-libssh=DIR       use libssh installation in DIR
 --without-libssh        do not use libssh
 --with-libssh2=DIR      use libssh2 installation in DIR
 --without-libssh2       do not use libssh2
 --with-cassandra=DIR    use Datastax Cassandra driver installation in DIR
 --without-cassandra     do not use Datastax Cassandra driver
 --with-nghttp2=DIR      use nghttp2 installation in DIR
 --without-nghttp2       do not use nghttp2
 --with-h2o=DIR          use h2o installation in DIR
 --without-h2o           do not use h2o
 --with-influxdb=DIR     use influxdb-cpp installation in DIR
 --without-influxdb      do not use influxdb-cpp
 --with-libxlsxwriter=DIR use libxlsxwriter installation in DIR
 --without-libxlsxwriter do not use libxlsxwriter
 --with-protobuf=DIR     use protocol buffers installation in DIR
 --without-protobuf      do not use protocol buffers
 --with-grpc=DIR         use GRPC (and protobuf) installation in DIR
 --without-grpc          do not use GRPC
 --with-msgsl=DIR        use Guideline Support Library installation in DIR
 --without-msgsl         do not use the Guideline Support Library
 --with-aws-sdk=DIR      use Amazon Web Services SDK installation in DIR
 --without-aws-sdk       do not use the Amazon Web Services SDK
 --with-crc32c=DIR       use fast CRC32C installation in DIR
 --without-crc32c        do not use fast CRC32C
 --with-google-cloud=DIR use Google Cloud C++ interface in DIR
 --without-google-cloud  do not use Google Cloud
 --with-hiredis=DIR      use Hiredis installation in DIR
 --without-hiredis       do not use Hiredis
 --with-apache-arrow=DIR use Apache Arrow installation in DIR
 --without-apache-arrow  do not use Apache Arrow
 --with-librdkafka=DIR   use librdkafka installation in DIR
 --without-librdkafka    do not use librdkafka
 --with-cppkafka=DIR     use cppkafka installation in DIR
 --without-cppkafka      do not use cppkafka
 --with-thrift=DIR       use Apache Thrift installation in DIR
 --without-thrift        do not use Apache Thrift
 --with-nlohmann-json=DIR use JSON for Modern C++ installation in DIR
 --without-nlohmann-json do not use JSON for Modern C++
 --with-yaml-cpp=DIR     use yaml-cpp installation in DIR
 --without-yaml-cpp      do not use yaml-cpp
 --with-opentracing=DIR  use OpenTracing installation in DIR
 --without-opentracing   do not use OpenTracing
 --with-jaeger=DIR       use Jaeger Tracing installation in DIR
 --without-jaeger        do not use Jaeger tracing
 --with-opentelemetry=DIR use OpenTelemetry installation in DIR
 --without-opentelemetry do not use OpenTelemetry
 --with-3psw=std:netopt  favor standard (system) builds of the above pkgs.
 --without-3psw          do not use any of the above packages
 --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
 --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>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      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" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
      continue
    # Base source directories on path to *input* file.
if test -n "$ac_f"; then
   ac_f_rel=`echo "$ac_f" | sed -e 's,^/.*/\./,,'`
   ac_dir_in=`$as_dirname -- "$ac_f_rel" ||
$as_expr X"$ac_f_rel" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_f_rel" : 'X\(//\)[^/]' \| \
	 X"$ac_f_rel" : 'X\(//\)$' \| \
	 X"$ac_f_rel" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_f_rel" |
    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=/`$as_echo "$ac_dir_in" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_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
      $as_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.69

Copyright (C) 2012 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

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile

# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_cpp

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_compile

# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if eval \${$3+:} false; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##"
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_mongrel

# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_run

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile

# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_link

# ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES
# -----------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_cxx_check_decl ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  as_decl_name=`echo $2|sed 's/ *(.*//'`
  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
#ifndef $as_decl_name
#ifdef __cplusplus
  (void) $as_decl_use;
#else
  (void) $as_decl_name;
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_decl

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
# ---------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_cxx_check_type ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=no"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof ($2))
	 return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof (($2)))
	    return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  eval "$3=yes"
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
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_type

# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_cxx_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_run

# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
# ----------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_cxx_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=$ac_mid; break
else
  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_lo=$ac_mid; break
else
  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  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
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=$ac_mid
else
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval () { return $2; }
static unsigned long int ulongval () { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
  ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_compute_int

# ac_fn_cxx_try_cpp LINENO
# ------------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_cpp

# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
# ---------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_cxx_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if eval \${$3+:} false; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## ---------------------------------------- ##
## Report this to cpp-core@ncbi.nlm.nih.gov ##
## ---------------------------------------- ##"
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_mongrel

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $2 (); 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 $2

/* 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 $2 ();
/* 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_$2 || defined __stub___$2
choke me
#endif

int
main ()
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_func

# ac_fn_cxx_check_func LINENO FUNC VAR
# ------------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_cxx_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $2 (); 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 $2

/* 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 $2 ();
/* 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_$2 || defined __stub___$2
choke me
#endif

int
main ()
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_func

# ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES
# ------------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
# INCLUDES, setting cache variable VAR accordingly.
ac_fn_cxx_check_member ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
if eval \${$4+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main ()
{
static $2 ac_aggr;
if (ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  eval "$4=yes"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$5
int
main ()
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  eval "$4=yes"
else
  eval "$4=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
eval ac_res=\$$4
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_member

# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
# ---------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_cxx_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_compile


# 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]* )
      { NCBI=; unset NCBI;}
      ;;
   no )
      if test "${with_ncbi_c-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-ncbi-c but --without-3psw"
      else
         with_ncbi_c=no
      fi
      if test "${with_aws_sdk-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-aws-sdk but --without-3psw"
      else
         with_aws_sdk=no
      fi
      if test "${with_google_cloud-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-google-cloud but --without-3psw"
      else
         with_google_cloud=no
      fi
      if test "${with_apache_arrow-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-apache-arrow but --without-3psw"
      else
         with_apache_arrow=no
      fi
      if test "${with_nlohmann_json-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-nlohmann-json but --without-3psw"
      else
         with_nlohmann_json=no
      fi
      if test "${with_yaml_cpp-no}" != "no"; then
         as_fn_error $? "incompatible options: --with-yaml-cpp but --without-3psw"
      else
         with_yaml_cpp=no
      fi
      if test "${with_sss-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sss but --without-3psw"
         else
            with_sss=no
         fi
        if test "${with_sssutils-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sssutils but --without-3psw"
         else
            with_sssutils=no
         fi
        if test "${with_sssdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sssdb but --without-3psw"
         else
            with_sssdb=no
         fi
        if test "${with_vdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-vdb but --without-3psw"
         else
            with_vdb=no
         fi
        if test "${with_ngs-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-ngs but --without-3psw"
         else
            with_ngs=no
         fi
        if test "${with_ncbicrypt-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-ncbicrypt but --without-3psw"
         else
            with_ncbicrypt=no
         fi
        if test "${with_libunwind-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libunwind but --without-3psw"
         else
            with_libunwind=no
         fi
        if test "${with_z-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-z but --without-3psw"
         else
            with_z=no
         fi
        if test "${with_bz2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-bz2 but --without-3psw"
         else
            with_bz2=no
         fi
        if test "${with_lzo-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-lzo but --without-3psw"
         else
            with_lzo=no
         fi
        if test "${with_zstd-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-zstd but --without-3psw"
         else
            with_zstd=no
         fi
        if test "${with_pcre-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-pcre but --without-3psw"
         else
            with_pcre=no
         fi
        if test "${with_pcre2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-pcre2 but --without-3psw"
         else
            with_pcre2=no
         fi
        if test "${with_mbedtls-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mbedtls but --without-3psw"
         else
            with_mbedtls=no
         fi
        if test "${with_gmp-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gmp but --without-3psw"
         else
            with_gmp=no
         fi
        if test "${with_gcrypt-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gcrypt but --without-3psw"
         else
            with_gcrypt=no
         fi
        if test "${with_nettle-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-nettle but --without-3psw"
         else
            with_nettle=no
         fi
        if test "${with_gnutls-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gnutls but --without-3psw"
         else
            with_gnutls=no
         fi
        if test "${with_openssl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-openssl but --without-3psw"
         else
            with_openssl=no
         fi
        if test "${with_krb5-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-krb5 but --without-3psw"
         else
            with_krb5=no
         fi
        if test "${with_boost-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-boost but --without-3psw"
         else
            with_boost=no
         fi
        if test "${with_lmdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-lmdb but --without-3psw"
         else
            with_lmdb=no
         fi
        if test "${with_sybase-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sybase but --without-3psw"
         else
            with_sybase=no
         fi
        if test "${with_ftds-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-ftds but --without-3psw"
         else
            with_ftds=no
         fi
        if test "${with_mysql-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mysql but --without-3psw"
         else
            with_mysql=no
         fi
        if test "${with_opengl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-opengl but --without-3psw"
         else
            with_opengl=no
         fi
        if test "${with_mesa-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mesa but --without-3psw"
         else
            with_mesa=no
         fi
        if test "${with_glut-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-glut but --without-3psw"
         else
            with_glut=no
         fi
        if test "${with_glew-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-glew but --without-3psw"
         else
            with_glew=no
         fi
        if test "${with_gl2ps-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gl2ps but --without-3psw"
         else
            with_gl2ps=no
         fi
        if test "${with_wxwidgets-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-wxwidgets but --without-3psw"
         else
            with_wxwidgets=no
         fi
        if test "${with_freetype-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-freetype but --without-3psw"
         else
            with_freetype=no
         fi
        if test "${with_ftgl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-ftgl but --without-3psw"
         else
            with_ftgl=no
         fi
        if test "${with_fastcgi-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-fastcgi but --without-3psw"
         else
            with_fastcgi=no
         fi
        if test "${with_fastcgipp-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-fastcgipp but --without-3psw"
         else
            with_fastcgipp=no
         fi
        if test "${with_bdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-bdb but --without-3psw"
         else
            with_bdb=no
         fi
        if test "${with_orbacus-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-orbacus but --without-3psw"
         else
            with_orbacus=no
         fi
        if test "${with_odbc-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-odbc but --without-3psw"
         else
            with_odbc=no
         fi
        if test "${with_python-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-python but --without-3psw"
         else
            with_python=no
         fi
        if test "${with_perl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-perl but --without-3psw"
         else
            with_perl=no
         fi
        if test "${with_jni-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-jni but --without-3psw"
         else
            with_jni=no
         fi
        if test "${with_sqlite3-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sqlite3 but --without-3psw"
         else
            with_sqlite3=no
         fi
        if test "${with_mimetic-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mimetic but --without-3psw"
         else
            with_mimetic=no
         fi
        if test "${with_sge-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sge but --without-3psw"
         else
            with_sge=no
         fi
        if test "${with_drmaa2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-drmaa2 but --without-3psw"
         else
            with_drmaa2=no
         fi
        if test "${with_icu-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-icu but --without-3psw"
         else
            with_icu=no
         fi
        if test "${with_sp-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sp but --without-3psw"
         else
            with_sp=no
         fi
        if test "${with_expat-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-expat but --without-3psw"
         else
            with_expat=no
         fi
        if test "${with_sablot-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sablot but --without-3psw"
         else
            with_sablot=no
         fi
        if test "${with_libxml-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libxml but --without-3psw"
         else
            with_libxml=no
         fi
        if test "${with_libxslt-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libxslt but --without-3psw"
         else
            with_libxslt=no
         fi
        if test "${with_libexslt-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libexslt but --without-3psw"
         else
            with_libexslt=no
         fi
        if test "${with_xerces-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-xerces but --without-3psw"
         else
            with_xerces=no
         fi
        if test "${with_xalan-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-xalan but --without-3psw"
         else
            with_xalan=no
         fi
        if test "${with_zorba-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-zorba but --without-3psw"
         else
            with_zorba=no
         fi
        if test "${with_oechem-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-oechem but --without-3psw"
         else
            with_oechem=no
         fi
        if test "${with_muparser-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-muparser but --without-3psw"
         else
            with_muparser=no
         fi
        if test "${with_hdf5-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-hdf5 but --without-3psw"
         else
            with_hdf5=no
         fi
        if test "${with_gif-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gif but --without-3psw"
         else
            with_gif=no
         fi
        if test "${with_jpeg-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-jpeg but --without-3psw"
         else
            with_jpeg=no
         fi
        if test "${with_png-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-png but --without-3psw"
         else
            with_png=no
         fi
        if test "${with_tiff-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-tiff but --without-3psw"
         else
            with_tiff=no
         fi
        if test "${with_xpm-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-xpm but --without-3psw"
         else
            with_xpm=no
         fi
        if test "${with_magic-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-magic but --without-3psw"
         else
            with_magic=no
         fi
        if test "${with_curl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-curl but --without-3psw"
         else
            with_curl=no
         fi
        if test "${with_gsoap-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gsoap but --without-3psw"
         else
            with_gsoap=no
         fi
        if test "${with_avro-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-avro but --without-3psw"
         else
            with_avro=no
         fi
        if test "${with_cereal-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-cereal but --without-3psw"
         else
            with_cereal=no
         fi
        if test "${with_sasl2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-sasl2 but --without-3psw"
         else
            with_sasl2=no
         fi
        if test "${with_mongodb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mongodb but --without-3psw"
         else
            with_mongodb=no
         fi
        if test "${with_mongodb3-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-mongodb3 but --without-3psw"
         else
            with_mongodb3=no
         fi
        if test "${with_leveldb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-leveldb but --without-3psw"
         else
            with_leveldb=no
         fi
        if test "${with_liburing-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-liburing but --without-3psw"
         else
            with_liburing=no
         fi
        if test "${with_rocksdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-rocksdb but --without-3psw"
         else
            with_rocksdb=no
         fi
        if test "${with_gmock-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-gmock but --without-3psw"
         else
            with_gmock=no
         fi
        if test "${with_lapack-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-lapack but --without-3psw"
         else
            with_lapack=no
         fi
        if test "${with_libuv-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libuv but --without-3psw"
         else
            with_libuv=no
         fi
        if test "${with_libssh-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libssh but --without-3psw"
         else
            with_libssh=no
         fi
        if test "${with_libssh2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libssh2 but --without-3psw"
         else
            with_libssh2=no
         fi
        if test "${with_cassandra-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-cassandra but --without-3psw"
         else
            with_cassandra=no
         fi
        if test "${with_nghttp2-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-nghttp2 but --without-3psw"
         else
            with_nghttp2=no
         fi
        if test "${with_h2o-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-h2o but --without-3psw"
         else
            with_h2o=no
         fi
        if test "${with_influxdb-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-influxdb but --without-3psw"
         else
            with_influxdb=no
         fi
        if test "${with_libxlsxwriter-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-libxlsxwriter but --without-3psw"
         else
            with_libxlsxwriter=no
         fi
        if test "${with_protobuf-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-protobuf but --without-3psw"
         else
            with_protobuf=no
         fi
        if test "${with_grpc-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-grpc but --without-3psw"
         else
            with_grpc=no
         fi
        if test "${with_msgsl-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-msgsl but --without-3psw"
         else
            with_msgsl=no
         fi
        if test "${with_crc32c-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-crc32c but --without-3psw"
         else
            with_crc32c=no
         fi
        if test "${with_hiredis-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-hiredis but --without-3psw"
         else
            with_hiredis=no
         fi
        if test "${with_librdkafka-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-librdkafka but --without-3psw"
         else
            with_librdkafka=no
         fi
        if test "${with_cppkafka-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-cppkafka but --without-3psw"
         else
            with_cppkafka=no
         fi
        if test "${with_thrift-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-thrift but --without-3psw"
         else
            with_thrift=no
         fi
        if test "${with_opentracing-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-opentracing but --without-3psw"
         else
            with_opentracing=no
         fi
        if test "${with_jaeger-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-jaeger but --without-3psw"
         else
            with_jaeger=no
         fi
        if test "${with_opentelemetry-no}" != "no"; then
            as_fn_error $? "incompatible options: --with-opentelemetry but --without-3psw"
         else
            with_opentelemetry=no
         fi

      { NCBI=; unset NCBI;}
      ;;
   * )
      as_fn_error $? "Unsupported option --with-3psw=$with_3psw"
      ;;
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.69.  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=.
    $as_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append 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
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset 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

    $as_echo "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
    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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; 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

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

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

    if test -s confdefs.h; then
      $as_echo "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      $as_echo "$as_me: caught signal $ac_signal"
    $as_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'; as_fn_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

$as_echo "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
  # We do not want a PATH search for config.site.
  case $CONFIG_SITE in #((
    -*)  ac_site_file1=./$CONFIG_SITE;;
    */*) ac_site_file1=$CONFIG_SITE;;
    *)   ac_site_file1=./$CONFIG_SITE;;
  esac
elif test "x$prefix" != xNONE; then
  ac_site_file1=$prefix/share/config.site
  ac_site_file2=$prefix/etc/config.site
else
  ac_site_file1=$ac_default_prefix/share/config.site
  ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
  test "x$ac_site_file" = xNONE && continue
  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
  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.  DJGPP emulates it as a regular file.
  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_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,)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_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
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`$as_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.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

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-_ was given.
if test "${with__+set}" = set; then :
  withval=$with__;
fi


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


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


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


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


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


# Check whether --with-skew-guard was given.
if test "${with_skew_guard+set}" = set; then :
  withval=$with_skew_guard;
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-rebuilds was given.
if test "${with_lib_rebuilds+set}" = set; then :
  withval=$with_lib_rebuilds;
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-caution was given.
if test "${with_caution+set}" = set; then :
  withval=$with_caution;
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-c was given.
if test "${with_ncbi_c+set}" = set; then :
  withval=$with_ncbi_c;
fi


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


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


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


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


# Check whether --with-downloaded-vdb was given.
if test "${with_downloaded_vdb+set}" = set; then :
  withval=$with_downloaded_vdb;
fi


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


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


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


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


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


## Third-party and system packages

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


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


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


# Check whether --with-backward-cpp was given.
if test "${with_backward_cpp+set}" = set; then :
  withval=$with_backward_cpp;
fi


# Check whether --with-backward-cpp was given.
if test "${with_backward_cpp+set}" = set; then :
  withval=$with_backward_cpp;
fi


# Check whether --with-backward-cpp-sig was given.
if test "${with_backward_cpp_sig+set}" = set; then :
  withval=$with_backward_cpp_sig;
fi


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-krb5 was given.
if test "${with_krb5+set}" = set; then :
  withval=$with_krb5;
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-ftds was given.
if test "${with_ftds+set}" = set; then :
  withval=$with_ftds;
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-mysql was given.
if test "${with_mysql+set}" = set; then :
  withval=$with_mysql;
fi


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-wxwidgets was given.
if test "${with_wxwidgets+set}" = set; then :
  withval=$with_wxwidgets;
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-ucs was given.
if test "${with_wxwidgets_ucs+set}" = set; then :
  withval=$with_wxwidgets_ucs;
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-ftgl was given.
if test "${with_ftgl+set}" = set; then :
  withval=$with_ftgl;
fi


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


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


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


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


# Check whether --with-fastcgipp was given.
if test "${with_fastcgipp+set}" = set; then :
  withval=$with_fastcgipp;
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-orbacus was given.
if test "${with_orbacus+set}" = set; then :
  withval=$with_orbacus;
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-python was given.
if test "${with_python+set}" = set; then :
  withval=$with_python;
fi


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


# Check whether --with-perl was given.
if test "${with_perl+set}" = set; then :
  withval=$with_perl;
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-boost was given.
if test "${with_boost+set}" = set; then :
  withval=$with_boost;
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-tag was given.
if test "${with_boost_tag+set}" = set; then :
  withval=$with_boost_tag;
fi


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# Check whether --with-aws-sdk was given.
if test "${with_aws_sdk+set}" = set; then :
  withval=$with_aws_sdk;
fi


# Check whether --with-aws-sdk was given.
if test "${with_aws_sdk+set}" = set; then :
  withval=$with_aws_sdk;
fi


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


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


# Check whether --with-google-cloud was given.
if test "${with_google_cloud+set}" = set; then :
  withval=$with_google_cloud;
fi


# Check whether --with-google-cloud was given.
if test "${with_google_cloud+set}" = set; then :
  withval=$with_google_cloud;
fi


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


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


# Check whether --with-apache-arrow was given.
if test "${with_apache_arrow+set}" = set; then :
  withval=$with_apache_arrow;
fi


# Check whether --with-apache-arrow was given.
if test "${with_apache_arrow+set}" = set; then :
  withval=$with_apache_arrow;
fi


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


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


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


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


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


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


# Check whether --with-nlohmann-json was given.
if test "${with_nlohmann_json+set}" = set; then :
  withval=$with_nlohmann_json;
fi


# Check whether --with-nlohmann-json was given.
if test "${with_nlohmann_json+set}" = set; then :
  withval=$with_nlohmann_json;
fi


# Check whether --with-yaml-cpp was given.
if test "${with_yaml_cpp+set}" = set; then :
  withval=$with_yaml_cpp;
fi


# Check whether --with-yaml-cpp was given.
if test "${with_yaml_cpp+set}" = set; then :
  withval=$with_yaml_cpp;
fi


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


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


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


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


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


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


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


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


## Optional projects

# 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-internal was given.
if test "${with_internal+set}" = set; then :
  withval=$with_internal;
fi


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


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


# Check whether --with-gbench was given.
if test "${with_gbench+set}" = set; then :
  withval=$with_gbench;
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
         as_fn_error $? "incompatible options: --without-dll but --with-gbench" "$LINENO" 5
      else
         : ${with_dll:=yes}
      fi
     if test "$with_mt" = "no"; then
         as_fn_error $? "incompatible options: --without-mt but --with-gbench" "$LINENO" 5
      else
         : ${with_mt:=yes}
      fi
     if test "$with_gui" = "no"; then
         as_fn_error $? "incompatible options: --without-gui but --with-gbench" "$LINENO" 5
      else
         : ${with_gui:=yes}
      fi
     if test "$with_exe" = "no"; then
         as_fn_error $? "incompatible options: --without-exe but --with-gbench" "$LINENO" 5
      else
         : ${with_exe:=yes}
      fi
     if test "$with_serial" = "no"; then
         as_fn_error $? "incompatible options: --without-serial but --with-gbench" "$LINENO" 5
      else
         : ${with_serial:=yes}
      fi
     if test "$with_objects" = "no"; then
         as_fn_error $? "incompatible options: --without-objects but --with-gbench" "$LINENO" 5
      else
         : ${with_objects:=yes}
      fi
     if test "$with_algo" = "no"; then
         as_fn_error $? "incompatible options: --without-algo but --with-gbench" "$LINENO" 5
      else
         : ${with_algo:=yes}
      fi
     if test "$with_glew" = "no"; then
         as_fn_error $? "incompatible options: --without-glew but --with-gbench" "$LINENO" 5
      else
         : ${with_glew:=yes}
      fi
     if test "$with_wxwidgets" = "no"; then
         as_fn_error $? "incompatible options: --without-wxwidgets but --with-gbench" "$LINENO" 5
      else
         : ${with_wxwidgets:=yes}
      fi
     if test "$with_ftgl" = "no"; then
         as_fn_error $? "incompatible options: --without-ftgl but --with-gbench" "$LINENO" 5
      else
         : ${with_ftgl:=yes}
      fi
     if test "$with_sqlite3" = "no"; then
         as_fn_error $? "incompatible options: --without-sqlite3 but --with-gbench" "$LINENO" 5
      else
         : ${with_sqlite3:=yes}
      fi
     if test "$with_bdb" = "no"; then
         as_fn_error $? "incompatible options: --without-bdb but --with-gbench" "$LINENO" 5
      else
         : ${with_bdb:=yes}
      fi
     if test "$with_boost" = "no"; then
         as_fn_error $? "incompatible options: --without-boost but --with-gbench" "$LINENO" 5
      else
         : ${with_boost:=yes}
      fi
     if test "$with_xslt" = "no"; then
         as_fn_error $? "incompatible options: --without-xslt but --with-gbench" "$LINENO" 5
      else
         : ${with_xslt:=yes}
      fi

   : ${with_projects=scripts/projects/ncbi_gbench.lst}
elif test "$with_jni" = "yes" ; then
   if test "$with_dll" = "no"; then
         as_fn_error $? "incompatible options: --without-dll but --with-jni" "$LINENO" 5
      else
         with_dll=yes
      fi
     if test "$with_mt" = "no"; then
         as_fn_error $? "incompatible options: --without-mt but --with-jni" "$LINENO" 5
      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_libdw=no}
   : ${with_ncbicrypt=no}
   : ${with_pcre=no} # Too much variation across distributions.
   : ${with_pcre2=no}
   : ${with_sse42=no}

$as_echo "#define NCBI_BIN_RELEASE 1" >>confdefs.h

fi

case "$with_strip:$with_symbols" in
   yes:yes )
      as_fn_error $? "incompatible options: --with-strip but --with-symbols" "$LINENO" 5
      ;;
   yes:* )
      with_symbols=no
      ;;
esac

if test "$with_debug" = no; then
    : ${with_symbols=no}
    : ${with_optimization=yes}
    if test "${with_max_debug-no}" != no; then
       as_fn_error $? "incompatible options: --without-debug but --with-max-debug" "$LINENO" 5
    fi
else
    : ${with_symbols=yes}
    : ${with_optimization=no}
fi

if test "$with_openmp" = yes; then
   if test "$with_mt" = no; then
      as_fn_error $? "incompatible options: --without-mt but --with-openmp" "$LINENO" 5
   fi
   : ${with_mt=yes}
fi

case "$with_downloaded_vdb:$with_vdb" in
   yes:no )
      as_fn_error $? "incompatible options: --without-vdb but
                    --with-downloaded-vdb" "$LINENO" 5
      ;;
   yes: )
      with_vdb=yes
      ;;
esac

case "$with_static_vdb:$with_vdb" in
   yes:no )
      as_fn_error $? "incompatible options: --without-vdb but --with-static-vdb" "$LINENO" 5
      ;;
   yes: )
      with_vdb=yes
      ;;
   :* )
      with_static_vdb=$with_bin_release
      ;;
esac

case "$with_static_gnutls:$with_gnutls" in
   yes:no )
      as_fn_error $? "incompatible options: --without-gnutls but --with-static-gnutls" "$LINENO" 5
      ;;
   yes: )
      with_gnutls=yes
      ;;
   :yes )
      with_static_gnutls=$with_bin_release
      ;;
esac

if test -n "$with_serial"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-serial is deprecated" >&5
$as_echo "$as_me: WARNING: --with(out)-serial is deprecated" >&2;}
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please simply pass an appropriate project list" >&5
$as_echo "$as_me: WARNING: please simply pass an appropriate project list" >&2;}
    fi
   if test -n "$with_objects"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-objects is deprecated" >&5
$as_echo "$as_me: WARNING: --with(out)-objects is deprecated" >&2;}
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please simply pass an appropriate project list" >&5
$as_echo "$as_me: WARNING: please simply pass an appropriate project list" >&2;}
    fi
   if test -n "$with_dbapi"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-dbapi is deprecated" >&5
$as_echo "$as_me: WARNING: --with(out)-dbapi is deprecated" >&2;}
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please simply pass an appropriate project list" >&5
$as_echo "$as_me: WARNING: please simply pass an appropriate project list" >&2;}
    fi
   if test -n "$with_algo"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-algo is deprecated" >&5
$as_echo "$as_me: WARNING: --with(out)-algo is deprecated" >&2;}
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please simply pass an appropriate project list" >&5
$as_echo "$as_me: WARNING: please simply pass an appropriate project list" >&2;}
    fi


#### Check for special options
if test "$with_extra_action" = "yes" ; then
   as_fn_error $? "--with-extra-action must have a value after =" "$LINENO" 5
fi
if test "$with_extra_action" = "no" ; then
   as_fn_error $? "--without-extra-action is not allowed" "$LINENO" 5
fi

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

     else
        PROJECTS=""

        if test -f projects; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: default projects file \"projects\" is unreadable." >&5
$as_echo "$as_me: WARNING: default projects file \"projects\" is unreadable." >&2;}
        elif test -h projects; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: default projects file \"projects\" is a dangling link." >&5
$as_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"  ||  \
      as_fn_error $? "unable to read requested projects file \"$abs_projects\"." "$LINENO" 5
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

want_cxx20=no
want_c2x=no
if test -n "$with_experimental"; then
   NCBI_C_PATH_TAGS="/ncbi.gi64 .gi64"
   want_gi32=no
   want_gi64=no
   for x in `echo $with_experimental | tr , ' '`; do
      case "$x" in
         ChaosMonkey )

$as_echo "#define NCBI_MONKEY 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}ChaosMonkey"; WithFeaturesSep=" "
            ;;
         Int4GI )

$as_echo "#define NCBI_INT4_GI 1" >>confdefs.h

            NCBI_C_PATH_TAGS=
                      WithFeatures="$WithFeatures${WithFeaturesSep}Int4GI"; WithFeaturesSep=" "
            want_gi32=yes
            ;;
         Int8GI )

$as_echo "#define NCBI_INT8_GI 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}Int8GI"; WithFeaturesSep=" "
            want_gi64=yes
            ;;
         StrictGI )

$as_echo "#define NCBI_STRICT_GI 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}Int8GI"; WithFeaturesSep=" "
                      WithFeatures="$WithFeatures${WithFeaturesSep}StrictGI"; WithFeaturesSep=" "
            want_gi64=yes
            ;;
         StrictEntrezId )
            $as_echo "#define NCBI_STRICT_GI 1" >>confdefs.h


$as_echo "#define NCBI_TEST_STRICT_ENTREZ_ID 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}Int8GI"; WithFeaturesSep=" "
                      WithFeatures="$WithFeatures${WithFeaturesSep}StrictGI"; WithFeaturesSep=" "
                      WithFeatures="$WithFeatures${WithFeaturesSep}StrictEntrezID"; WithFeaturesSep=" "
            want_gi64=yes
            ;;
         StrictTaxId )
            $as_echo "#define NCBI_STRICT_GI 1" >>confdefs.h


$as_echo "#define NCBI_STRICT_TAX_ID 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}Int8GI"; WithFeaturesSep=" "
                      WithFeatures="$WithFeatures${WithFeaturesSep}StrictGI"; WithFeaturesSep=" "
                      WithFeatures="$WithFeatures${WithFeaturesSep}StrictTaxID"; WithFeaturesSep=" "
            want_gi64=yes
            ;;
         PSGLoader )
            # Contingent on third-party library availability
            ;;
         BM64 )

$as_echo "#define BM64ADDR 1" >>confdefs.h

                      WithFeatures="$WithFeatures${WithFeaturesSep}BM64"; WithFeaturesSep=" "
            ;;
         C++20 )
            want_cxx20=yes
            ;;
         C2X )
            want_c2x=yes
            ;;
         * )
            as_fn_error $? "unrecognized experimental feature \"$x\"." "$LINENO" 5
            ;;
      esac
   done
   if test "$want_gi32:$want_gi64" = "yes:yes"; then
      as_fn_error $? "Incompatible experimental features Int8GI (and/or StrictGI) and Int4GI." "$LINENO" 5
   fi
fi

#### Always define this

$as_echo "#define NCBI_CXX_TOOLKIT 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking TeamCity build number" >&5
$as_echo_n "checking TeamCity build number... " >&6; }
if test -n "$TEAMCITY_VERSION" -a -n "$BUILD_NUMBER"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NUMBER" >&5
$as_echo "$BUILD_NUMBER" >&6; }
   NCBI_TEAMCITY_BUILD_NUMBER=$BUILD_NUMBER
   NCBI_TEAMCITY_PROJECT_NAME=$TEAMCITY_PROJECT_NAME
   NCBI_TEAMCITY_BUILDCONF_NAME=$TEAMCITY_BUILDCONF_NAME
   NCBI_TEAMCITY_BUILD_ID=`sed -ne 's/^teamcity\.build\.id=//p' \
                           $TEAMCITY_BUILD_PROPERTIES_FILE`
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
$as_echo "none" >&6; }
   NCBI_TEAMCITY_BUILD_NUMBER=0
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking VCS revision" >&5
$as_echo_n "checking VCS revision... " >&6; }
gitrev=`git -C "$srcdir" log -1 --format=%h 2>/dev/null`
svnrev=`svn info "$srcdir" 2>/dev/null | sed -ne 's/^Revision: //p'`
if test -n "$svnrev"; then
   NCBI_SUBVERSION_REVISION=$svnrev
fi
if test -n "$gitrev"; then
   NCBI_GIT_BRANCH=`git -C "$srcdir" branch --show-current`
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gitrev (Git: $NCBI_GIT_BRANCH)" >&5
$as_echo "$gitrev (Git: $NCBI_GIT_BRANCH)" >&6; }
   NCBI_REVISION=$gitrev
   : ${NCBI_SUBVERSION_REVISION=0}
elif test -n "$svnrev"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svnrev (Subversion)" >&5
$as_echo "$svnrev (Subversion)" >&6; }
   NCBI_SUBVERSION_REVISION=$svnrev
   NCBI_REVISION=$svnrev
elif test -n "$NCBI_SUBVERSION_REVISION"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCBI_SUBVERSION_REVISION" >&5
$as_echo "$NCBI_SUBVERSION_REVISION" >&6; }
   NCBI_REVISION=$NCBI_SUBVERSION_REVISION
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
   NCBI_SUBVERSION_REVISION=0
fi
if test -n "$NCBI_REVISION"; then
   # The overall presence or absence of revision info should be stable,
   # even if the specific revision ID evolves.

$as_echo "#define HAVE_NCBI_REVISION 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking NCBI stable components' version" >&5
$as_echo_n "checking NCBI stable components' version... " >&6; }
scver=`svn info "$srcdir/src/build-system" 2>/dev/null |
 sed -ne 's,^URL: .*/production/components/[^/]*/\([1-9][0-9]*\)\..*,\1,p'`
if test -n "$scver"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $scver" >&5
$as_echo "$scver" >&6; }
   NCBI_SC_VERSION=$scver
elif test -n "$NCBI_SC_VERSION"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NCBI_SC_VERSION" >&5
$as_echo "$NCBI_SC_VERSION" >&6; }
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
   NCBI_SC_VERSION=0
fi


$as_echo "#define HAVE_COMMON_NCBI_BUILD_VER_H 1" >>confdefs.h


#### 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
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in src/build-system \"$srcdir\"/src/build-system" "$LINENO" 5
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 ||
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if ${ac_cv_build+:} false; then :
  $as_echo_n "(cached) " >&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 &&
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
if ${ac_cv_host+:} false; then :
  $as_echo_n "(cached) " >&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` ||
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
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.
# Reject install programs that cannot install multiple files.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if ${ac_cv_path_install+:} false; then :
  $as_echo_n "(cached) " >&6
else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    # Account for people who put trailing slashes in PATH elements.
case $as_dir/ in #((
  ./ | .// | /[cC]/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  /usr/ucb/* ) ;;
  *)
    # OSF1 and SCO ODT 3.0 have their own names for install.
    # Don't use installbsd from OSF since it installs stuff as root
    # by default.
    for ac_prog in ginstall scoinst install; do
      for ac_exec_ext in '' $ac_executable_extensions; do
	if as_fn_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
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

rm -rf conftest.one conftest.two conftest.dir

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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$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'


#### Help ICC get off the ground ASAP.
case "/$CXX" in
   */icpc )
      if test -d /opt/ncbi/gcc -o -d /usr/local/gcc; then
         case "`$CXX -dumpversion`:$host_cpu" in
            *:i?86)           v=4.4.5 ;;
            ?.* | 1[01].* ) v=4.0.1 ;;
            1[23].*)        v=4.4.2 ;;
            1[456].*)       v=4.9.3 ;;
            17.*) v=7.3.0; CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 $CPPFLAGS" ;;
            *)                v=7.3.0 ;;
         esac
         for gcc in /opt/ncbi/gcc/$v/bin/gcc /usr/local/gcc/$v/bin/gcc; do
            if test -x $gcc; then
               CC="$CC -gcc-name=$gcc"
               CXX="$CXX -gcc-name=$gcc"
               case $gcc in
                  /opt/* )
                     LDFLAGS="-Wl,-rpath,/opt/ncbi/gcc/$v/lib64 $LDFLAGS"
                     ;;
                  /usr/* )
                     LDFLAGS="-Wl,-rpath,/usr/lib64/gcc-$v $LDFLAGS"
                     ;;
               esac
               break
            fi
         done
      fi
      ;;
   */icpx )
      case "$host_cpu" in
         i?86   ) intel_cpu_name=ia32      ;;
         x86_64 ) intel_cpu_name=intel64   ;;
         *      ) intel_cpu_name=$host_cpu ;;
      esac

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

      compiler_root=${x_CXX%/bin/*}
      icc_libdir=$compiler_root/compiler/lib/$intel_cpu_name
      test -d $icc_libdir  ||  icc_libdir=$compiler_root/lib
      LDFLAGS="-L$icc_libdir -Wl,-rpath,$icc_libdir -lintlc $LDFLAGS"
      ;;
esac

#### Don't let Clang pick up old (pre-C++14) system standard
#### library installations on Linux.
case "$host_os:/$CXX" in
   linux*:*/clang* | */icpx )
      case "`$CXX --version`" in
         *version\ 3.* )
            gccver=5.3.0
            CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 $CPPFLAGS"
            ;;
         *version\ ?.* | *version\ 1[0-3].* )
            gccver=7.3.0
            ;;
         Intel*\ 201* | Intel*\ 2020.* | Intel*\ 2021.[0-6]* )
            gccver=12.2.0
            ;;
         * )
            gccver=13.2.0
            ;;
      esac
      gccdir=/opt/ncbi/gcc/$gccver
      if test -d $gccdir; then
         # CPPFLAGS="--gcc-toolchain=$gccdir $CPPFLAGS"
         # LDFLAGS="--gcc-toolchain=$gccdir $LDFLAGS"
         for d in `$gccdir/bin/g++ -v -E -x c++ $ARCH_CFLAGS $ARCH_CPPFLAGS - \
                   </dev/null 2>&1 | fgrep 'include/c++' | tac`; do
            ncbi_fix_dir_tmp=`if cd $d; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $d && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            d=$ncbi_fix_dir_tmp2
         else
            case "$d" in
               /*) ;;
               * ) d=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) d=$ncbi_fix_dir_tmp ;;
 esac
            # We don't use a dedicated CXXCPPFLAGS variable, but sticking
            # with -isystem rather than -cxx-isystem avoids spurious
            # warnings when also using ccache or distcc, and should still
            # be safe in practice.  (The three libstdc++ headers that have
            # the same names as system headers all arrange to include
            # those headers via #include_next, and to conditionalize any
            # C++ declarations on compiling as actual C++.)
            CPPFLAGS="-isystem $d $CPPFLAGS"
         done
         CPPFLAGS="-nostdinc++ $CPPFLAGS"
         libstdcxx=`$gccdir/bin/g++ --print-file-name=libstdc++.a`
         d=`dirname $libstdcxx`
         ncbi_fix_dir_tmp=`if cd $d; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $d && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            d=$ncbi_fix_dir_tmp2
         else
            case "$d" in
               /*) ;;
               * ) d=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) d=$ncbi_fix_dir_tmp ;;
 esac
         LDFLAGS="-L$d -Wl,-rpath,$d $LDFLAGS"
         crtbegin=`$gccdir/bin/g++ --print-file-name=crtbegin.o`
         d=`dirname $crtbegin`
         ncbi_fix_dir_tmp=`if cd $d; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $d && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            d=$ncbi_fix_dir_tmp2
         else
            case "$d" in
               /*) ;;
               * ) d=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) d=$ncbi_fix_dir_tmp ;;
 esac
         LDFLAGS="-L$d -B$d $LDFLAGS"
      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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_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"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM | *.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
  ac_file=''
fi
if test -z "$ac_file"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if ${ac_cv_objext+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if ${ac_cv_c_compiler_gnu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if ${ac_cv_prog_cc_g+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
else
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if ${ac_cv_prog_cc_c89+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
#include <stdio.h>
struct stat;
/* 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"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_c89=$ac_arg
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)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :

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

ac_build_objext=$ac_objext
{ ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;}
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if ${ac_cv_prog_CPP+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
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



cross_compiling_build=no

ac_build_tool_prefix=
if test -n "$build"; then :
  ac_build_tool_prefix="$build-"
elif test -n "$build_alias"; then :
  ac_build_tool_prefix="$build_alias-"
fi

ac_ext=c
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_build_c_compiler_gnu

ac_ext=c
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_build_c_compiler_gnu
if test -n "$ac_build_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_build_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC_FOR_BUILD"; then
  ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
if test -n "$CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
$as_echo "$CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC_FOR_BUILD"; then
  ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC_FOR_BUILD"; then
  ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
if test -n "$ac_ct_CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
$as_echo "$ac_ct_CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_CC_FOR_BUILD" = x; then
    CC_FOR_BUILD=""
  else
    case $cross_compiling_build:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
  fi
else
  CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD"
fi

if test -z "$CC_FOR_BUILD"; then
          if test -n "$ac_build_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_build_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC_FOR_BUILD"; then
  ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}cc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
if test -n "$CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
$as_echo "$CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  fi
fi
if test -z "$CC_FOR_BUILD"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC_FOR_BUILD"; then
  ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_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_FOR_BUILD="cc"
    $as_echo "$as_me:${as_lineno-$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_FOR_BUILD
  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_FOR_BUILD to just the basename; use the full file name.
    shift
    ac_cv_prog_CC_FOR_BUILD="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
if test -n "$CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
$as_echo "$CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$CC_FOR_BUILD"; then
  if test -n "$ac_build_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_build_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC_FOR_BUILD"; then
  ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC_FOR_BUILD="$ac_build_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
if test -n "$CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
$as_echo "$CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$CC_FOR_BUILD" && break
  done
fi
if test -z "$CC_FOR_BUILD"; then
  ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC_FOR_BUILD"; then
  ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
if test -n "$ac_ct_CC_FOR_BUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
$as_echo "$ac_ct_CC_FOR_BUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_CC_FOR_BUILD" && break
done

  if test "x$ac_ct_CC_FOR_BUILD" = x; then
    CC_FOR_BUILD=""
  else
    case $cross_compiling_build:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
  fi
fi

fi


test -z "$CC_FOR_BUILD" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if ${ac_cv_c_compiler_gnu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GCC_FOR_BUILD=yes
else
  GCC_FOR_BUILD=
fi
ac_test_CFLAGS=${CFLAGS_FOR_BUILD+set}
ac_save_CFLAGS=$CFLAGS_FOR_BUILD
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5
$as_echo_n "checking whether $CC_FOR_BUILD accepts -g... " >&6; }
if ${ac_cv_build_prog_cc_g+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_build_prog_cc_g=no
   CFLAGS_FOR_BUILD="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_build_prog_cc_g=yes
else
  CFLAGS_FOR_BUILD=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS_FOR_BUILD="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_build_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5
$as_echo "$ac_cv_build_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
  CFLAGS_FOR_BUILD=$ac_save_CFLAGS
elif test $ac_cv_build_prog_cc_g = yes; then
  if test "$GCC_FOR_BUILD" = yes; then
    CFLAGS_FOR_BUILD="-g -O2"
  else
    CFLAGS_FOR_BUILD="-g"
  fi
else
  if test "$GCC_FOR_BUILD" = yes; then
    CFLAGS_FOR_BUILD="-O2"
  else
    CFLAGS_FOR_BUILD=
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to accept ISO C89" >&5
$as_echo_n "checking for $CC_FOR_BUILD option to accept ISO C89... " >&6; }
if ${ac_cv_build_prog_cc_c89+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_build_prog_cc_c89=no
ac_save_CC=$CC_FOR_BUILD
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
#include <stdio.h>
struct stat;
/* 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_FOR_BUILD="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_build_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_build_objext
  test "x$ac_cv_build_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC_FOR_BUILD=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_build_prog_cc_c89" in
  x)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5
$as_echo "$ac_cv_build_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_build_prog_cc_c89" != xno; then :

fi

ac_ext=c
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_build_c_compiler_gnu

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test "${ac_cv_build_exeext+set}" = set && test "$ac_cv_build_exeext" != no;
	then :; else
	   ac_cv_build_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_build_exeext" = no && ac_cv_build_exeext=

else
  ac_file=''
fi
if test -z "$ac_file"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_build_exeext=$ac_cv_build_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_build_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_build_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_build_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_exeext" >&5
$as_echo "$ac_cv_build_exeext" >&6; }

rm -f conftest.$ac_ext
BUILD_EXEEXT=$ac_cv_build_exeext
ac_build_exeext=$BUILD_EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling_build" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_build_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling_build=no
  else
    if test "$cross_compiling_build" = maybe; then
	cross_compiling_build=yes
    else
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--build'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling_build" >&5
$as_echo "$cross_compiling_build" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_build_exeext conftest.out
ac_clean_files=$ac_clean_files_save

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if ${ac_cv_build_objext+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.dSYM ) ;;
    *) ac_cv_build_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_build_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_objext" >&5
$as_echo "$ac_cv_build_objext" >&6; }
BUILD_OBJEXT=$ac_cv_build_objext
ac_build_objext=$BUILD_OBJEXT

ac_ext=c
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_build_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then
  CPP_FOR_BUILD=
fi
if test -z "$CPP_FOR_BUILD"; then
  if ${ac_cv_build_prog_CPP+:} false; then :
  $as_echo_n "(cached) " >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

    done
    ac_cv_build_prog_CPP=$CPP_FOR_BUILD

fi
  CPP_FOR_BUILD=$ac_cv_build_prog_CPP
else
  ac_cv_build_prog_CPP=$CPP_FOR_BUILD
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5
$as_echo "$CPP_FOR_BUILD" >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi

ac_ext=c
ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_build_c_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



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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if ${ac_cv_cxx_compiler_gnu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if ${ac_cv_prog_cxx_g+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
else
  CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$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) '`"
   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 Clang compiler (which also masquerades as GCC)
if test "$KCC" != "yes"  -a  "$ICC" != yes; then
   clang_ver="`$real_CXX -v 2>&1 | grep clang | grep ' version '`"
   if test -n "$clang_ver"; then
      Clang=yes
      GCC=no
   fi
fi


#### Detect IBM VisualAge compiler
if test "$GCC" != "yes"  -a  "$KCC" != "yes"  -a  "$ICC" != "yes" \
  -a  "$Clang" != "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  "$Clang" != "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  "$Clang" != "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 -dumpfullversion 2>/dev/null \
       || $real_CXX -dumpversion 2>&1`"
   case "$compiler_ver" in
     *.*.* ) ;;
     * )
       fullversion="`$real_CXX --version | \
           sed -ne '1s/.*) \([1-9][0-9.]*\).*/\1/p'`"
       case "$fullversion" in
         "$compiler_ver".* ) compiler_ver=$fullversion ;;
       esac
       ;;
   esac
   compiler="GCC"
   ncbi_compiler="GCC"
   ncbi_compiler_ver="$compiler_ver"
             WithFeatures="$WithFeatures${WithFeaturesSep}GCC"; WithFeaturesSep=" "
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 "$Clang" = "yes" ; then
   compiler_ver="$clang_ver"
   case "$compiler_ver" in
      *Apple* )
         compiler=AppleClang
         ncbi_compiler=APPLE_CLANG
                   WithFeatures="$WithFeatures${WithFeaturesSep}AppleClang"; WithFeaturesSep=" "
         ;;
      * )
         compiler=LLVMClang
         ncbi_compiler=LLVM_CLANG
                   WithFeatures="$WithFeatures${WithFeaturesSep}LLVMClang"; WithFeaturesSep=" "
         ;;
   esac
   ncbi_compiler_ver="`echo $clang_ver | sed 's%.*version \([0-9.]*\).*%\1%'`"
             WithFeatures="$WithFeatures${WithFeaturesSep}Clang"; 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/' ;;
    [GI]CC:??.? ) ncbi_compiler_sed='s/\([0-9][0-9]\)\.\([0-9]\)/\1\20/' ;;
    GCC:??.?.? | ICC:??.?.? | ICC:??.?.?.* | *Clang:??.?.? )
       ncbi_compiler_sed='s/\([0-9][0-9]\)\.\([0-9]\)\.\([0-9]\).*/\1\2\3/' ;;
    GCC:?? )    ncbi_compiler_sed='s/\([0-9][0-9]\)/\100/' ;;
    ICC:20??.?.? | ICC:20??.?.?.* )
       ncbi_compiler_sed='s/20\([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/' ;;
    *)    as_fn_error $? "Do not know how to parse $compiler version number $ncbi_compiler_ver" "$LINENO" 5 ;;
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

$as_echo "#define NCBI_COMPILER_GCC 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_KCC 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_ICC 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_APPLE_CLANG 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_LLVM_CLANG 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_WORKSHOP 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_MIPSPRO 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_VISUALAGE 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_COMPAQ 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_CRAY 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_MSVC 1" >>confdefs.h


$as_echo "#define NCBI_COMPILER_UNKNOWN 1" >>confdefs.h

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 )
       as_fn_error $? "Configuration has been canceled per --with-caution." "$LINENO" 5 ;;
    no )
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding without questions per --without-caution" >&5
$as_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]* )  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding at your own risk..." >&5
$as_echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  as_fn_error $? "Configuration has been canceled by user." "$LINENO" 5 ;;
       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`"

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 $x_CXX | sed -ne 's:\(.*\)[/\\]bin[/\\].*:\1:p'`
x_CXX=



#### 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 | *Clang )
                                : ${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 ) as_fn_error $? "$msg" "$LINENO" 5 ;;
          ''  ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $msg" >&5
$as_echo "$as_me: WARNING: $msg" >&2;}; with_mt=no ;;
       esac
       ;;
   esac
fi

case "$host_os:$compiler" in
  solaris2.10:GCC ) : ${THREAD_LIBS:="-lposix4"} ;;
  solaris*        ) : ${THREAD_LIBS:="-lpthread -lposix4"} ;;
  freebsd*        ) : ${THREAD_LIBS:="-pthread"} ;; # for LMDB in ST builds
  *               ) : ${THREAD_LIBS:="-lpthread"} ;;
esac

if test "$with_mt" != "no" ; then
   CPPFLAGS="$CPPFLAGS -D_MT -D_REENTRANT -D_THREAD_SAFE"
   LIBS="$LIBS $THREAD_LIBS"
   case "$host_os:$compiler" in
     solaris2.??:* | solaris*:GCC | *:Compaq | irix* | aix* | darwin* | cygwin*)
        NCBIATOMIC_LIB=
        ;;
     *:GCC | *:ICC | *Clang | linux*:KCC )
        case "$host_cpu" in
           i?86 | powerpc* | ppc* | x86_64 | sparc* | aarch64 | arm*64* )
              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 | LLVMClang ) # Not yet AppleClang, as of version 11.
         : ${OPENMP_FLAGS=-fopenmp}
         ;;
      ICC )
         : ${OPENMP_FLAGS=-qopenmp -qopenmp-link=static}
         ;;
      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=
   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:$compiler_version" in
 solaris2\.6:GCC:* )
   echo "GCC compiler is not supported for:  $host"
   compiler=
   ;;

 solaris*:GCC:* )
   STRIP="@:"
   ;;

 linux*:ICC:??? | linux*:ICC:1??? )
   # -we70: "incomplete type is not allowed" should be an error, not a warning!
   # -we10159: So should "invalid argument for option '-std'", to allow for
   #           effective configure-time probing.
   # -wd2651: Suppress spurious "attribute does not apply to any entity"
   #          when deprecating enum values (via NCBI_STD_DEPRECATED).
   CFLAGS="-we70 -we10159 $CFLAGS"
   CXXFLAGS="-we70 -we10159 -wd2651 $CXXFLAGS"
   MATH_LIBS=-Wl,-lm # avoid static libimf in shared libs
   ;;

 linux*:GCC:* )
    if test -r $srcdir/src/build-system/config.site.ncbi && test -d "$NCBI"
    then
       case "$compiler_version" in
          5?? ) CPPFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 $CPPFLAGS" ;;
       esac
    fi
    ;;

 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:* )
   CPPFLAGS="-D_GLIBCXX_USE_C99 $CPPFLAGS"
   CXXFLAGS="-Wa,-mbig-obj $CXXFLAGS"
   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:* | darwin*:*Clang:* )
   case `uname -m` in
      *64 ) : ${with_64=yes} ;;
      *   ) : ${with_64=no}  ;;
   esac
   # Per <https://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 test "$compiler" = AppleClang \
      ||  ("$compiler" = GCC  &&  $CXX -v 2>&1 | grep -q Apple) ; then
      CFLAGS="-fpascal-strings $CFLAGS"
      CXXFLAGS="-fpascal-strings $CXXFLAGS"
      if test "$compiler" = AppleClang; 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 -headerpad_max_install_names $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"
               ;;
            * )
               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 -Wl,-headerpad_max_install_names $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
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No dlfcn.h in /usr/include or /sw/include." >&5
$as_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'
   FOUNDATION_LIBS='-framework Foundation'

   # New in macOS 10.12; don't attempt to use on older versions
   ac_cv_func_clock_gettime=no
   ac_cv_search_clock_gettime=no
   ;;
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 )
       as_fn_error $? "Configuration has been canceled per --with-caution." "$LINENO" 5 ;;
    no )
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding without questions per --without-caution" >&5
$as_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]* )  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding at your own risk..." >&5
$as_echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  as_fn_error $? "Configuration has been canceled by user." "$LINENO" 5 ;;
       esac
       ;;
 esac
   echo
   compiler="UNKNOWN"
fi


C_LIBS=$LIBS


ARCH_CPPFLAGS=
#### architecture settings, and extra C++ LIBS
if 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 | *Clang )
      # 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"
      ;;
    * )
      as_fn_error $? "Do not know how to compile 64-bit with compiler $CXX $compiler_ver $host:$compiler" "$LINENO" 5
      ;;
   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 | *Clang )
         # 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...
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to compile 32-bit with compiler $CXX $compiler_ver $host:$compiler" >&5
$as_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
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



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if ${ac_cv_path_GREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -z "$GREP"; then
  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"
      as_fn_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
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_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
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    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
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if ${ac_cv_path_EGREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  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"
      as_fn_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
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_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
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    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
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
if test "x$ac_cv_header_minix_config_h" = x""yes; then :
  MINIX=yes
else
  MINIX=
fi


  if test "$MINIX" = yes; then

$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h


$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h


$as_echo "#define _MINIX 1" >>confdefs.h

  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
if ${ac_cv_safe_to_define___extensions__+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#         define __EXTENSIONS__ 1
          $ac_includes_default
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_safe_to_define___extensions__=yes
else
  ac_cv_safe_to_define___extensions__=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
  test $ac_cv_safe_to_define___extensions__ = yes &&
    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h

  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h

  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h

  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h

  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h



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 -n "$with_64"; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports --with(out)-64" >&5
$as_echo_n "checking whether this system supports --with(out)-64... " >&6; }
if ${ncbi_cv_sys_with64_ok+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #include <string>
int
main ()
{
std::string* sp = new std::string("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_sys_with64_ok=yes
else
  ncbi_cv_sys_with64_ok=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_sys_with64_ok" >&5
$as_echo "$ncbi_cv_sys_with64_ok" >&6; }
   if test "$ncbi_cv_sys_with64_ok" = no; then
      as_fn_error $? "cannot continue; please try different options" "$LINENO" 5
   fi
fi

case "$host_os:$compiler" in
   darwin*:GCC | darwin*Clang )
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-rpath" >&5
$as_echo_n "checking whether $CC supports -Wl,-rpath... " >&6; }
if ${ncbi_cv_prog_cc_wl_rpath+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LDFLAGS=$LDFLAGS
          LDFLAGS="-Wl,-rpath,. $LDFLAGS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_wl_rpath=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_wl_rpath" >&5
$as_echo "$ncbi_cv_prog_cc_wl_rpath" >&6; }
      ;;
   cygwin* )
      ;;
   *:GCC | *:ICC | *Clang )
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC has an option to export all symbols" >&5
$as_echo_n "checking whether $CC has an option to export all symbols... " >&6; }
if ${ncbi_cv_prog_cc_export_all+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_export_all=$x
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_export_all" >&5
$as_echo "$ncbi_cv_prog_cc_export_all" >&6; }
      test "$ncbi_cv_prog_cc_export_all" = no  || \
         LDFLAGS="$ncbi_cv_prog_cc_export_all $LDFLAGS"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--{en,dis}able-new-dtags" >&5
$as_echo_n "checking whether $CC supports -Wl,--{en,dis}able-new-dtags... " >&6; }
if ${ncbi_cv_prog_cc_new_dtags+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LDFLAGS=$LDFLAGS
          LDFLAGS="-Wl,--enable-new-dtags $LDFLAGS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_new_dtags=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_new_dtags" >&5
$as_echo "$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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC has an option to discard unneeded shared libraries" >&5
$as_echo_n "checking whether $CC has an option to discard unneeded shared libraries... " >&6; }
if ${ncbi_cv_prog_cc_as_needed+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LDFLAGS=$LDFLAGS
    ncbi_cv_prog_cc_as_needed=no
    for x in -Wl,--as-needed; do
       LDFLAGS="$orig_LDFLAGS $x"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_as_needed=$x
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
       test "x$ncbi_cv_prog_cc_as_needed" = "xno"  ||  break
    done
    LDFLAGS=$orig_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_as_needed" >&5
$as_echo "$ncbi_cv_prog_cc_as_needed" >&6; }
case "$ncbi_cv_prog_cc_as_needed" in
   -Wl,--as-needed )
      AS_NEEDED=-Wl,--as-needed
      NO_AS_NEEDED=-Wl,--no-as-needed
      ;;
   no )
      AS_NEEDED=
      NO_AS_NEEDED=
      ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC has an option to link in whole static archives" >&5
$as_echo_n "checking whether $CC has an option to link in whole static archives... " >&6; }
if ${ncbi_cv_prog_cc_whole_archive+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LDFLAGS=$LDFLAGS
    ncbi_cv_prog_cc_whole_archive=no
    for x in -Wl,--whole-archive; do
       LDFLAGS="$orig_LDFLAGS $x `echo $x | sed -e 's/--/--no-/'`"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_whole_archive=$x
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
       test "x$ncbi_cv_prog_cc_whole_archive" = "xno"  ||  break
    done
    LDFLAGS=$orig_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_whole_archive" >&5
$as_echo "$ncbi_cv_prog_cc_whole_archive" >&6; }
case "$ncbi_cv_prog_cc_whole_archive" in
   -Wl,--whole-archive )
      WHOLE_ARCHIVE=-Wl,--whole-archive
      NO_WHOLE_ARCHIVE=-Wl,--no-whole-archive
      ;;
   no )
      WHOLE_ARCHIVE=
      NO_WHOLE_ARCHIVE=
      ;;
esac

case "$compiler" in
 *Clang)
   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

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -stdlib=libc++" >&5
$as_echo_n "checking whether $CXX supports -stdlib=libc++... " >&6; }
if ${ncbi_cv_prog_cxx_stdlib_libcxx+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_CXX=$CXX
       CXX="$orig_CXX -stdlib=libc++"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdexcept>
int
main ()
{
std::logic_error le("Inconceivable!");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cxx_stdlib_libcxx=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cxx_stdlib_libcxx" >&5
$as_echo "$ncbi_cv_prog_cxx_stdlib_libcxx" >&6; }
   test "$ncbi_cv_prog_cxx_stdlib_libcxx" = no  ||  CXX="$CXX -stdlib=libc++"
   ;;
 *)
   ncbi_cv_prog_cxx_stdlib_libcxx=no
   ;;
esac

ac_fn_cxx_check_decl "$LINENO" "_LIBCPP_VERSION" "ac_cv_have_decl__LIBCPP_VERSION" "#include <iosfwd>
"
if test "x$ac_cv_have_decl__LIBCPP_VERSION" = x""yes; then :

fi


modern_cxx_stds="-std=gnu++20 -std=gnu++17 -std=gnu++1z"
modern_c_stds="-std=gnu18 -std=gnu17 -std=gnu11 -std=gnu1x"
modern_c_stds="$modern_c_stds -std=gnu99 -std=gnu9x"

if test "$want_cxx20" = yes; then
   modern_cxx_stds="-std=gnu++20"
elif test "$ac_cv_have_decl__LIBCPP_VERSION" = no; then
   modern_cxx_stds="-std=gnu++20 $modern_cxx_stds"
fi

if test "$want_c2x" = yes; then
   modern_c_stds="-std=gnu2x $modern_c_stds"
fi

if dpkg-vendor --is Ubuntu >/dev/null 2>&1; then
   is_ubuntu=yes
else
   is_ubuntu=no
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable modern C++ features in $CXX" >&5
$as_echo_n "checking how to enable modern C++ features in $CXX... " >&6; }
if ${ncbi_cv_prog_modern_cxx+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_CXX=$CXX
    ncbi_cv_prog_modern_cxx=no
    for x in $modern_cxx_stds ''; do
       CXX="$orig_CXX $x"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <numeric>
int
main ()
{
return 3 - std::gcd(123, 456);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_modern_cxx=$x
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          test "x$ncbi_cv_prog_modern_cxx" = "xno"  ||  break
       done
       CXX=$orig_CXX
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_modern_cxx" >&5
$as_echo "$ncbi_cv_prog_modern_cxx" >&6; }
if test "$ncbi_cv_prog_modern_cxx" = no; then
   if test "$want_cxx20" = yes; then
      as_fn_error $? "Please upgrade to a compiler supporting C++20, such as GCC 10 or newer." "$LINENO" 5
   else
      as_fn_error $? "Please upgrade to a compiler supporting C++ '17, such as GCC 7.1 or newer." "$LINENO" 5
   fi
else
   CXX="$CXX $ncbi_cv_prog_modern_cxx"
fi

case "$CXX:::$ac_cv_prog_CXXCPP" in
   *++17*:::*++14* ) { ac_cv_prog_CXXCPP=; unset ac_cv_prog_CXXCPP;} ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++20 <format>" >&5
$as_echo_n "checking whether $CXX supports C++20 <format>... " >&6; }
if ${ncbi_cv_lib_cxx20_format+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <format>
int
main ()
{
auto s = std::format("{}", 123.4);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_cxx20_format=yes
else
  ncbi_cv_lib_cxx20_format=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_cxx20_format" >&5
$as_echo "$ncbi_cv_lib_cxx20_format" >&6; }
if test "$ncbi_cv_lib_cxx20_format" = yes; then
             WithFeatures="$WithFeatures${WithFeaturesSep}Cxx2020_format_api"; WithFeaturesSep=" "
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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable modern C features in $CC" >&5
$as_echo_n "checking how to enable modern C features in $CC... " >&6; }
if ${ncbi_cv_prog_modern_c+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_CC=$CC
    ncbi_cv_prog_modern_c=no
    for x in -xc99=all $modern_c_stds; do
       case "$x" in
          -std=gnu* ) x="$x -fgnu89-inline" ;;
       esac
       CC="$orig_CC $x"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ncbi_cv_prog_modern_c=$x
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          test "x$ncbi_cv_prog_modern_c" = "xno"  ||  break
       done
       CC=$orig_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_modern_c" >&5
$as_echo "$ncbi_cv_prog_modern_c" >&6; }

if test "$host_cpu" != x86_64; then
   : ${with_sse42=no}
fi

# if test "${with_sse42-$with_optimization}" = yes; then
   orig_CC=$CC
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -msse4.2" >&5
$as_echo_n "checking whether $CC supports -msse4.2... " >&6; }
if ${ncbi_cv_prog_c_sse42+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_CC=$CC
       CC="$CC -msse4.2"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <smmintrin.h>
int
main ()
{
__m128i v;  _mm_cmpgt_epi64(v, v);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ncbi_cv_prog_c_sse42=yes
else
  ncbi_cv_prog_c_sse42=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_c_sse42" >&5
$as_echo "$ncbi_cv_prog_c_sse42" >&6; }
   if test $ncbi_cv_prog_c_sse42 = yes; then
      CC="$orig_CC -msse4.2"
      orig_CC=$CC
   elif test "$with_sse42" = yes; then
      as_fn_error $? "SSE 4.2 support explicitly requested but unavailable." "$LINENO" 5
   else
      CC=$orig_CC
   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

test "$ncbi_cv_prog_modern_c" = no  ||  CC="$CC $ncbi_cv_prog_modern_c"

if test "${with_sse42-$with_optimization}" = yes; then
   orig_CXX=$CXX
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -msse4.2" >&5
$as_echo_n "checking whether $CXX supports -msse4.2... " >&6; }
if ${ncbi_cv_prog_cxx_sse42+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CXX="$CXX -msse4.2"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <smmintrin.h>
int
main ()
{
__m128i v;  _mm_cmpgt_epi64(v, v);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cxx_sse42=yes
else
  ncbi_cv_prog_cxx_sse42=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cxx_sse42" >&5
$as_echo "$ncbi_cv_prog_cxx_sse42" >&6; }
   if test $ncbi_cv_prog_cxx_sse42 = yes; then
      CXX="$orig_CXX -msse4.2"
      orig_CXX=$CXX
   elif test "$with_sse42" = yes; then
      as_fn_error $? "SSE 4.2 support explicitly requested but unavailable." "$LINENO" 5
   else
      CXX=$orig_CXX
   fi
fi

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_modern_c" 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:* | *:ICC:* | *Clang:* ) : ${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:* | *Clang:* )
        DEF_FAST_FLAGS="-O3 -finline-functions -fstrict-aliasing"
        # DEF_FAST_FLAGS="$DEF_FAST_FLAGS -ffast-math" ;;
        case "$with_profiling:$compiler:$compiler_version:$host_cpu" in
           yes:* | *:AppleClang:15*:arm* )
              ;;
           * )
              # incompatible with -pg; breaks exception handling with
              # Apple Clang 15 on Silicon.
              DEF_FAST_FLAGS="$DEF_FAST_FLAGS -fomit-frame-pointer"
              ;;
        esac
        ;;
      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:??? | ICC:1??? )
        # Core 2; ICC 11 goes up to SSE4.2 (i7), ICC 12 up to CORE-AVX-I
        DEF_FAST_FLAGS="-O3 -axSSSE3 -ip"
        ;;
      ICC:* )
        DEF_FAST_FLAGS="-O3 -ffp-model=fast -march=corei7" # -ipo
        ;;
      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 | darwin*Clang )
      CFLAGS_DLL="-fno-common"
      CXXFLAGS_DLL="-fno-common"
      ;;
    *:GCC | *Clang | 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 | linux*Clang | *bsd*:GCC | *bsd*Clang | 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

# Extract the first word of "dpkg-architecture", so it can be a program name with args.
set dummy dpkg-architecture; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DPKG_ARCHITECTURE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DPKG_ARCHITECTURE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DPKG_ARCHITECTURE="$DPKG_ARCHITECTURE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DPKG_ARCHITECTURE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DPKG_ARCHITECTURE=$ac_cv_path_DPKG_ARCHITECTURE
if test -n "$DPKG_ARCHITECTURE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DPKG_ARCHITECTURE" >&5
$as_echo "$DPKG_ARCHITECTURE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test -x "$DPKG_ARCHITECTURE" \
    &&  $DPKG_ARCHITECTURE -qDEB_HOST_MULTIARCH >/dev/null 2>&1; then
   multiarch=`$DPKG_ARCHITECTURE -qDEB_HOST_MULTIARCH`
else
   multiarch=`echo $host | sed -e 's/-unknown-/-/; s/^i[3-9]86-/^i\[3-9\]86/'`
fi

case "$compiler:$compiler_version:$with_bin_release:$ncbi_cv_prog_cxx_stdlib_libcxx" in
  GCC:*:yes:no | *Clang:*:yes:no )
    libstdcxx=`$CXX $LDFLAGS -print-file-name=libstdc++.a`
    case "$host_os:$libstdcxx" in
       cygwin*:/*)
          LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
          LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
          ;;
       *:/*)
          # LIBS="$libstdcxx $LIBS"
          # LINK=$C_LINK
          LDFLAGS="$LDFLAGS -static-libstdc++"
          ;;
       *)
          as_fn_error $? "Unable to find static libstdc++ requested by --with-bin-release." "$LINENO" 5
          ;;
    esac
    ;;
  GCC:* | *Clang:*:*:* )
    # Need to specify runpath for compiler-provided libraries
    major=6 # true for all supported versions at present
    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 | *:/lib64 | *:/usr/lib | *:/usr/lib32 | *:/usr/lib64 \
            | *:/usr/lib/$multiarch )
               # 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???:* )
    case "$host_cpu" in
       i?86   ) intel_cpu_name=ia32      ;;
       x86_64 ) intel_cpu_name=intel64   ;;
       *      ) intel_cpu_name=$host_cpu ;;
    esac
    LDFLAGS="$CONF_f_runpath$compiler_root/lib/$intel_cpu_name $LDFLAGS"
    # 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.
    if test "$with_bin_release" = "yes"; then
       LDFLAGS="$LDFLAGS -static-libstdc++"
    elif test "$with_dll" != "no"; then
       LIBS="$LIBS -lstdc++ -lgcc_s"
    fi
    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"
    ;;
   ICC:* )
    CPPFLAGS="$CPPFLAGS -D_GCC_NEXT_LIMITS_H"
    CFLAGS="$CFLAGS -ffp-model=precise"
    CXXFLAGS="$CXXFLAGS -ffp-model=precise"
    ;;
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) as_fn_error $? "This platform does not support DLL profiling." "$LINENO" 5
                 ;;
            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 | linux*Clang | irix* | solaris*:WorkShop* | linux*:ICC \
    | solaris*:GCC | osf* | darwin*:GCC | darwin*Clang | freebsd*:GCC \
    | freebsd*Clang | *:KCC )
      ;;
    * )
      echo
      echo "DLLs may not be buildable by $CXX $compiler_ver on $host!"
      case "$with_caution" in
    yes )
       as_fn_error $? "Configuration has been canceled per --with-caution." "$LINENO" 5 ;;
    no )
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding without questions per --without-caution" >&5
$as_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]* )  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding at your own risk..." >&5
$as_echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  as_fn_error $? "Configuration has been canceled by user." "$LINENO" 5 ;;
       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)    as_fn_error $? "--without-static requires --with-dll" "$LINENO" 5 ;;
   *)       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 "$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


#### Clang compiler::  common flags and definitions
case "$compiler" in
   *Clang )
      CFLAGS="-Wall -Wno-format-y2k $CFLAGS"
      CXXFLAGS="-Wall -Wno-format-y2k $CXXFLAGS"
      case "$host_os:$compiler_version" in
         linux*:1[4-9]?? | linux*:[2-9]??? )
            # Normally an error, breaking some Boost.Test 1.76 usage;
            # no obvious middle ground.
            CXXFLAGS="-Wno-enum-constexpr-conversion $CXXFLAGS"
            APP_LDFLAGS="-nopie $APP_LDFLAGS"
            ;;
      esac
      ;;
esac


#### 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 | *Clang ) NO_STRICT_ALIASING=-fno-strict-aliasing ;;
   ICC ) NO_STRICT_ALIASING='-falias -ffnalias' ;;
   WorkShop* ) NO_STRICT_ALIASING='-xalias_level=any' ;;
   * ) NO_STRICT_ALIASING=
esac

  for ac_prog in gawk mawk nawk awk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_AWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AWK="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$AWK" && break
done

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
$as_echo_n "checking for GNU make... " >&6; }
if ${_cv_gnu_make_command+:} false; then :
  $as_echo_n "(cached) " >&6
else
      _cv_gnu_make_command="" ;
    for a in "$MAKE" make gmake gnumake ; do
      if test -z "$a" ; then continue ; fi ;
      if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then
        _cv_gnu_make_command=$a ;
        AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make")
        ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }')
        break ;
      fi
    done ;
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
$as_echo "$_cv_gnu_make_command" >&6; }
  if test "x$_cv_gnu_make_command" = x""""; then :
  ifGNUmake="#"
else
  ifGNUmake=""
fi
  if test "x$_cv_gnu_make_command" = x""""; then :
  { ax_cv_gnu_make_command=; unset ax_cv_gnu_make_command;}
else
  ax_cv_gnu_make_command=${_cv_gnu_make_command}
fi


# Extract the first word of "${ac_cv_prog_AWK-awk}", so it can be a program name with args.
set dummy ${ac_cv_prog_AWK-awk}; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $AWK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
AWK=$ac_cv_path_AWK
if test -n "$AWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "${ax_cv_gnu_make_command-make}", so it can be a program name with args.
set dummy ${ax_cv_gnu_make_command-make}; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MAKE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MAKE=$ac_cv_path_MAKE
if test -n "$MAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
$as_echo "$MAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


export MAKE

#### 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 "$with_pch" = "yes"; then
   case "$compiler" in
      GCC | *Clang ) ;;
      * ) ncbi_cv_cxx_pch=no ;;
   esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports precompiled headers" >&5
$as_echo_n "checking whether $CXX supports precompiled headers... " >&6; }
if ${ncbi_cv_cxx_pch+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cxx_pch" >&5
$as_echo "$ncbi_cv_cxx_pch" >&6; }
   if test "$ncbi_cv_cxx_pch" = "yes"; then
      if test "$Rules" = "rules"; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of make does not fully support PCH-related dependencies." >&5
$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RANLIB+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
$as_echo "$RANLIB" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
$as_echo "$ac_ct_RANLIB" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_AR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="ar cr"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
$as_echo "$AR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test "x$RANLIB" != "x:"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking ranlib's effectiveness" >&5
$as_echo_n "checking ranlib's effectiveness... " >&6; }
if ${ncbi_cv_prog_ranlib_effect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern int libfunc(void);
int
main ()
{
return libfunc();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ok_without=true
else
  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern int libfunc(void);
int
main ()
{
return libfunc();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ok_with=true
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_ranlib_effect" >&5
$as_echo "$ncbi_cv_prog_ranlib_effect" >&6; }
   case "$ncbi_cv_prog_ranlib_effect" in
      negative) RANLIB=: ;;
      unknown)
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to make a working library with or without ranlib." >&5
$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_STRIP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="strip"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
$as_echo "$STRIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strip loses runtime type information" >&5
$as_echo_n "checking whether strip loses runtime type information... " >&6; }
if ${ncbi_cv_strip_loses_rtti+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_strip_loses_rtti" >&5
$as_echo "$ncbi_cv_strip_loses_rtti" >&6; }
   if test "$ncbi_cv_strip_loses_rtti" = "yes"; then
      case "$with_caution" in
    yes )
       as_fn_error $? "Configuration has been canceled per --with-caution." "$LINENO" 5 ;;
    no )
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding without questions per --without-caution" >&5
$as_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]* )  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding at your own risk..." >&5
$as_echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  as_fn_error $? "Configuration has been canceled by user." "$LINENO" 5 ;;
       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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DISTCC+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DISTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DISTCC" >&5
$as_echo "$DISTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether any distcc servers are available" >&5
$as_echo_n "checking whether any distcc servers are available... " >&6; }
if ${ncbi_cv_prog_distcc_servers+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_distcc_servers" >&5
$as_echo "$ncbi_cv_prog_distcc_servers" >&6; }
      if test "$ncbi_cv_prog_distcc_servers" = no; then
         { DISTCC=; unset DISTCC;}
      fi
      if test -n "$DISTCC" ; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $DISTCC is compatible with $CC" >&5
$as_echo_n "checking whether $DISTCC is compatible with $CC... " >&6; }
if ${ncbi_cv_prog_distcc_vs_cc+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_distcc_vs_cc" >&5
$as_echo "$ncbi_cv_prog_distcc_vs_cc" >&6; }
         if test "$ncbi_cv_prog_distcc_vs_cc" = yes; then
            CC_WRAPPER="$DISTCC $CC_WRAPPER"
         else
            { DISTCC=; unset DISTCC;}
         fi
      fi
      if test -n "$DISTCC" ; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $DISTCC is compatible with $CXX" >&5
$as_echo_n "checking whether $DISTCC is compatible with $CXX... " >&6; }
if ${ncbi_cv_prog_distcc_vs_cxx+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_distcc_vs_cxx" >&5
$as_echo "$ncbi_cv_prog_distcc_vs_cxx" >&6; }
         if test "$ncbi_cv_prog_distcc_vs_cxx" = yes; then
            CXX_WRAPPER="$DISTCC $CXX_WRAPPER"
         else
            { DISTCC=; unset DISTCC;}
         fi
      fi
      rm -f distcctest.*
   elif test "$with_distcc" = "yes" ; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: distcc explicitly requested, but not found in PATH." >&5
$as_echo "$as_me: WARNING: distcc explicitly requested, but not found in PATH." >&2;}
   fi
   { DISTCC_FALLBACK=; unset DISTCC_FALLBACK;}
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CCACHE+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
$as_echo "$CCACHE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache explicitly requested, but not found in PATH." >&5
$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TAIL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TAIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
$as_echo "$TAIL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


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

# Extract the first word of "basename", so it can be a program name with args.
set dummy basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BASENAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASENAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
BASENAME=$ac_cv_path_BASENAME
if test -n "$BASENAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
$as_echo "$BASENAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SED+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
$as_echo "$SED" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "touch", so it can be a program name with args.
set dummy touch; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TOUCH+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
$as_echo "$TOUCH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if ${ac_cv_path_EGREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  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"
      as_fn_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
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_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
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    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
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run $EGREP quietly" >&5
$as_echo_n "checking how to run $EGREP quietly... " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP_Q" >&5
$as_echo "$EGREP_Q" >&6; }

# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_VALGRIND_PATH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$VALGRIND_PATH"; then
  ac_cv_prog_VALGRIND_PATH="$VALGRIND_PATH" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_VALGRIND_PATH="valgrind"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND_PATH" >&5
$as_echo "$VALGRIND_PATH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



# Extract the first word of "ldd", so it can be a program name with args.
set dummy ldd; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LDD+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
$as_echo "$LDD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


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

# Extract the first word of "uuidgen", so it can be a program name with args.
set dummy uuidgen; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UUIDGEN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UUIDGEN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UUIDGEN="$UUIDGEN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UUIDGEN="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UUIDGEN=$ac_cv_path_UUIDGEN
if test -n "$UUIDGEN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UUIDGEN" >&5
$as_echo "$UUIDGEN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "cd_reporter", so it can be a program name with args.
set dummy cd_reporter; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CD_REPORTER+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CD_REPORTER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CD_REPORTER="$CD_REPORTER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="/am/ncbiapdata/bin:/Volumes/ncbiapdata/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CD_REPORTER="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CD_REPORTER=$ac_cv_path_CD_REPORTER
if test -n "$CD_REPORTER"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CD_REPORTER" >&5
$as_echo "$CD_REPORTER" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



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

signature_compiler=$compiler
case "$compiler" in
   GCC )
      if $CXX -v 2>&1 | $EGREP_Q 'LLVM'; then
         signature_compiler=LLVMGCC
      fi
      ;;
   *Clang )
      signature_compiler=Clang
      ;;
esac

### Possibly add the version to the build directory name, but preseve
### the original default when reconfiguring.
if test -z "${with_version}" -a -n "${ncbi_cv_sys_xdir_ln}"; 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}${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

if test "${with_max_debug-no}" != "no"; then
   case "$NCBI_OLD_STATUS_DIR" in
      *MaxDebug* ) max_tag=Max ;;
      *Debug*    )             ;;
      *          ) max_tag=Max ;;
   esac
fi


#### 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" ;;
      *Clang)    PFFLAGS="-pg" ;;
      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


#### Code coverage
if test "$with_code_coverage" = "yes"; then
   case "$compiler" in
      GCC | *Clang )
         COVFLAGS="--coverage"
         ;;
      * )
         as_fn_error $? "--with-code-coverage not implemented for $compiler" "$LINENO" 5
         ;;
   esac
   CFLAGS="$CFLAGS $COVFLAGS"
   CXXFLAGS="$CXXFLAGS $COVFLAGS"
   LDFLAGS="$LDFLAGS $COVFLAGS"
fi


#### Determine whether this is implicitly a 64-bit platform
ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF

fi

# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
$as_echo_n "checking size of size_t... " >&6; }
if ${ac_cv_sizeof_size_t+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_size_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_size_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
$as_echo "$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

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
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcheck is most likely to be effective in DebugMT builds." >&5
$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TCHECK_CL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TCHECK_CL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TCHECK_CL="$TCHECK_CL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$TCHECK_BIN:$PATH:$TCHECK_FALLBACK"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TCHECK_CL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCHECK_CL" >&5
$as_echo "$TCHECK_CL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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}-${max_tag}${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}_${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}"  ||  as_fn_error $? "Couldn't create ${build_root}" "$LINENO" 5

#### 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AMQ+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $AMQ in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AMQ="$AMQ" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:/usr/sbin:/sbin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AMQ="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AMQ" >&5
$as_echo "$AMQ" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


case "$AMQ" in
   */amq)
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AMQ -w works" >&5
$as_echo_n "checking whether $AMQ -w works... " >&6; }
if ${ncbi_cv_prog_amq_w+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_amq_w" >&5
$as_echo "$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 { PWD=; unset 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 { PWD=; unset 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
      as_fn_error $? "incompatible options: --without-runpath and --with-relative-runpath=$with_relative_runpath" "$LINENO" 5
   elif test -z "$origin"; then
      as_fn_error $? "Do not know how to specify relative runpaths on $host" "$LINENO" 5
   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 | *Clang)
   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 <https://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=""

$as_echo "#define NCBI_USE_BUNDLES 1" >>confdefs.h

        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:* )
             ncbi_cv_prog_cc_wl_no_asu=no
             LIBS="$LIBS -lc"
             C_LIBS="$C_LIBS -lc"
             ;;
           * )
             FORBID_UNDEF='-Wl,--no-undefined'
             ;;
        esac
        ;;
      irix* )
        FORBID_UNDEF='-Wl,-no_unresolved'
        ;;
      osf* )
        ALLOW_UNDEF='-Wl,-expect_unresolved,\*'
        FORBID_UNDEF='-Wl,-error_unresolved'
        ;;
   esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--no-allow-shlib-undefined" >&5
$as_echo_n "checking whether $CC supports -Wl,--no-allow-shlib-undefined... " >&6; }
if ${ncbi_cv_prog_cc_wl_no_asu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LDFLAGS=$LDFLAGS
       LDFLAGS="$CXXFLAGS_DLL -shared -Wl,--no-allow-shlib-undefined $LDFLAGS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_prog_cc_wl_no_asu=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_prog_cc_wl_no_asu" >&5
$as_echo "$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
      as_fn_error $? "Do not know how to build DLLs with compiler $CXX $compiler_ver" "$LINENO" 5
   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)'
   if test "$with_bin_release" = "yes"; then
      CFLAGS="$CFLAGS $CFLAGS_DLL"
      CFLAGS_DLL=
      CXXFLAGS="$CXXFLAGS $CXXFLAGS_DLL"
      CXXFLAGS_DLL=
   fi
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=

$as_echo "#define NCBI_DLL_SUPPORT 1" >>confdefs.h

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

$as_echo "#define NCBI_DLL_BUILD 1" >>confdefs.h

      : ${with_plugin_auto_load=yes}
   fi
fi

if test "$with_plugin_auto_load" = yes; then

$as_echo "#define NCBI_PLUGIN_AUTO_LOAD 1" >>confdefs.h

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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if ${ac_cv_prog_CPP+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
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 { PWD=; unset 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 { PWD=; unset 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
      as_fn_error $? "--with-algo:  ALGO sources are missing" "$LINENO" 5
   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
      as_fn_error $? "--with-app:  APP sources are missing" "$LINENO" 5
   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
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CGI tree missing; some projects may fail to build." >&5
$as_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
      as_fn_error $? "--with-ctools:  CTOOLS sources are missing" "$LINENO" 5
   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
      as_fn_error $? "--with-dbapi:  DBAPI sources are missing" "$LINENO" 5
   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
      as_fn_error $? "--with-gui:  GUI sources are missing" "$LINENO" 5
   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
      as_fn_error $? "--with-objects:  OBJECTS sources are missing" "$LINENO" 5
   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
      as_fn_error $? "--with-serial:  SERIAL sources are missing" "$LINENO" 5
   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 )
       as_fn_error $? "Configuration has been canceled per --with-caution." "$LINENO" 5 ;;
    no )
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding without questions per --without-caution" >&5
$as_echo "$as_me: WARNING: Proceeding without questions per --without-caution" >&2;} ;;
    * )
       echo "Do you want to re-configure in \"${builddir}\" (at your own risk)? [y/N]"
       read answer <& 7
       case "$answer" in
         [Yy]* )  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Proceeding at your own risk..." >&5
$as_echo "$as_me: WARNING: Proceeding at your own risk..." >&2;} ;;
         *       )  as_fn_error $? "Configuration has been canceled by user." "$LINENO" 5 ;;
       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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cross-directory hard links work" >&5
$as_echo_n "checking whether cross-directory hard links work... " >&6; }
if ${ncbi_cv_sys_xdir_ln+:} false; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_sys_xdir_ln" >&5
$as_echo "$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")
asan_sfx=''
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-no}" != "no"; then
      case "$compiler:$with_max_debug" in
         GCC:thread | *Clang:thread ) sanitize=-fsanitize=thread ;;
         GCC:yes | *Clang:yes ) sanitize=-fsanitize=address; asan_sfx=ASan ;;
         *:yes ) ;;
         * )
            as_fn_error $? "--with-max-debug=$with_max_debug unimplemented for compiler $compiler" "$LINENO" 5
            ;;
      esac
      case "$compiler" in
         GCC | *Clang )
            CPPFLAGS="-D_GLIBCXX_DEBUG $CPPFLAGS"
            CFLAGS="-fstack-check $sanitize $CFLAGS"
            CXXFLAGS="-fstack-check $sanitize $CXXFLAGS"
            LDFLAGS="$sanitize $LDFLAGS"
            ;;
         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:* )
            # 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_optimization" = "no" ; then
      CFLAGS="$NOPT_CFLAGS -O0"
      CXXFLAGS="$NOPT_CXXFLAGS -O0"
      LDFLAGS="$NOPT_LDFLAGS -O0"
      FAST_CFLAGS="$CFLAGS"
      FAST_CXXFLAGS="$CXXFLAGS"
      FAST_LDFLAGS="$LDFLAGS"
   else
      if test "$GCC" = yes; then
         defoptim=-O2
      else
         defoptim=-O
      fi
      if echo " $CFLAGS "   | grep -v "$optrx" >/dev/null ; then
         CFLAGS="$CFLAGS $defoptim" ; fi
      if echo " $CXXFLAGS " | grep -v "$optrx" >/dev/null ; then
         CXXFLAGS="$CXXFLAGS $defoptim" ; fi
      if echo " $LDFLAGS "  | grep -v "$optrx" >/dev/null ; then
         LDFLAGS="$LDFLAGS $defoptim" ; fi
      if test "$skip_fast_flags" = yes ; then
         FAST_CFLAGS="$CFLAGS"
         FAST_CXXFLAGS="$CXXFLAGS"
         FAST_LDFLAGS="$LDFLAGS"
      else
         case "$compiler:$compiler_version" in
            ICC:[2-9]??? )
               NOPT_CFLAGS=`echo " $NOPT_CFLAGS" \
                            | sed -e 's/ -ffp-model=[^ ]*//'`
               NOPT_CXXFLAGS=`echo " $NOPT_CXXFLAGS" \
                              | sed -e 's/ -ffp-model=[^ ]*//'`
               # NOPT_LDFLAGS="$NOPT_LDFLAGS -fuse-ld=lld"
               ;;
         esac
         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.
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if ${ac_cv_prog_CXXCPP+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
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


for ac_header in iostream  iostream.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in fstream   fstream.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

for ac_header in strstream strstream.h strstrea.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in inttypes.h limits limits.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


### Check for the platform (very roughly)
for ac_header in unistd.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
if test "x$ac_cv_header_unistd_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_UNISTD_H 1
_ACEOF
 x_have_unistd="yes"
fi

done

for ac_header in windows.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WINDOWS_H 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

$as_echo "#define NCBI_OS_MSWIN 1" >>confdefs.h


$as_echo "#define NCBI_OS \"MSWIN\"" >>confdefs.h

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

$as_echo "#define NCBI_OS_UNIX 1" >>confdefs.h


$as_echo "#define NCBI_OS \"UNIX\"" >>confdefs.h


   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)

$as_echo "#define NCBI_OS_AIX 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_BSD 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_CYGWIN 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_DARWIN 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_IRIX 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_LINUX 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_OSF1 1" >>confdefs.h

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

$as_echo "#define NCBI_OS_SOLARIS 1" >>confdefs.h

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

$as_echo "#define NCBI_OS \"MAC\"" >>confdefs.h

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

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

$as_echo "#define NETDB_REENTRANT 1" >>confdefs.h

      ;;
esac

# AC_CHECK_TYPES is insufficient, as linking may still fail :-/
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wstring" >&5
$as_echo_n "checking for wstring... " >&6; }
if ${ac_cv_type_wstring_linkable+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string>
         using std::wstring;
int
main ()
{
wstring ws, ws2; ws.find_first_of(ws2);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_type_wstring_linkable=yes
else
  ac_cv_type_wstring_linkable=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_wstring_linkable" >&5
$as_echo "$ac_cv_type_wstring_linkable" >&6; }
if test "$ac_cv_type_wstring_linkable" = "yes"; then

$as_echo "#define HAVE_WSTRING 1" >>confdefs.h

fi

ac_fn_cxx_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
#include <sys/socket.h>
"
if test "x$ac_cv_type_socklen_t" = x""yes; then :

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


fi

for ac_header in atomic.h cpuid.h dlfcn.h ieeefp.h poll.h \
                 stdio.h string.h strings.h sys/epoll.h \
                 sys/mount.h sys/sockio.h sys/stat.h \
                 sys/statvfs.h sys/sysinfo.h \
                 sys/sysmacros.h sys/types.h sys/vfs.h x86intrin.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

case "$host_os" in
   cygwin*) for ac_header in winternl.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "winternl.h" "ac_cv_header_winternl_h" "$ac_includes_default"
if test "x$ac_cv_header_winternl_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WINTERNL_H 1
_ACEOF

fi

done
 ;;
esac
# for FreeTDS (and in some cases PCRE2)
for ac_header in arpa/inet.h dirent.h errno.h fcntl.h getopt.h \
                 langinfo.h libgen.h locale.h malloc.h net/inet/in.h netdb.h \
                 netinet/in.h netinet/tcp.h paths.h select.h signal.h \
                 stdbool.h stddef.h sys/eventfd.h sys/file.h sys/ioctl.h \
                 sys/param.h sys/resource.h sys/select.h sys/socket.h \
                 sys/time.h sys/wait.h valgrind/memcheck.h wchar.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

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

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
if ${ac_cv_working_alloca_h+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <alloca.h>
int
main ()
{
char *p = (char *) alloca (2 * sizeof (int));
			  if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_working_alloca_h=yes
else
  ac_cv_working_alloca_h=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
$as_echo "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then

$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
if ${ac_cv_func_alloca_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  ifdef HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca (size_t);
#    endif
#   endif
#  endif
# endif
#endif

int
main ()
{
char *p = (char *) alloca (1);
				    if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_alloca_works=yes
else
  ac_cv_func_alloca_works=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
$as_echo "$ac_cv_func_alloca_works" >&6; }

if test $ac_cv_func_alloca_works = yes; then

$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h

else
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble.  Some versions do not even contain alloca or
# contain a buggy version.  If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.

ALLOCA=\${LIBOBJDIR}alloca.$ac_objext

$as_echo "#define C_ALLOCA 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
if ${ac_cv_os_cray+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if defined CRAY && ! defined CRAY2
webecray
#else
wenotbecray
#endif

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

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
$as_echo "$ac_cv_os_cray" >&6; }
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
_ACEOF

    break
fi

  done
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
if ${ac_cv_c_stack_direction+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_c_stack_direction=0
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
find_stack_direction (int *addr, int depth)
{
  int dir, dummy = 0;
  if (! addr)
    addr = &dummy;
  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
  return dir + dummy;
}

int
main (int argc, char **argv)
{
  return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_c_stack_direction=1
else
  ac_cv_c_stack_direction=-1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
$as_echo "$ac_cv_c_stack_direction" >&6; }
cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
_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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
if ${ac_cv_header_time+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_header_time=yes
else
  ac_cv_header_time=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
$as_echo "$ac_cv_header_time" >&6; }
if test $ac_cv_header_time = yes; then

$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h

fi


for ac_header in cxxabi.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "cxxabi.h" "ac_cv_header_cxxabi_h" "$ac_includes_default"
if test "x$ac_cv_header_cxxabi_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_CXXABI_H 1
_ACEOF

fi

done

if test "$ac_cv_header_cxxabi_h" = "yes"; then
   ac_fn_cxx_check_decl "$LINENO" "abi::__cxa_demangle" "ac_cv_have_decl_abi____cxa_demangle" "#include <cxxabi.h>
"
if test "x$ac_cv_have_decl_abi____cxa_demangle" = x""yes; then :

$as_echo "#define HAVE_CXA_DEMANGLE 1" >>confdefs.h

fi

fi

orig_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $OPENMP_FLAGS"
ac_fn_cxx_check_header_mongrel "$LINENO" "omp.h" "ac_cv_header_omp_h" "$ac_includes_default"
if test "x$ac_cv_header_omp_h" = x""yes; then :

fi


if test "$ac_cv_header_omp_h" = no; then
   if test "$with_openmp" = yes; then
      as_fn_error $? "--with-openmp explicitly specified, but unavailable with $CC." "$LINENO" 5
   else
      OPENMP_FLAGS=
   fi
fi
CFLAGS=$orig_CFLAGS

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r" >&5
$as_echo_n "checking for gethostbyname_r... " >&6; }
if ${ncbi_cv_func_gethostbyname_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_gethostbyname_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_gethostbyname_r="5"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_gethostbyname_r" = "no" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_gethostbyname_r="6"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_gethostbyname_r" >&5
$as_echo "$ncbi_cv_func_gethostbyname_r" >&6; }

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

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

fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r" >&5
$as_echo_n "checking for gethostbyaddr_r... " >&6; }
if ${ncbi_cv_func_gethostbyaddr_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_gethostbyaddr_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_gethostbyaddr_r="7"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_gethostbyaddr_r" = "no" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_gethostbyaddr_r="8"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_gethostbyaddr_r" >&5
$as_echo "$ncbi_cv_func_gethostbyaddr_r" >&6; }

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

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

fi


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname_r" >&5
$as_echo_n "checking for getservbyname_r... " >&6; }
if ${ncbi_cv_func_getservbyname_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_getservbyname_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_getservbyname_r="5"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_getservbyname_r" = "no" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :

         ncbi_cv_func_getservbyname_r="6"


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_getservbyname_r" >&5
$as_echo "$ncbi_cv_func_getservbyname_r" >&6; }

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

cat >>confdefs.h <<_ACEOF
#define NCBI_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.)

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r" >&5
$as_echo_n "checking for getpwuid_r... " >&6; }
if ${ncbi_cv_func_getpwuid_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_getpwuid_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_getpwuid_r=4
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_getpwuid_r" = "no" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_getpwuid_r=5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_getpwuid_r" >&5
$as_echo "$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. :-/
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getlogin_r" >&5
$as_echo_n "checking for getlogin_r... " >&6; }
if ${ncbi_cv_func_getlogin_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_getlogin_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unistd.h>
int
main ()
{
char buf[64]; /* return */ getlogin_r(buf, 64);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_getlogin_r=yes
else
  ncbi_cv_func_getlogin_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_getlogin_r" >&5
$as_echo "$ncbi_cv_func_getlogin_r" >&6; }
if test $ncbi_cv_func_getlogin_r = yes; then

$as_echo "#define HAVE_GETLOGIN_R 1" >>confdefs.h

fi

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

# 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=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_localtime_r" = "yes" ; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of localtime_r" >&5
$as_echo_n "checking return type of localtime_r... " >&6; }
if ${ac_cv_func_which_localtime_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_func_which_localtime_r=struct
else
  ac_cv_func_which_localtime_r=int
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_which_localtime_r" >&5
$as_echo "$ac_cv_func_which_localtime_r" >&6; }
   if test $ac_cv_func_which_localtime_r = struct; then

$as_echo "#define HAVE_FUNC_LOCALTIME_R_TM 1" >>confdefs.h

   else

$as_echo "#define HAVE_FUNC_LOCALTIME_R_INT 1" >>confdefs.h

   fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread mutexes are available" >&5
$as_echo_n "checking whether pthread mutexes are available... " >&6; }
if ${ncbi_cv_func_pthread_mutex+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  ncbi_cv_func_pthread_mutex=yes
else
  ncbi_cv_func_pthread_mutex=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_pthread_mutex" >&5
$as_echo "$ncbi_cv_func_pthread_mutex" >&6; }
if test $ncbi_cv_func_pthread_mutex=yes; then

$as_echo "#define HAVE_PTHREAD_MUTEX 1" >>confdefs.h

fi


### Check for other standard library functions

for ac_func in vprintf
do :
  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
if test "x$ac_cv_func_vprintf" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_VPRINTF 1
_ACEOF

ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
if test "x$ac_cv_func__doprnt" = x""yes; then :

$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h

fi

fi
done


for ac_func in accept4 alarm asprintf atoll basename \
               bcopy __builtin_mul_overflow dbopen daemon euidaccess \
               eventfd execvpe fseeko fstat getgrouplist \
               gethrtime getopt getpagesize \
               getpass getpassphrase getpwuid getrusage gettimeofday getuid \
               lchown lutimes mallinfo mallinfo2 malloc_options memfd_create \
               memmove memrchr mkostemp nl_langinfo pipe2 poll \
               putenv readpassphrase readv realpath secure_getenv \
               select setenv setitimer setrlimit \
               snprintf statfs statvfs strcasecmp \
               strdup strerror strlcat strlcpy \
               strndup strnlen strsep strtok_r sysmp timegm usleep utimes \
               vasprintf vsnprintf writev
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
if ${ac_cv_type_signal+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <signal.h>

int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_type_signal=int
else
  ac_cv_type_signal=void
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select updates the timeout when interrupted" >&5
$as_echo_n "checking whether select updates the timeout when interrupted... " >&6; }
if ${ncbi_cv_func_select_updates_timeout+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_run "$LINENO"; then :
  ncbi_cv_func_select_updates_timeout=yes
else
  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.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_select_updates_timeout" >&5
$as_echo "$ncbi_cv_func_select_updates_timeout" >&6; }
if test "$ncbi_cv_func_select_updates_timeout" = yes; then

$as_echo "#define SELECT_UPDATES_TIMEOUT 1" >>confdefs.h

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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasecmp treats letters as lowercase" >&5
$as_echo_n "checking whether strcasecmp treats letters as lowercase... " >&6; }
if ${ncbi_cv_func_strcasecmp_lc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ncbi_cv_func_strcasecmp_lc=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int
main ()
{
return strcasecmp("A", "_") <= 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
  ncbi_cv_func_strcasecmp_lc=yes
else
  ncbi_cv_func_strcasecmp_lc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_strcasecmp_lc" >&5
$as_echo "$ncbi_cv_func_strcasecmp_lc" >&6; }
   if test "$ncbi_cv_func_strcasecmp_lc" = yes; then

$as_echo "#define HAVE_STRCASECMP_LC 1" >>confdefs.h

   fi
fi

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

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_sysinfo_1=yes
else
  ncbi_cv_func_sysinfo_1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_sysinfo_1" >&5
$as_echo "$ncbi_cv_func_sysinfo_1" >&6; }

if test "$ncbi_cv_func_sysinfo_1" = yes; then

$as_echo "#define HAVE_SYSINFO_1 1" >>confdefs.h

fi

for ac_func in getloadavg
do :
  ac_fn_cxx_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
if test "x$ac_cv_func_getloadavg" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETLOADAVG 1
_ACEOF

fi
done


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdir_r" >&5
$as_echo_n "checking for readdir_r... " >&6; }
if ${ncbi_cv_func_readdir_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_func_readdir_r="no"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
DIR* dir; struct dirent* entry; readdir_r(dir, entry, &entry);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_readdir_r=3
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test "$ncbi_cv_func_readdir_r" = "no" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
DIR* dir; struct dirent* entry; readdir_r(dir, entry);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_readdir_r=2
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_readdir_r" >&5
$as_echo "$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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdio supports locking" >&5
$as_echo_n "checking whether stdio supports locking... " >&6; }
if ${ncbi_cv_c_stdio_locked+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
int c;
        flockfile(stdin);
        c = getc_unlocked(stdin);
        funlockfile(stdin);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_c_stdio_locked=yes
else
  ncbi_cv_c_stdio_locked=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_c_stdio_locked" >&5
$as_echo "$ncbi_cv_c_stdio_locked" >&6; }
if test "$ncbi_cv_c_stdio_locked" = yes; then

$as_echo "#define NCBI_HAVE_STDIO_LOCKED 1" >>confdefs.h

fi

### Check for typedefs, structures, and compiler features.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

#ifndef __cplusplus
  /* Ultrix mips cc rejects this sort of thing.  */
  typedef int charset[2];
  const charset cs = { 0, 0 };
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *pcpcc;
  char **ppc;
  /* 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";
  pcpcc = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++pcpcc;
  ppc = (char**) pcpcc;
  pcpcc = (char const *const *) ppc;
  { /* SCO 3.2v4 cc rejects this sort of thing.  */
    char tx;
    char *t = &tx;
    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 sort of thing, saying
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    struct s { int j; const int *ap[3]; } bx;
    struct s *b = &bx; b->j = 5;
  }
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    const int foo = 10;
    if (!foo) return 0;
  }
  return !cs[0] && !zero.x;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_c_const=yes
else
  ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then

$as_echo "#define const /**/" >>confdefs.h

fi


### Check for C standard types and sizes
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if ${ac_cv_c_bigendian+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_bigendian=unknown
    # See if we're dealing with a universal compiler.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __APPLE_CC__
	       not a universal capable compiler
	     #endif
	     typedef int dummy;

_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

	# Check for potential -arch flags.  It is not universal unless
	# there are at least two -arch flags with different values.
	ac_arch=
	ac_prev=
	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
	 if test -n "$ac_prev"; then
	   case $ac_word in
	     i?86 | x86_64 | ppc | ppc64)
	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
		 ac_arch=$ac_word
	       else
		 ac_cv_c_bigendian=universal
		 break
	       fi
	       ;;
	   esac
	   ac_prev=
	 elif test "x$ac_word" = "x-arch"; then
	   ac_prev=arch
	 fi
       done
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test $ac_cv_c_bigendian = unknown; then
      # See if sys/param.h defines the BYTE_ORDER macro.
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
	     #include <sys/param.h>

int
main ()
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
		     && LITTLE_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  # It does; now see whether it defined to BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=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
    if test $ac_cv_c_bigendian = unknown; then
      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  # It does; now see whether it defined to _BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#ifndef _BIG_ENDIAN
		 not big endian
		#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=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
    if test $ac_cv_c_bigendian = unknown; then
      # Compile a test program.
      if test "$cross_compiling" = yes; then :
  # Try to guess by grepping values from an object file.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 };
		int use_ascii (int i) {
		  return ascii_mm[i] + ascii_ii[i];
		}
		short int ebcdic_ii[] =
		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
		short int ebcdic_mm[] =
		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
		int use_ebcdic (int i) {
		  return ebcdic_mm[i] + ebcdic_ii[i];
		}
		extern int foo;

int
main ()
{
return use_ascii (foo) == use_ebcdic (foo);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; 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
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_run "$LINENO"; then :
  ac_cv_c_bigendian=no
else
  ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
$as_echo "$ac_cv_c_bigendian" >&6; }
 case $ac_cv_c_bigendian in #(
   yes)
     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
   no)
      ;; #(
   universal)

$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h

     ;; #(
   *)
     as_fn_error $? "unknown endianness
 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
 esac

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_c_char_unsigned=no
else
  ac_cv_c_char_unsigned=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
$as_echo "$ac_cv_c_char_unsigned" >&6; }
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h

fi

# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
$as_echo_n "checking size of char... " >&6; }
if ${ac_cv_sizeof_char+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_char" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (char)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_char=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
$as_echo "$ac_cv_sizeof_char" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
$as_echo_n "checking size of double... " >&6; }
if ${ac_cv_sizeof_double+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_double" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_double=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
$as_echo "$ac_cv_sizeof_double" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
$as_echo_n "checking size of float... " >&6; }
if ${ac_cv_sizeof_float+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_float" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_float=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
$as_echo "$ac_cv_sizeof_float" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
if ${ac_cv_sizeof_int+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
$as_echo "$ac_cv_sizeof_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
if ${ac_cv_sizeof_long+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
$as_echo "$ac_cv_sizeof_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
$as_echo_n "checking size of long double... " >&6; }
if ${ac_cv_sizeof_long_double+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long_double" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long double)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_double=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
$as_echo "$ac_cv_sizeof_long_double" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
if ${ac_cv_sizeof_long_long+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
$as_echo "$ac_cv_sizeof_long_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
$as_echo_n "checking size of short... " >&6; }
if ${ac_cv_sizeof_short+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_short" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_short=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
$as_echo "$ac_cv_sizeof_short" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
$as_echo_n "checking size of void*... " >&6; }
if ${ac_cv_sizeof_voidp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_voidp" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (void*)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_voidp=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
$as_echo "$ac_cv_sizeof_voidp" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
$as_echo_n "checking size of wchar_t... " >&6; }
if ${ac_cv_sizeof_wchar_t+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "#include <wchar.h>
"; then :

else
  if test "$ac_cv_type_wchar_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (wchar_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_wchar_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
$as_echo "$ac_cv_sizeof_wchar_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
_ACEOF


# 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5
$as_echo_n "checking size of __int64... " >&6; }
if ${ac_cv_sizeof___int64+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type___int64" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (__int64)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof___int64=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
$as_echo "$ac_cv_sizeof___int64" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF___INT64 $ac_cv_sizeof___int64
_ACEOF


ac_fn_cxx_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
if test "x$ac_cv_type_intptr_t" = x""yes; then :

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


fi
ac_fn_cxx_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
if test "x$ac_cv_type_uintptr_t" = x""yes; then :

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


fi


ac_fn_cxx_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" "#include <sys/types.h>
        #include <netinet/in.h>
"
if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = x""yes; then :

$as_echo "#define HAVE_SIN_LEN 1" >>confdefs.h

fi


ac_fn_cxx_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <time.h>
"
if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :

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


fi
ac_fn_cxx_check_member "$LINENO" "struct tm" "__tm_zone" "ac_cv_member_struct_tm___tm_zone" "#include <time.h>
"
if test "x$ac_cv_member_struct_tm___tm_zone" = x""yes; then :

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


fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function prototypes can use throw(...)" >&5
$as_echo_n "checking whether function prototypes can use throw(...)... " >&6; }
if ${ncbi_cv_cxx_throw_spec+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_cxx_throw_spec=yes
else
  ncbi_cv_cxx_throw_spec=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cxx_throw_spec" >&5
$as_echo "$ncbi_cv_cxx_throw_spec" >&6; }
if test "$ncbi_cv_cxx_throw_spec" = yes; then

$as_echo "#define NCBI_USE_THROW_SPEC 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ios(_base)::register_callback" >&5
$as_echo_n "checking for ios(_base)::register_callback... " >&6; }
if ${ncbi_cv_func_ios_register_callback+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iostream>
int
main ()
{
std::cout.register_callback(0, std::ios::erase_event);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_ios_register_callback=yes
else
  ncbi_cv_func_ios_register_callback=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_ios_register_callback" >&5
$as_echo "$ncbi_cv_func_ios_register_callback" >&6; }
if test "$ncbi_cv_func_ios_register_callback" = yes; then

$as_echo "#define HAVE_IOS_REGISTER_CALLBACK 1" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SysV semaphores" >&5
$as_echo_n "checking for SysV semaphores... " >&6; }
if ${ncbi_cv_sys_semaphores+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_sys_semaphores=yes
else
  ncbi_cv_sys_semaphores=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_sys_semaphores" >&5
$as_echo "$ncbi_cv_sys_semaphores" >&6; }
if test "$ncbi_cv_sys_semaphores" = yes; then

$as_echo "#define HAVE_SYSV_SEMAPHORES 1" >>confdefs.h

fi

ac_fn_cxx_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
#include <sys/sem.h>
"
if test "x$ac_cv_type_union_semun" = x""yes; then :

$as_echo "#define HAVE_SEMUN 1" >>confdefs.h

fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which way the stack grows" >&5
$as_echo_n "checking which way the stack grows... " >&6; }
if ${ncbi_cv_sys_stack_dir+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ncbi_cv_sys_stack_dir="unknown (cross-compiling)"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
 int f(int* p) { int i; return (&i < p) ? 1 : 0; }
int
main ()
{
 int p; return f(&p);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
  ncbi_cv_sys_stack_dir=up
else
  ncbi_cv_sys_stack_dir=down
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_sys_stack_dir" >&5
$as_echo "$ncbi_cv_sys_stack_dir" >&6; }
case "$ncbi_cv_sys_stack_dir" in
 up)
$as_echo "#define STACK_GROWS_UP 1" >>confdefs.h
  ;;
 down)
$as_echo "#define STACK_GROWS_DOWN 1" >>confdefs.h
;;
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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports C99-style variadic macros" >&5
$as_echo_n "checking whether the preprocessor supports C99-style variadic macros... " >&6; }
if ${ncbi_cv_cpp_std_varargs+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define foo(...) 1
         #if foo(x,y,z) != 1
         #error failed
         #endif
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cpp_std_varargs=yes
else
  ncbi_cv_cpp_std_varargs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cpp_std_varargs" >&5
$as_echo "$ncbi_cv_cpp_std_varargs" >&6; }
if test "$ncbi_cv_cpp_std_varargs" = yes; then

$as_echo "#define HAVE_CPP_STD_VARARGS 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports GNU-style variadic macros" >&5
$as_echo_n "checking whether the preprocessor supports GNU-style variadic macros... " >&6; }
if ${ncbi_cv_cpp_gnu_varargs+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define foo(args...) 1
         #if foo(x,y,z) != 1
         #error failed
         #endif
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cpp_gnu_varargs=yes
else
  ncbi_cv_cpp_gnu_varargs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cpp_gnu_varargs" >&5
$as_echo "$ncbi_cv_cpp_gnu_varargs" >&6; }
if test "$ncbi_cv_cpp_gnu_varargs" = yes; then

$as_echo "#define HAVE_CPP_GNU_VARARGS 1" >>confdefs.h

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
   VisualAge:* | WorkShop* )
      ncbi_cv_c_forceinline=inline
      ;;
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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to force inlining" >&5
$as_echo_n "checking how to force inlining... " >&6; }
if ${ncbi_cv_c_forceinline+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$fi int f(void) { return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_c_forceinline=$fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_c_forceinline" >&5
$as_echo "$ncbi_cv_c_forceinline" >&6; }
forceinline=$ncbi_cv_c_forceinline
test "$forceinline" = "no"  &&  forceinline=""

cat >>confdefs.h <<_ACEOF
#define NCBI_FORCEINLINE $forceinline
_ACEOF


case "$compiler:$compiler_version $CFLAGS $CXXFLAGS" in
   GCC:*\ *\ -fvisibility* | ICC:*\ -fvisibility* | *Clang:*\ -fvisibility*) ;;
   * ) ncbi_cv_c_attribute_visibility_default=unnecessary ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports __attribute__((visibility(\"default\")))" >&5
$as_echo_n "checking whether $CC supports __attribute__((visibility(\"default\")))... " >&6; }
if ${ncbi_cv_c_attribute_visibility_default+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
__attribute__((visibility("default"))) void f(void); void f(void) {}
int
main ()
{
f();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_c_attribute_visibility_default=yes
else
  ncbi_cv_c_attribute_visibility_default=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_c_attribute_visibility_default" >&5
$as_echo "$ncbi_cv_c_attribute_visibility_default" >&6; }
if test $ncbi_cv_c_attribute_visibility_default = yes; then

$as_echo "#define HAVE_ATTRIBUTE_VISIBILITY_DEFAULT 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports C99 restrict" >&5
$as_echo_n "checking whether the C compiler supports C99 restrict... " >&6; }
if ${ncbi_cv_c_restrict+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_c_restrict=no
    for restrict in __restrict__ __restrict restrict; do
       test "$ncbi_cv_c_restrict" = "no" || break
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
void f(int * $restrict p);
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_c_restrict=$restrict
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_c_restrict" >&5
$as_echo "$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

$as_echo "#define HAVE_RESTRICT_C 1" >>confdefs.h

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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports C99 restrict" >&5
$as_echo_n "checking whether the C++ compiler supports C99 restrict... " >&6; }
if ${ncbi_cv_cxx_restrict+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ncbi_cv_cxx_restrict=no
    for restrict in __restrict__ __restrict restrict; do
       test "$ncbi_cv_cxx_restrict" = "no" || break
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
void f(int * $restrict p);
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_cxx_restrict=$restrict
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cxx_restrict" >&5
$as_echo "$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

$as_echo "#define HAVE_RESTRICT_CXX 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking syntax for declaring thread-local variables" >&5
$as_echo_n "checking syntax for declaring thread-local variables... " >&6; }
if ${ncbi_cv_c_tls_var+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$tls_var int i;
int
main ()
{
static $tls_var int j;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_c_tls_var=$tls_var
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_c_tls_var" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FIONBIO requires BSD_COMP to be defined" >&5
$as_echo_n "checking whether FIONBIO requires BSD_COMP to be defined... " >&6; }
if ${ncbi_cv_decl_fionbio_needs_bsd_comp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
 #include <sys/types.h>
          #include <sys/ioctl.h>
int
main ()
{
 int request = FIONBIO;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_decl_fionbio_needs_bsd_comp=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
 #define BSD_COMP 1
              #include <sys/types.h>
              #include <sys/ioctl.h>
int
main ()
{
 int request = FIONBIO;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_decl_fionbio_needs_bsd_comp=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_decl_fionbio_needs_bsd_comp" >&5
$as_echo "$ncbi_cv_decl_fionbio_needs_bsd_comp" >&6; }
if test "$ncbi_cv_decl_fionbio_needs_bsd_comp" = yes; then

$as_echo "#define BSD_COMP 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INADDR_NONE is defined" >&5
$as_echo_n "checking whether INADDR_NONE is defined... " >&6; }
if ${ncbi_cv_decl_inaddr_none+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_decl_inaddr_none=yes
else
  ncbi_cv_decl_inaddr_none=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_decl_inaddr_none" >&5
$as_echo "$ncbi_cv_decl_inaddr_none" >&6; }
if test "$ncbi_cv_decl_inaddr_none" != yes; then

$as_echo "#define INADDR_NONE 0xffffffff" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unaligned reads are permissible" >&5
$as_echo_n "checking whether unaligned reads are permissible... " >&6; }
if ${ncbi_cv_sys_unaligned_reads+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_run "$LINENO"; then :
  ncbi_cv_sys_unaligned_reads=yes
else
  ncbi_cv_sys_unaligned_reads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_sys_unaligned_reads" >&5
$as_echo "$ncbi_cv_sys_unaligned_reads" >&6; }
if test "$ncbi_cv_sys_unaligned_reads" = yes; then

$as_echo "#define HAVE_UNALIGNED_READS 1" >>confdefs.h

fi

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

orig_CFLAGS=$CFLAGS

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports SIMD vector arithmetic" >&5
$as_echo_n "checking whether $CC supports SIMD vector arithmetic... " >&6; }
if ${ncbi_cv_cc_vector_math+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cc_vector_math=yes
else
  ncbi_cv_cc_vector_math=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cc_vector_math" >&5
$as_echo "$ncbi_cv_cc_vector_math" >&6; }
if test "$ncbi_cv_cc_vector_math" = yes; then

$as_echo "#define HAVE_VECTOR_MATH 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funsafe-math-optimizations" >&5
$as_echo_n "checking whether $CC supports -funsafe-math-optimizations... " >&6; }
if ${ncbi_cv_cc_unsafe_math+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CFLAGS="$orig_CFLAGS -funsafe-math-optimizations"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cc_unsafe_math=yes
else
  ncbi_cv_cc_unsafe_math=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cc_unsafe_math" >&5
$as_echo "$ncbi_cv_cc_unsafe_math" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -msse4.1" >&5
$as_echo_n "checking whether $CC supports -msse4.1... " >&6; }
if ${ncbi_cv_cc_sse4_1+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CFLAGS="$orig_CFLAGS -msse4.1"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <emmintrin.h>
int
main ()
{
double v __attribute__((__vector_size__(16)));
           __builtin_ia32_shufpd(v, v, 1);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ncbi_cv_cc_sse4_1=yes
else
  ncbi_cv_cc_sse4_1=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cc_sse4_1" >&5
$as_echo "$ncbi_cv_cc_sse4_1" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -maes" >&5
$as_echo_n "checking whether $CC supports -maes... " >&6; }
if ${ncbi_cv_cc_aes+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CFLAGS="$orig_CFLAGS -maes"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cc_aes=yes
else
  ncbi_cv_cc_aes=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cc_aes" >&5
$as_echo "$ncbi_cv_cc_aes" >&6; }

case "$compiler:$compiler_version" in
 ICC:??? | ICC:1??? )
   # Pre-(20)21 ICC noisily ignores this flag, so explicitly blacklist it.
   ncbi_cv_cc_fdiagnostics_color_always=no
   ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fdiagnostics-color=always" >&5
$as_echo_n "checking whether $CC supports -fdiagnostics-color=always... " >&6; }
if ${ncbi_cv_cc_fdiagnostics_color_always+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CFLAGS="$orig_CFLAGS -fdiagnostics-color=always"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ncbi_cv_cc_fdiagnostics_color_always=yes
else
  ncbi_cv_cc_fdiagnostics_color_always=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cc_fdiagnostics_color_always" >&5
$as_echo "$ncbi_cv_cc_fdiagnostics_color_always" >&6; }
if test $ncbi_cv_cc_fdiagnostics_color_always = yes; then
   COLOR_DIAGNOSTICS=-fdiagnostics-color=always
else
   COLOR_DIAGNOSTICS=
fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports __builtin_bswap32" >&5
$as_echo_n "checking whether $CXX supports __builtin_bswap32... " >&6; }
if ${ncbi_cv_cxx_builtin_bswap32+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
int i = 0x01234567; return __builtin_bswap32(i);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_cxx_builtin_bswap32=yes
else
  ncbi_cv_cxx_builtin_bswap32=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cxx_builtin_bswap32" >&5
$as_echo "$ncbi_cv_cxx_builtin_bswap32" >&6; }
if test $ncbi_cv_cxx_builtin_bswap32 = yes; then

$as_echo "#define HAVE_BUILTIN_BSWAP 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports __builtin_expect" >&5
$as_echo_n "checking whether $CXX supports __builtin_expect... " >&6; }
if ${ncbi_cv_cxx_builtin_expect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
int i = 0;  return __builtin_expect(i, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_cxx_builtin_expect=yes
else
  ncbi_cv_cxx_builtin_expect=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_cxx_builtin_expect" >&5
$as_echo "$ncbi_cv_cxx_builtin_expect" >&6; }
if test $ncbi_cv_cxx_builtin_expect = yes; then

$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h

fi

### Check for the availability of other packages
### --------------------------------------------


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether in-house NCBI resources are available" >&5
$as_echo_n "checking whether in-house NCBI resources are available... " >&6; }
if test -n "$orig_NCBI" -a -f "$orig_NCBI/.ncbirc" \
    -a \( -d /am/ncbiapdata/test_data -o -d /Volumes/ncbiapdata/test_data \)
then
             WithFeatures="$WithFeatures${WithFeaturesSep}in-house-resources"; WithFeaturesSep=" "
   if test -d /am/ncbiapdata/test_data/traces04 \
      -o -d /Volumes/ncbiapdata/test_data/traces04; then
                 WithFeatures="$WithFeatures${WithFeaturesSep}full-test-data"; WithFeaturesSep=" "
   fi
   if test -d "`sed -ne 's/^[Bb][Ll][Aa][Ss][Tt][Dd][Bb] *= *//p' \
                $orig_NCBI/.ncbirc 2>/dev/null`"; then
                 WithFeatures="$WithFeatures${WithFeaturesSep}full-blastdb"; WithFeaturesSep=" "
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

### Common-use system and miscellaneous libs
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking library needed for 64-bit std::atomic" >&5
$as_echo_n "checking library needed for 64-bit std::atomic... " >&6; }
if ${ncbi_cv_lib_atomic64+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LIBS=$LIBS
    for x in '' -latomic; do
       LIBS="$x $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <atomic>
             struct S { int x, y; };
             bool f(std::atomic<S> &as, S &s1, S s2) {
	         bool b = as.compare_exchange_strong(s1, s2);
		 return b ? as.load().x : as.load().y; }
int
main ()
{
std::atomic<S> as; S s1, s2; return f(as, s1, s2);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_atomic64=${x:-none required}; break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    done
    LIBS=$orig_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_atomic64" >&5
$as_echo "$ncbi_cv_lib_atomic64" >&6; }
if test "x$ncbi_cv_lib_atomic64" != "xnone required"; then
   ATOMIC64_LIBS=$ncbi_cv_lib_atomic64
fi

if test -z "${NETWORK_LIBS+set}"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
$as_echo_n "checking for library containing gethostbyname... " >&6; }
if ${ac_cv_search_gethostbyname+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
for ac_lib in '' nsl; 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_gethostbyname=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_gethostbyname+:} false; then :
  break
fi
done
if ${ac_cv_search_gethostbyname+:} false; then :

else
  ac_cv_search_gethostbyname=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
$as_echo "$ac_cv_search_gethostbyname" >&6; }
ac_res=$ac_cv_search_gethostbyname
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "x$ac_cv_search_gethostbyname" = "xnone required" \
       || libnsl=$ac_cv_search_gethostbyname
else
  libnsl=
fi

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5
$as_echo_n "checking for library containing connect... " >&6; }
if ${ac_cv_search_connect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
for ac_lib in '' socket; 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_connect=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_connect+:} false; then :
  break
fi
done
if ${ac_cv_search_connect+:} false; then :

else
  ac_cv_search_connect=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5
$as_echo "$ac_cv_search_connect" >&6; }
ac_res=$ac_cv_search_connect
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  test "x$ac_cv_search_connect" = "xnone required" \
       || NETWORK_LIBS="$ac_cv_search_connect $libnsl"
else
  NETWORK_LIBS=$libnsl
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
$as_echo_n "checking for res_search in -lresolv... " >&6; }
if ${ac_cv_lib_resolv_res_search+:} false; then :
  $as_echo_n "(cached) " >&6
else
  orig_LIBS=$LIBS
    LIBS="-lresolv $NETWORK_LIBS $orig_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_resolv_res_search=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
if test "$ac_cv_lib_resolv_res_search" = "yes"; then
   RESOLVER_LIBS=-lresolv
else
   RESOLVER_LIBS=
fi
NETWORK_LIBS="$RESOLVER_LIBS $NETWORK_LIBS"

orig_LIBS=$LIBS
LIBS="$NETWORK_LIBS $orig_LIBS"
for ac_func in inet_ntoa_r
do :
  ac_fn_cxx_check_func "$LINENO" "inet_ntoa_r" "ac_cv_func_inet_ntoa_r"
if test "x$ac_cv_func_inet_ntoa_r" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_INET_NTOA_R 1
_ACEOF

fi
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
$as_echo_n "checking for getaddrinfo... " >&6; }
if ${ac_cv_func_getaddrinfo+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <netdb.h>
int
main ()
{
struct addrinfo *p; getaddrinfo("foo", "bar", p, &p);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_func_getaddrinfo=yes
else
  ac_cv_func_getaddrinfo=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
$as_echo "$ac_cv_func_getaddrinfo" >&6; }
test "$ac_cv_func_getaddrinfo" = "yes" && \

$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5
$as_echo_n "checking for getnameinfo... " >&6; }
if ${ac_cv_func_getnameinfo+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_func_getnameinfo=yes
else
  ac_cv_func_getnameinfo=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getnameinfo" >&5
$as_echo "$ac_cv_func_getnameinfo" >&6; }
test "$ac_cv_func_getnameinfo" = "yes" && \

$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h

for ac_func in freehostent gethostent_r getipnodebyaddr getipnodebyname \
               inet_ntop socketpair
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_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 :
  ac_fn_cxx_check_func "$LINENO" "erf" "ac_cv_func_erf"
if test "x$ac_cv_func_erf" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ERF 1
_ACEOF

fi
done


saved_LIBS=$LIBS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_open" >&5
$as_echo_n "checking for library containing kstat_open... " >&6; }
if ${ac_cv_search_kstat_open+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_kstat_open=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_kstat_open+:} false; then :
  break
fi
done
if ${ac_cv_search_kstat_open+:} false; then :

else
  ac_cv_search_kstat_open=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kstat_open" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBKSTAT 1" >>confdefs.h

   test "x$ac_cv_search_kstat_open" = "xnone required" || KSTAT_LIBS=$ac_cv_search_kstat_open
fi

 LIBS=$saved_LIBS

saved_LIBS=$LIBS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rstat" >&5
$as_echo_n "checking for library containing rstat... " >&6; }
if ${ac_cv_search_rstat+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_rstat=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_rstat+:} false; then :
  break
fi
done
if ${ac_cv_search_rstat+:} false; then :

else
  ac_cv_search_rstat=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rstat" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBRPCSVC 1" >>confdefs.h

   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
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setkey" >&5
$as_echo_n "checking for library containing setkey... " >&6; }
if ${ac_cv_search_setkey+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_setkey=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_setkey+:} false; then :
  break
fi
done
if ${ac_cv_search_setkey+:} false; then :

else
  ac_cv_search_setkey=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setkey" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBCRYPT 1" >>confdefs.h

   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
     linux*:ICC   ) ac_cv_search_dlopen="-ldl" ;;
     solaris*:GCC ) ac_cv_search_dlopen="-ldl" ;;
     darwin*      ) ac_cv_search_iconv="-liconv" ;;
esac
# Temporarily drop -fsanitize= flags for this test, as some toolchains count
# the support library's indirect use of libdt when building applications
# but not when building shared libraries with --no-undefined.
orig_CXXFLAGS=$CXXFLAGS
orig_LDFLAGS=$LDFLAGS
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/[^ ]*fsanitize=[^ ]*//g'`
LDFLAGS=`echo $LDFLAGS | sed -e 's/[^ ]*fsanitize=[^ ]*//g'`
saved_LIBS=$LIBS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
if ${ac_cv_search_dlopen+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_dlopen+:} false; then :
  break
fi
done
if ${ac_cv_search_dlopen+:} false; then :

else
  ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBDL 1" >>confdefs.h

   test "x$ac_cv_search_dlopen" = "xnone required" || DL_LIBS=$ac_cv_search_dlopen
fi

 LIBS=$saved_LIBS

CXXFLAGS=$orig_CXXFLAGS
LDFLAGS=$orig_LDFLAGS
orig_LIBS="$DL_LIBS $orig_LIBS"
# Left alone for the sake of anything using $(C_LIBS) in lieu of $(ORIG_LIBS).
# DL_LIBS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
$as_echo_n "checking for library containing uuid_generate... " >&6; }
if ${ac_cv_search_uuid_generate+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_uuid_generate=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_uuid_generate+:} false; then :
  break
fi
done
if ${ac_cv_search_uuid_generate+:} false; then :

else
  ac_cv_search_uuid_generate=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fuse_loop" >&5
$as_echo_n "checking for library containing fuse_loop... " >&6; }
if ${ac_cv_search_fuse_loop+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_fuse_loop=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_fuse_loop+:} false; then :
  break
fi
done
if ${ac_cv_search_fuse_loop+:} false; then :

else
  ac_cv_search_fuse_loop=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fuse_loop" >&5
$as_echo "$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
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
$as_echo_n "checking for library containing clock_gettime... " >&6; }
if ${ac_cv_search_clock_gettime+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_clock_gettime+:} false; then :
  break
fi
done
if ${ac_cv_search_clock_gettime+:} false; then :

else
  ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBRT 1" >>confdefs.h

   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
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cplus_demangle" >&5
$as_echo_n "checking for library containing cplus_demangle... " >&6; }
if ${ac_cv_search_cplus_demangle+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_cplus_demangle=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_cplus_demangle+:} false; then :
  break
fi
done
if ${ac_cv_search_cplus_demangle+:} false; then :

else
  ac_cv_search_cplus_demangle=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cplus_demangle" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBDEMANGLE 1" >>confdefs.h

   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 clock_gettime nanosleep pthread_cond_timedwait_relative_np \
                pthread_condattr_setclock sched_yield
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

ac_fn_cxx_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include <time.h>
     #ifdef HAVE_SYS_TIME_H
     #  include <sys/time.h>
     #endif
"
if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CLOCK_MONOTONIC $ac_have_decl
_ACEOF
ac_fn_cxx_check_decl "$LINENO" "CLOCK_SGI_CYCLE" "ac_cv_have_decl_CLOCK_SGI_CYCLE" "#include <time.h>
     #ifdef HAVE_SYS_TIME_H
     #  include <sys/time.h>
     #endif
"
if test "x$ac_cv_have_decl_CLOCK_SGI_CYCLE" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CLOCK_SGI_CYCLE $ac_have_decl
_ACEOF
ac_fn_cxx_check_decl "$LINENO" "CLOCK_REALTIME" "ac_cv_have_decl_CLOCK_REALTIME" "#include <time.h>
     #ifdef HAVE_SYS_TIME_H
     #  include <sys/time.h>
     #endif
"
if test "x$ac_cv_have_decl_CLOCK_REALTIME" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CLOCK_REALTIME $ac_have_decl
_ACEOF


# We need to include <iconv.h>, since some implementations rename the symbols.
# This logic adapted from Bruno Haible's iconv.m4.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5
$as_echo_n "checking for library containing iconv... " >&6; }
if ${ac_cv_search_iconv+:} false; then :
  $as_echo_n "(cached) " >&6
else

   ac_cv_search_iconv=no
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_iconv="none required"
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_iconv=-l$l
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
         LIBS="$orig_LIBS"
      done
   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5
$as_echo "$ac_cv_search_iconv" >&6; }
if test "x$ac_cv_search_iconv" != xno; then
             WithPackages="$WithPackages${WithPackagesSep}Iconv"; WithPackagesSep=" "

$as_echo "#define HAVE_LIBICONV 1" >>confdefs.h

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
$as_echo_n "checking for iconv declaration... " >&6; }
   if ${am_cv_proto_iconv+:} false; then :
  $as_echo_n "(cached) " >&6
else

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


#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
if ac_fn_cxx_try_compile "$LINENO"; then :
  am_cv_proto_iconv_arg1=""
else
  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/( /(/'`
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
       }$am_cv_proto_iconv" >&5
$as_echo "${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:no | LLVMGCC:no )
      compiler_pfx="GCC-"
      : ${gccver=`$CXX -dumpversion`}
      compiler_vpfx="GCC`echo $gccver | tr -d .`-"
      ;;
   Clang:* | *[GIK]CC:* )
      compiler_pfx="${signature_compiler}-"
      compiler_vpfx="${signature_compiler}${compiler_version}-"
      ;;
esac

usr_lib='[/usr]*/lib/*[amdsprcv]*[23469]*'
no_usr_lib="s,-L$usr_lib ,,g; s,-L/usr/lib/$multiarch ,,g"

: ${with_libunwind:=no}
if test "$with_libunwind" != "no"; then
    case "$LIBUNWIND_PATH:$with_libunwind" in
       *:yes | *: | $with_libunwind* ) ;;
       * ) LIBUNWIND_PATH=$with_libunwind ;;
    esac
    if test "$LIBUNWIND_PATH" != /usr -a -d "$LIBUNWIND_PATH"; then
       in_path=" in $LIBUNWIND_PATH"
       if test -z "$LIBUNWIND_INCLUDE" -a -d "$LIBUNWIND_PATH/include"; then
          LIBUNWIND_INCLUDE="-I$LIBUNWIND_PATH/include"
       fi
       if test -n "$LIBUNWIND_LIBPATH"; then
          :
       elif test -d "$LIBUNWIND_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 $LIBUNWIND_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBUNWIND_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBUNWIND_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBUNWIND_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBUNWIND_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 $LIBUNWIND_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBUNWIND_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBUNWIND_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBUNWIND_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBUNWIND_LIBS="$LIBUNWIND_LIBPATH -lunwind "
    else
       LIBUNWIND_INCLUDE=""
       LIBUNWIND_LIBS="-lunwind "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind$in_path" >&5
$as_echo_n "checking for libunwind$in_path... " >&6; }
if ${ncbi_cv_lib_libunwind+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBUNWIND_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBUNWIND_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libunwind.h>
                   #include <stdlib.h>
int
main ()
{
void *buffer; unw_backtrace(&buffer, 9);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libunwind=yes
else
  ncbi_cv_lib_libunwind=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libunwind" >&5
$as_echo "$ncbi_cv_lib_libunwind" >&6; }
    if test "$ncbi_cv_lib_libunwind" = "no"; then
       if test "${with_libunwind:=no}" != no; then
       as_fn_error $? "--with-libunwind explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libunwind" = "no"; then
    LIBUNWIND_PATH="No_LIBUNWIND"
    LIBUNWIND_INCLUDE=
    LIBUNWIND_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBUNWIND"; WithPackagesSep=" "
    LIBUNWIND_INCLUDE=" $LIBUNWIND_INCLUDE"

$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h

 fi



LIBS="$LIBUNWIND_LIBS $LIBS"
orig_LIBS="$LIBUNWIND_LIBS $orig_LIBS"

if test "$with_libdw" != "no"; then
    case "$LIBDW_PATH:$with_libdw" in
       *:yes | *: | $with_libdw* ) ;;
       * ) LIBDW_PATH=$with_libdw ;;
    esac
    if test "$LIBDW_PATH" != /usr -a -d "$LIBDW_PATH"; then
       in_path=" in $LIBDW_PATH"
       if test -z "$LIBDW_INCLUDE" -a -d "$LIBDW_PATH/include"; then
          LIBDW_INCLUDE="-I$LIBDW_PATH/include"
       fi
       if test -n "$LIBDW_LIBPATH"; then
          :
       elif test -d "$LIBDW_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 $LIBDW_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBDW_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBDW_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBDW_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBDW_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 $LIBDW_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBDW_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBDW_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBDW_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBDW_LIBS="$LIBDW_LIBPATH -ldw "
    else
       LIBDW_INCLUDE=""
       LIBDW_LIBS="-ldw "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdw$in_path" >&5
$as_echo_n "checking for libdw$in_path... " >&6; }
if ${ncbi_cv_lib_libdw+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBDW_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBDW_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <elfutils/libdw.h>
int
main ()
{
Dwarf* d = dwarf_begin(17, DWARF_C_READ);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libdw=yes
else
  ncbi_cv_lib_libdw=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libdw" >&5
$as_echo "$ncbi_cv_lib_libdw" >&6; }
    if test "$ncbi_cv_lib_libdw" = "no"; then
       if test "${with_libdw:=no}" != no; then
       as_fn_error $? "--with-libdw explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libdw" = "no"; then
    LIBDW_PATH="No_LIBDW"
    LIBDW_INCLUDE=
    LIBDW_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBDW"; WithPackagesSep=" "
    LIBDW_INCLUDE=" $LIBDW_INCLUDE"

$as_echo "#define HAVE_LIBDW 1" >>confdefs.h

 fi



LIBS="$LIBDW_LIBS $LIBS"
orig_LIBS="$LIBDW_LIBS $orig_LIBS"

case "$with_backward_cpp" in
   yes | '' ) ;;
   no       ) ncbi_cv_lib_backward_cpp=no ;;
   *        ) BACKWARD_CPP_PATH=$with_backward_cpp ;;
esac
if test -d "$BACKWARD_CPP_PATH"; then
   BACKWARD_CPP_INCLUDE=-I$BACKWARD_CPP_PATH/include
   in_path=" in $BACKWARD_CPP_PATH"
else
   in_path=
fi
CPPFLAGS="$orig_CPPFLAGS $BACKWARD_CPP_INCLUDE"
for ac_header in backward.hpp
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "backward.hpp" "ac_cv_header_backward_hpp" "$ac_includes_default"
if test "x$ac_cv_header_backward_hpp" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_BACKWARD_HPP 1
_ACEOF
           WithPackages="$WithPackages${WithPackagesSep}BACKWARD_CPP"; WithPackagesSep=" "
else
  BACKWARD_CPP_INCLUDE=; if test "${with_backward_cpp:=no}" != no; then
       as_fn_error $? "--with-backward_cpp explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi

done


orig_BACKWARD_CPP_INCLUDE=$BACKWARD_CPP_INCLUDE
if test "$with_backward_cpp" != "no"; then
    case "$BACKWARD_CPP_PATH:$with_backward_cpp" in
       *:yes | *: | $with_backward_cpp* ) ;;
       * ) BACKWARD_CPP_PATH=$with_backward_cpp ;;
    esac
    if test "$BACKWARD_CPP_PATH" != /usr -a -d "$BACKWARD_CPP_PATH"; then
       in_path=" in $BACKWARD_CPP_PATH"
       if test -z "$BACKWARD_CPP_INCLUDE" -a -d "$BACKWARD_CPP_PATH/include"; then
          BACKWARD_CPP_INCLUDE="-I$BACKWARD_CPP_PATH/include"
       fi
       if test -n "$BACKWARD_CPP_LIBPATH"; then
          :
       elif test -d "$BACKWARD_CPP_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 $BACKWARD_CPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BACKWARD_CPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $BACKWARD_CPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    BACKWARD_CPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$BACKWARD_CPP_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 $BACKWARD_CPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    BACKWARD_CPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $BACKWARD_CPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    BACKWARD_CPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       BACKWARD_CPP_LIBS="$BACKWARD_CPP_LIBPATH -lbackward "
    else
       BACKWARD_CPP_INCLUDE=""
       BACKWARD_CPP_LIBS="-lbackward "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbackward$in_path" >&5
$as_echo_n "checking for libbackward$in_path... " >&6; }
if ${ncbi_cv_lib_backward_cpp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$LIBUNWIND_INCLUDE $LIBDW_INCLUDE $BACKWARD_CPP_INCLUDE $orig_CPPFLAGS"
       LIBS="$BACKWARD_CPP_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef HAVE_LIBUNWIND
                   #  define BACKWARD_HAS_UNWIND 1
                   #else
                   #  define BACKWARD_HAS_BACKTRACE 1
                   #endif
                   #ifdef HAVE_LIBDW
                   #  define BACKWARD_HAS_DW 1
                   #endif
                   #include <backward.hpp>
int
main ()
{
backward::StackTrace st; st.load_here(32);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_backward_cpp=yes
else
  ncbi_cv_lib_backward_cpp=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_backward_cpp" >&5
$as_echo "$ncbi_cv_lib_backward_cpp" >&6; }
    if test "$ncbi_cv_lib_backward_cpp" = "no"; then
       if test "${with_backward_cpp:=no}" != no; then
       as_fn_error $? "--with-backward_cpp explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_backward_cpp" = "no"; then
    BACKWARD_CPP_PATH="No_BACKWARD_CPP"
    BACKWARD_CPP_INCLUDE=
    BACKWARD_CPP_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}BACKWARD_CPP"; WithPackagesSep=" "
    BACKWARD_CPP_INCLUDE="$LIBUNWIND_INCLUDE $LIBDW_INCLUDE $BACKWARD_CPP_INCLUDE"

$as_echo "#define HAVE_LIBBACKWARD_CPP 1" >>confdefs.h

 fi



BACKWARD_CPP_INCLUDE=$orig_BACKWARD_CPP_INCLUDE


if test "$with_backward_cpp_sig" = yes; then

$as_echo "#define USE_LIBBACKWARD_SIG_HANDLING 1" >>confdefs.h

fi

if test "$with_z" != "no"; then
    case "$Z_PATH:$with_z" in
       *:yes | *: | $with_z* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libz$in_path" >&5
$as_echo_n "checking for libz$in_path... " >&6; }
if ${ncbi_cv_lib_z+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $Z_INCLUDE $orig_CPPFLAGS"
       LIBS="$Z_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <zlib.h>
int
main ()
{
gzFile fp; char buf[1024]; int n = gzread(fp, buf, sizeof(buf))
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_z=yes
else
  ncbi_cv_lib_z=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_z" >&5
$as_echo "$ncbi_cv_lib_z" >&6; }
    if test "$ncbi_cv_lib_z" = "no"; then
       if test "${with_z:=no}" != no; then
       as_fn_error $? "--with-z explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBZ 1" >>confdefs.h

 fi



if test -z "$Z_LIBS"; then
   zlocal=util/compress/zlib
   { $as_echo "$as_me:${as_lineno-$LINENO}: using local zlib copy in $zlocal" >&5
$as_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
# Cloudflare fork, always present in practice
if test -d "$real_srcdir/include/util/compress/zlib_cloudflare"; then

$as_echo "#define HAVE_LIBZCF 1" >>confdefs.h

fi

if test "$with_bz2" != "no"; then
    case "$BZ2_PATH:$with_bz2" in
       *:yes | *: | $with_bz2* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbz2$in_path" >&5
$as_echo_n "checking for libbz2$in_path... " >&6; }
if ${ncbi_cv_lib_bz2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $BZ2_INCLUDE $orig_CPPFLAGS"
       LIBS="$BZ2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_bz2=yes
else
  ncbi_cv_lib_bz2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_bz2" >&5
$as_echo "$ncbi_cv_lib_bz2" >&6; }
    if test "$ncbi_cv_lib_bz2" = "no"; then
       if test "${with_bz2:=no}" != no; then
       as_fn_error $? "--with-bz2 explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBBZ2 1" >>confdefs.h

 fi



if test -z "$BZ2_LIBS"; then
   bzlocal=util/compress/bzip2
   { $as_echo "$as_me:${as_lineno-$LINENO}: using local bzlib copy in $bzlocal" >&5
$as_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"

$as_echo "#define USE_LOCAL_BZLIB 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}BZ2"; WithPackagesSep=" "
             WithPackages="$WithPackages${WithPackagesSep}LocalBZ2"; WithPackagesSep=" "
fi

case "$with_lzo" in
   no       ) ;;
   yes | "" ) ;;
   *        ) LZO_PATH=$with_lzo ;;
esac
if test -d "$LZO_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LZO_PATH; then { PWD=; unset 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 "$LZO_PATH:$with_lzo" in
       *:yes | *: | $with_lzo* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzo2$in_path" >&5
$as_echo_n "checking for liblzo2$in_path... " >&6; }
if ${ncbi_cv_lib_lzo+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LZO_INCLUDE $orig_CPPFLAGS"
       LIBS="$LZO_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <lzo/lzo1x.h>
int
main ()
{
lzo_uint32 c = lzo_crc32(0, (const unsigned char*)"foo", 3);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_lzo=yes
else
  ncbi_cv_lib_lzo=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_lzo" >&5
$as_echo "$ncbi_cv_lib_lzo" >&6; }
    if test "$ncbi_cv_lib_lzo" = "no"; then
       if test "${with_lzo:=no}" != no; then
       as_fn_error $? "--with-lzo explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBLZO 1" >>confdefs.h

 fi



if test -n "$LZO_LIBS" -a "x$with_bin_release" = xyes \
        -a \( -f "$LZO_PATH/lib$bit64_sfx/liblzo2-static.a" \
              -o -f "$LZO_PATH/lib/liblzo2-static.a" \); then
   LZO_LIBS="$LZO_LIBPATH -llzo2-static"
fi

case "$with_zstd" in
   no       ) ;;
   yes | "" ) ;;
   *        ) ZSTD_PATH=$with_zstd ;;
esac
if test -d "$ZSTD_PATH"; then
   ZSTD_ARCH_PATH=$ZSTD_PATH
for d in "$ZSTD_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$ZSTD_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$ZSTD_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$ZSTD_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      ZSTD_ARCH_PATH=$d
      break
   fi
done
   ZSTD_PATH=$ZSTD_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $ZSTD_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $ZSTD_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ZSTD_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ZSTD_PATH" in
               /*) ;;
               * ) ZSTD_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ZSTD_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_zstd" != "no"; then
    case "$ZSTD_PATH:$with_zstd" in
       *:yes | *: | $with_zstd* ) ;;
       * ) ZSTD_PATH=$with_zstd ;;
    esac
    if test "$ZSTD_PATH" != /usr -a -d "$ZSTD_PATH"; then
       in_path=" in $ZSTD_PATH"
       if test -z "$ZSTD_INCLUDE" -a -d "$ZSTD_PATH/include"; then
          ZSTD_INCLUDE="-I$ZSTD_PATH/include"
       fi
       if test -n "$ZSTD_LIBPATH"; then
          :
       elif test -d "$ZSTD_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 $ZSTD_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ZSTD_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ZSTD_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    ZSTD_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$ZSTD_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 $ZSTD_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ZSTD_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ZSTD_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    ZSTD_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       ZSTD_LIBS="$ZSTD_LIBPATH -lzstd "
    else
       ZSTD_INCLUDE=""
       ZSTD_LIBS="-lzstd "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd$in_path" >&5
$as_echo_n "checking for libzstd$in_path... " >&6; }
if ${ncbi_cv_lib_zstd+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $ZSTD_INCLUDE $orig_CPPFLAGS"
       LIBS="$ZSTD_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define ZSTD_STATIC_LINKING_ONLY 1
                   #include <zstd.h>
int
main ()
{
ZSTD_CCtx* cctx = ZSTD_createCCtx();
        return ZSTD_c_literalCompressionMode;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_zstd=yes
else
  ncbi_cv_lib_zstd=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_zstd" >&5
$as_echo "$ncbi_cv_lib_zstd" >&6; }
    if test "$ncbi_cv_lib_zstd" = "no"; then
       if test "${with_zstd:=no}" != no; then
       as_fn_error $? "--with-zstd explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_zstd" = "no"; then
    ZSTD_PATH="No_ZSTD"
    ZSTD_INCLUDE=
    ZSTD_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}ZSTD"; WithPackagesSep=" "
    ZSTD_INCLUDE=" $ZSTD_INCLUDE"

$as_echo "#define HAVE_LIBZSTD 1" >>confdefs.h

 fi



if test -n "$ZSTD_LIBS" -a \( -f "$ZSTD_PATH/lib$bit64_sfx/libzstd-static.a" \
                              -o -f "$ZSTD_PATH/lib/libzstd-static.a" \); then
   ZSTD_STATIC_LIBS="$ZSTD_LIBPATH -lzstd-static"
else
   ZSTD_STATIC_LIBS=$ZSTD_LIBS
fi
if test "x$with_bin_release" = xyes; then
   ZSTD_LIBS=$ZSTD_STATIC_LIBS
fi

case "$with_pcre" in
   no       ) ;;
   yes | "" ) ;;
   *        ) PCRE_PATH=$with_pcre ;;
esac
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 "$PCRE_PATH:$with_pcre" in
       *:yes | *: | $with_pcre* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre$in_path" >&5
$as_echo_n "checking for libpcre$in_path... " >&6; }
if ${ncbi_cv_lib_pcre+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $PCRE_INCLUDE $orig_CPPFLAGS"
       LIBS="$PCRE_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_pcre=yes
else
  ncbi_cv_lib_pcre=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_pcre" >&5
$as_echo "$ncbi_cv_lib_pcre" >&6; }
    if test "$ncbi_cv_lib_pcre" = "no"; then
       if test "${with_pcre:=no}" != no; then
       as_fn_error $? "--with-pcre explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBPCRE 1" >>confdefs.h

 fi




if test "$with_pcre2" != "no"; then
    case "$PCRE2_PATH:$with_pcre2" in
       *:yes | *: | $with_pcre2* ) ;;
       * ) PCRE2_PATH=$with_pcre2 ;;
    esac
    if test "$PCRE2_PATH" != /usr -a -d "$PCRE2_PATH"; then
       in_path=" in $PCRE2_PATH"
       if test -z "$PCRE2_INCLUDE" -a -d "$PCRE2_PATH/include"; then
          PCRE2_INCLUDE="-I$PCRE2_PATH/include"
       fi
       if test -n "$PCRE2_LIBPATH"; then
          :
       elif test -d "$PCRE2_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 $PCRE2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PCRE2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PCRE2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PCRE2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$PCRE2_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 $PCRE2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PCRE2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PCRE2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PCRE2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       PCRE2_LIBS="$PCRE2_LIBPATH -lpcre2-8 "
    else
       PCRE2_INCLUDE=""
       PCRE2_LIBS="-lpcre2-8 "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8$in_path" >&5
$as_echo_n "checking for libpcre2-8$in_path... " >&6; }
if ${ncbi_cv_lib_pcre2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $PCRE2_INCLUDE $orig_CPPFLAGS"
       LIBS="$PCRE2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define PCRE2_CODE_UNIT_WIDTH 8
                   #include <pcre2.h>
int
main ()
{
pcre2_config(123, NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_pcre2=yes
else
  ncbi_cv_lib_pcre2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_pcre2" >&5
$as_echo "$ncbi_cv_lib_pcre2" >&6; }
    if test "$ncbi_cv_lib_pcre2" = "no"; then
       if test "${with_pcre2:=no}" != no; then
       as_fn_error $? "--with-pcre2 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_pcre2" = "no"; then
    PCRE2_PATH="No_PCRE2"
    PCRE2_INCLUDE=
    PCRE2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PCRE2"; WithPackagesSep=" "
    PCRE2_INCLUDE=" $PCRE2_INCLUDE"

$as_echo "#define HAVE_LIBPCRE2 1" >>confdefs.h

 fi



PCRE_LEGACY_LIBS=$PCRE_LIBS
if test "x$with_pcre2" != xno; then
   PCRE_LIBS=$PCRE2_LIBS
fi

if test -z "$PCRE_LIBS" -a -z "$PCRE2_LIBS"; then
   pcrelocal=util/regexp
   { $as_echo "$as_me:${as_lineno-$LINENO}: using local PCRE copy in $pcrelocal" >&5
$as_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"

$as_echo "#define USE_LOCAL_PCRE 1" >>confdefs.h

   if test -f $srcdir/include/$pcrelocal/pcre2.h; then

$as_echo "#define HAVE_LIBPCRE2 1" >>confdefs.h

                WithPackages="$WithPackages${WithPackagesSep}PCRE2"; WithPackagesSep=" "
   else
                WithPackages="$WithPackages${WithPackagesSep}PCRE"; WithPackagesSep=" "
   fi
             WithPackages="$WithPackages${WithPackagesSep}LocalPCRE"; WithPackagesSep=" "
elif test -n "$PCRE2_LIBS"; then
   PCREPOSIX_LIBS=`echo "$PCRE2_LIBS" | sed -e 's/-lpcre2-8/-lpcre2posix &/'`
else
   PCREPOSIX_LIBS=`echo "$PCRE_LIBS" | sed -e 's/-lpcre/-lpcreposix -lpcre/'`
fi

## SSL/TLS libraries (and supporting libraries)
if test "x${with_mbedtls-no}" != xno; then
   case "$with_mbedtls" in
      yes ) ;;
      *   ) MBEDTLS_PATH=$with_mbedtls ;;
   esac
   d="$MBEDTLS_PATH/${DEBUG_SFX}${mt_sfx}${bit64_sfx}"
   if test -d "$d"; then
      MBEDTLS_PATH=$d
   fi
   if test -d "$MBEDTLS_PATH"; then
      ncbi_fix_dir_tmp=`if cd $MBEDTLS_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $MBEDTLS_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            MBEDTLS_PATH=$ncbi_fix_dir_tmp2
         else
            case "$MBEDTLS_PATH" in
               /*) ;;
               * ) MBEDTLS_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) MBEDTLS_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   if test "$with_mbedtls" != "no"; then
    case "$MBEDTLS_PATH:$with_mbedtls" in
       *:yes | *: | $with_mbedtls* ) ;;
       * ) MBEDTLS_PATH=$with_mbedtls ;;
    esac
    if test "$MBEDTLS_PATH" != /usr -a -d "$MBEDTLS_PATH"; then
       in_path=" in $MBEDTLS_PATH"
       if test -z "$MBEDTLS_INCLUDE" -a -d "$MBEDTLS_PATH/include"; then
          MBEDTLS_INCLUDE="-I$MBEDTLS_PATH/include"
       fi
       if test -n "$MBEDTLS_LIBPATH"; then
          :
       elif test -d "$MBEDTLS_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 $MBEDTLS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MBEDTLS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MBEDTLS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    MBEDTLS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MBEDTLS_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 $MBEDTLS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MBEDTLS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MBEDTLS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    MBEDTLS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MBEDTLS_LIBS="$MBEDTLS_LIBPATH -lmbedtls -lmbedx509 -lmbedcrypto $Z_LIBS"
    else
       MBEDTLS_INCLUDE=""
       MBEDTLS_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $Z_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmbedtls$in_path" >&5
$as_echo_n "checking for libmbedtls$in_path... " >&6; }
if ${ncbi_cv_lib_mbedtls+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $MBEDTLS_INCLUDE $orig_CPPFLAGS"
       LIBS="$MBEDTLS_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mbedtls/ssl.h>
int
main ()
{
mbedtls_ssl_context ssl; mbedtls_ssl_init(&ssl);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_mbedtls=yes
else
  ncbi_cv_lib_mbedtls=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_mbedtls" >&5
$as_echo "$ncbi_cv_lib_mbedtls" >&6; }
    if test "$ncbi_cv_lib_mbedtls" = "no"; then
       if test "${with_mbedtls:=no}" != no; then
       as_fn_error $? "--with-mbedtls explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_mbedtls" = "no"; then
    MBEDTLS_PATH="No_MBEDTLS"
    MBEDTLS_INCLUDE=
    MBEDTLS_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MBEDTLS"; WithPackagesSep=" "
    MBEDTLS_INCLUDE=" $MBEDTLS_INCLUDE"

$as_echo "#define HAVE_LIBMBEDTLS 1" >>confdefs.h

 fi



   if test -n "$MBEDTLS_LIBS" -a -f "$MBEDTLS_PATH/lib/libmbedtls-static.a" \
      -a "x$with_static_mbedtls" = xyes; then
      MBEDTLS_LIBS="-L$MBEDTLS_PATH/lib -lmbedtls-static -lmbedx509-static -lmbedcrypto-static $Z_LIBS"
   fi
fi
if test -z "$MBEDTLS_LIBS"; then
   mbedtls_local=connect/mbedtls
   { $as_echo "$as_me:${as_lineno-$LINENO}: using local mbedTLS copy in $mbedtls_local" >&5
$as_echo "$as_me: using local mbedTLS copy in $mbedtls_local" >&6;}
   MBEDTLS_INCLUDE=""
   MBEDTLS_LIBS="$Z_LIBS"
             WithPackages="$WithPackages${WithPackagesSep}MBEDTLS"; WithPackagesSep=" "
fi

if test "x$with_gmp" != xno; then
   case "$with_gmp" in
      yes | '' ) ;;
      *        ) GMP_PATH=$with_gmp ;;
   esac
   for pfx in "$compiler_vpfx" "$compiler_pfx" "" ; do
      vpath=$GMP_PATH/$pfx${DEBUG_SFX}${mt_sfx}${bit64_sfx}
      if test -d "$vpath" ; then
         GMP_PATH=$vpath
         break
      fi
   done
   if test -d "$GMP_PATH"; then
      ncbi_fix_dir_tmp=`if cd $GMP_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GMP_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GMP_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GMP_PATH" in
               /*) ;;
               * ) GMP_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GMP_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   if test "$with_gmp" != "no"; then
    case "$GMP_PATH:$with_gmp" in
       *:yes | *: | $with_gmp* ) ;;
       * ) GMP_PATH=$with_gmp ;;
    esac
    if test "$GMP_PATH" != /usr -a -d "$GMP_PATH"; then
       in_path=" in $GMP_PATH"
       if test -z "$GMP_INCLUDE" -a -d "$GMP_PATH/include"; then
          GMP_INCLUDE="-I$GMP_PATH/include"
       fi
       if test -n "$GMP_LIBPATH"; then
          :
       elif test -d "$GMP_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 $GMP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GMP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GMP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GMP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GMP_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 $GMP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GMP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GMP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GMP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GMP_LIBS="$GMP_LIBPATH -lgmp "
    else
       GMP_INCLUDE=""
       GMP_LIBS="-lgmp "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp$in_path" >&5
$as_echo_n "checking for libgmp$in_path... " >&6; }
if ${ncbi_cv_lib_gmp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GMP_INCLUDE $orig_CPPFLAGS"
       LIBS="$GMP_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <gmp.h>
int
main ()
{
mpz_t x; mpz_init(x);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gmp=yes
else
  ncbi_cv_lib_gmp=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gmp" >&5
$as_echo "$ncbi_cv_lib_gmp" >&6; }
    if test "$ncbi_cv_lib_gmp" = "no"; then
       if test "${with_gmp:=no}" != no; then
       as_fn_error $? "--with-gmp explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_gmp" = "no"; then
    GMP_PATH="No_GMP"
    GMP_INCLUDE=
    GMP_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GMP"; WithPackagesSep=" "
    GMP_INCLUDE=" $GMP_INCLUDE"

$as_echo "#define HAVE_LIBGMP 1" >>confdefs.h

 fi



fi
if test "$with_gmp" = no; then
   { GMP_INCLUDE=; unset GMP_INCLUDE;}
   { GMP_LIBS=; unset GMP_LIBS;}
else
             WithPackages="$WithPackages${WithPackagesSep}GMP"; WithPackagesSep=" "
fi

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 { PWD=; unset 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LIBGCRYPT_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5
$as_echo "$LIBGCRYPT_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
   { GCRYPT_CONFIG_LIBS=; unset GCRYPT_CONFIG_LIBS;}
fi
if test "$with_gcrypt" != "no"; then
    case "$GCRYPT_PATH:$with_gcrypt" in
       *:yes | *: | $with_gcrypt* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcrypt$in_path" >&5
$as_echo_n "checking for libgcrypt$in_path... " >&6; }
if ${ncbi_cv_lib_gcrypt+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GCRYPT_INCLUDE $orig_CPPFLAGS"
       LIBS="$GCRYPT_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gcrypt=yes
else
  ncbi_cv_lib_gcrypt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gcrypt" >&5
$as_echo "$ncbi_cv_lib_gcrypt" >&6; }
    if test "$ncbi_cv_lib_gcrypt" = "no"; then
       if test "${with_gcrypt:=no}" != no; then
       as_fn_error $? "--with-gcrypt explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBGCRYPT 1" >>confdefs.h

 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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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

if test "x$with_nettle" != xno; then
   case "$with_nettle" in
      yes | '' ) ;;
      *        ) NETTLE_PATH=$with_nettle ;;
   esac
   if test -d "$NETTLE_PATH"; then
      ncbi_fix_dir_tmp=`if cd $NETTLE_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NETTLE_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NETTLE_PATH=$ncbi_fix_dir_tmp2
         else
            case "$NETTLE_PATH" in
               /*) ;;
               * ) NETTLE_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NETTLE_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   if test -d "$NETTLE_PATH/lib$bit64_sfx"; then
      NETTLE_LIBDIR=$NETTLE_PATH/lib$bit64_sfx
   else
      NETTLE_LIBDIR=$NETTLE_PATH/lib
   fi
   for pfx in "$compiler_vpfx" "$compiler_pfx" "" ; do
      vpath=$NETTLE_PATH/$pfx${DEBUG_SFX}${mt_sfx}${bit64_sfx}
      if test -d "$vpath" ; then
         NETTLE_LIBDIR=$vpath/lib
         break
      fi
   done
   if test -d "$NETTLE_LIBDIR"; then
      ncbi_fix_dir_tmp=`if cd $NETTLE_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NETTLE_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NETTLE_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$NETTLE_LIBDIR" in
               /*) ;;
               * ) NETTLE_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NETTLE_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 $NETTLE_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NETTLE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NETTLE_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NETTLE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   fi
   if test "$with_nettle" != "no"; then
    case "$NETTLE_PATH:$with_nettle" in
       *:yes | *: | $with_nettle* ) ;;
       * ) NETTLE_PATH=$with_nettle ;;
    esac
    if test "$NETTLE_PATH" != /usr -a -d "$NETTLE_PATH"; then
       in_path=" in $NETTLE_PATH"
       if test -z "$NETTLE_INCLUDE" -a -d "$NETTLE_PATH/include"; then
          NETTLE_INCLUDE="-I$NETTLE_PATH/include"
       fi
       if test -n "$NETTLE_LIBPATH"; then
          :
       elif test -d "$NETTLE_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 $NETTLE_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NETTLE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NETTLE_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NETTLE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$NETTLE_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 $NETTLE_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NETTLE_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NETTLE_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NETTLE_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       NETTLE_LIBS="$NETTLE_LIBPATH -lhogweed -lnettle"
    else
       NETTLE_INCLUDE=""
       NETTLE_LIBS="-lhogweed -lnettle"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhogweed$in_path" >&5
$as_echo_n "checking for libhogweed$in_path... " >&6; }
if ${ncbi_cv_lib_nettle+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $NETTLE_INCLUDE $orig_CPPFLAGS"
       LIBS="$NETTLE_LIBS $GMP_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nettle/sexp.h>
int
main ()
{
struct sexp_iterator it;
             sexp_iterator_first(&it, 0, (const uint8_t*) NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_nettle=yes
else
  ncbi_cv_lib_nettle=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_nettle" >&5
$as_echo "$ncbi_cv_lib_nettle" >&6; }
    if test "$ncbi_cv_lib_nettle" = "no"; then
       if test "${with_nettle:=no}" != no; then
       as_fn_error $? "--with-nettle explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_nettle" = "no"; then
    NETTLE_PATH="No_NETTLE"
    NETTLE_INCLUDE=
    NETTLE_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}NETTLE"; WithPackagesSep=" "
    NETTLE_INCLUDE=" $NETTLE_INCLUDE"

$as_echo "#define HAVE_LIBNETTLE 1" >>confdefs.h

 fi



fi
if test "$with_nettle" = no; then
   { NETTLE_INCLUDE=; unset NETTLE_INCLUDE;}
   { NETTLE_LIBS=; unset NETTLE_LIBS;}
else
             WithPackages="$WithPackages${WithPackagesSep}NETTLE"; WithPackagesSep=" "
fi

case "${with_gnutls=no}" 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 { PWD=; unset 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LIBGNUTLS_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CONFIG" >&5
$as_echo "$LIBGNUTLS_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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$bit64_sfx/pkgconfig:$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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
           GNUTLS_CONFIG_LIBS=`$LIBGNUTLS_CONFIG --libs-only-l`
           GNUTLS_CONFIG_LIBS="$GNUTLS_LIBPATH $GNUTLS_CONFIG_LIBS $Z_LIBS"
           ;;
       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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
           GNUTLS_CONFIG_LIBS="`$LIBGNUTLS_CONFIG --libs` $Z_LIBS"
           ;;
   esac

   if test "x$LIBGNUTLS_CONFIG" != xno; then
      GNUTLS_INCLUDE=`$LIBGNUTLS_CONFIG --cflags`
   fi
else
   { GNUTLS_CONFIG_LIBS=; unset GNUTLS_CONFIG_LIBS;}
fi
if test "$with_gnutls" != "no"; then
    case "$GNUTLS_PATH:$with_gnutls" in
       *:yes | *: | $with_gnutls* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
       x=`echo $x | sed -e "$ncbi_rpath_sed"`
       ncbi_rp_R_flags="${ncbi_rp_R_flags}${ncbi_rp_R_sep}$x"
       ncbi_rp_R_sep=:
    done
    GNUTLS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GNUTLS_LIBS="$GNUTLS_LIBPATH -lgnutls $GNUTLS_CONFIG_LIBS"
    else
       GNUTLS_INCLUDE=""
       GNUTLS_LIBS="-lgnutls $GNUTLS_CONFIG_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnutls$in_path" >&5
$as_echo_n "checking for libgnutls$in_path... " >&6; }
if ${ncbi_cv_lib_gnutls+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GNUTLS_INCLUDE $orig_CPPFLAGS"
       LIBS="$GNUTLS_LIBS $GCRYPT_LIBS $NETTLE_LIBS $GMP_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <gnutls/gnutls.h>
int
main ()
{
gnutls_session_t s; gnutls_init(&s, GNUTLS_CLIENT);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gnutls=yes
else
  ncbi_cv_lib_gnutls=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gnutls" >&5
$as_echo "$ncbi_cv_lib_gnutls" >&6; }
    if test "$ncbi_cv_lib_gnutls" = "no"; then
       if test "${with_gnutls:=no}" != no; then
       as_fn_error $? "--with-gnutls explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBGNUTLS 1" >>confdefs.h

 fi



if test "x$with_gnutls" != xno; then
   for ac_func in gnutls_certificate_set_verify_function \
                   gnutls_record_disable_padding gnutls_rnd
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
eval as_val=\$$as_ac_var
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

   for ac_header in gnutls/abstract.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "gnutls/abstract.h" "ac_cv_header_gnutls_abstract_h" "$ac_includes_default"
if test "x$ac_cv_header_gnutls_abstract_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_ABSTRACT_H 1
_ACEOF

fi

done

   if test -n "$GNUTLS_CONFIG_LIBS"; then
      if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    GNUTLS_LIBS=`echo $GNUTLS_CONFIG_LIBS | sed -e "$no_usr_lib"`
 else
    GNUTLS_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `echo $GNUTLS_CONFIG_LIBS | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
   else
      GNUTLS_LIBS="$GNUTLS_LIBS $NETTLE_LIBS $GMP_LIBS"
   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
   if test "$with_static_gnutls" = yes; then
      dirs=''
      sep=''
      static_libs=''
      for x in $GNUTLS_LIBS; do
         case $x in
            -L* ) dirs="$dirs `echo _$x | cut -c4-`" ;;
            -l* )
                want=lib`echo _$x | cut -c4-`-static.a
                for d in $dirs; do
                   if test -f $d/$want; then
                      x=$x-static
                      break
                   fi
                done
                ;;
         esac
         static_libs=$static_libs$sep$x
         sep=' '
      done
      GNUTLS_LIBS="$static_libs $ICONV_LIBS"
   fi
fi

if test "$with_openssl" != "no"; then
    case "$OPENSSL_PATH:$with_openssl" in
       *:yes | *: | $with_openssl* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssl$in_path" >&5
$as_echo_n "checking for libssl$in_path... " >&6; }
if ${ncbi_cv_lib_openssl+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $OPENSSL_INCLUDE $orig_CPPFLAGS"
       LIBS="$OPENSSL_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <openssl/ssl.h>
int
main ()
{
SSL_library_init();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_openssl=yes
else
  ncbi_cv_lib_openssl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_openssl" >&5
$as_echo "$ncbi_cv_lib_openssl" >&6; }
    if test "$ncbi_cv_lib_openssl" = "no"; then
       if test "${with_openssl:=no}" != no; then
       as_fn_error $? "--with-openssl explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBOPENSSL 1" >>confdefs.h

 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

NETWORK_LIBS="$GNUTLS_LIBS $MBEDTLS_LIBS $NETWORK_LIBS"

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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_KRB5_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5
$as_echo "$KRB5_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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 "$KRB5_PATH:$with_krb5" in
       *:yes | *: | $with_krb5* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgssapi_krb5$in_path" >&5
$as_echo_n "checking for libgssapi_krb5$in_path... " >&6; }
if ${ncbi_cv_lib_krb5+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $KRB5_INCLUDE $orig_CPPFLAGS"
       LIBS="$KRB5_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_krb5=yes
else
  ncbi_cv_lib_krb5=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_krb5" >&5
$as_echo "$ncbi_cv_lib_krb5" >&6; }
    if test "$ncbi_cv_lib_krb5" = "no"; then
       if test "${with_krb5:=no}" != no; then
       as_fn_error $? "--with-krb5 explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h

 fi



if test "x$with_krb5" != xno; then
   for ac_func in error_message
do :
  ac_fn_cxx_check_func "$LINENO" "error_message" "ac_cv_func_error_message"
if test "x$ac_cv_func_error_message" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ERROR_MESSAGE 1
_ACEOF

fi
done

   for ac_header in com_err.h roken.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

   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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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


case "$with_curl" in
   no       ) ac_cv_path_CURL_CONFIG=no ;;
   yes | "" )                           ;;
   *        ) CURL_PATH=$with_curl      ;;
esac
if test -d "$CURL_PATH"; then
   ncbi_fix_dir_tmp=`if cd $CURL_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CURL_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CURL_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CURL_PATH" in
               /*) ;;
               * ) CURL_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CURL_PATH=$ncbi_fix_dir_tmp ;;
 esac
   CURL_ARCH_PATH=$CURL_PATH
for d in "$CURL_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CURL_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CURL_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$CURL_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      CURL_ARCH_PATH=$d
      break
   fi
done
   ncbi_fix_dir_tmp=`if cd $CURL_ARCH_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CURL_ARCH_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CURL_ARCH_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CURL_ARCH_PATH" in
               /*) ;;
               * ) CURL_ARCH_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CURL_ARCH_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
# Extract the first word of "curl-config", so it can be a program name with args.
set dummy curl-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CURL_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CURL_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$CURL_ARCH_PATH/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CURL_CONFIG=$ac_cv_path_CURL_CONFIG
if test -n "$CURL_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
$as_echo "$CURL_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test -x "$CURL_CONFIG"; then
   : ${CURL_INCLUDE=`"$CURL_CONFIG" --cflags`}
   if test -z "${CURL_LIBPATH+set}"; then
    if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    CURL_LIBPATH=`"$CURL_CONFIG" --libs | sed -e "s/ -lcurl[^ ]*//; "`
 else
    CURL_LIBPATH=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `"$CURL_CONFIG" --libs | sed -e "s/ -lcurl[^ ]*//; "`; do
       case "$x" in
          -L/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -L*)
             CURL_LIBPATH="$CURL_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=:
             ;;
          *)
             CURL_LIBPATH="$CURL_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
    CURL_LIBPATH="$CURL_LIBPATH${ncbi_rp_R_flags}"
 fi
 fi
   CURL_PATH=`"$CURL_CONFIG" --prefix`
elif test -d "$CURL_ARCH_PATH"; then
   : ${CURL_INCLUDE=-I$CURL_PATH/include}
   if test -z "${CURL_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 $CURL_ARCH_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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_ARCH_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
fi
if test "$with_curl" != "no"; then
    case "$CURL_PATH:$with_curl" in
       *:yes | *: | $with_curl* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl$in_path" >&5
$as_echo_n "checking for libcurl$in_path... " >&6; }
if ${ncbi_cv_lib_curl+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $CURL_INCLUDE $orig_CPPFLAGS"
       LIBS="$CURL_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <curl/curl.h>
int
main ()
{
char* v = curl_version();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_curl=yes
else
  ncbi_cv_lib_curl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_curl" >&5
$as_echo "$ncbi_cv_lib_curl" >&6; }
    if test "$ncbi_cv_lib_curl" = "no"; then
       if test "${with_curl:=no}" != no; then
       as_fn_error $? "--with-curl explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h

 fi



if test -n "$CURL_LIBS"; then
   if test -x "$CURL_CONFIG"; then
      CURL_STATIC_LIBS=`"$CURL_CONFIG" --static-libs`
   elif test -f "$CURL_ARCH_PATH/lib/libcurl-static.a"; then
      # Speculative
      CURL_STATIC_LIBS="$CURL_LIBPATH -lcurl-static $OPENSSL_LIBS $Z_LIBS"
   fi
   : ${CURL_STATIC_LIBS:=$CURL_LIBS}
fi


## SYBASE libraries

NETWORK_PURE_LIBS="$NETWORK_LIBS"
if test "$with_sybase" != "no" ; then
   resolve_sybase=true
   default_pointer=default-${NCBI_PLATFORM_BITS}bit
   : ${with_sybase_new:="no"}

   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
   if test -d "$with_sybase_local" ; then
      SYBASE_PATH=$with_sybase_local
   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 -n "$SYBASE" ; then
      if test -d "$local_sybase_root" ; then
         case $SYBASE in
            $local_sybase_root/* ) ;;
            * ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring non-standard SYBASE setting: $SYBASE" >&5
$as_echo "$as_me: WARNING: ignoring non-standard SYBASE setting: $SYBASE" >&2;} ;;
            # Ignored regardless, but standard values are not so concerning.
         esac
      fi
   fi

   if test -f "$SYBASE_PATH/SYBASE.env"; then
      ocs=`sed -ne 's:^SYBASE_OCS=:/:p' "$SYBASE_PATH/SYBASE.env"`
   else
      ocs=
   fi
   if test -d "$SYBASE_PATH$ocslib$bit64_sfx"; then
      SYBASE_LIBPATH="$SYBASE_PATH$ocs/lib$bit64_sfx"
   else
      SYBASE_LIBPATH="$SYBASE_PATH$ocs/lib"
   fi
   syb_sfx=$bit64_sfx
   if test -f "$SYBASE_LIBPATH/libsybct$syb_sfx.a"; then
      syb_pfx=syb
   else
      syb_pfx=
   fi

   if test "$with_mt" = "yes" ; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reentrant Sybase libraries" >&5
$as_echo_n "checking for reentrant Sybase libraries... " >&6; }
if ${ncbi_cv_lib_sybase_r+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -f "$SYBASE_LIBPATH/lib${syb_pfx}ct_r$bit64_sfx.so"; then
             ncbi_cv_lib_sybase_r=yes
          else
             ncbi_cv_lib_sybase_r=no
          fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sybase_r" >&5
$as_echo "$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=-l${syb_pfx}tcl$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

   if test -f "$SYBASE_LIBPATH/libsybunic${bit64_sfx}.a"; then
      sybunic=-lsybunic${bit64_sfx}
   fi

   test -n "$bit64_sfx"  &&  SYBASE_INCLUDE="-DSYB_LP64"
   SYBASE_LIBLIST="-l${syb_pfx}blk$syb_sfx -l${syb_pfx}ct$syb_sfx"
   SYBASE_LIBLIST="$SYBASE_LIBLIST -l${syb_pfx}cs$syb_sfx $sybtcl"
   SYBASE_LIBLIST="$SYBASE_LIBLIST -l${syb_pfx}comn$syb_sfx"
   SYBASE_LIBLIST="$SYBASE_LIBLIST -l${syb_pfx}intl$syb_sfx $sybunic"
   SYBASE_DLLLIST="$sybtli"

   # deduce conf.macro: SYBASE_INCLUDE, SYBASE_LIBS, SYBASE_DLLS, SYBASE_DBLIBS
   SYBASE_INCLUDE="-I$SYBASE_PATH$ocs/include $SYBASE_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 $SYBASE_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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_LIBS="$SYBASE_LPATH $SYBASE_LIBLIST"
   SYBASE_DBLIBS="$SYBASE_LPATH $SYBASE_DBLIBS"
   SYBASE_DLLS="$SYBASE_DLLLIST"

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sybase${SYBASE_PATH:+ in $SYBASE_PATH}" >&5
$as_echo_n "checking for Sybase${SYBASE_PATH:+ in $SYBASE_PATH}... " >&6; }
if ${ncbi_cv_lib_sybase+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$SYBASE_INCLUDE $orig_CPPFLAGS"
       LIBS="$SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctpublic.h>
int
main ()
{
CS_RETCODE i = ct_init(0,0);  i = cs_ctx_global(0,0);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sybase=yes
else
  ncbi_cv_lib_sybase=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sybase" >&5
$as_echo "$ncbi_cv_lib_sybase" >&6; }

   if test "$ncbi_cv_lib_sybase" = yes; then
                WithPackages="$WithPackages${WithPackagesSep}Sybase"; WithPackagesSep=" "

$as_echo "#define HAVE_LIBSYBASE 1" >>confdefs.h

      if test "$with_mt" = "yes" -a "$ncbi_cv_lib_sybase_r" = "yes"; then

$as_echo "#define HAVE_SYBASE_REENTRANT 1" >>confdefs.h

      fi

      SYBASE_DBLIBS="$SYBASE_LPATH -lsybdb${bit64_sfx} $sybunic"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sybase DBLib" >&5
$as_echo_n "checking for Sybase DBLib... " >&6; }
if ${ncbi_cv_lib_sybdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$SYBASE_DBLIBS $SYBASE_LIBS $SYBASE_DLLS $SYBASE_NETWORK_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sybdb=yes
else
  ncbi_cv_lib_sybdb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sybdb" >&5
$as_echo "$ncbi_cv_lib_sybdb" >&6; }
      if test "$ncbi_cv_lib_sybdb" = yes; then
                   WithPackages="$WithPackages${WithPackagesSep}DBLib"; WithPackagesSep=" "

$as_echo "#define HAVE_LIBSYBDB 1" >>confdefs.h

      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
       as_fn_error $? "--with-sybase explicitly specified, but no usable version found." "$LINENO" 5
    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_LIBLIST=
SYBASE_DLLLIST=
SYBASE_LIBPATH=


## FreeTDS libraries
freetds=
if test "$with_ftds" != "no" ; then
   ftds_ver=14
   try_local=yes
   case "$with_ftds" in
      100 | 1.00 )
         ftds_ver=100
         ;;
      14* | 1.4 | 1.4.* | yes | '' )
         ;;
      * )
         FTDS_PATH=$with_ftds
         try_local=no
         ;;
   esac
   : ${FTDS_CTLIBS:="-lct -ltds $NETWORK_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 $FTDS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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/ftds100/freetds"
      if test $try_local = yes -a -f "${real_srcdir}/src/$d/Makefile.in" ; then
         test "$ftds_ver" = 100  &&  FTDS_PATH="<$d>"
         FTDS100_CTLIB_LIB="ct_ftds100${STATIC} tds_ftds100${STATIC}"
         FTDS100_CTLIB_LIBS='$(ICONV_LIBS) $(KRB5_LIBS) $(NETWORK_LIBS)'
         FTDS100_CTLIB_INCLUDE="-I\$(includedir)/$d -I\$(includedir0)/$d"
         freetds=freetds
      elif test -d "$FTDS_PATH" ; then
         FTDS100_CTLIB_LIB=
         FTDS100_CTLIB_LIBS=$FTDS_CTLIBS
         FTDS100_CTLIB_INCLUDE=$FTDS_INCLUDE
      fi
      FTDS100_LIB='$(FTDS100_CTLIB_LIB)'
      FTDS100_LIBS='$(FTDS100_CTLIB_LIBS)'
      FTDS100_INCLUDE='$(FTDS100_CTLIB_INCLUDE)'

   d="dbapi/driver/ftds14/freetds"
      if test $try_local = yes -a -f "${real_srcdir}/src/$d/Makefile.in" ; then
         test "$ftds_ver" = 14  &&  FTDS_PATH="<$d>"
         FTDS14_CTLIB_LIB="ct_ftds14${STATIC} tds_ftds14${STATIC}"
         FTDS14_CTLIB_LIBS='$(ICONV_LIBS) $(KRB5_LIBS) $(NETWORK_LIBS)'
         FTDS14_CTLIB_INCLUDE="-I\$(includedir)/$d -I\$(includedir0)/$d"
         freetds=freetds
      elif test -d "$FTDS_PATH" ; then
         FTDS14_CTLIB_LIB=
         FTDS14_CTLIB_LIBS=$FTDS_CTLIBS
         FTDS14_CTLIB_INCLUDE=$FTDS_INCLUDE
      fi
      FTDS14_LIB='$(FTDS14_CTLIB_LIB)'
      FTDS14_LIBS='$(FTDS14_CTLIB_LIBS)'
      FTDS14_INCLUDE='$(FTDS14_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

$as_echo "#define NCBI_FTDS_RENAME_SYBDB 1" >>confdefs.h

      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: Using bundled FreeTDS (version $ftds_ver) from $FTDS_PATH" >&5
$as_echo "$as_me: Using bundled FreeTDS (version $ftds_ver) from $FTDS_PATH" >&6;}
   else
      FTDS_LIBS="$FTDS_CTLIBS"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeTDS${FTDS_PATH:+ in $FTDS_PATH}" >&5
$as_echo_n "checking for FreeTDS${FTDS_PATH:+ in $FTDS_PATH}... " >&6; }
if ${ncbi_cv_lib_freetds+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$FTDS_INCLUDE $orig_CPPFLAGS"
          LIBS="$FTDS_LIBS $NETWORK_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_freetds=yes
else
  ncbi_cv_lib_freetds=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_freetds" >&5
$as_echo "$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
       as_fn_error $? "--with-ftds explicitly specified, but no usable version found." "$LINENO" 5
    fi
      fi
   fi
fi
if test "$with_ftds" = "no" ; then
   FTDS_PATH=
   FTDS_INCLUDE=
   FTDS_LIBS=
   FTDS_LIB=
   FTDS100_INCLUDE=
   FTDS100_LIBS=
   FTDS100_LIB=
   FTDS100_CTLIB_INCLUDE=
   FTDS100_CTLIB_LIBS=
   FTDS100_CTLIB_LIB=
   FTDS14_INCLUDE=
   FTDS14_LIBS=
   FTDS14_LIB=
   FTDS14_CTLIB_INCLUDE=
   FTDS14_CTLIB_LIBS=
   FTDS14_CTLIB_LIB=
   freetds=
else

$as_echo "#define HAVE_LIBFTDS 1" >>confdefs.h

             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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_mysql_config+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $mysql_config in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_mysql_config="$mysql_config" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$MYSQL_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_mysql_config="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mysql_config" >&5
$as_echo "$mysql_config" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether MySQL works" >&5
$as_echo_n "checking whether MySQL works... " >&6; }
if ${ncbi_cv_lib_mysql+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$MYSQL_INCLUDE $orig_CPPFLAGS"
          LIBS="$MYSQL_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mysql.h>
int
main ()
{
MYSQL *p;  p = mysql_init(p);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_mysql=yes
else
  ncbi_cv_lib_mysql=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_mysql" >&5
$as_echo "$ncbi_cv_lib_mysql" >&6; }
      if test "$ncbi_cv_lib_mysql" = no; then
         if test "${with_mysql:=no}" != no; then
       as_fn_error $? "--with-mysql explicitly specified, but no usable version found." "$LINENO" 5
    fi
      fi
   else
      if test "${with_mysql:=no}" != no; then
       as_fn_error $? "--with-mysql explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_mysql" = "no" ; then
   MYSQL_PATH="No_MYSQL"
   MYSQL_INCLUDE=
   MYSQL_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}MySQL"; WithPackagesSep=" "

$as_echo "#define HAVE_MYSQL 1" >>confdefs.h

fi


## Berkeley DB library
if test "$with_bdb" != "no" ; then
   case "$with_bdb" in
      yes | "" )
         ;;
      */*)
          BERKELEYDB_PATH=$with_bdb
          { BERKELEYDB_INCLUDE=; unset BERKELEYDB_INCLUDE;}
          { BERKELEYDB_LIBPATH=; unset BERKELEYDB_LIBPATH;}
          { BERKELEYDB_LIBS=; unset BERKELEYDB_LIBS;}
          ;;
      *)
          BERKELEYDB_PATH=$NCBI/BerkeleyDB-${with_bdb}
          { BERKELEYDB_INCLUDE=; unset BERKELEYDB_INCLUDE;}
          { BERKELEYDB_LIBPATH=; unset BERKELEYDB_LIBPATH;}
          { BERKELEYDB_LIBS=; unset BERKELEYDB_LIBS;}
          ;;
   esac
   if test -d "$BERKELEYDB_PATH"; then
      ncbi_fix_dir_tmp=`if cd $BERKELEYDB_PATH; then { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
      if test "x$with_bin_release" = "xyes"; then
         BERKELEYDB_LIBS=$BERKELEYDB_STATIC_LIBS
      fi
   else
      BERKELEYDB_STATIC_LIBS=${BERKELEYDB_LIBS}
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB libraries${BERKELEYDB_PATH:+ in $BERKELEYDB_PATH}" >&5
$as_echo_n "checking for Berkeley DB libraries${BERKELEYDB_PATH:+ in $BERKELEYDB_PATH}... " >&6; }
if ${ncbi_cv_lib_berkeley_db+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BERKELEYDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$BERKELEYDB_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <db.h>
            #include <stdlib.h>
int
main ()
{
 DB* dbp;  db_create(&dbp, NULL, 0);  dbp->app_private = 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_berkeley_db=yes
else
  ncbi_cv_lib_berkeley_db=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_berkeley_db" >&5
$as_echo "$ncbi_cv_lib_berkeley_db" >&6; }
   if test "$ncbi_cv_lib_berkeley_db" = "no"; then
      if test "${with_bdb:=no}" != no; then
       as_fn_error $? "--with-bdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Berkeley DB version (4.3 or newer required)" >&5
$as_echo_n "checking Berkeley DB version (4.3 or newer required)... " >&6; }
if ${ncbi_cv_lib_berkeley_db_version+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

cat >/dev/null <<_NCBI_EOF
#include <db.h>
_NCBI_EOF
get_DB_VERSION() {
    grep '^[^#]' <<_NCBI_EOF
DB_VERSION_MAJOR.DB_VERSION_MINOR.DB_VERSION_PATCH
_NCBI_EOF
}
ncbi_cv_lib_berkeley_db_version=\`get_DB_VERSION | tr -cd 0123456789.\`

_ACEOF
          eval "$ac_cpp $BERKELEYDB_INCLUDE conftest.$ac_ext" > conftest.sh \
             2>&5
          . ./conftest.sh
          rm -f conftest*

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_berkeley_db_version" >&5
$as_echo "$ncbi_cv_lib_berkeley_db_version" >&6; }
      case "$ncbi_cv_lib_berkeley_db_version" in
         1.* | 2.* | 3.* | 4.[0-2].* )
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your Berkeley DB version is too old to use.  (Needed >= 4.3.)" >&5
$as_echo "$as_me: WARNING: Your Berkeley DB version is too old to use.  (Needed >= 4.3.)" >&2;}
            if test -n "$with_bdb"; then
               as_fn_error $? "--with-bdb:  Berkeley DB library is too old" "$LINENO" 5
            fi
            with_bdb=no
            ;;
         4.[3-6].* | [5-9].* | 1[0-7].* | 18.[01].* ) ;;
         * )
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Untested Berkeley DB version; may prove incompatible." >&5
$as_echo "$as_me: WARNING: Untested Berkeley DB version; may prove incompatible." >&2;}
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If so, please re-run this script with the flag --without-bdb." >&5
$as_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=" "

$as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h

   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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Berkeley DB C++ wrappers (optional)" >&5
$as_echo_n "checking for native Berkeley DB C++ wrappers (optional)... " >&6; }
if ${ncbi_cv_lib_berkeley_db_cxx+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BERKELEYDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$BERKELEYDB_CXX_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <db_cxx.h>
int
main ()
{
DbEnv env(0);  Db db(&env, 0);  db.set_app_private(NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_berkeley_db_cxx=yes
else
  ncbi_cv_lib_berkeley_db_cxx=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_berkeley_db_cxx" >&5
$as_echo "$ncbi_cv_lib_berkeley_db_cxx" >&6; }
   if test "$ncbi_cv_lib_berkeley_db_cxx" = "yes"; then
                WithPackages="$WithPackages${WithPackagesSep}BerkeleyDB++"; WithPackagesSep=" "

$as_echo "#define HAVE_BERKELEY_DB_CXX 1" >>confdefs.h

   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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ODBC libraries${ODBC_PATH:+ in $ODBC_PATH}" >&5
$as_echo_n "checking for ODBC libraries${ODBC_PATH:+ in $ODBC_PATH}... " >&6; }
if ${ncbi_cv_lib_odbc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_odbc=yes
else
  ncbi_cv_lib_odbc=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_odbc" >&5
$as_echo "$ncbi_cv_lib_odbc" >&6; }
   if test "$ncbi_cv_lib_odbc" = "no"; then
                  if test "${with_odbc:=no}" != no; then
       as_fn_error $? "--with-odbc explicitly specified, but no usable version found." "$LINENO" 5
    fi
   else
      # odbcss.h isn't self-contained :-/
      for ac_header in odbcss.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "odbcss.h" "ac_cv_header_odbcss_h" "#include <sql.h>
"
if test "x$ac_cv_header_odbcss_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_ODBCSS_H 1
_ACEOF

fi

done


      for ac_func in SQLGetPrivateProfileString
do :
  ac_fn_cxx_check_func "$LINENO" "SQLGetPrivateProfileString" "ac_cv_func_SQLGetPrivateProfileString"
if test "x$ac_cv_func_SQLGetPrivateProfileString" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SQLGETPRIVATEPROFILESTRING 1
_ACEOF

fi
done

      ac_fn_cxx_check_type "$LINENO" "SQLLEN" "ac_cv_type_SQLLEN" "#include <sqltypes.h>
"
if test "x$ac_cv_type_SQLLEN" = x""yes; then :

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


fi
ac_fn_cxx_check_type "$LINENO" "SQLROWOFFSET" "ac_cv_type_SQLROWOFFSET" "#include <sqltypes.h>
"
if test "x$ac_cv_type_SQLROWOFFSET" = x""yes; then :

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


fi
ac_fn_cxx_check_type "$LINENO" "SQLROWSETSIZE" "ac_cv_type_SQLROWSETSIZE" "#include <sqltypes.h>
"
if test "x$ac_cv_type_SQLROWSETSIZE" = x""yes; then :

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


fi
ac_fn_cxx_check_type "$LINENO" "SQLSETPOSIROW" "ac_cv_type_SQLSETPOSIROW" "#include <sqltypes.h>
"
if test "x$ac_cv_type_SQLSETPOSIROW" = x""yes; then :

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


fi

      # 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of SQLWCHAR" >&5
$as_echo_n "checking size of SQLWCHAR... " >&6; }
if ${ac_cv_sizeof_SQLWCHAR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (SQLWCHAR))" "ac_cv_sizeof_SQLWCHAR"        "#include <sqltypes.h>
"; then :

else
  if test "$ac_cv_type_SQLWCHAR" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (SQLWCHAR)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_SQLWCHAR=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_SQLWCHAR" >&5
$as_echo "$ac_cv_sizeof_SQLWCHAR" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SQLWCHAR $ac_cv_sizeof_SQLWCHAR
_ACEOF



      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SQLColAttribute's last argument is an SQLLEN *" >&5
$as_echo_n "checking whether SQLColAttribute's last argument is an SQLLEN *... " >&6; }
if ${ncbi_cv_func_sqlcolattribute_sqllen+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_sqlcolattribute_sqllen=yes
else
  ncbi_cv_func_sqlcolattribute_sqllen=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_sqlcolattribute_sqllen" >&5
$as_echo "$ncbi_cv_func_sqlcolattribute_sqllen" >&6; }
      if test $ncbi_cv_func_sqlcolattribute_sqllen = yes; then

$as_echo "#define NCBI_SQLCOLATTRIBUTE_SQLLEN 1" >>confdefs.h

      fi

      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SQLParamOptions takes SQLULEN" >&5
$as_echo_n "checking whether SQLParamOptions takes SQLULEN... " >&6; }
if ${ncbi_cv_func_sqlparamoptions_sqllen+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sql.h>
              SQLRETURN SQL_API SQLParamOptions
                (SQLHSTMT hstmt, SQLULEN crow, SQLULEN *pirow);
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_func_sqlparamoptions_sqllen=yes
else
  ncbi_cv_func_sqlparamoptions_sqllen=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_func_sqlparamoptions_sqllen" >&5
$as_echo "$ncbi_cv_func_sqlparamoptions_sqllen" >&6; }
      if test $ncbi_cv_func_sqlparamoptions_sqllen = yes; then

$as_echo "#define NCBI_SQLPARAMOPTIONS_SQLLEN 1" >>confdefs.h

      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=
      $as_echo "#define HAVE_SQLLEN 1" >>confdefs.h

   if test $NCBI_PLATFORM_BITS -eq 32; then
      $as_echo "#define HAVE_SQLROWOFFSET 1" >>confdefs.h

      $as_echo "#define HAVE_SQLROWSETSIZE 1" >>confdefs.h

   fi
   $as_echo "#define HAVE_SQLSETPOSIROW 1" >>confdefs.h

   $as_echo "#define NCBI_SQLCOLATTRIBUTE_SQLLEN 1" >>confdefs.h

   $as_echo "#define NCBI_SQLPARAMOPTIONS_SQLLEN 1" >>confdefs.h

      ;;
 *)
             WithPackages="$WithPackages${WithPackagesSep}ODBC"; WithPackagesSep=" "

$as_echo "#define HAVE_ODBC 1" >>confdefs.h

   ;;
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON+:} false; then :
  $as_echo_n "(cached) " >&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+$PYTHON_PATH/bin:}$PATH:/usr/local/python-/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
$as_echo "$PYTHON" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 if test -x "$PYTHON"; then
    pyconf="$real_srcdir/scripts/common/impl/python-config.py"
    PYTHON_VERSION=`DYLD_BIND_AT_LAUNCH=1 "$PYTHON" "$pyconf" --version 2>&5`
 else
    PYTHON_VERSION=
    ncbi_cv_lib_python=no
 fi
 if test -n "$PYTHON_VERSION"; then
    PYTHON_INCLUDE=`"$PYTHON" "$pyconf" --include`
    PYTHON_LIBPATH=`"$PYTHON" "$pyconf" --libpath`
    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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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} `"$PYTHON" "$pyconf" --libs`"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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} `"$PYTHON" "$pyconf" --libs`"
 fi
    CPPFLAGS="$PYTHON_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON_LIBS $orig_LIBS"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Python $PYTHON_VERSION libraries" >&5
$as_echo_n "checking for usable Python $PYTHON_VERSION libraries... " >&6; }
if ${ncbi_cv_lib_python+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_python=yes
else
  ncbi_cv_lib_python=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_python" >&5
$as_echo "$ncbi_cv_lib_python" >&6; }
 else
    PYTHON=
    ncbi_cv_lib_python=no
 fi
 if test "$ncbi_cv_lib_python" = "no"; then
    PYTHON_INCLUDE=
    PYTHON_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON"; WithPackagesSep=" "

$as_echo "#define HAVE_PYTHON 1" >>confdefs.h

 fi



   # Extract the first word of "python2.5", so it can be a program name with args.
set dummy python2.5; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON25+:} false; then :
  $as_echo_n "(cached) " >&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+$PYTHON_PATH/bin:}$PATH:/usr/local/python-2.5/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON25="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON25" >&5
$as_echo "$PYTHON25" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 if test -x "$PYTHON25"; then
    pyconf="$real_srcdir/scripts/common/impl/python-config.py"
    PYTHON25_VERSION=`DYLD_BIND_AT_LAUNCH=1 "$PYTHON25" "$pyconf" --version 2>&5`
 else
    PYTHON25_VERSION=
    ncbi_cv_lib_python25=no
 fi
 if test -n "$PYTHON25_VERSION"; then
    PYTHON25_INCLUDE=`"$PYTHON25" "$pyconf" --include`
    PYTHON25_LIBPATH=`"$PYTHON25" "$pyconf" --libpath`
    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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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} `"$PYTHON25" "$pyconf" --libs`"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON25_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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} `"$PYTHON25" "$pyconf" --libs`"
 fi
    CPPFLAGS="$PYTHON25_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON25_LIBS $orig_LIBS"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Python $PYTHON25_VERSION libraries" >&5
$as_echo_n "checking for usable Python $PYTHON25_VERSION libraries... " >&6; }
if ${ncbi_cv_lib_python25+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_python25=yes
else
  ncbi_cv_lib_python25=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_python25" >&5
$as_echo "$ncbi_cv_lib_python25" >&6; }
 else
    PYTHON25=
    ncbi_cv_lib_python25=no
 fi
 if test "$ncbi_cv_lib_python25" = "no"; then
    PYTHON25_INCLUDE=
    PYTHON25_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON25"; WithPackagesSep=" "

$as_echo "#define HAVE_PYTHON25 1" >>confdefs.h

 fi



   # Extract the first word of "python2.6", so it can be a program name with args.
set dummy python2.6; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON26+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON26 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON26="$PYTHON26" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${PYTHON_PATH+$PYTHON_PATH/bin:}$PATH:/usr/local/python-2.6/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON26="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON26=$ac_cv_path_PYTHON26
if test -n "$PYTHON26"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON26" >&5
$as_echo "$PYTHON26" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 if test -x "$PYTHON26"; then
    pyconf="$real_srcdir/scripts/common/impl/python-config.py"
    PYTHON26_VERSION=`DYLD_BIND_AT_LAUNCH=1 "$PYTHON26" "$pyconf" --version 2>&5`
 else
    PYTHON26_VERSION=
    ncbi_cv_lib_python26=no
 fi
 if test -n "$PYTHON26_VERSION"; then
    PYTHON26_INCLUDE=`"$PYTHON26" "$pyconf" --include`
    PYTHON26_LIBPATH=`"$PYTHON26" "$pyconf" --libpath`
    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 $PYTHON26_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON26_LIBS="${ncbi_rp_L_flags} `"$PYTHON26" "$pyconf" --libs`"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON26_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PYTHON26_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} `"$PYTHON26" "$pyconf" --libs`"
 fi
    CPPFLAGS="$PYTHON26_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON26_LIBS $orig_LIBS"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Python $PYTHON26_VERSION libraries" >&5
$as_echo_n "checking for usable Python $PYTHON26_VERSION libraries... " >&6; }
if ${ncbi_cv_lib_python26+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_python26=yes
else
  ncbi_cv_lib_python26=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_python26" >&5
$as_echo "$ncbi_cv_lib_python26" >&6; }
 else
    PYTHON26=
    ncbi_cv_lib_python26=no
 fi
 if test "$ncbi_cv_lib_python26" = "no"; then
    PYTHON26_INCLUDE=
    PYTHON26_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON26"; WithPackagesSep=" "

$as_echo "#define HAVE_PYTHON26 1" >>confdefs.h

 fi



   # Extract the first word of "python2.7", so it can be a program name with args.
set dummy python2.7; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON27+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON27 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON27="$PYTHON27" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${PYTHON_PATH+$PYTHON_PATH/bin:}$PATH:/usr/local/python-2.7/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON27="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON27=$ac_cv_path_PYTHON27
if test -n "$PYTHON27"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON27" >&5
$as_echo "$PYTHON27" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 if test -x "$PYTHON27"; then
    pyconf="$real_srcdir/scripts/common/impl/python-config.py"
    PYTHON27_VERSION=`DYLD_BIND_AT_LAUNCH=1 "$PYTHON27" "$pyconf" --version 2>&5`
 else
    PYTHON27_VERSION=
    ncbi_cv_lib_python27=no
 fi
 if test -n "$PYTHON27_VERSION"; then
    PYTHON27_INCLUDE=`"$PYTHON27" "$pyconf" --include`
    PYTHON27_LIBPATH=`"$PYTHON27" "$pyconf" --libpath`
    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 $PYTHON27_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON27_LIBS="${ncbi_rp_L_flags} `"$PYTHON27" "$pyconf" --libs`"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON27_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PYTHON27_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} `"$PYTHON27" "$pyconf" --libs`"
 fi
    CPPFLAGS="$PYTHON27_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON27_LIBS $orig_LIBS"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Python $PYTHON27_VERSION libraries" >&5
$as_echo_n "checking for usable Python $PYTHON27_VERSION libraries... " >&6; }
if ${ncbi_cv_lib_python27+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_python27=yes
else
  ncbi_cv_lib_python27=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_python27" >&5
$as_echo "$ncbi_cv_lib_python27" >&6; }
 else
    PYTHON27=
    ncbi_cv_lib_python27=no
 fi
 if test "$ncbi_cv_lib_python27" = "no"; then
    PYTHON27_INCLUDE=
    PYTHON27_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON27"; WithPackagesSep=" "

$as_echo "#define HAVE_PYTHON27 1" >>confdefs.h

 fi



   # Extract the first word of "python3", so it can be a program name with args.
set dummy python3; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PYTHON3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PYTHON3 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${PYTHON_PATH+$PYTHON_PATH/bin:}$PATH:/usr/local/python-3/bin"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON3=$ac_cv_path_PYTHON3
if test -n "$PYTHON3"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
$as_echo "$PYTHON3" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 if test -x "$PYTHON3"; then
    pyconf="$real_srcdir/scripts/common/impl/python-config.py"
    PYTHON3_VERSION=`DYLD_BIND_AT_LAUNCH=1 "$PYTHON3" "$pyconf" --version 2>&5`
 else
    PYTHON3_VERSION=
    ncbi_cv_lib_python3=no
 fi
 if test -n "$PYTHON3_VERSION"; then
    PYTHON3_INCLUDE=`"$PYTHON3" "$pyconf" --include`
    PYTHON3_LIBPATH=`"$PYTHON3" "$pyconf" --libpath`
    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 $PYTHON3_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PYTHON3_LIBS="${ncbi_rp_L_flags} `"$PYTHON3" "$pyconf" --libs`"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PYTHON3_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PYTHON3_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} `"$PYTHON3" "$pyconf" --libs`"
 fi
    CPPFLAGS="$PYTHON3_INCLUDE $orig_CPPFLAGS"
    LIBS="$PYTHON3_LIBS $orig_LIBS"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Python $PYTHON3_VERSION libraries" >&5
$as_echo_n "checking for usable Python $PYTHON3_VERSION libraries... " >&6; }
if ${ncbi_cv_lib_python3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_python3=yes
else
  ncbi_cv_lib_python3=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_python3" >&5
$as_echo "$ncbi_cv_lib_python3" >&6; }
 else
    PYTHON3=
    ncbi_cv_lib_python3=no
 fi
 if test "$ncbi_cv_lib_python3" = "no"; then
    PYTHON3_INCLUDE=
    PYTHON3_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PYTHON3"; WithPackagesSep=" "

$as_echo "#define HAVE_PYTHON3 1" >>confdefs.h

 fi



   if test "$ncbi_cv_lib_python" = "no"; then
      if test "$ncbi_cv_lib_python27" = "yes"; then
         PYTHON_INCLUDE=$PYTHON27_INCLUDE
         PYTHON_LIBS=$PYTHON27_LIBS
      elif test "$ncbi_cv_lib_python26" = "yes"; then
         PYTHON_INCLUDE=$PYTHON26_INCLUDE
         PYTHON_LIBS=$PYTHON26_LIBS
      elif test "$ncbi_cv_lib_python25" = "yes"; then
         PYTHON_INCLUDE=$PYTHON25_INCLUDE
         PYTHON_LIBS=$PYTHON25_LIBS
      fi
      if test -n "$PYTHON_LIBS"; then
                   WithPackages="$WithPackages${WithPackagesSep}PYTHON"; WithPackagesSep=" "
         $as_echo "#define HAVE_PYTHON 1" >>confdefs.h

      else
         if test "${with_python:=no}" != no; then
       as_fn_error $? "--with-python explicitly specified, but no usable version found." "$LINENO" 5
    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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PERL+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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 '$_ = " \$Config{libs} "; s/ -l\S*db\S*(?= )/ /g; print;'`
      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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable Perl libraries" >&5
$as_echo_n "checking for usable Perl libraries... " >&6; }
if ${ncbi_cv_lib_perl+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <EXTERN.h>
#include <perl.h>
int
main ()
{
PerlInterpreter* p = perl_alloc();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_perl=yes
else
  ncbi_cv_lib_perl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_perl" >&5
$as_echo "$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
       as_fn_error $? "--with-perl explicitly specified, but no usable version found." "$LINENO" 5
    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 && as_fn_error $? "'\$JAVAC' undefined" "$LINENO" 5
# Extract the first word of "$JAVAC", so it can be a program name with args.
set dummy $JAVAC; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path__ACJNI_JAVAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $_ACJNI_JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path__ACJNI_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ACJNI_JAVAC" >&5
$as_echo "$_ACJNI_JAVAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


test "x$_ACJNI_JAVAC" = xno && as_fn_error $? "$JAVAC could not be found in path" "$LINENO" 5


# find the include directory relative to the javac executable
_cur=""$_ACJNI_JAVAC""
while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking symlink for $_cur" >&5
$as_echo_n "checking symlink for $_cur... " >&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
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cur" >&5
$as_echo "$_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
                as_fn_error $? "cannot find java include files" "$LINENO" 5
        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
   { $as_echo "$as_me:${as_lineno-$LINENO}: setting JDK_INCLUDE = $JDK_INCLUDE" >&5
$as_echo "$as_me: setting JDK_INCLUDE = $JDK_INCLUDE" >&6;}
   CPPFLAGS="$JDK_INCLUDE $orig_CPPFLAGS"
   ac_fn_cxx_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
if test "x$ac_cv_header_jni_h" = x""yes; then :

$as_echo "#define NCBI_JNI 1" >>confdefs.h

                 WithFeatures="$WithFeatures${WithFeaturesSep}JDK"; WithFeaturesSep=" "
                 WithFeatures="$WithFeatures${WithFeaturesSep}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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   if test -d "$BOOST_PATH"; then
      boost_path_digits=`basename $BOOST_PATH | sed -e 's/-ncbi[0-9]*$//; s/.0$//' | tr -cd 0123456789`
   else
      boost_path_digits=
      BOOST_LIBPATH_=/usr/lib
   fi
   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
         { ncbi_cv_lib_boost_version=; unset ncbi_cv_lib_boost_version;}
         { ncbi_cv_lib_boost_version_num=; unset ncbi_cv_lib_boost_version_num;}
         { ncbi_cv_lib_boost_regex=; unset ncbi_cv_lib_boost_regex;}
         { ncbi_cv_lib_boost_spirit=; unset ncbi_cv_lib_boost_spirit;}
         { ncbi_cv_lib_boost_system=; unset ncbi_cv_lib_boost_system;}
         { ncbi_cv_lib_boost_filesystem=; unset ncbi_cv_lib_boost_filesystem;}
         { ncbi_cv_lib_boost_iostreams=; unset ncbi_cv_lib_boost_iostreams;}
         { ncbi_cv_lib_boost_program_options=; unset ncbi_cv_lib_boost_program_options;}
         { ncbi_cv_lib_boost_serialization=; unset ncbi_cv_lib_boost_serialization;}
         { ncbi_cv_lib_boost_test=; unset ncbi_cv_lib_boost_test;}
         { ncbi_cv_lib_boost_thread=; unset ncbi_cv_lib_boost_thread;}
      elif test -z "$ncbi_cv_lib_boost_version_num"; then
         { ncbi_cv_lib_boost_version=; unset ncbi_cv_lib_boost_version;}
      fi
   fi
      CPPFLAGS=$orig_CPPFLAGS
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boost version" >&5
$as_echo_n "checking Boost version... " >&6; }
if ${ncbi_cv_lib_boost_version+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

cat >/dev/null <<_NCBI_EOF
#include <boost/version.hpp>
_NCBI_EOF
get_BOOST_VERSION() {
    grep '^[^#]' <<_NCBI_EOF
BOOST_VERSION
_NCBI_EOF
}
get_BOOST_LIB_VERSION() {
    grep '^[^#]' <<_NCBI_EOF
BOOST_LIB_VERSION
_NCBI_EOF
}
ncbi_cv_lib_boost_version_num=\`get_BOOST_VERSION\`
ncbi_cv_lib_boost_version=\`get_BOOST_LIB_VERSION | tr -d '"'\`

_ACEOF
          { { ac_try="$ac_cpp $BOOST_INCLUDE conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp $BOOST_INCLUDE conftest.$ac_ext") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.sh
          . ./conftest.sh 2>&5
          rm -f conftest*

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_version" >&5
$as_echo "$ncbi_cv_lib_boost_version" >&6; }

cat >>confdefs.h <<_ACEOF
#define NCBI_EXPECTED_BOOST_VERSION $ncbi_cv_lib_boost_version_num
_ACEOF

   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* | *Clang* )
         # 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]_* )
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your Boost version is too old to use.  (Needed >= 1.35.)" >&5
$as_echo "$as_me: WARNING: Your Boost version is too old to use.  (Needed >= 1.35.)" >&2;}
         if test -n "$with_boost"; then
            as_fn_error $? "--with-boost:  Boost library is too old" "$LINENO" 5
         fi
         with_boost=no
         ;;
      1_3[5-9] | 1_3[5-9]_* | 1_[4-7]* ) ;;
      '' ) with_boost=no ;;
      * )
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Untested Boost version; may prove incompatible." >&5
$as_echo "$as_me: WARNING: Untested Boost version; may prove incompatible." >&2;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If so, please re-run this script with the flag --without-boost." >&5
$as_echo "$as_me: WARNING: If so, please re-run this script with the flag --without-boost." >&2;}
         ;;
   esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost library name tag" >&5
$as_echo_n "checking for Boost library name tag... " >&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"  ;;
            darwin*:*CLANG)
               if test "x$ac_cv_have_decl__LIBCPP_VERSION" = xyes; then
                  BOOST_TAG="-clang-darwin"
               else
                  BOOST_TAG="-xgcc"
                  boost_comp_vers=`echo $gccver | tr -d . | cut -c1-2`
               fi
               ;;
            *:*CLANG)
               if test "x$ac_cv_have_decl__LIBCPP_VERSION" = xyes; then
                  BOOST_TAG="-clang"
               else
                  BOOST_TAG="-gcc"
                  boost_comp_vers=`echo $gccver | tr -d . | cut -c1-2`
               fi
               ;;
         esac
         case "$BOOST_TAG:$compiler_version" in
            -*gcc:???|-il:???|-clang*:??? )
               : ${boost_comp_vers=`echo $compiler_version | cut -c1-2`}
               boost_comp_major=`echo $compiler_version | cut -c1`
               ;;
            -*gcc:????|-il:????|-clang*:???? )
               : ${boost_comp_vers=`echo $compiler_version | cut -c1-3`}
               boost_comp_major=`echo $compiler_version | cut -c1-2`
               ;;
            * )
               boost_comp_vers=''
               boost_comp_major=''
               ;;
         esac
         test "$with_mt"    = "yes"  &&  BOOST_MT=-mt
         if test "$with_max_debug" = yes; then
            BOOST_D="-gd -d"
            BOOST_INCLUDE="$BOOST_INCLUDE -DBOOST_USE_ASAN"
            BOOST_INCLUDE="$BOOST_INCLUDE -DBOOST_USE_UCONTEXT"
         elif test "$with_debug" = no; then
            BOOST_D=
         else
            BOOST_D=-d
         fi
         test "$bit64_sfx"  = "64"   &&  BOOST_64=-64
         case "$host_cpu" in
            i?86 | x86_64 ) BOOST_ARCH=-x$NCBI_PLATFORM_BITS ;;
            aarch64 | arm*) BOOST_ARCH=-a$NCBI_PLATFORM_BITS ;;
            ia64          ) BOOST_ARCH=-i$NCBI_PLATFORM_BITS ;;
            sparc*        ) BOOST_ARCH=-s$NCBI_PLATFORM_BITS ;;
            mips*         ) BOOST_ARCH=-m$NCBI_PLATFORM_BITS ;;
            power* | ppc* ) BOOST_ARCH=-p$NCBI_PLATFORM_BITS ;;
            *             ) BOOST_ARCH= ;;
         esac
         found=no
         for base in "$BOOST_TAG$boost_comp_vers" \
             "$BOOST_TAG$boost_comp_major" "$BOOST_TAG" ''; do
           for bvers in "-$ncbi_cv_lib_boost_version" ''; do
             for bvers2 in "$BOOST_ARCH$bvers" "$bvers$BOOST_64" "$bvers"; do
               for bmt in "$BOOST_MT" '-mt' ''; do
                 for bd in $BOOST_D '' '-d'; do
                   bsfx=$bmt$bd$bvers2
                   if ls $BOOST_LIBPATH_/libboost*$base$bsfx.* >/dev/null 2>&1;
                   then
                     found=yes
                     break
                   else
                     for ext in .a .so; do
                       name=libboost_system$base$bsfx$ext
                       path=`$CXX -B$BOOST_LIBPATH_/ -print-file-name=$name \
                             2>/dev/null`
                       case "$path" in
                         $BOOST_PATH/*/$name ) found=yes; break ;;
                       esac
                     done
                   fi
                   test "$found" = yes  &&  break
                 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
            bvers2=$BOOST_ARCH$bvers
            bmt=$BOOST_MT
            bd=${BOOST_D%% *}
            bsfx=$cvers$bmt$bd$bvers2
         fi

         BOOST_TAG=$base$bsfx
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOST_TAG (autodetected)" >&5
$as_echo "$BOOST_TAG (autodetected)" >&6; }
         ;;
      no )
         BOOST_TAG=""
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: none (by explicit request)" >&5
$as_echo "none (by explicit request)" >&6; }
         ;;
      *)
         BOOST_TAG=$with_boost_tag
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOST_TAG (by explicit request)" >&5
$as_echo "$BOOST_TAG (by explicit request)" >&6; }
         ;;
   esac
   BOOST_STATIC_TAG=`echo "_$BOOST_TAG-s" \
     | sed -e 's/^_//; s/-\(g*d\)-s$/-s\1/; s/-\(g*d-.*\)-s$/-s\1/; s/\(-[a-z][36][24].*\)-s$/-s\1/; s/\(-[1-9].*\)-s$/-s\1/'`

   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_STATIC_TAG.a"; then
       BOOST_REGEX_STATIC_LIBS=-lboost_regex$BOOST_STATIC_TAG
       if test "x$with_bin_release" = "xyes"; then
           BOOST_REGEX_LIBS=$BOOST_REGEX_STATIC_LIBS
       fi
   else
       BOOST_REGEX_STATIC_LIBS=$BOOST_REGEX_LIBS
   fi

   in_path=${BOOST_PATH:+ in $BOOST_PATH}

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Regex$in_path" >&5
$as_echo_n "checking for Boost.Regex$in_path... " >&6; }
if ${ncbi_cv_lib_boost_regex+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_REGEX_LIBS $RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/regex.hpp>
int
main ()
{
throw boost::regex_error(boost::regex_constants::error_stack);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_regex=yes
else
  ncbi_cv_lib_boost_regex=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_regex" >&5
$as_echo "$ncbi_cv_lib_boost_regex" >&6; }

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Spirit$in_path" >&5
$as_echo_n "checking for Boost.Spirit$in_path... " >&6; }
if ${ncbi_cv_lib_boost_spirit+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE -DBOOST_ERROR_CODE_HEADER_ONLY $orig_CPPFLAGS"
      LIBS="$RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/spirit.hpp>
                             using namespace boost::spirit;
                             struct MyGrammar : public grammar<MyGrammar>
                             {
                                 template <typename TScanner>
                                 struct definition {
                                     definition(const MyGrammar&) { }
                                     typedef rule<TScanner, parser_context<>,
                                                  parser_tag<0> >
                                             TRule;
                                     TRule my_rule;
                                     TRule const & start() const
                                         { return my_rule; }
                                 };
                             };
int
main ()
{
MyGrammar g;  parse("123", g);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_spirit=yes
else
  ncbi_cv_lib_boost_spirit=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_spirit" >&5
$as_echo "$ncbi_cv_lib_boost_spirit" >&6; }

   BOOST_SYSTEM_LIBS=-lboost_system${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_system$BOOST_STATIC_TAG.a"; then
       BOOST_SYSTEM_STATIC_LIBS=-lboost_system$BOOST_STATIC_TAG
       if test "x$with_bin_release" = "xyes"; then
           BOOST_SYSTEM_LIBS=$BOOST_SYSTEM_STATIC_LIBS
       fi
   else
       BOOST_SYSTEM_STATIC_LIBS=$BOOST_SYSTEM_LIBS
   fi

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.System$in_path" >&5
$as_echo_n "checking for Boost.System$in_path... " >&6; }
if ${ncbi_cv_lib_boost_system+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_SYSTEM_LIBS $RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/system/error_code.hpp>
int
main ()
{
const char * s = boost::system::system_category().name();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_system=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_system" >&5
$as_echo "$ncbi_cv_lib_boost_system" >&6; }

   boost_chrono_lib=-lboost_chrono${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_chrono$BOOST_STATIC_TAG.a"; then
       boost_chrono_static_lib=-lboost_chrono$BOOST_STATIC_TAG
       if test "x$with_bin_release" = "xyes"; then
           boost_chrono_lib=$boost_chrono_static_lib
       fi
   else
       boost_chrono_static_lib=$boost_chrono_lib
   fi
   BOOST_CHRONO_LIBS="$boost_chrono_lib $BOOST_SYSTEM_LIBS"
   BOOST_CHRONO_STATIC_LIBS="$boost_chrono_static_lib $BOOST_SYSTEM_STATIC_LIBS"

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Chrono$in_path" >&5
$as_echo_n "checking for Boost.Chrono$in_path... " >&6; }
if ${ncbi_cv_lib_boost_chrono+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS $RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/chrono.hpp>
int
main ()
{
boost::chrono::system_clock::now();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_chrono=yes
else
  ncbi_cv_lib_boost_chrono=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_chrono" >&5
$as_echo "$ncbi_cv_lib_boost_chrono" >&6; }

   boost_fs_lib=-lboost_filesystem${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_filesystem$BOOST_STATIC_TAG.a"; then
       boost_fs_static_lib=-lboost_filesystem$BOOST_STATIC_TAG
       if test "x$with_bin_release" = "xyes"; then
           boost_fs_lib=$boost_fs_static_lib
       fi
   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"

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Filesystem$in_path" >&5
$as_echo_n "checking for Boost.Filesystem$in_path... " >&6; }
if ${ncbi_cv_lib_boost_filesystem+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_FILESYSTEM_LIBS $RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/filesystem.hpp>
int
main ()
{
return boost::filesystem::portable_name("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_filesystem=yes
else
  ncbi_cv_lib_boost_filesystem=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_filesystem" >&5
$as_echo "$ncbi_cv_lib_boost_filesystem" >&6; }

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

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Iostreams$in_path" >&5
$as_echo_n "checking for Boost.Iostreams$in_path... " >&6; }
if ${ncbi_cv_lib_boost_iostreams+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_IOSTREAMS_LIBS $Z_LIBS $BZ2_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/iostreams/device/file_descriptor.hpp>
int
main ()
{
boost::iostreams::file_descriptor fd;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_iostreams=yes
else
  ncbi_cv_lib_boost_iostreams=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_iostreams" >&5
$as_echo "$ncbi_cv_lib_boost_iostreams" >&6; }

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

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Program-Options$in_path" >&5
$as_echo_n "checking for Boost.Program-Options$in_path... " >&6; }
if ${ncbi_cv_lib_boost_program_options+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_PROGRAM_OPTIONS_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/program_options.hpp>
int
main ()
{
boost::program_options::option_description od;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_program_options=yes
else
  ncbi_cv_lib_boost_program_options=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_program_options" >&5
$as_echo "$ncbi_cv_lib_boost_program_options" >&6; }

   BOOST_SERIALIZATION_LIBS=-lboost_serialization${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_serialization$BOOST_STATIC_TAG.a"; then
       BOOST_SERIALIZATION_STATIC_LIBS=-lboost_serialization$BOOST_STATIC_TAG
       if test "x$with_bin_release" = "xyes"; then
           BOOST_SERIALIZATION_LIBS=$BOOST_SERIALIZATION_STATIC_LIBS
       fi
   else
       BOOST_SERIALIZATION_STATIC_LIBS=$BOOST_SERIALIZATION_LIBS
   fi

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Serialization$in_path" >&5
$as_echo_n "checking for Boost.Serialization$in_path... " >&6; }
if ${ncbi_cv_lib_boost_serialization+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_SERIALIZATION_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/archive/text_oarchive.hpp>
                             #include <iostream>
int
main ()
{
boost::archive::text_oarchive oa(std::cout);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_serialization=yes
else
  ncbi_cv_lib_boost_serialization=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_serialization" >&5
$as_echo "$ncbi_cv_lib_boost_serialization" >&6; }

   BOOST_TEST_PEM_LIBS=-lboost_prg_exec_monitor${BOOST_TAG}
   if test -f "$BOOST_LIBPATH_/libboost_prg_exec_monitor$BOOST_STATIC_TAG.a"; then
       BOOST_TEST_PEM_STATIC_LIBS=-lboost_prg_exec_monitor$BOOST_STATIC_TAG
   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_STATIC_TAG.a"; then
       BOOST_TEST_TEM_STATIC_LIBS=-lboost_test_exec_monitor$BOOST_STATIC_TAG
   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_STATIC_TAG.a"; then
       BOOST_TEST_UTF_STATIC_LIBS=-lboost_unit_test_framework$BOOST_STATIC_TAG
   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

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Test$in_path" >&5
$as_echo_n "checking for Boost.Test$in_path... " >&6; }
if ${ncbi_cv_lib_boost_test+:} false; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef NCBI_BOOST_NOT_INCLUDED
                #  include <boost/test/unit_test.hpp>
                #else
                #  if __cplusplus > 201703L
                #    include <boost/version.hpp>
                #    if BOOST_VERSION < 107300
                #     include <ostream>
                namespace std {
                    ostream& operator<<(ostream& os, const wchar_t*)
                        { return os; }
                }
                #    endif
                #  endif
                #  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
if ac_fn_cxx_try_link "$LINENO"; then :
  found="$found:$mode"
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_test" >&5
$as_echo "$ncbi_cv_lib_boost_test" >&6; }

   BOOST_THREAD_LIBS="-lboost_thread${BOOST_TAG} $BOOST_SYSTEM_LIBS"
   if test -f "$BOOST_LIBPATH_/libboost_thread$BOOST_STATIC_TAG.a"; then
       BOOST_THREAD_STATIC_LIBS="-lboost_thread$BOOST_STATIC_TAG $BOOST_SYSTEM_STATIC_LIBS"
       if test "x$with_bin_release" = "xyes"; then
           BOOST_THREAD_LIBS=$BOOST_THREAD_STATIC_LIBS
       fi
   else
       BOOST_THREAD_STATIC_LIBS=$BOOST_THREAD_LIBS
   fi

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost.Thread$in_path" >&5
$as_echo_n "checking for Boost.Thread$in_path... " >&6; }
if ${ncbi_cv_lib_boost_thread+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $orig_CPPFLAGS"
      LIBS="$BOOST_LIBPATH $BOOST_THREAD_LIBS $RT_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <boost/thread.hpp>
int
main ()
{
boost::mutex m; boost::mutex::scoped_lock l(m);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_boost_thread=yes
else
  ncbi_cv_lib_boost_thread=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_boost_thread" >&5
$as_echo "$ncbi_cv_lib_boost_thread" >&6; }
else
   BOOST_INCLUDE=
   BOOST_LIBPATH=
   BOOST_TAG=
   ncbi_cv_lib_boost_chrono=no
   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_serialization=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_chrono" != "no"; then

$as_echo "#define HAVE_BOOST_CHRONO 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.Chrono"; WithPackagesSep=" "
else
   boost_chrono_lib=
   boost_chrono_static_lib=
   BOOST_CHRONO_LIBS=
   BOOST_CHRONO_STATIC_LIBS=
fi

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

$as_echo "#define HAVE_BOOST_FILESYSTEM 1" >>confdefs.h

             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

$as_echo "#define HAVE_BOOST_IOSTREAMS 1" >>confdefs.h

             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

$as_echo "#define HAVE_BOOST_PROGRAM_OPTIONS 1" >>confdefs.h

             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

$as_echo "#define HAVE_BOOST_REGEX 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.Regex"; WithPackagesSep=" "
else
   BOOST_REGEX_LIBS=
   BOOST_REGEX_STATIC_LIBS=
fi

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

$as_echo "#define HAVE_BOOST_SERIALIZATION 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.Serialization"; WithPackagesSep=" "
else
   BOOST_SERIALIZATION_LIBS=
   BOOST_SERIALIZATION_STATIC_LIBS=
fi

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

$as_echo "#define HAVE_BOOST_SPIRIT 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.Spirit"; WithPackagesSep=" "
fi

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

$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.System"; WithPackagesSep=" "
# BOOST_SYSTEM(_STATIC)_LIBS already conditionally cleared above
fi

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

$as_echo "#define HAVE_BOOST_TEST 1" >>confdefs.h

   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

$as_echo "#define HAVE_BOOST_THREAD 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}Boost.Thread"; 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
   * ) as_fn_error $? "Boost explicitly requested, but Boost.Test.Included unavailable." "$LINENO" 5 ;;
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
   if test -n "$NCBI_C_PATH_TAGS"; then
      for x in $NCBI_C_PATH_TAGS; do
         if test -d "$NCBI_C_PATH$x"; then
            NCBI_C_PATH=$NCBI_C_PATH$x
            break
         fi
      done
   fi

   NCBI_C_INCLUDE="-I$NCBI_C_PATH/include${bit64_sfx}"
   if test "$want_gi32" = "yes"; then
     NCBI_C_INCLUDE="$NCBI_C_INCLUDE -DUSE_BIGINT_IDS=0"
   else
     NCBI_C_INCLUDE="$NCBI_C_INCLUDE -DUSE_BIGINT_IDS=1"
   fi
   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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the NCBI C toolkit${NCBI_C_PATH:+ in $NCBI_C_PATH}" >&5
$as_echo_n "checking for the NCBI C toolkit${NCBI_C_PATH:+ in $NCBI_C_PATH}... " >&6; }
if ${ncbi_cv_lib_ctools+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$NCBI_C_INCLUDE $orig_CPPFLAGS"
       LIBS="$NCBI_C_LIBPATH $NCBI_C_ncbi $NETWORK_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ncbi.h>
int
main ()
{
 Nlm_Boolean b = Nlm_GetArgs("fake", -1, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ctools=yes
else
  ncbi_cv_lib_ctools=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ctools" >&5
$as_echo "$ncbi_cv_lib_ctools" >&6; }
   if test "$ncbi_cv_lib_ctools" = no; then
      if test "${with_ncbi_c:=no}" != no; then
       as_fn_error $? "--with-ncbi-c explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_ncbi_c" = "no" ; then
   if test "$with_ctools" = "yes"; then
      as_fn_error $? "--with-ctools:  NCBI C Toolkit is missing" "$LINENO" 5
   fi
   NCBI_C_PATH="No_NCBI_CToolkit"
   NCBI_C_INCLUDE=
   NCBI_C_LIBPATH=
   NCBI_C_ncbi=
else
             WithPackages="$WithPackages${WithPackagesSep}C-Toolkit"; WithPackagesSep=" "

$as_echo "#define HAVE_NCBI_C 1" >>confdefs.h

fi


### ncbicrypt
case "$with_ncbicrypt" in
   yes | no | '' ) ;;
   *             ) NCBICRYPT_PATH=$with_ncbicrypt ;;
esac
if test -d "$NCBICRYPT_PATH"; then
   NCBICRYPT_ARCH_PATH=$NCBICRYPT_PATH
for d in "$NCBICRYPT_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$NCBICRYPT_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$NCBICRYPT_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$NCBICRYPT_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      NCBICRYPT_ARCH_PATH=$d
      break
   fi
done
   NCBICRYPT_PATH=$NCBICRYPT_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $NCBICRYPT_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NCBICRYPT_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NCBICRYPT_PATH=$ncbi_fix_dir_tmp2
         else
            case "$NCBICRYPT_PATH" in
               /*) ;;
               * ) NCBICRYPT_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NCBICRYPT_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_ncbicrypt" != "no"; then
    case "$NCBICRYPT_PATH:$with_ncbicrypt" in
       *:yes | *: | $with_ncbicrypt* ) ;;
       * ) NCBICRYPT_PATH=$with_ncbicrypt ;;
    esac
    if test "$NCBICRYPT_PATH" != /usr -a -d "$NCBICRYPT_PATH"; then
       in_path=" in $NCBICRYPT_PATH"
       if test -z "$NCBICRYPT_INCLUDE" -a -d "$NCBICRYPT_PATH/include"; then
          NCBICRYPT_INCLUDE="-I$NCBICRYPT_PATH/include"
       fi
       if test -n "$NCBICRYPT_LIBPATH"; then
          :
       elif test -d "$NCBICRYPT_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 $NCBICRYPT_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NCBICRYPT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NCBICRYPT_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NCBICRYPT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$NCBICRYPT_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 $NCBICRYPT_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NCBICRYPT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NCBICRYPT_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NCBICRYPT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       NCBICRYPT_LIBS="$NCBICRYPT_LIBPATH -lncbicrypt "
    else
       NCBICRYPT_INCLUDE=""
       NCBICRYPT_LIBS="-lncbicrypt "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libncbicrypt$in_path" >&5
$as_echo_n "checking for libncbicrypt$in_path... " >&6; }
if ${ncbi_cv_lib_ncbicrypt+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $NCBICRYPT_INCLUDE $orig_CPPFLAGS"
       LIBS="$NCBICRYPT_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ncbicrypt.h>
int
main ()
{
NCBICRYPT_Key k = NCBICRYPT_Init("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ncbicrypt=yes
else
  ncbi_cv_lib_ncbicrypt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ncbicrypt" >&5
$as_echo "$ncbi_cv_lib_ncbicrypt" >&6; }
    if test "$ncbi_cv_lib_ncbicrypt" = "no"; then
       if test "${with_ncbicrypt:=no}" != no; then
       as_fn_error $? "--with-ncbicrypt explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_ncbicrypt" = "no"; then
    NCBICRYPT_PATH="No_NCBICRYPT"
    NCBICRYPT_INCLUDE=
    NCBICRYPT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}NCBICRYPT"; WithPackagesSep=" "
    NCBICRYPT_INCLUDE=" $NCBICRYPT_INCLUDE"

$as_echo "#define HAVE_LIBNCBICRYPT 1" >>confdefs.h

 fi



NETWORK_LIBS="$NETWORK_LIBS $NCBICRYPT_LIBS"
NETWORK_PURE_LIBS="$NETWORK_PURE_LIBS $NCBICRYPT_LIBS"


# 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
$as_echo_n "checking for X... " >&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 #(
    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
  $as_echo_n "(cached) " >&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 dylib la dll; 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 | /usr/lib64 | /lib | /lib64) ;;
	*) 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/X11R7/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include

/usr/include/X11
/usr/include/X11R7
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4

/usr/local/X11/include
/usr/local/X11R7/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include

/usr/local/include/X11
/usr/local/include/X11R7
/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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Xlib.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  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.i 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="-lX11 $LIBS"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main ()
{
XrmInitialize ()
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  LIBS=$ac_save_LIBS
for ac_dir in `$as_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 dylib la dll; do
    if test -r "$ac_dir/libX11.$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
$as_echo "$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'"
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
$as_echo "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.

$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h

  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 . . . .
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
$as_echo_n "checking whether -R must be followed by a space... " >&6; }
    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
    ac_cxx_werror_flag=yes
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
       X_LIBS="$X_LIBS -R$x_libraries"
else
  LIBS="$ac_xsave_LIBS -R $x_libraries"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	  X_LIBS="$X_LIBS -R $x_libraries"
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
$as_echo "neither works" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
    LIBS=$ac_xsave_LIBS
  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""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.
    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = x""yes; then :

fi

    if test $ac_cv_func_gethostbyname = no; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_nsl_gethostbyname=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_bsd_gethostbyname=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
if test "x$ac_cv_lib_bsd_gethostbyname" = x""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.
    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
if test "x$ac_cv_func_connect" = x""yes; then :

fi

    if test $ac_cv_func_connect = no; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
$as_echo_n "checking for connect in -lsocket... " >&6; }
if ${ac_cv_lib_socket_connect+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_socket_connect=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
$as_echo "$ac_cv_lib_socket_connect" >&6; }
if test "x$ac_cv_lib_socket_connect" = x""yes; then :
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
if test "x$ac_cv_func_remove" = x""yes; then :

fi

    if test $ac_cv_func_remove = no; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
$as_echo_n "checking for remove in -lposix... " >&6; }
if ${ac_cv_lib_posix_remove+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_posix_remove=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
$as_echo "$ac_cv_lib_posix_remove" >&6; }
if test "x$ac_cv_lib_posix_remove" = x""yes; then :
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
if test "x$ac_cv_func_shmat" = x""yes; then :

fi

    if test $ac_cv_func_shmat = no; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
$as_echo_n "checking for shmat in -lipc... " >&6; }
if ${ac_cv_lib_ipc_shmat+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_ipc_shmat=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
if test "x$ac_cv_lib_ipc_shmat" = x""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
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""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"`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XextCreateExtension in -lXext" >&5
$as_echo_n "checking for XextCreateExtension in -lXext... " >&6; }
if ${ac_cv_lib_Xext_XextCreateExtension+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_Xext_XextCreateExtension=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
$as_echo "$ac_cv_lib_Xext_XextCreateExtension" >&6; }
if test "x$ac_cv_lib_Xext_XextCreateExtension" = x""yes; then :
  Xext="-lXext"
else
  Xext=
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtMainLoop in -lXt" >&5
$as_echo_n "checking for XtMainLoop in -lXt... " >&6; }
if ${ac_cv_lib_Xt_XtMainLoop+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_Xt_XtMainLoop=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtMainLoop" >&5
$as_echo "$ac_cv_lib_Xt_XtMainLoop" >&6; }
if test "x$ac_cv_lib_Xt_XtMainLoop" = x""yes; then :
  Xt="-lXt"
else
  Xt=
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuMakeAtom in -lXmu" >&5
$as_echo_n "checking for XmuMakeAtom in -lXmu... " >&6; }
if ${ac_cv_lib_Xmu_XmuMakeAtom+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXmu $Xt $Xext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_Xmu_XmuMakeAtom=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuMakeAtom" >&5
$as_echo "$ac_cv_lib_Xmu_XmuMakeAtom" >&6; }
if test "x$ac_cv_lib_Xmu_XmuMakeAtom" = x""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 { PWD=; unset 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 GLKit -framework OpenGL"
         # ... and its proprietary successor
         OPENGL_LIBS="$OPENGL_LIBS -framework Metal -framework MetalKit"
         OPENGL_LIBS="$OPENGL_LIBS -framework QuartzCore"
         ;;
      # 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL$where" >&5
$as_echo_n "checking for OpenGL$where... " >&6; }
if ${ncbi_cv_lib_opengl+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$orig_CPPFLAGS $OPENGL_INCLUDE"
       LIBS="$OPENGL_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

           #ifdef NCBI_OS_DARWIN
           #  include <OpenGL/gl.h>
           #else
           #  include <GL/gl.h>
           #endif

int
main ()
{
glBegin(0);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_opengl=yes
else
  ncbi_cv_lib_opengl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_opengl" >&5
$as_echo "$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
       as_fn_error $? "--with-opengl explicitly specified, but no usable version found." "$LINENO" 5
    fi
   if test "${with_gl2ps:=no}" != no; then
       as_fn_error $? "--with-gl2ps explicitly specified, but no usable version found." "$LINENO" 5
    fi
else
             WithPackages="$WithPackages${WithPackagesSep}OpenGL"; WithPackagesSep=" "

$as_echo "#define HAVE_OPENGL 1" >>confdefs.h

   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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSMesaCreateContext in -lOSMesa" >&5
$as_echo_n "checking for OSMesaCreateContext in -lOSMesa... " >&6; }
if ${ac_cv_lib_OSMesa_OSMesaCreateContext+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lOSMesa $OPENGL_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_OSMesa_OSMesaCreateContext=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OSMesa_OSMesaCreateContext" >&5
$as_echo "$ac_cv_lib_OSMesa_OSMesaCreateContext" >&6; }
if test "x$ac_cv_lib_OSMesa_OSMesaCreateContext" = x""yes; then :
            WithPackages="$WithPackages${WithPackagesSep}MESA"; WithPackagesSep=" ";
          OSMESA_LIBS="$OSMESA_LDFLAGS $OPENGL_LIBPATH -lOSMesa -lGLU -lGL $X_ALL_LIBS"

$as_echo "#define HAVE_LIBOSMESA 1" >>confdefs.h

else
  OSMESA_LIBS=
fi

   fi
   if test -z "$OSMESA_LIBS"; then
      if test "${with_mesa:=no}" != no; then
       as_fn_error $? "--with-mesa explicitly specified, but no usable version found." "$LINENO" 5
    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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glutInit in -lglut" >&5
$as_echo_n "checking for glutInit in -lglut... " >&6; }
if ${ac_cv_lib_glut_glutInit+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lglut $OPENGL_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_glut_glutInit=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glut_glutInit" >&5
$as_echo "$ac_cv_lib_glut_glutInit" >&6; }
if test "x$ac_cv_lib_glut_glutInit" = x""yes; then :
            WithPackages="$WithPackages${WithPackagesSep}GLUT"; WithPackagesSep=" ";
          GLUT_LIBS="$GLUT_LDFLAGS $OPENGL_LIBPATH -lglut -lGLU -lGL $X_ALL_LIBS"

$as_echo "#define HAVE_LIBGLUT 1" >>confdefs.h

else
  GLUT_LIBS=
fi

      if test -z "$GLUT_LIBS"; then
         if test "${with_glut:=no}" != no; then
       as_fn_error $? "--with-glut explicitly specified, but no usable version found." "$LINENO" 5
    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 { PWD=; unset 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
      fi
      glew_config="eval PKG_CONFIG_PATH=\"$GLEW_LIBDIR/pkgconfig\" pkg-config"
      if pkg-config --version >/dev/null 2>&1; then
         if test "$with_glew_mx" != no \
           && $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
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glewGetExtension" >&5
$as_echo_n "checking for library containing glewGetExtension... " >&6; }
if ${ac_cv_search_glewGetExtension+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
  if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_search_glewGetExtension=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_glewGetExtension+:} false; then :
  break
fi
done
if ${ac_cv_search_glewGetExtension+:} false; then :

else
  ac_cv_search_glewGetExtension=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glewGetExtension" >&5
$as_echo "$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"

$as_echo "#define HAVE_LIBGLEW 1" >>confdefs.h

   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
       as_fn_error $? "--with-glew explicitly specified, but no usable version found." "$LINENO" 5
    fi
         if test "${with_glew_mx:=no}" != no; then
       as_fn_error $? "--with-glew-mx explicitly specified, but no usable version found." "$LINENO" 5
    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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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"
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLEW multi-context (MX) support" >&5
$as_echo_n "checking for GLEW multi-context (MX) support... " >&6; }
if ${ncbi_cv_lib_glew_mx+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define GLEW_MX 1
                 #include <GL/glew.h>
int
main ()
{
glewContextInit(NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_glew_mx=yes
else
  ncbi_cv_lib_glew_mx=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_glew_mx" >&5
$as_echo "$ncbi_cv_lib_glew_mx" >&6; }
          if test $ncbi_cv_lib_glew_mx = yes; then
             if test "$with_glew_mx" = no; then
                GLEW_INCLUDE=
                GLEW_LIBS=
                if test "${with_glew:=no}" != no; then
       as_fn_error $? "--with-glew explicitly specified, but no usable version found." "$LINENO" 5
    fi
             else
                GLEW_INCLUDE="$GLEW_INCLUDE -DGLEW_MX"
             fi
          else
             if test "${with_glew_mx:=no}" != no; then
       as_fn_error $? "--with-glew-mx explicitly specified, but no usable version found." "$LINENO" 5
    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
# : ${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=
   { wxconf=; unset wxconf;}
   # Extract the first word of "wx-config", so it can be a program name with args.
set dummy wx-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_wxconf+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $wxconf in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_wxconf="$wxconf" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$WXWIDGETS_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_wxconf="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wxconf" >&5
$as_echo "$wxconf" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
      { wxconf=; unset 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 "$wxconf" \
     &&  "$wxconf" $wxcfflags --list 2>/dev/null \
       | grep 'Default config is gtk3' >/dev/null; then
      gtkconf="pkg-config gtk+-3.0"
   elif test -x "$wxconf" \
     &&  "$wxconf" $wxcfflags --list 2>/dev/null \
       | grep 'Default config is gtk4' >/dev/null; then
      gtkconf="pkg-config gtk4"
   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
         deps=`$gtkconf --libs 2>/dev/null`
         libsed="$basesed; s%\$% $deps%"
         ;;
   esac
   test -x "$wxconf"  &&  case "`"$wxconf" $wxcfflags --version`" in
      1.* | 2.[0-7].* ) wxlibs=std ;;
      *                 ) wxlibs=std,richtext,aui,propgrid ;;
   esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets${WXWIDGETS_ARCH_PATH:+ in $WXWIDGETS_ARCH_PATH}" >&5
$as_echo_n "checking for wxWidgets${WXWIDGETS_ARCH_PATH:+ in $WXWIDGETS_ARCH_PATH}... " >&6; }
if ${ncbi_cv_lib_wxwidgets+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -x "$wxconf" ; then
          WXWIDGETS_INCLUDE="`"$wxconf" $wxcfflags --cflags` $baseflags"
          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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <wx/combobox.h>
               class CMyComboBox : public wxComboBox {};
int
main ()
{
CMyComboBox cb; cb.Clear();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_wxwidgets=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_wxwidgets" >&5
$as_echo "$ncbi_cv_lib_wxwidgets" >&6; }
   if test "$ncbi_cv_lib_wxwidgets" = "no"; then
      if test "${with_wxwidgets:=no}" != no; then
       as_fn_error $? "--with-wxwidgets explicitly specified, but no usable version found." "$LINENO" 5
    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].*) ;;
      * )           WithPackages="$WithPackages${WithPackagesSep}wx2.8"; WithPackagesSep=" " ;;
   esac
   # The "yes" may have been cached; get the actual settings again if needed
   if test -z "$WXWIDGETS_INCLUDE"; then
      WXWIDGETS_INCLUDE="`"$wxconf" $wxcfflags --cflags` $baseflags"
   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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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 $wxlibs --static \
      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=:
   wxpnglib=$WXWIDGETS_ARCH_PATH/lib/libpng.so
   defpnglib=${PNG_PATH-/usr}/lib${bit64_sfx}/libpng.so
   if test -f $wxpnglib  &&  \
       (test ! -f $defpnglib  ||  ! cmp -s $wxpnglib $defpnglib); then
      PNG_PATH=$WXWIDGETS_ARCH_PATH
      PNG_INCLUDE=$WXWIDGETS_INCLUDE
   fi
   wxtifflib=$WXWIDGETS_ARCH_PATH/lib/libtiff.so
   deftifflib=${TIFF_PATH-/usr}/lib${bit64_sfx}/libtiff.so
   if test -f $wxtifflib  &&  \
       (test ! -f $deftifflib  ||  ! cmp -s $wxtifflib $deftifflib); then
      TIFF_PATH=$WXWIDGETS_ARCH_PATH
      TIFF_INCLUDE=$WXWIDGETS_INCLUDE
   fi

$as_echo "#define HAVE_WXWIDGETS 1" >>confdefs.h

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 { PWD=; unset 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
      FASTCGI_ARCH_PATH=$FASTCGI_PATH
for d in "$FASTCGI_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$FASTCGI_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$FASTCGI_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$FASTCGI_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      FASTCGI_ARCH_PATH=$d
      break
   fi
done
   fi
   FASTCGI_INCLUDE="-I$FASTCGI_PATH/include"
   if test "$with_debug" != "no" \
      -a -d "$FASTCGI_ARCH_PATH/altlib${bit64_sfx}"; then
      FASTCGI_LIBDIR="$FASTCGI_ARCH_PATH/altlib${bit64_sfx}"
   else
      FASTCGI_LIBDIR="$FASTCGI_ARCH_PATH/lib${bit64_sfx}"
   fi
   ncbi_fix_dir_tmp=`if cd $FASTCGI_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $FASTCGI_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            FASTCGI_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$FASTCGI_LIBDIR" in
               /*) ;;
               * ) FASTCGI_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) FASTCGI_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 $FASTCGI_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FastCGI libraries${FASTCGI_PATH:+ in $FASTCGI_PATH}" >&5
$as_echo_n "checking for FastCGI libraries${FASTCGI_PATH:+ in $FASTCGI_PATH}... " >&6; }
if ${ncbi_cv_lib_fcgi+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$FASTCGI_INCLUDE $orig_CPPFLAGS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fcgiapp.h>
int
main ()
{
 (void) FCGX_IsCGI();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_fcgi=yes
else
  ncbi_cv_lib_fcgi=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_fcgi" >&5
$as_echo "$ncbi_cv_lib_fcgi" >&6; }
   if test "$ncbi_cv_lib_fcgi" = "no"; then
      if test "${with_fastcgi:=no}" != no; then
       as_fn_error $? "--with-fastcgi explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
   for ac_func in FCGX_Accept_r
do :
  ac_fn_cxx_check_func "$LINENO" "FCGX_Accept_r" "ac_cv_func_FCGX_Accept_r"
if test "x$ac_cv_func_FCGX_Accept_r" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_FCGX_ACCEPT_R 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=" "

$as_echo "#define HAVE_LIBFASTCGI 1" >>confdefs.h

fi


## FastCGI++ (MT-capable)
case "$with_fastcgipp" in
   yes | no | '' ) ;;
   *             ) FASTCGIPP_PATH=$with_fastcgipp ;;
esac
if test -d "$FASTCGIPP_PATH"; then
   FASTCGIPP_ARCH_PATH=$FASTCGIPP_PATH
for d in "$FASTCGIPP_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$FASTCGIPP_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$FASTCGIPP_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$FASTCGIPP_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      FASTCGIPP_ARCH_PATH=$d
      break
   fi
done
   FASTCGIPP_PATH=$FASTCGIPP_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $FASTCGIPP_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $FASTCGIPP_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            FASTCGIPP_PATH=$ncbi_fix_dir_tmp2
         else
            case "$FASTCGIPP_PATH" in
               /*) ;;
               * ) FASTCGIPP_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) FASTCGIPP_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_fastcgipp" != "no"; then
    case "$FASTCGIPP_PATH:$with_fastcgipp" in
       *:yes | *: | $with_fastcgipp* ) ;;
       * ) FASTCGIPP_PATH=$with_fastcgipp ;;
    esac
    if test "$FASTCGIPP_PATH" != /usr -a -d "$FASTCGIPP_PATH"; then
       in_path=" in $FASTCGIPP_PATH"
       if test -z "$FASTCGIPP_INCLUDE" -a -d "$FASTCGIPP_PATH/include"; then
          FASTCGIPP_INCLUDE="-I$FASTCGIPP_PATH/include"
       fi
       if test -n "$FASTCGIPP_LIBPATH"; then
          :
       elif test -d "$FASTCGIPP_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 $FASTCGIPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FASTCGIPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FASTCGIPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    FASTCGIPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$FASTCGIPP_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 $FASTCGIPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    FASTCGIPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $FASTCGIPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    FASTCGIPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       FASTCGIPP_LIBS="$FASTCGIPP_LIBPATH -lfastcgipp "
    else
       FASTCGIPP_INCLUDE=""
       FASTCGIPP_LIBS="-lfastcgipp "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfastcgipp$in_path" >&5
$as_echo_n "checking for libfastcgipp$in_path... " >&6; }
if ${ncbi_cv_lib_fastcgipp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $FASTCGIPP_INCLUDE $orig_CPPFLAGS"
       LIBS="$FASTCGIPP_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <fastcgi++/http.hpp>
int
main ()
{
Fastcgipp::Http::SessionId sid;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_fastcgipp=yes
else
  ncbi_cv_lib_fastcgipp=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_fastcgipp" >&5
$as_echo "$ncbi_cv_lib_fastcgipp" >&6; }
    if test "$ncbi_cv_lib_fastcgipp" = "no"; then
       if test "${with_fastcgipp:=no}" != no; then
       as_fn_error $? "--with-fastcgipp explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_fastcgipp" = "no"; then
    FASTCGIPP_PATH="No_FASTCGIPP"
    FASTCGIPP_INCLUDE=
    FASTCGIPP_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}FASTCGIPP"; WithPackagesSep=" "
    FASTCGIPP_INCLUDE=" $FASTCGIPP_INCLUDE"

$as_echo "#define HAVE_LIBFASTCGIPP 1" >>confdefs.h

 fi





## NCBI SSS libraries
if test "$with_sybase" = "no" ; then
   if test "${with_sssdb:=no}" != no; then
       as_fn_error $? "--with-sssdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi

case "$host_os:$compiler:$compiler_version" in
   linux*:GCC:* | linux*:*Clang:* )
      : ${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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCBI SSS directories${NCBI_SSS_PATH:+ in $NCBI_SSS_PATH}" >&5
$as_echo_n "checking for NCBI SSS directories${NCBI_SSS_PATH:+ in $NCBI_SSS_PATH}... " >&6; }
   if test "$with_included_sss" = "yes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } # duh
   elif test ! -d "${NCBI_SSS_LIBPATH}"  -o  ! -d "${NCBI_SSS_INCLUDE}" ; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      if test "${with_sss:=no}" != no; then
       as_fn_error $? "--with-sss explicitly specified, but no usable version found." "$LINENO" 5
    fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
   fi
fi

if test "$with_sss" = "no" ; then
   if test "${with_sssutils:=no}" != no; then
       as_fn_error $? "--with-sssutils explicitly specified, but no usable version found." "$LINENO" 5
    fi
   if test "${with_sssdb:=no}" != no; then
       as_fn_error $? "--with-sssdb explicitly specified, but no usable version found." "$LINENO" 5
    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"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the NCBI SSS UTILS library" >&5
$as_echo_n "checking for the NCBI SSS UTILS library... " >&6; }
if ${ncbi_cv_lib_sssutils+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$NCBI_SSS_INCLUDE $SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$NCBI_SSS_LIBPATH $LIBSSSUTILS $SYBASE_LIBS $NETWORK_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <hashtab.hpp>
int
main ()
{
 (new C_HashTab(123))->Clear();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sssutils=yes
else
  ncbi_cv_lib_sssutils=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sssutils" >&5
$as_echo "$ncbi_cv_lib_sssutils" >&6; }
      if test "$ncbi_cv_lib_sssutils" = yes; then

$as_echo "#define HAVE_LIBSSSUTILS 1" >>confdefs.h

                   WithPackages="$WithPackages${WithPackagesSep}SSSUTILS"; WithPackagesSep=" "
         if test -f "$local_sss/../ncbils2/asn/login.asn" \
           -a -n "$GCRYPT_LIBS"; 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
       as_fn_error $? "--with-sssutils explicitly specified, but no usable version found." "$LINENO" 5
    fi
         if test "${with_sss:=no}" != no; then
       as_fn_error $? "--with-sss explicitly specified, but no usable version found." "$LINENO" 5
    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
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the NCBI SSS DB library" >&5
$as_echo_n "checking for the NCBI SSS DB library... " >&6; }
if ${ncbi_cv_lib_sssdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$NCBI_SSS_INCLUDE $SYBASE_INCLUDE $orig_CPPFLAGS"
          LIBS="$NCBI_SSS_LIBPATH $LIBSSSDB $SYBASE_LIBS $NETWORK_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cslink.hpp>
int
main ()
{
 (new CSLink)->connect2server("srv", "user", "pwd", "db");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sssdb=yes
else
  ncbi_cv_lib_sssdb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sssdb" >&5
$as_echo "$ncbi_cv_lib_sssdb" >&6; }
      if test "$ncbi_cv_lib_sssdb" = "yes"; then

$as_echo "#define HAVE_LIBSSSDB 1" >>confdefs.h

                   WithPackages="$WithPackages${WithPackagesSep}SSSDB"; WithPackagesSep=" "
      else
         if test "${with_sssdb:=no}" != no; then
       as_fn_error $? "--with-sssdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
         if test "${with_sss:=no}" != no; then
       as_fn_error $? "--with-sss explicitly specified, but no usable version found." "$LINENO" 5
    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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SP directories${SP_PATH:+ in $SP_PATH}" >&5
$as_echo_n "checking for SP directories${SP_PATH:+ in $SP_PATH}... " >&6; }
   if test ! -d "${SP_LIBPATH}"  -o  ! -d "${SP_INCLUDE}" ; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      if test "${with_sp:=no}" != no; then
       as_fn_error $? "--with-sp explicitly specified, but no usable version found." "$LINENO" 5
    fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the SP SGML library" >&5
$as_echo_n "checking for the SP SGML library... " >&6; }
if ${ncbi_cv_lib_sp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$SP_INCLUDE $orig_CPPFLAGS"
       LIBS="$SP_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <SGMLApplication.h>
int
main ()
{
 SP_API::SGMLApplication app;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sp=yes
else
  ncbi_cv_lib_sp=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sp" >&5
$as_echo "$ncbi_cv_lib_sp" >&6; }
   if test "$ncbi_cv_lib_sp" = "no"; then
      if test "${with_sp:=no}" != no; then
       as_fn_error $? "--with-sp explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi

if test "$with_sp" = "no" ; then
   SP_INCLUDE=
   SP_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}SP"; WithPackagesSep=" "

$as_echo "#define HAVE_LIBSP 1" >>confdefs.h

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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ORBacus${ORBACUS_PATH:+ in $ORBACUS_PATH}" >&5
$as_echo_n "checking for ORBacus${ORBACUS_PATH:+ in $ORBACUS_PATH}... " >&6; }
if ${ncbi_cv_lib_orbacus+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$ORBACUS_INCLUDE $orig_CPPFLAGS"
       LIBS="$ORBACUS_LIBPATH $LIBOB $NETWORK_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_orbacus=yes
else
  ncbi_cv_lib_orbacus=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_orbacus" >&5
$as_echo "$ncbi_cv_lib_orbacus" >&6; }
   if test "$ncbi_cv_lib_orbacus" = "no"; then
      if test "${with_orbacus:=no}" != no; then
       as_fn_error $? "--with-orbacus explicitly specified, but no usable version found." "$LINENO" 5
    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=" "

$as_echo "#define HAVE_ORBACUS 1" >>confdefs.h

fi


## 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=
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU${ICU_ARCH_PATH:+ in $ICU_ARCH_PATH}" >&5
$as_echo_n "checking for ICU${ICU_ARCH_PATH:+ in $ICU_ARCH_PATH}... " >&6; }
if ${ncbi_cv_lib_icu+:} false; then :
  $as_echo_n "(cached) " >&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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <unicode/unistr.h>
int
main ()
{
int32_t i = UNICODE_STRING_SIMPLE("foo").indexOf('f');
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_icu=yes
else
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_icu" >&5
$as_echo "$ncbi_cv_lib_icu" >&6; }
   if test "$ncbi_cv_lib_icu" = "no"; then
      if test "${with_icu:=no}" != no; then
       as_fn_error $? "--with-icu explicitly specified, but no usable version found." "$LINENO" 5
    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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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_SEARCHPATH=`$ICU_CONFIG --ldflags-searchpath | sed -e "$no_usr_lib"`
   ICU_STATIC_LIBS=`$ICU_CONFIG --ldflags-libsonly | sed -e 's/-licu/-lsicu/g'`
   ICU_STATIC_LIBS="$ICU_SEARCHPATH $ICU_STATIC_LIBS"

$as_echo "#define HAVE_ICU 1" >>confdefs.h

fi


### XML/XSL libraries
if test "$with_expat" != "no"; then
    case "$EXPAT_PATH:$with_expat" in
       *:yes | *: | $with_expat* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat$in_path" >&5
$as_echo_n "checking for libexpat$in_path... " >&6; }
if ${ncbi_cv_lib_expat+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $EXPAT_INCLUDE $orig_CPPFLAGS"
       LIBS="$EXPAT_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <expat.h>
int
main ()
{
XML_Parser parser = XML_ParserCreate("utf-8");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_expat=yes
else
  ncbi_cv_lib_expat=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_expat" >&5
$as_echo "$ncbi_cv_lib_expat" >&6; }
    if test "$ncbi_cv_lib_expat" = "no"; then
       if test "${with_expat:=no}" != no; then
       as_fn_error $? "--with-expat explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h

 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

case "$with_sablot" in
   no       ) ;;
   yes | "" ) ;;
   *        ) SABLOT_PATH=$with_sablot ;;
esac
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 { PWD=; unset 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 "$SABLOT_PATH:$with_sablot" in
       *:yes | *: | $with_sablot* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsablot$in_path" >&5
$as_echo_n "checking for libsablot$in_path... " >&6; }
if ${ncbi_cv_lib_sablot+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $SABLOT_INCLUDE $orig_CPPFLAGS"
       LIBS="$SABLOT_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sablot.h>
int
main ()
{
SDOM_Document* D; int x = SablotParse(NULL, "file:/dev/null", D);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sablot=yes
else
  ncbi_cv_lib_sablot=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sablot" >&5
$as_echo "$ncbi_cv_lib_sablot" >&6; }
    if test "$ncbi_cv_lib_sablot" = "no"; then
       if test "${with_sablot:=no}" != no; then
       as_fn_error $? "--with-sablot explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBSABLOT 1" >>confdefs.h

 fi



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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2$in_path" >&5
$as_echo_n "checking for libxml2$in_path... " >&6; }
if ${ncbi_cv_lib_libxml+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$LIBXML_INCLUDE $orig_CPPFLAGS"
      LIBS="$LIBXML_LIBS $orig_LIBS"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libxml/parser.h>
int
main ()
{
xmlDocPtr doc = xmlParseFile("foo.xml");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libxml=yes
else
  ncbi_cv_lib_libxml=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libxml" >&5
$as_echo "$ncbi_cv_lib_libxml" >&6; }
   if test "$ncbi_cv_lib_libxml" = "no"; then
      if test "${with_libxml:=no}" != no; then
       as_fn_error $? "--with-libxml explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBXML 1" >>confdefs.h

   export LIBXML_LIBPATH
fi



if test -f "${LIBXML_LIBPATH_}/libxml2-static.a"; then
   LIBXML_STATIC_LIBS="-L${LIBXML_LIBPATH_} -lxml2-static $ICONV_LIBS"
   if test "x$with_bin_release" = "xyes"; then
      LIBXML_LIBS=$LIBXML_STATIC_LIBS
   fi
else
   LIBXML_STATIC_LIBS=${LIBXML_LIBS}
fi

: ${LIBXSLT_PATH=$LIBXML_PATH}
if test "$with_libxslt" != "no"; then
    case "$LIBXSLT_PATH:$with_libxslt" in
       *:yes | *: | $with_libxslt* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxslt$in_path" >&5
$as_echo_n "checking for libxslt$in_path... " >&6; }
if ${ncbi_cv_lib_libxslt+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$LIBXML_INCLUDE $LIBXSLT_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBXSLT_LIBS $LIBXML_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libxslt/xslt.h>
int
main ()
{
xsltInit()
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libxslt=yes
else
  ncbi_cv_lib_libxslt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libxslt" >&5
$as_echo "$ncbi_cv_lib_libxslt" >&6; }
    if test "$ncbi_cv_lib_libxslt" = "no"; then
       if test "${with_libxslt:=no}" != no; then
       as_fn_error $? "--with-libxslt explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBXSLT 1" >>confdefs.h

 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"
   if test "x$with_bin_release" = "xyes"; then
      LIBXSLT_LIBS=$LIBXSLT_STATIC_LIBS
   fi
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_XSLTPROC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XSLTPROC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$LIBXSLT_PATH/bin:`dirname $LIBXML_LIBPATH_ 2>/dev/null`/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
$as_echo "$XSLTPROC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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 "$LIBEXSLT_PATH:$with_libexslt" in
       *:yes | *: | $with_libexslt* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexslt$in_path" >&5
$as_echo_n "checking for libexslt$in_path... " >&6; }
if ${ncbi_cv_lib_libexslt+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$LIBXSLT_INCLUDE $LIBEXSLT_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBEXSLT_LIBS $LIBXSLT_LIBS $LIBXML_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libexslt/exslt.h>
int
main ()
{
exsltRegisterAll()
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libexslt=yes
else
  ncbi_cv_lib_libexslt=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libexslt" >&5
$as_echo "$ncbi_cv_lib_libexslt" >&6; }
    if test "$ncbi_cv_lib_libexslt" = "no"; then
       if test "${with_libexslt:=no}" != no; then
       as_fn_error $? "--with-libexslt explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBEXSLT 1" >>confdefs.h

 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"
   if test "x$with_bin_release" = "xyes"; then
      LIBEXSLT_LIBS=$LIBEXSLT_STATIC_LIBS
   fi
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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xerces-C++$in_path" >&5
$as_echo_n "checking for Xerces-C++$in_path... " >&6; }
if ${ncbi_cv_lib_xerces_c+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$XERCES_INCLUDE $orig_CPPFLAGS"
       LIBS="$XERCES_LIBS $ICU_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_xerces_c=yes
else
  ncbi_cv_lib_xerces_c=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_xerces_c" >&5
$as_echo "$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
       as_fn_error $? "--with-xerces explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_xerces" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Xerces"; WithPackagesSep=" "

$as_echo "#define HAVE_XERCES 1" >>confdefs.h

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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xalan-C++$in_path" >&5
$as_echo_n "checking for Xalan-C++$in_path... " >&6; }
if ${ncbi_cv_lib_xalan_c+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$XALAN_INCLUDE $XERCES_INCLUDE $orig_CPPFLAGS"
       LIBS="$XALAN_LIBS $XERCES_LIBS $ICU_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <xalanc/XalanTransformer/XalanTransformer.hpp>
int
main ()
{
xalanc::XalanTransformer::initialize();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_xalan_c=yes
else
  ncbi_cv_lib_xalan_c=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_xalan_c" >&5
$as_echo "$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
       as_fn_error $? "--with-xalan explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_xalan" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Xalan"; WithPackagesSep=" "

$as_echo "#define HAVE_XALAN 1" >>confdefs.h

else
   XALAN_INCLUDE=
   XALAN_LIBS=
   XALAN_STATIC_LIBS=
fi

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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zorba$in_path" >&5
$as_echo_n "checking for Zorba$in_path... " >&6; }
if ${ncbi_cv_lib_zorba+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$ZORBA_INCLUDE $orig_CPPFLAGS"
       LIBS="$ZORBA_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <zorba/zorba.h>
int
main ()
{
zorba::Version v = zorba::Zorba::version();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_zorba=yes
else
  ncbi_cv_lib_zorba=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_zorba" >&5
$as_echo "$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
       as_fn_error $? "--with-zorba explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_zorba" != no; then
             WithPackages="$WithPackages${WithPackagesSep}Zorba"; WithPackagesSep=" "

$as_echo "#define HAVE_ZORBA 1" >>confdefs.h

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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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 "$SQLITE3_PATH:$with_sqlite3" in
       *:yes | *: | $with_sqlite3* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsqlite3$in_path" >&5
$as_echo_n "checking for libsqlite3$in_path... " >&6; }
if ${ncbi_cv_lib_sqlite3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $SQLITE3_INCLUDE $orig_CPPFLAGS"
       LIBS="$SQLITE3_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sqlite3.h>
int
main ()
{
sqlite3_pcache_methods m;
     int status = sqlite3_config(SQLITE_CONFIG_GETPCACHE, &m);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sqlite3=yes
else
  ncbi_cv_lib_sqlite3=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sqlite3" >&5
$as_echo "$ncbi_cv_lib_sqlite3" >&6; }
    if test "$ncbi_cv_lib_sqlite3" = "no"; then
       if test "${with_sqlite3:=no}" != no; then
       as_fn_error $? "--with-sqlite3 explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBSQLITE3 1" >>confdefs.h

 fi



if test -n "$SQLITE3_LIBS"; then
   CPPFLAGS="$SQLITE3_INCLUDE $orig_CPPFLAGS"
   ac_fn_cxx_check_header_mongrel "$LINENO" "sqlite3async.h" "ac_cv_header_sqlite3async_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3async_h" = x""yes; then :

$as_echo "#define HAVE_SQLITE3ASYNC_H 1" >>confdefs.h

                 WithPackages="$WithPackages${WithPackagesSep}SQLITE3ASYNC"; WithPackagesSep=" "
fi


   LIBS="$SQLITE3_LIBS $orig_LIBS"
   for ac_func in sqlite3_unlock_notify
do :
  ac_fn_cxx_check_func "$LINENO" "sqlite3_unlock_notify" "ac_cv_func_sqlite3_unlock_notify"
if test "x$ac_cv_func_sqlite3_unlock_notify" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SQLITE3_UNLOCK_NOTIFY 1
_ACEOF

fi
done

   SQLITE3_WRAPPER=sqlitewrapp
else
   SQLITE3_WRAPPER=
fi
if test -n "$SQLITE3_LIBS" -a -f "$SQLITE3_LIBDIR/libsqlite3-static.a"; then
   SQLITE3_STATIC_LIBS="-L$SQLITE3_LIBDIR -lsqlite3-static"
   if test "x$with_bin_release" = "xyes"; then
      SQLITE3_LIBS=$SQLITE3_STATIC_LIBS
   fi
else
   SQLITE3_STATIC_LIBS=$SQLITE3_LIBS
fi


# NCBI SRA/VDB
VDB_POST_LINK=:
VDB_REQ=VDB
if test "$with_vdb" != "no" ; then
   # CURL?
   vdb_deps="$NETWORK_LIBS $BZ2_LIBS $Z_LIBS $DL_LIBS"
   # In MT builds, ORIG_LIBS already contains THREAD_LIBS.  However,
   # VDB is always threaded, and may need explicit THREAD_LIBS when
   # used statically.
   if test "$with_mt" = no; then
      vdb_deps="$vdb_deps $THREAD_LIBS"
   fi
   vdb_static_deps="$LIBXML_STATIC_LIBS $vdb_deps"
   vdb_deps="$LIBXML_LIBS $vdb_deps"
   if test "${with_vdb:-yes}" != "yes" -a -d "$with_vdb"; then
      VDB_PATH=$with_vdb
   fi
   if test -d "$VDB_PATH"; then
      : ${with_downloaded_vdb=no}
   else
      : ${with_downloaded_vdb=$with_vdb}
   fi
   if test "$with_downloaded_vdb" != "no"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: trying to build the NCBI SRA/VDB Toolkit from GitHub." >&5
$as_echo "$as_me: trying to build the NCBI SRA/VDB Toolkit from GitHub." >&6;}
      VDB_PATH=`$real_srcdir/scripts/common/add_vdb.sh 2>&5`
      status=$?
      if test $status != 0; then
         message="SRA/VDB build failed with status $status"
      elif test ! -d "$VDB_PATH"; then
         message="SRA/VDB build nominally succeeded, but failed to report where"
      else
         message=
      fi
      case "$message:$with_downloaded_vdb" in
         :*    ) ;;
         *:yes ) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "$message
See \`config.log' for more details" "$LINENO" 5; } ;;
         *     ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $message" >&5
$as_echo "$as_me: WARNING: $message" >&2;}  ;;
      esac
   fi
   # if test "$with_included_vdb" != "yes"; then
      if test -z "$VDB_PATH"; then
         in_path=
      else
                  vdb_parent=`dirname "$VDB_PATH"`
         ncbi_fix_dir_tmp=`if cd $vdb_parent; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $vdb_parent && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            vdb_parent=$ncbi_fix_dir_tmp2
         else
            case "$vdb_parent" in
               /*) ;;
               * ) vdb_parent=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) vdb_parent=$ncbi_fix_dir_tmp ;;
 esac
         VDB_PATH=$vdb_parent/`basename "$VDB_PATH"`
         in_path=" in $VDB_PATH"
         case "$host_os" in
            darwin*  ) vdb_os=mac ;;
            linux*   ) vdb_os=linux ;;
            solaris* ) vdb_os=sun ;;
         esac
         case "$VDB_PATH" in
            */cxx_toolkit/* ) vdb_os_interfaces=$vdb_os/../interfaces ;;
            *               ) vdb_os_interfaces= ;;
         esac
         for x in $vdb_os_interfaces interfaces include; do
            if test -d "$VDB_PATH/$x"; then
               vdb_inc_root=$VDB_PATH/$x
               : ${VDB_INCLUDE="-I$vdb_inc_root"}
               break
            fi
         done
         vdb_inc_subdirs=cc/gcc
         case "$host_cpu:$bit64_sfx" in
            a*r*:*  ) vdb_inc_subdirs="cc/gcc/arm64 $vdb_inc_subdirs" ;;
            *86*:64 ) vdb_inc_subdirs="cc/gcc/x86_64 $vdb_inc_subdirs" ;;
            *86*:*  ) vdb_inc_subdirs="cc/gcc/fat86 $vdb_inc_subdirs" ;;
         esac
         case "$ncbi_compiler" in
            *CLANG ) vdb_inc_subdirs="cc/clang $vdb_inc_subdirs" ;;
            ICC    ) vdb_inc_subdirs="cc/icc $vdb_inc_subdirs"   ;;
         esac
         vdb_inc_subdirs="os/$vdb_os os/unix $vdb_inc_subdirs"
         for x in $vdb_inc_subdirs; do
            VDB_INCLUDE="$VDB_INCLUDE -I$vdb_inc_root/$x"
         done
         case "$DEBUG_SFX" in
            Debug )
               VDB_INCLUDE="$VDB_INCLUDE -D_DEBUGGING"
               vdb_mode=debug
               ;;
            Release )
               vdb_mode=release
               ;;
         esac
         case "$host_os:$host_cpu:$bit64_sfx" in
            darwin*:*86*:64 ) vdb_libpath=mac/$vdb_mode/x86_64/lib   ;;
            darwin*:*86*:* )  vdb_libpath=mac/$vdb_mode/fat86/lib    ;;
            darwin*:arm*   )  vdb_libpath=mac/$vdb_mode/arm64/lib    ;;
            linux*:*86*:64 )  vdb_libpath=linux/$vdb_mode/x86_64/lib ;;
            linux*:aarch64* ) vdb_libpath=linux/$vdb_mode/arm64/lib  ;;
            * )
               if test -n "$with_vdb"; then
                  as_fn_error $? "--with-vdb explicitly specified,
                                but not supported on this platform." "$LINENO" 5
               fi
               ;;
         esac
         for x in "$vdb_libpath" "lib${bit64_sfx:-32}" lib; do
            if test -n "$x" -a -d "$VDB_PATH/$x"; then
               : ${VDB_LIBDIR=$VDB_PATH/$x}
               break
            fi
         done
      fi
      if test -z "${VDB_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 $VDB_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    VDB_LIBS="${ncbi_rp_L_flags} -lncbi-vdb $vdb_deps"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $VDB_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    VDB_LIBS="${ncbi_rp_L_flags}${ncbi_rp_R_flags} -lncbi-vdb $vdb_deps"
 fi
 fi
      CPPFLAGS="$orig_CPPFLAGS $VDB_INCLUDE"
      LIBS="$orig_LIBS $VDB_LIBS"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncbi-vdb$in_path" >&5
$as_echo_n "checking for ncbi-vdb$in_path... " >&6; }
if ${ncbi_cv_lib_ncbi_vdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

            #include <sra/sradb.h>
int
main ()
{
const SRAMgr* mgr; SRAMgrMakeRead(&mgr);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ncbi_vdb=yes
else
  ncbi_cv_lib_ncbi_vdb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ncbi_vdb" >&5
$as_echo "$ncbi_cv_lib_ncbi_vdb" >&6; }
      if test "$ncbi_cv_lib_ncbi_vdb" = yes; then
                   WithPackages="$WithPackages${WithPackagesSep}VDB"; WithPackagesSep=" "
         if test -f "$VDB_LIBDIR/libncbi-vdb-static.a"; then
            VDB_STATIC_LIBS="-L$VDB_LIBDIR -lncbi-vdb-static $vdb_static_deps"
            if test "$with_static_vdb" = yes; then
               VDB_LIBS="-L$VDB_LIBDIR -lncbi-vdb-static $vdb_deps"
            fi
         else
            VDB_STATIC_LIBS=$VDB_LIBS
         fi
         case "$host_os" in
            darwin*)
               inst_name=`otool -D $VDB_LIBDIR/libncbi-vdb.dylib 2>/dev/null \
                          | grep -v ':$'`
               case "$inst_name" in
                   @executable_path* )
                      major=`echo $inst_name | sed -ne 's,.*/libncbi-vdb\.\([1-9][0-9]*\).*\.dylib$,\1,p'`
                      test -z "$major"  || \
                         VDB_POST_LINK="install_name_tool -change $inst_name @rpath/libncbi-vdb.$major.dylib"
                      ;;
               esac
               ;;
         esac

$as_echo "#define HAVE_NCBI_VDB 1" >>confdefs.h

         bamread=bamread
         sraread=sraread
         ncbi_id2proc_snp=ncbi_id2proc_snp
         ncbi_id2proc_wgs=ncbi_id2proc_wgs
         ncbi_xloader_bam=ncbi_xloader_bam
         ncbi_xloader_csra=ncbi_xloader_csra
         ncbi_xloader_snp=ncbi_xloader_snp
         ncbi_xloader_sra=ncbi_xloader_sra
         ncbi_xloader_vdbgraph=ncbi_xloader_vdbgraph
         ncbi_xloader_wgs=ncbi_xloader_wgs
      else
         VDB_INCLUDE=
         VDB_LIBS=
         VDB_STATIC_LIBS=
         bamread=
         sraread=
         ncbi_id2proc_snp=
         ncbi_id2proc_wgs=
         ncbi_xloader_bam=
         ncbi_xloader_csra=
         ncbi_xloader_snp=
         ncbi_xloader_sra=
         ncbi_xloader_vdbgraph=
         ncbi_xloader_wgs=
      fi
   # else ...
   # fi
   if test -z "$VDB_LIBS"; then
      if test "${with_vdb:=no}" != no; then
       as_fn_error $? "--with-vdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
      if test "${with_ngs:=no}" != no; then
       as_fn_error $? "--with-ngs explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
else
   if test "${with_ngs:=no}" != no; then
       as_fn_error $? "--with-ngs explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi


### NCBI NGS SDK
if test "$with_ngs" != "no" ; then
   if test "${with_ngs:-yes}" != "yes" -a -d "$with_ngs"; then
      NGS_PATH=$with_ngs
   fi
   NGS_INCLUDE="-I$NGS_PATH/include"
   case "$host_cpu:$bit64_sfx" in
      *86*:64 ) extra_inc="-I$NGS_PATH/include/ngs/unix/x86_64" ;;
      *86*:*  ) extra_inc="-I$NGS_PATH/include/ngs/unix/fat86"  ;;
      a*:64   ) extra_inc="-I$NGS_PATH/include/ngs/unix/arm64"  ;;
      *       ) extra_inc=''                                    ;;
   esac
   NGS_INCLUDE="$NGS_INCLUDE $extra_inc"
   CPPFLAGS="$NGS_INCLUDE $VDB_INCLUDE $orig_CPPFLAGS"
   for x in "$vdb_libpath" "lib${bit64_sfx:-32}" lib; do
      if test -n "$x" -a -d "$NGS_PATH/$x"; then
         : ${NGS_LIBDIR=$NGS_PATH/$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 $NGS_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGS_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   if test -n "$NGS_PATH"; then
      in_path=" in $NGS_PATH"
   else
      in_path=
   fi
   LIBS="$orig_LIBS $NGS_LIBPATH -lncbi-ngs $VDB_LIBS"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libncbi-ngs$in_path" >&5
$as_echo_n "checking for libncbi-ngs$in_path... " >&6; }
if ${ncbi_cv_lib_ncbi_ngs+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

         #include <ngs/itf/PileupItf.h>
int
main ()
{
struct NGS_Pileup_v1_vt * p1vt = &ITF_Pileup_vt;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ncbi_ngs=yes
else
  ncbi_cv_lib_ncbi_ngs=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ncbi_ngs" >&5
$as_echo "$ncbi_cv_lib_ncbi_ngs" >&6; }
   if test $ncbi_cv_lib_ncbi_ngs=yes; then
      NGS_C_LIBS=-lncbi-ngs
   fi
   LIBS=$orig_LIBS
   if test "$with_ngs" != "no"; then
    case "$NGS_PATH:$with_ngs" in
       *:yes | *: | $with_ngs* ) ;;
       * ) NGS_PATH=$with_ngs ;;
    esac
    if test "$NGS_PATH" != /usr -a -d "$NGS_PATH"; then
       in_path=" in $NGS_PATH"
       if test -z "$NGS_INCLUDE" -a -d "$NGS_PATH/include"; then
          NGS_INCLUDE="-I$NGS_PATH/include"
       fi
       if test -n "$NGS_LIBPATH"; then
          :
       elif test -d "$NGS_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 $NGS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$NGS_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 $NGS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       NGS_LIBS="$NGS_LIBPATH -lncbi-ngs-c++ -lngs-c++ $NGS_C_LIBS"
    else
       NGS_INCLUDE=""
       NGS_LIBS="-lncbi-ngs-c++ -lngs-c++ $NGS_C_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libncbi-ngs-c++$in_path" >&5
$as_echo_n "checking for libncbi-ngs-c++$in_path... " >&6; }
if ${ncbi_cv_lib_ngs+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$extra_inc $NGS_INCLUDE $orig_CPPFLAGS"
       LIBS="$NGS_LIBS $VDB_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ncbi-vdb/NGS.hpp>
int
main ()
{
ncbi::NGS::setAppVersionString("conftest.0.0.0");
             ngs::ReadCollection coll
             = ncbi::NGS::openReadCollection("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ngs=yes
else
  ncbi_cv_lib_ngs=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ngs" >&5
$as_echo "$ncbi_cv_lib_ngs" >&6; }
    if test "$ncbi_cv_lib_ngs" = "no"; then
       if test "${with_ngs:=no}" != no; then
       as_fn_error $? "--with-ngs explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_ngs" = "no"; then
    NGS_PATH="No_NGS"
    NGS_INCLUDE=
    NGS_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}NGS"; WithPackagesSep=" "
    NGS_INCLUDE="$extra_inc $NGS_INCLUDE"

$as_echo "#define HAVE_LIBNGS 1" >>confdefs.h

 fi



   if test -n "$NGS_LIBS"; then
      if test -f "$NGS_LIBDIR/libncbi-ngs-c++-static.a"; then
         NGS_STATIC_LIBS="-L$NGS_LIBDIR -lncbi-ngs-c++-static"
         NGS_STATIC_LIBS="$NGS_STATIC_LIBS -lngs-c++-static"
         if test -n "$NGS_C_LIBS"; then
            NGS_STATIC_LIBS="$NGS_STATIC_LIBS $NGS_C_LIBS-static"
         fi
      else
         NGS_STATIC_LIBS=$NGS_LIBS
      fi
   else
      if test "${with_ngs:=no}" != no; then
       as_fn_error $? "--with-ngs explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
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 "$OECHEM_PATH:$with_oechem" in
       *:yes | *: | $with_oechem* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liboechem$in_path" >&5
$as_echo_n "checking for liboechem$in_path... " >&6; }
if ${ncbi_cv_lib_oechem+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $OECHEM_INCLUDE $orig_CPPFLAGS"
       LIBS="$OECHEM_LIBS $NETWORK_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <oechem.h>
int
main ()
{
OEChem::OEMol mol; OEChem::OEConfBase* c = mol.GetActive();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_oechem=yes
else
  ncbi_cv_lib_oechem=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_oechem" >&5
$as_echo "$ncbi_cv_lib_oechem" >&6; }
    if test "$ncbi_cv_lib_oechem" = "no"; then
       if test "${with_oechem:=no}" != no; then
       as_fn_error $? "--with-oechem explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBOECHEM 1" >>confdefs.h

 fi



if test -n "$OECHEM_LIBS"; then
   OECHEM_LIBS=`echo $OECHEM_LIBS | sed -e 's/-loechem \(.*-loechem .*\)/\1/'`
fi


### Sun/Univa Grid Engine
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

case "$with_sge" in
   yes | "" ) ;;
   *        ) SGE_PATH=$with_sge ;;
esac
if test -d "$SGE_PATH" -a -z "$SGE_LIBPATH"; then
   for x in $SGE_PLATFORMS; do
      if test -d "$SGE_PATH/lib/$x"; then
         SGE_LIBPATH="$SGE_PATH/lib/$x"
         break
      fi
   done
   BASE_SGE_LIBPATH=$SGE_LIBPATH
   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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
   # Try to use a dedicated directory without alternate versions of
   # system libraries such as OpenSSL.
   if test -d "$BASE_SGE_LIBPATH" -a -d "$SGE_PATH/lib/drmaa"; then
      SGE_LIBPATH=`echo $SGE_LIBPATH \
          | sed -e "s,-L$BASE_SGE_LIBPATH,-L$SGE_PATH/lib/drmaa,g"`
   fi
fi
if test "$with_sge" != "no"; then
    case "$SGE_PATH:$with_sge" in
       *:yes | *: | $with_sge* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrmaa$in_path" >&5
$as_echo_n "checking for libdrmaa$in_path... " >&6; }
if ${ncbi_cv_lib_sge+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $SGE_INCLUDE $orig_CPPFLAGS"
       LIBS="$SGE_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                     #include <drmaa.h>
int
main ()
{
char buf[1024]; drmaa_init("SGE", buf, sizeof(buf));
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sge=yes
else
  ncbi_cv_lib_sge=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sge" >&5
$as_echo "$ncbi_cv_lib_sge" >&6; }
    if test "$ncbi_cv_lib_sge" = "no"; then
       if test "${with_sge:=no}" != no; then
       as_fn_error $? "--with-sge explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBSGE 1" >>confdefs.h

 fi





### DRMAA2
: ${DRMAA2_PATH=$SGE_PATH}
case "$with_drmaa2" in
   yes | "" ) ;;
   *        ) DRMAA2_PATH=$with_drmaa2 ;;
esac
if test -d "$DRMAA2_PATH" -a -z "$DRMAA2_LIBPATH"; then
   for x in $SGE_PLATFORMS; do
      if test -d "$DRMAA2_PATH/lib/$x"; then
         DRMAA2_LIBPATH="$DRMAA2_PATH/lib/$x"
         break
      fi
   done
   BASE_DRMAA2_LIBPATH=$DRMAA2_LIBPATH
   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 $DRMAA2_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $DRMAA2_LIBPATH; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
   # Try to use a dedicated directory without alternate versions of
   # system libraries such as OpenSSL.
   if test -d "$BASE_DRMAA2_LIBPATH" -a -d "$DRMAA2_PATH/lib/drmaa"; then
      DRMAA2_LIBPATH=`echo $DRMAA2_LIBPATH \
          | sed -e "s,-L$BASE_DRMAA2_LIBPATH,-L$DRMAA2_PATH/lib/drmaa,g"`
   fi
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

if test "$with_drmaa2" != "no"; then
    case "$DRMAA2_PATH:$with_drmaa2" in
       *:yes | *: | $with_drmaa2* ) ;;
       * ) DRMAA2_PATH=$with_drmaa2 ;;
    esac
    if test "$DRMAA2_PATH" != /usr -a -d "$DRMAA2_PATH"; then
       in_path=" in $DRMAA2_PATH"
       if test -z "$DRMAA2_INCLUDE" -a -d "$DRMAA2_PATH/include"; then
          DRMAA2_INCLUDE="-I$DRMAA2_PATH/include"
       fi
       if test -n "$DRMAA2_LIBPATH"; then
          :
       elif test -d "$DRMAA2_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 $DRMAA2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $DRMAA2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$DRMAA2_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 $DRMAA2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $DRMAA2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    DRMAA2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       DRMAA2_LIBS="$DRMAA2_LIBPATH -ldrmaa2 "
    else
       DRMAA2_INCLUDE=""
       DRMAA2_LIBS="-ldrmaa2 "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrmaa2$in_path" >&5
$as_echo_n "checking for libdrmaa2$in_path... " >&6; }
if ${ncbi_cv_lib_drmaa2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $DRMAA2_INCLUDE $orig_CPPFLAGS"
       LIBS="$DRMAA2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <drmaa2.h>
int
main ()
{
drmaa2_create_rsession("foo", "bar");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ncbi_cv_lib_drmaa2=yes
else
  ncbi_cv_lib_drmaa2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_drmaa2" >&5
$as_echo "$ncbi_cv_lib_drmaa2" >&6; }
    if test "$ncbi_cv_lib_drmaa2" = "no"; then
       if test "${with_drmaa2:=no}" != no; then
       as_fn_error $? "--with-drmaa2 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_drmaa2" = "no"; then
    DRMAA2_PATH="No_DRMAA2"
    DRMAA2_INCLUDE=
    DRMAA2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}DRMAA2"; WithPackagesSep=" "
    DRMAA2_INCLUDE=" $DRMAA2_INCLUDE"

$as_echo "#define HAVE_LIBDRMAA2 1" >>confdefs.h

 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



### 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 { PWD=; unset 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 "$MUPARSER_PATH:$with_muparser" in
       *:yes | *: | $with_muparser* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmuparser$in_path" >&5
$as_echo_n "checking for libmuparser$in_path... " >&6; }
if ${ncbi_cv_lib_muparser+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $MUPARSER_INCLUDE $orig_CPPFLAGS"
       LIBS="$MUPARSER_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <muParser.h>
int
main ()
{
mu::Parser parser;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_muparser=yes
else
  ncbi_cv_lib_muparser=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_muparser" >&5
$as_echo "$ncbi_cv_lib_muparser" >&6; }
    if test "$ncbi_cv_lib_muparser" = "no"; then
       if test "${with_muparser:=no}" != no; then
       as_fn_error $? "--with-muparser explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBMUPARSER 1" >>confdefs.h

 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 { PWD=; unset 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 "$HDF5_PATH:$with_hdf5" in
       *:yes | *: | $with_hdf5* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhdf5_cpp$in_path" >&5
$as_echo_n "checking for libhdf5_cpp$in_path... " >&6; }
if ${ncbi_cv_lib_hdf5+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $HDF5_INCLUDE $orig_CPPFLAGS"
       LIBS="$HDF5_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <H5Cpp.h>
int
main ()
{
H5::H5Library::open();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_hdf5=yes
else
  ncbi_cv_lib_hdf5=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_hdf5" >&5
$as_echo "$ncbi_cv_lib_hdf5" >&6; }
    if test "$ncbi_cv_lib_hdf5" = "no"; then
       if test "${with_hdf5:=no}" != no; then
       as_fn_error $? "--with-hdf5 explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBHDF5 1" >>confdefs.h

 fi





### Image libraries
# : ${JPEG_PATH=/usr/sfw}
# Grr... jpeglib.h isn't especially well-behaved.
if test "$with_jpeg" != "no"; then
    case "$JPEG_PATH:$with_jpeg" in
       *:yes | *: | $with_jpeg* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjpeg$in_path" >&5
$as_echo_n "checking for libjpeg$in_path... " >&6; }
if ${ncbi_cv_lib_jpeg+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $JPEG_INCLUDE $orig_CPPFLAGS"
       LIBS="$JPEG_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_jpeg=yes
else
  ncbi_cv_lib_jpeg=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_jpeg" >&5
$as_echo "$ncbi_cv_lib_jpeg" >&6; }
    if test "$ncbi_cv_lib_jpeg" = "no"; then
       if test "${with_jpeg:=no}" != no; then
       as_fn_error $? "--with-jpeg explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBJPEG 1" >>confdefs.h

 fi




# : ${PNG_PATH=/usr/sfw}
if test "$with_png" != "no"; then
    case "$PNG_PATH:$with_png" in
       *:yes | *: | $with_png* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng$in_path" >&5
$as_echo_n "checking for libpng$in_path... " >&6; }
if ${ncbi_cv_lib_png+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$Z_INCLUDE $PNG_INCLUDE $orig_CPPFLAGS"
       LIBS="$PNG_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_png=yes
else
  ncbi_cv_lib_png=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_png" >&5
$as_echo "$ncbi_cv_lib_png" >&6; }
    if test "$ncbi_cv_lib_png" = "no"; then
       if test "${with_png:=no}" != no; then
       as_fn_error $? "--with-png explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBPNG 1" >>confdefs.h

 fi




# : ${TIFF_PATH=/usr/sfw}
if test "$with_tiff" != "no"; then
    case "$TIFF_PATH:$with_tiff" in
       *:yes | *: | $with_tiff* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtiff$in_path" >&5
$as_echo_n "checking for libtiff$in_path... " >&6; }
if ${ncbi_cv_lib_tiff+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $TIFF_INCLUDE $orig_CPPFLAGS"
       LIBS="$TIFF_LIBS $JPEG_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <tiffio.h>
int
main ()
{
TIFF* tiff = TIFFOpen("foo", "r");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_tiff=yes
else
  ncbi_cv_lib_tiff=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_tiff" >&5
$as_echo "$ncbi_cv_lib_tiff" >&6; }
    if test "$ncbi_cv_lib_tiff" = "no"; then
       if test "${with_tiff:=no}" != no; then
       as_fn_error $? "--with-tiff explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBTIFF 1" >>confdefs.h

 fi



## etc.

# Paths?
with_ungif=$with_gif
if test "$with_gif" != "no"; then
    case "$GIF_PATH:$with_gif" in
       *:yes | *: | $with_gif* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgif$in_path" >&5
$as_echo_n "checking for libgif$in_path... " >&6; }
if ${ncbi_cv_lib_gif+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GIF_INCLUDE $orig_CPPFLAGS"
       LIBS="$GIF_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern "C" {
                  #include <gif_lib.h>
                  }
int
main ()
{
GifFileType* fp; return DGifSlurp(fp);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gif=yes
else
  ncbi_cv_lib_gif=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gif" >&5
$as_echo "$ncbi_cv_lib_gif" >&6; }
    if test "$ncbi_cv_lib_gif" = "no"; then
       if test "${with_gif:=no}" != no; then
       as_fn_error $? "--with-gif explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBGIF 1" >>confdefs.h

 fi



if test "$with_gif" = "no"; then
   if test "$with_ungif" != "no"; then
    case "$UNGIF_PATH:$with_ungif" in
       *:yes | *: | $with_ungif* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libungif$in_path" >&5
$as_echo_n "checking for libungif$in_path... " >&6; }
if ${ncbi_cv_lib_ungif+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $UNGIF_INCLUDE $orig_CPPFLAGS"
       LIBS="$UNGIF_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern "C" {
                     #include <gif_lib.h>
                     }
int
main ()
{
GifFileType* fp; return DGifSlurp(fp);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ungif=yes
else
  ncbi_cv_lib_ungif=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ungif" >&5
$as_echo "$ncbi_cv_lib_ungif" >&6; }
    if test "$ncbi_cv_lib_ungif" = "no"; then
       if test "${with_ungif:=no}" != no; then
       as_fn_error $? "--with-ungif explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBUNGIF 1" >>confdefs.h

 fi



else

$as_echo "#define HAVE_LIBUNGIF 1" >>confdefs.h

   UNGIF_INCLUDE=$GIF_INCLUDE
   UNGIF_LIBS=$GIF_LIBS
fi

case "$x_libraries" in */*) : ${XPM_PATH=`dirname "$x_libraries"`} ;; esac
if test "$with_xpm" != "no"; then
    case "$XPM_PATH:$with_xpm" in
       *:yes | *: | $with_xpm* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXpm$in_path" >&5
$as_echo_n "checking for libXpm$in_path... " >&6; }
if ${ncbi_cv_lib_xpm+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$X_CFLAGS $XPM_INCLUDE $orig_CPPFLAGS"
       LIBS="$XPM_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/xpm.h>
int
main ()
{
XpmImage image; XpmInfo info;
     XpmReadFileToXpmImage("foo", &image, &info);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_xpm=yes
else
  ncbi_cv_lib_xpm=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_xpm" >&5
$as_echo "$ncbi_cv_lib_xpm" >&6; }
    if test "$ncbi_cv_lib_xpm" = "no"; then
       if test "${with_xpm:=no}" != no; then
       as_fn_error $? "--with-xpm explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBXPM 1" >>confdefs.h

 fi



# The use of X_CFLAGS is probably redundant, but shouldn't hurt.

if test "$with_gl2ps" != "no"; then
   if test "${with_gl2ps-yes}" != "yes"; then
      GL2PS_PATH=$with_gl2ps
   fi
   if test -d "$GL2PS_PATH"; then
      if test -d "$GL2PS_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx"; then
         GL2PS_PATH=$GL2PS_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx
      elif test -d "$GL2PS_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx"; then
         GL2PS_PATH=$GL2PS_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx
      elif test -d "$GL2PS_PATH/$DEBUG_SFX$bit64_sfx"; then
         GL2PS_PATH=$GL2PS_PATH/$DEBUG_SFX$bit64_sfx
      fi
      ncbi_fix_dir_tmp=`if cd $GL2PS_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GL2PS_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GL2PS_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GL2PS_PATH" in
               /*) ;;
               * ) GL2PS_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GL2PS_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
   if test "$with_gl2ps" != "no"; then
    case "$GL2PS_PATH:$with_gl2ps" in
       *:yes | *: | $with_gl2ps* ) ;;
       * ) GL2PS_PATH=$with_gl2ps ;;
    esac
    if test "$GL2PS_PATH" != /usr -a -d "$GL2PS_PATH"; then
       in_path=" in $GL2PS_PATH"
       if test -z "$GL2PS_INCLUDE" -a -d "$GL2PS_PATH/include"; then
          GL2PS_INCLUDE="-I$GL2PS_PATH/include"
       fi
       if test -n "$GL2PS_LIBPATH"; then
          :
       elif test -d "$GL2PS_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 $GL2PS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GL2PS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GL2PS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GL2PS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GL2PS_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 $GL2PS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GL2PS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GL2PS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GL2PS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GL2PS_LIBS="$GL2PS_LIBPATH -lgl2ps "
    else
       GL2PS_INCLUDE=""
       GL2PS_LIBS="-lgl2ps "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgl2ps$in_path" >&5
$as_echo_n "checking for libgl2ps$in_path... " >&6; }
if ${ncbi_cv_lib_gl2ps+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$OPENGL_INCLUDE $GL2PS_INCLUDE $orig_CPPFLAGS"
       LIBS="$GL2PS_LIBS $OPENGL_LIBS $PNG_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <gl2ps.h>
int
main ()
{
gl2psSpecial(GL2PS_SVG, "foo")
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gl2ps=yes
else
  ncbi_cv_lib_gl2ps=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gl2ps" >&5
$as_echo "$ncbi_cv_lib_gl2ps" >&6; }
    if test "$ncbi_cv_lib_gl2ps" = "no"; then
       if test "${with_gl2ps:=no}" != no; then
       as_fn_error $? "--with-gl2ps explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_gl2ps" = "no"; then
    GL2PS_PATH="No_GL2PS"
    GL2PS_INCLUDE=
    GL2PS_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GL2PS"; WithPackagesSep=" "
    GL2PS_INCLUDE="$OPENGL_INCLUDE $GL2PS_INCLUDE"

$as_echo "#define HAVE_LIBGL2PS 1" >>confdefs.h

 fi



fi
if test -n "$GL2PS_LIBS" -a -f "$GL2PS_PATH/lib/libgl2ps-static.a"; then
   GL2PS_STATIC_LIBS="-L$GL2PS_PATH/lib -lgl2ps-static"
else
   GL2PS_STATIC_LIBS=$GL2PS_LIBS
fi

## FreeType and FTGL
if test "$with_freetype" != "no" ; then
   ft2pc="env PKG_CONFIG_PATH=$FREETYPE_PATH/lib/pkgconfig pkg-config freetype2"
   if $ft2pc --exists >/dev/null 2>&1; then
      freetype_config=$ft2pc
      FREETYPE_PATH=`$ft2pc --variable=exec_prefix`
   else
      : ${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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_freetype_config+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $freetype_config in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_freetype_config="$freetype_config" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$FREETYPE_BINPATH:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_freetype_config="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $freetype_config" >&5
$as_echo "$freetype_config" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   fi
   if test -n "$freetype_config" ; then
      : ${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/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -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
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FREETYPE_INCLUDE needs doctoring" >&5
$as_echo_n "checking whether FREETYPE_INCLUDE needs doctoring... " >&6; }
if ${ncbi_cv_lib_freetype_fix_include+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ft2build.h>
int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_lib_freetype_fix_include=no
else
  ncbi_cv_lib_freetype_fix_include=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_freetype_fix_include" >&5
$as_echo "$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
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeType works" >&5
$as_echo_n "checking whether FreeType works... " >&6; }
if ${ncbi_cv_lib_freetype+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $orig_CPPFLAGS"
          LIBS="$FREETYPE_LIBS $orig_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ft2build.h>
                   #include FT_FREETYPE_H
int
main ()
{
FT_Select_Charmap(NULL, ft_encoding_unicode);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_freetype=yes
else
  ncbi_cv_lib_freetype=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_freetype" >&5
$as_echo "$ncbi_cv_lib_freetype" >&6; }
      if test "$ncbi_cv_lib_freetype" = no; then
         if test "${with_freetype:=no}" != no; then
       as_fn_error $? "--with-freetype explicitly specified, but no usable version found." "$LINENO" 5
    fi
      fi
   else
      if test "${with_freetype:=no}" != no; then
       as_fn_error $? "--with-freetype explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
fi
if test "$with_freetype" = "no" ; then
   FREETYPE_PATH="No_FREETYPE"
   FREETYPE_INCLUDE=
   FREETYPE_LIBS=
else
             WithPackages="$WithPackages${WithPackagesSep}FreeType"; WithPackagesSep=" "

$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h

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 { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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 "$FTGL_PATH:$with_ftgl" in
       *:yes | *: | $with_ftgl* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libftgl$in_path" >&5
$as_echo_n "checking for libftgl$in_path... " >&6; }
if ${ncbi_cv_lib_ftgl+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$FREETYPE_INCLUDE $FTGL_INCLUDE $orig_CPPFLAGS"
       LIBS="$FTGL_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <FTGL/ftgl.h>
int
main ()
{
FTSimpleLayout layout;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_ftgl=yes
else
  ncbi_cv_lib_ftgl=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_ftgl" >&5
$as_echo "$ncbi_cv_lib_ftgl" >&6; }
    if test "$ncbi_cv_lib_ftgl" = "no"; then
       if test "${with_ftgl:=no}" != no; then
       as_fn_error $? "--with-ftgl explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBFTGL 1" >>confdefs.h

 fi





if test "$with_magic" != "no"; then
    case "$MAGIC_PATH:$with_magic" in
       *:yes | *: | $with_magic* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmagic$in_path" >&5
$as_echo_n "checking for libmagic$in_path... " >&6; }
if ${ncbi_cv_lib_magic+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $MAGIC_INCLUDE $orig_CPPFLAGS"
       LIBS="$MAGIC_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <magic.h>
int
main ()
{
magic_t m = magic_open(17);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_magic=yes
else
  ncbi_cv_lib_magic=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_magic" >&5
$as_echo "$ncbi_cv_lib_magic" >&6; }
    if test "$ncbi_cv_lib_magic" = "no"; then
       if test "${with_magic:=no}" != no; then
       as_fn_error $? "--with-magic explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBMAGIC 1" >>confdefs.h

 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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 "$MIMETIC_PATH:$with_mimetic" in
       *:yes | *: | $with_mimetic* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmimetic$in_path" >&5
$as_echo_n "checking for libmimetic$in_path... " >&6; }
if ${ncbi_cv_lib_mimetic+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $MIMETIC_INCLUDE $orig_CPPFLAGS"
       LIBS="$MIMETIC_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mimetic/mimetic.h>
int
main ()
{
mimetic::MimeEntity me;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_mimetic=yes
else
  ncbi_cv_lib_mimetic=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_mimetic" >&5
$as_echo "$ncbi_cv_lib_mimetic" >&6; }
    if test "$ncbi_cv_lib_mimetic" = "no"; then
       if test "${with_mimetic:=no}" != no; then
       as_fn_error $? "--with-mimetic explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBMIMETIC 1" >>confdefs.h

 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 { PWD=; unset 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GSOAP_SOAPCPP2+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GSOAP_SOAPCPP2="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSOAP_SOAPCPP2" >&5
$as_echo "$GSOAP_SOAPCPP2" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "wsdl2h", so it can be a program name with args.
set dummy wsdl2h; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GSOAP_WSDL2H+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GSOAP_WSDL2H="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSOAP_WSDL2H" >&5
$as_echo "$GSOAP_WSDL2H" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



if test "$with_gsoap" != "no"; then
    case "$GSOAP_PATH:$with_gsoap" in
       *:yes | *: | $with_gsoap* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgsoapssl++$in_path" >&5
$as_echo_n "checking for libgsoapssl++$in_path... " >&6; }
if ${ncbi_cv_lib_gsoap+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GSOAP_INCLUDE $orig_CPPFLAGS"
       LIBS="$GSOAP_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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; }
        #if GSOAP_VERSION >= 20871
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_fault_subcode(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_fault_string(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_fault_detail(struct soap*)
        { return NULL; }
        #else
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultsubcode(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultstring(struct soap*)
        { return NULL; }
        SOAP_FMAC3 const char* SOAP_FMAC4 soap_check_faultdetail(struct soap*)
        { return NULL; }
        #endif
        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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gsoap=yes
else
  ncbi_cv_lib_gsoap=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gsoap" >&5
$as_echo "$ncbi_cv_lib_gsoap" >&6; }
    if test "$ncbi_cv_lib_gsoap" = "no"; then
       if test "${with_gsoap:=no}" != no; then
       as_fn_error $? "--with-gsoap explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBGSOAP 1" >>confdefs.h

 fi





# Apache Avro
if test "$with_avro" != no; then
   case "$with_avro" in
      yes | '' ) ;;
      *        ) AVRO_PATH=$with_avro ;;
   esac
   AVRO_ARCH_PATH=$AVRO_PATH
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_ARCH_PATH=$d
      break
   fi
done
   AVRO_PATH=$AVRO_ARCH_PATH
   if test -d "$AVRO_PATH$asan_sfx"; then
      AVRO_PATH="$AVRO_PATH$asan_sfx"
   fi
   if test -d "$AVRO_PATH"; then
      ncbi_fix_dir_tmp=`if cd $AVRO_PATH; then { PWD=; unset 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 "$AVRO_PATH:$with_avro" in
       *:yes | *: | $with_avro* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libavrocpp$in_path" >&5
$as_echo_n "checking for libavrocpp$in_path... " >&6; }
if ${ncbi_cv_lib_avro+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $AVRO_INCLUDE $orig_CPPFLAGS"
       LIBS="$AVRO_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <avro/Node.hh>
int
main ()
{
avro::Name name("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_avro=yes
else
  ncbi_cv_lib_avro=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_avro" >&5
$as_echo "$ncbi_cv_lib_avro" >&6; }
    if test "$ncbi_cv_lib_avro" = "no"; then
       if test "${with_avro:=no}" != no; then
       as_fn_error $? "--with-avro explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBAVRO 1" >>confdefs.h

 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AVROGENCPP+:} false; then :
  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AVROGENCPP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AVROGENCPP" >&5
$as_echo "$AVROGENCPP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi


# USC Cereal (header-only)
case "$with_cereal" in
   yes | no | '' ) ;;
   *             ) CEREAL_PATH=$with_cereal ;;
esac
if test "$with_cereal" != no; then
   in_cereal=
   if test -d "$CEREAL_PATH"; then
      ncbi_fix_dir_tmp=`if cd $CEREAL_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CEREAL_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CEREAL_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CEREAL_PATH" in
               /*) ;;
               * ) CEREAL_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CEREAL_PATH=$ncbi_fix_dir_tmp ;;
 esac
      in_cereal=" in $CEREAL_PATH"
   fi
   CEREAL_INCLUDE=-I$CEREAL_PATH/include
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USC Cereal$in_cereal" >&5
$as_echo_n "checking for USC Cereal$in_cereal... " >&6; }
if ${ncbi_cv_lib_cereal+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$CEREAL_INCLUDE $orig_CPPFLAGS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <iostream>
                             #include <cereal/archives/binary.hpp>
int
main ()
{
cereal::BinaryOutputArchive
                             archive(std::cout);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_lib_cereal=yes
else
  ncbi_cv_lib_cereal=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_cereal" >&5
$as_echo "$ncbi_cv_lib_cereal" >&6; }
    if test "$ncbi_cv_lib_cereal" = yes; then
                 WithPackages="$WithPackages${WithPackagesSep}Cereal"; WithPackagesSep=" "
    else
       if test "${with_cereal:=no}" != no; then
       as_fn_error $? "--with-cereal explicitly specified, but no usable version found." "$LINENO" 5
    fi
       CEREAL_INCLUDE=
    fi
fi


# SASL 2
if test "$with_sasl2" != "no"; then
    case "$SASL2_PATH:$with_sasl2" in
       *:yes | *: | $with_sasl2* ) ;;
       * ) SASL2_PATH=$with_sasl2 ;;
    esac
    if test "$SASL2_PATH" != /usr -a -d "$SASL2_PATH"; then
       in_path=" in $SASL2_PATH"
       if test -z "$SASL2_INCLUDE" -a -d "$SASL2_PATH/include"; then
          SASL2_INCLUDE="-I$SASL2_PATH/include"
       fi
       if test -n "$SASL2_LIBPATH"; then
          :
       elif test -d "$SASL2_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 $SASL2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SASL2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SASL2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    SASL2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$SASL2_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 $SASL2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    SASL2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $SASL2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    SASL2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       SASL2_LIBS="$SASL2_LIBPATH -lsasl2 "
    else
       SASL2_INCLUDE=""
       SASL2_LIBS="-lsasl2 "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsasl2$in_path" >&5
$as_echo_n "checking for libsasl2$in_path... " >&6; }
if ${ncbi_cv_lib_sasl2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $SASL2_INCLUDE $orig_CPPFLAGS"
       LIBS="$SASL2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
                    #include <sasl/sasl.h>
int
main ()
{
sasl_client_init(NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_sasl2=yes
else
  ncbi_cv_lib_sasl2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_sasl2" >&5
$as_echo "$ncbi_cv_lib_sasl2" >&6; }
    if test "$ncbi_cv_lib_sasl2" = "no"; then
       if test "${with_sasl2:=no}" != no; then
       as_fn_error $? "--with-sasl2 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_sasl2" = "no"; then
    SASL2_PATH="No_SASL2"
    SASL2_INCLUDE=
    SASL2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}SASL2"; WithPackagesSep=" "
    SASL2_INCLUDE=" $SASL2_INCLUDE"

$as_echo "#define HAVE_LIBSASL2 1" >>confdefs.h

 fi





# legacy 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 { PWD=; unset 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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 "$MONGODB_PATH:$with_mongodb" in
       *:yes | *: | $with_mongodb* ) ;;
       * ) 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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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 $OPENSSL_LIBS $SASL2_LIBS"
    else
       MONGODB_INCLUDE=""
       MONGODB_LIBS="-lmongoclient $BOOST_LIBPATH $boost_fs_lib $BOOST_REGEX_LIBS $BOOST_THREAD_LIBS $OPENSSL_LIBS $SASL2_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmongoclient$in_path" >&5
$as_echo_n "checking for libmongoclient$in_path... " >&6; }
if ${ncbi_cv_lib_mongodb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $MONGODB_INCLUDE $orig_CPPFLAGS"
       LIBS="$MONGODB_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_mongodb=yes
else
  ncbi_cv_lib_mongodb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_mongodb" >&5
$as_echo "$ncbi_cv_lib_mongodb" >&6; }
    if test "$ncbi_cv_lib_mongodb" = "no"; then
       if test "${with_mongodb:=no}" != no; then
       as_fn_error $? "--with-mongodb explicitly specified, but no usable version found." "$LINENO" 5
    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"

$as_echo "#define HAVE_LIBMONGODB 1" >>confdefs.h

 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 -lmongoclient $BOOST_LIBPATH $boost_fs_static_lib $BOOST_REGEX_STATIC_LIBS $BOOST_THREAD_STATIC_LIBS $OPENSSL_LIBS $SASL2_LIBS"
else
   MONGODB_STATIC_LIBS=
fi


# MongoDB 3.x
if test "$with_mongodb3" != no; then
   case "$with_mongodb3" in
      yes | '' ) ;;
      *        ) MONGODB3_PATH=$with_mongodb3 ;;
   esac
   MONGODB3_ARCH_PATH=$MONGODB3_PATH
for d in "$MONGODB3_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$MONGODB3_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$MONGODB3_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$MONGODB3_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      MONGODB3_ARCH_PATH=$d
      break
   fi
done
   MONGODB3_PATH=$MONGODB3_ARCH_PATH
   if test -d "$MONGODB3_PATH$asan_sfx"; then
      MONGODB3_PATH="$MONGODB3_PATH$asan_sfx"
   fi
   if test -d "$MONGODB3_PATH"; then
      ncbi_fix_dir_tmp=`if cd $MONGODB3_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $MONGODB3_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            MONGODB3_PATH=$ncbi_fix_dir_tmp2
         else
            case "$MONGODB3_PATH" in
               /*) ;;
               * ) MONGODB3_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) MONGODB3_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
fi
if test -d $MONGODB3_PATH/lib${bit64_sfx}; then
   MONGODB3_LIBDIR=$MONGODB3_PATH/lib${bit64_sfx}
else
   MONGODB3_LIBDIR=$MONGODB3_PATH/lib
fi
m3pc="env PKG_CONFIG_PATH=$MONGODB3_LIBDIR/pkgconfig pkg-config libmongocxx"
if $m3pc --exists >/dev/null 2>&1; then
   MONGODB3_FULL_INCLUDE=`$m3pc --cflags`
   if test "x${CONF_f_runpath}" = "x${CONF_f_libpath}"; then
    MONGODB3_FULL_LIBS=`$m3pc --libs --static | sed -e "$no_usr_lib"`
 else
    MONGODB3_FULL_LIBS=
    ncbi_rp_L_sep=
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in `$m3pc --libs --static | sed -e "$no_usr_lib"`; do
       case "$x" in
          -L/lib | -L/usr/lib | -L/usr/lib32 | -L/usr/lib64 \
          | -L/usr/lib/$multiarch )
             continue
             ;;
          -L*)
             MONGODB3_FULL_LIBS="$MONGODB3_FULL_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=:
             ;;
          *)
             MONGODB3_FULL_LIBS="$MONGODB3_FULL_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
    MONGODB3_FULL_LIBS="$MONGODB3_FULL_LIBS${ncbi_rp_R_flags}"
 fi
fi
if test "$with_mongodb3" != "no"; then
    case "$MONGODB3_PATH:$with_mongodb3" in
       *:yes | *: | $with_mongodb3* ) ;;
       * ) MONGODB3_PATH=$with_mongodb3 ;;
    esac
    if test "$MONGODB3_PATH" != /usr -a -d "$MONGODB3_PATH"; then
       in_path=" in $MONGODB3_PATH"
       if test -z "$MONGODB3_INCLUDE" -a -d "$MONGODB3_PATH/include"; then
          MONGODB3_INCLUDE="-I$MONGODB3_PATH/include"
       fi
       if test -n "$MONGODB3_LIBPATH"; then
          :
       elif test -d "$MONGODB3_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 $MONGODB3_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MONGODB3_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MONGODB3_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    MONGODB3_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$MONGODB3_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 $MONGODB3_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    MONGODB3_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $MONGODB3_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    MONGODB3_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       MONGODB3_LIBS="$MONGODB3_LIBPATH -lmongocxx "
    else
       MONGODB3_INCLUDE=""
       MONGODB3_LIBS="-lmongocxx "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmongocxx$in_path" >&5
$as_echo_n "checking for libmongocxx$in_path... " >&6; }
if ${ncbi_cv_lib_mongodb3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$MONGODB3_FULL_INCLUDE $BOOST_INCLUDE $MONGODB3_INCLUDE $orig_CPPFLAGS"
       LIBS="$MONGODB3_LIBS $MONGODB3_FULL_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mongocxx/client.hpp>
int
main ()
{
mongocxx::client mongo_client;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_mongodb3=yes
else
  ncbi_cv_lib_mongodb3=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_mongodb3" >&5
$as_echo "$ncbi_cv_lib_mongodb3" >&6; }
    if test "$ncbi_cv_lib_mongodb3" = "no"; then
       if test "${with_mongodb3:=no}" != no; then
       as_fn_error $? "--with-mongodb3 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_mongodb3" = "no"; then
    MONGODB3_PATH="No_MONGODB3"
    MONGODB3_INCLUDE=
    MONGODB3_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}MONGODB3"; WithPackagesSep=" "
    MONGODB3_INCLUDE="$MONGODB3_FULL_INCLUDE $BOOST_INCLUDE $MONGODB3_INCLUDE"

$as_echo "#define HAVE_LIBMONGODB3 1" >>confdefs.h

 fi



if test -n "$MONGODB3_LIBS"; then
   MONGODB3_INCLUDE=$MONGODB3_FULL_INCLUDE
   MONGODB3_LIBS=$MONGODB3_FULL_LIBS
   if $m3pc-static --exists >/dev/null 2>&1; then
      MONGODB3_STATIC_LIBS=`$m3pc-static --libs --static`
   elif test -f $MONGODB3_LIBDIR/libmongocxx-static.a; then
      MONGODB3_STATIC_LIBS=`echo "$MONGODB3_LIBS" | \
        sed -e 's/-lmongo[^ ]*/&-static/g; s/-lbson[^ ]*/&-static/g' \
             -e 's/\(-l[^ ]*-static[^ ]*\)-static/\1/g'`
   else
      MONGODB3_STATIC_LIBS=$MONGODB3_LIBS
   fi
   if test -n "$ZSTD_LIBS"; then
      zsed="s@ -lzstd @ $ZSTD_LIBS @; s/^ //; s/ $//"
      MONGODB3_LIBS=`echo " $MONGODB3_LIBS " | sed -e "$zsed"`
      MONGODB3_STATIC_LIBS=`echo " $MONGODB3_STATIC_LIBS " | sed -e "$zsed"`
   fi
fi


# LevelDB
if test "$with_leveldb" != no; then
   case "$with_leveldb" in
      yes | '' ) ;;
      *        ) LEVELDB_PATH=$with_leveldb ;;
   esac
   LEVELDB_ARCH_PATH=$LEVELDB_PATH
for d in "$LEVELDB_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LEVELDB_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LEVELDB_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$LEVELDB_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      LEVELDB_ARCH_PATH=$d
      break
   fi
done
   LEVELDB_PATH=$LEVELDB_ARCH_PATH
   if test -d "$LEVELDB_PATH"; then
      ncbi_fix_dir_tmp=`if cd $LEVELDB_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LEVELDB_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LEVELDB_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LEVELDB_PATH" in
               /*) ;;
               * ) LEVELDB_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LEVELDB_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
fi
if test -d $LEVELDB_PATH/lib${bit64_sfx}; then
   LEVELDB_LIBDIR=$LEVELDB_PATH/lib${bit64_sfx}
else
   LEVELDB_LIBDIR=$LEVELDB_PATH/lib
fi
if test "$with_leveldb" != "no"; then
    case "$LEVELDB_PATH:$with_leveldb" in
       *:yes | *: | $with_leveldb* ) ;;
       * ) LEVELDB_PATH=$with_leveldb ;;
    esac
    if test "$LEVELDB_PATH" != /usr -a -d "$LEVELDB_PATH"; then
       in_path=" in $LEVELDB_PATH"
       if test -z "$LEVELDB_INCLUDE" -a -d "$LEVELDB_PATH/include"; then
          LEVELDB_INCLUDE="-I$LEVELDB_PATH/include"
       fi
       if test -n "$LEVELDB_LIBPATH"; then
          :
       elif test -d "$LEVELDB_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 $LEVELDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LEVELDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LEVELDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LEVELDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LEVELDB_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 $LEVELDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LEVELDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LEVELDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LEVELDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LEVELDB_LIBS="$LEVELDB_LIBPATH -lleveldb "
    else
       LEVELDB_INCLUDE=""
       LEVELDB_LIBS="-lleveldb "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libleveldb$in_path" >&5
$as_echo_n "checking for libleveldb$in_path... " >&6; }
if ${ncbi_cv_lib_leveldb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LEVELDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$LEVELDB_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <leveldb/db.h>
                     using namespace leveldb;
int
main ()
{
DB* db; Status status = DB::Open(Options(), "foo", &db);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_leveldb=yes
else
  ncbi_cv_lib_leveldb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_leveldb" >&5
$as_echo "$ncbi_cv_lib_leveldb" >&6; }
    if test "$ncbi_cv_lib_leveldb" = "no"; then
       if test "${with_leveldb:=no}" != no; then
       as_fn_error $? "--with-leveldb explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_leveldb" = "no"; then
    LEVELDB_PATH="No_LEVELDB"
    LEVELDB_INCLUDE=
    LEVELDB_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LEVELDB"; WithPackagesSep=" "
    LEVELDB_INCLUDE=" $LEVELDB_INCLUDE"

$as_echo "#define HAVE_LIBLEVELDB 1" >>confdefs.h

 fi





# liburing
if test "$with_liburing" != no; then
   case "$with_liburing" in
      yes | '' ) ;;
      *        ) LIBURING_PATH=$with_liburing ;;
   esac
   LIBURING_ARCH_PATH=$LIBURING_PATH
for d in "$LIBURING_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LIBURING_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LIBURING_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$LIBURING_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      LIBURING_ARCH_PATH=$d
      break
   fi
done
   LIBURING_PATH=$LIBURING_ARCH_PATH
   if test -d "$LIBURING_PATH"; then
      ncbi_fix_dir_tmp=`if cd $LIBURING_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBURING_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBURING_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBURING_PATH" in
               /*) ;;
               * ) LIBURING_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBURING_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
fi
if test "$with_liburing" != "no"; then
    case "$LIBURING_PATH:$with_liburing" in
       *:yes | *: | $with_liburing* ) ;;
       * ) LIBURING_PATH=$with_liburing ;;
    esac
    if test "$LIBURING_PATH" != /usr -a -d "$LIBURING_PATH"; then
       in_path=" in $LIBURING_PATH"
       if test -z "$LIBURING_INCLUDE" -a -d "$LIBURING_PATH/include"; then
          LIBURING_INCLUDE="-I$LIBURING_PATH/include"
       fi
       if test -n "$LIBURING_LIBPATH"; then
          :
       elif test -d "$LIBURING_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 $LIBURING_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBURING_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBURING_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBURING_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBURING_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 $LIBURING_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBURING_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBURING_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBURING_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBURING_LIBS="$LIBURING_LIBPATH -luring "
    else
       LIBURING_INCLUDE=""
       LIBURING_LIBS="-luring "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liburing$in_path" >&5
$as_echo_n "checking for liburing$in_path... " >&6; }
if ${ncbi_cv_lib_liburing+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBURING_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBURING_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <liburing.h>
int
main ()
{
io_uring_free_probe(io_uring_get_probe());
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_liburing=yes
else
  ncbi_cv_lib_liburing=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_liburing" >&5
$as_echo "$ncbi_cv_lib_liburing" >&6; }
    if test "$ncbi_cv_lib_liburing" = "no"; then
       if test "${with_liburing:=no}" != no; then
       as_fn_error $? "--with-liburing explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_liburing" = "no"; then
    LIBURING_PATH="No_LIBURING"
    LIBURING_INCLUDE=
    LIBURING_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBURING"; WithPackagesSep=" "
    LIBURING_INCLUDE=" $LIBURING_INCLUDE"

$as_echo "#define HAVE_LIBURING 1" >>confdefs.h

 fi






# RocksDB
if test "$with_rocksdb" != no; then
   case "$with_rocksdb" in
      yes | '' ) ;;
      *        ) ROCKSDB_PATH=$with_rocksdb ;;
   esac
   ROCKSDB_ARCH_PATH=$ROCKSDB_PATH
for d in "$ROCKSDB_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$ROCKSDB_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$ROCKSDB_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$ROCKSDB_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      ROCKSDB_ARCH_PATH=$d
      break
   fi
done
   ROCKSDB_PATH=$ROCKSDB_ARCH_PATH
   if test -d "$ROCKSDB_PATH$asan_sfx"; then
      ROCKSDB_PATH="$ROCKSDB_PATH$asan_sfx"
   fi
   if test -d "$ROCKSDB_PATH"; then
      ncbi_fix_dir_tmp=`if cd $ROCKSDB_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $ROCKSDB_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            ROCKSDB_PATH=$ncbi_fix_dir_tmp2
         else
            case "$ROCKSDB_PATH" in
               /*) ;;
               * ) ROCKSDB_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) ROCKSDB_PATH=$ncbi_fix_dir_tmp ;;
 esac
   fi
fi
if test -d $ROCKSDB_PATH/lib${bit64_sfx}; then
   ROCKSDB_LIBDIR=$ROCKSDB_PATH/lib${bit64_sfx}
else
   ROCKSDB_LIBDIR=$ROCKSDB_PATH/lib
fi
if test "$with_rocksdb" != "no"; then
    case "$ROCKSDB_PATH:$with_rocksdb" in
       *:yes | *: | $with_rocksdb* ) ;;
       * ) ROCKSDB_PATH=$with_rocksdb ;;
    esac
    if test "$ROCKSDB_PATH" != /usr -a -d "$ROCKSDB_PATH"; then
       in_path=" in $ROCKSDB_PATH"
       if test -z "$ROCKSDB_INCLUDE" -a -d "$ROCKSDB_PATH/include"; then
          ROCKSDB_INCLUDE="-I$ROCKSDB_PATH/include"
       fi
       if test -n "$ROCKSDB_LIBPATH"; then
          :
       elif test -d "$ROCKSDB_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 $ROCKSDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ROCKSDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ROCKSDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    ROCKSDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$ROCKSDB_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 $ROCKSDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    ROCKSDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $ROCKSDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    ROCKSDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       ROCKSDB_LIBS="$ROCKSDB_LIBPATH -lrocksdb $LIBURING_LIBS $BZ2_LIBS $Z_LIBS $ZSTD_LIBS"
    else
       ROCKSDB_INCLUDE=""
       ROCKSDB_LIBS="-lrocksdb $LIBURING_LIBS $BZ2_LIBS $Z_LIBS $ZSTD_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librocksdb$in_path" >&5
$as_echo_n "checking for librocksdb$in_path... " >&6; }
if ${ncbi_cv_lib_rocksdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $ROCKSDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$ROCKSDB_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <rocksdb/db.h>
                     using namespace rocksdb;
int
main ()
{
DB* db; Status status = DB::Open(Options(), "foo", &db);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_rocksdb=yes
else
  ncbi_cv_lib_rocksdb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_rocksdb" >&5
$as_echo "$ncbi_cv_lib_rocksdb" >&6; }
    if test "$ncbi_cv_lib_rocksdb" = "no"; then
       if test "${with_rocksdb:=no}" != no; then
       as_fn_error $? "--with-rocksdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_rocksdb" = "no"; then
    ROCKSDB_PATH="No_ROCKSDB"
    ROCKSDB_INCLUDE=
    ROCKSDB_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}ROCKSDB"; WithPackagesSep=" "
    ROCKSDB_INCLUDE=" $ROCKSDB_INCLUDE"

$as_echo "#define HAVE_LIBROCKSDB 1" >>confdefs.h

 fi





# Google Mock
case "$with_gmock" in
   yes | no | '' ) ;;
   *             ) GMOCK_PATH=$with_gmock ;;
esac
if test -d "$GMOCK_PATH"; then
   ncbi_fix_dir_tmp=`if cd $GMOCK_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GMOCK_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GMOCK_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GMOCK_PATH" in
               /*) ;;
               * ) GMOCK_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GMOCK_PATH=$ncbi_fix_dir_tmp ;;
 esac
   GMOCK_ARCH_PATH=$GMOCK_PATH
for d in "$GMOCK_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$GMOCK_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$GMOCK_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$GMOCK_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      GMOCK_ARCH_PATH=$d
      break
   fi
done
   GMOCK_LIBDIR=$GMOCK_ARCH_PATH/lib
   ncbi_fix_dir_tmp=`if cd $GMOCK_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GMOCK_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GMOCK_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$GMOCK_LIBDIR" in
               /*) ;;
               * ) GMOCK_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GMOCK_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
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 $GMOCK_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GMOCK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GMOCK_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GMOCK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_gmock" != "no"; then
    case "$GMOCK_PATH:$with_gmock" in
       *:yes | *: | $with_gmock* ) ;;
       * ) GMOCK_PATH=$with_gmock ;;
    esac
    if test "$GMOCK_PATH" != /usr -a -d "$GMOCK_PATH"; then
       in_path=" in $GMOCK_PATH"
       if test -z "$GMOCK_INCLUDE" -a -d "$GMOCK_PATH/include"; then
          GMOCK_INCLUDE="-I$GMOCK_PATH/include"
       fi
       if test -n "$GMOCK_LIBPATH"; then
          :
       elif test -d "$GMOCK_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 $GMOCK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GMOCK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GMOCK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GMOCK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GMOCK_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 $GMOCK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GMOCK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GMOCK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GMOCK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GMOCK_LIBS="$GMOCK_LIBPATH -lgmock -lgtest"
    else
       GMOCK_INCLUDE=""
       GMOCK_LIBS="-lgmock -lgtest"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmock$in_path" >&5
$as_echo_n "checking for libgmock$in_path... " >&6; }
if ${ncbi_cv_lib_gmock+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $GMOCK_INCLUDE $orig_CPPFLAGS"
       LIBS="$GMOCK_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <gmock/gmock.h>
int
main ()
{
int    my_argc;
       char** my_argv;
       testing::InitGoogleMock(&my_argc, my_argv);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_gmock=yes
else
  ncbi_cv_lib_gmock=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_gmock" >&5
$as_echo "$ncbi_cv_lib_gmock" >&6; }
    if test "$ncbi_cv_lib_gmock" = "no"; then
       if test "${with_gmock:=no}" != no; then
       as_fn_error $? "--with-gmock explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_gmock" = "no"; then
    GMOCK_PATH="No_GMOCK"
    GMOCK_INCLUDE=
    GMOCK_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GMOCK"; WithPackagesSep=" "
    GMOCK_INCLUDE=" $GMOCK_INCLUDE"

$as_echo "#define HAVE_LIBGMOCK 1" >>confdefs.h

 fi



if test -n "$GMOCK_LIBS"; then
   if test -f "$GMOCK_LIBDIR/libgmock-static.a"; then
      GMOCK_STATIC_LIBS="-L$GMOCK_LIBDIR -lgmock-static -lgtest-static"
   else
      GMOCK_STATIC_LIBS=$GMOCK_LIBS
   fi
fi


# LAPACK
CPPFLAGS="-DHAVE_LAPACK_CONFIG_H $orig_CPPFLAGS"
case "$with_lapack" in
   yes | no | '' ) ;;
   *             ) LAPACK_PATH=$with_lapack ;;
esac
if test -d "$LAPACK_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LAPACK_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LAPACK_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LAPACK_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LAPACK_PATH" in
               /*) ;;
               * ) LAPACK_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LAPACK_PATH=$ncbi_fix_dir_tmp ;;
 esac
   CPPFLAGS="-I$LAPACK_PATH/include $CPPFLAGS"
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

for ac_header in lapacke.h lapacke/lapacke.h clapack.h Accelerate/Accelerate.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
   if test "x$as_val" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $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

if test "$ac_cv_header_clapack_h:$ac_cv_header_Accelerate_Accelerate_h" != no:no; then
   ac_fn_cxx_check_type "$LINENO" "__CLPK_integer" "ac_cv_type___CLPK_integer" "#ifdef HAVE_CLAPACK_H
        #  include <clapack.h>
        #else
        #  include <Accelerate/Accelerate.h>
        #endif
"
if test "x$ac_cv_type___CLPK_integer" = x""yes; then :

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


fi

fi

if test "$with_lapack" != "no"; then
    case "$LAPACK_PATH:$with_lapack" in
       *:yes | *: | $with_lapack* ) ;;
       * ) LAPACK_PATH=$with_lapack ;;
    esac
    if test "$LAPACK_PATH" != /usr -a -d "$LAPACK_PATH"; then
       in_path=" in $LAPACK_PATH"
       if test -z "$LAPACK_INCLUDE" -a -d "$LAPACK_PATH/include"; then
          LAPACK_INCLUDE="-I$LAPACK_PATH/include"
       fi
       if test -n "$LAPACK_LIBPATH"; then
          :
       elif test -d "$LAPACK_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 $LAPACK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LAPACK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LAPACK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LAPACK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LAPACK_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 $LAPACK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LAPACK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LAPACK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LAPACK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LAPACK_LIBS="$LAPACK_LIBPATH -llapack -lblas"
    else
       LAPACK_INCLUDE=""
       LAPACK_LIBS="-llapack -lblas"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblapack$in_path" >&5
$as_echo_n "checking for liblapack$in_path... " >&6; }
if ${ncbi_cv_lib_lapack+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LAPACK_INCLUDE $orig_CPPFLAGS"
       LIBS="$LAPACK_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
extern "C" int dsyev_();
int
main ()
{
return dsyev_();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_lapack=yes
else
  ncbi_cv_lib_lapack=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_lapack" >&5
$as_echo "$ncbi_cv_lib_lapack" >&6; }
    if test "$ncbi_cv_lib_lapack" = "no"; then
       if test "${with_lapack:=no}" != no; then
       as_fn_error $? "--with-lapack explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_lapack" = "no"; then
    LAPACK_PATH="No_LAPACK"
    LAPACK_INCLUDE=
    LAPACK_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LAPACK"; WithPackagesSep=" "
    LAPACK_INCLUDE=" $LAPACK_INCLUDE"

$as_echo "#define HAVE_LIBLAPACK 1" >>confdefs.h

 fi




# LMDB
if test "$with_lmdb" != "no"; then
    case "$LMDB_PATH:$with_lmdb" in
       *:yes | *: | $with_lmdb* ) ;;
       * ) LMDB_PATH=$with_lmdb ;;
    esac
    if test "$LMDB_PATH" != /usr -a -d "$LMDB_PATH"; then
       in_path=" in $LMDB_PATH"
       if test -z "$LMDB_INCLUDE" -a -d "$LMDB_PATH/include"; then
          LMDB_INCLUDE="-I$LMDB_PATH/include"
       fi
       if test -n "$LMDB_LIBPATH"; then
          :
       elif test -d "$LMDB_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 $LMDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LMDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LMDB_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LMDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LMDB_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 $LMDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LMDB_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LMDB_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LMDB_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LMDB_LIBS="$LMDB_LIBPATH -llmdb $THREAD_LIBS"
    else
       LMDB_INCLUDE=""
       LMDB_LIBS="-llmdb $THREAD_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblmdb$in_path" >&5
$as_echo_n "checking for liblmdb$in_path... " >&6; }
if ${ncbi_cv_lib_lmdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LMDB_INCLUDE $orig_CPPFLAGS"
       LIBS="$LMDB_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <lmdb.h>
int
main ()
{
MDB_env *env; return mdb_env_create(&env);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_lmdb=yes
else
  ncbi_cv_lib_lmdb=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_lmdb" >&5
$as_echo "$ncbi_cv_lib_lmdb" >&6; }
    if test "$ncbi_cv_lib_lmdb" = "no"; then
       if test "${with_lmdb:=no}" != no; then
       as_fn_error $? "--with-lmdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_lmdb" = "no"; then
    LMDB_PATH="No_LMDB"
    LMDB_INCLUDE=
    LMDB_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LMDB"; WithPackagesSep=" "
    LMDB_INCLUDE=" $LMDB_INCLUDE"

$as_echo "#define HAVE_LIBLMDB 1" >>confdefs.h

 fi



if test -z "$LMDB_LIBS"; then
   lmdblocal=util/lmdb
   { $as_echo "$as_me:${as_lineno-$LINENO}: using local LMDB copy in $lmdblocal" >&5
$as_echo "$as_me: using local LMDB copy in $lmdblocal" >&6;}
   LMDB_PATH="<$lmdblocal>"
   LMDB_INCLUDE="-I\$(includedir)/$lmdblocal -I\$(includedir0)/$lmdblocal"
   # In MT builds, ORIG_LIBS already contains THREAD_LIBS.  However,
   # LMDB is always threaded, and may need explicit THREAD_LIBS when
   # used statically.
   LMDB_LIBS="$THREAD_LIBS"
   # LMDB_LIBS="-llmdb $THREAD_LIBS"
   LMDB_LIB="lmdb"

$as_echo "#define USE_LOCAL_LMDB 1" >>confdefs.h

             WithPackages="$WithPackages${WithPackagesSep}LMDB"; WithPackagesSep=" "
             WithPackages="$WithPackages${WithPackagesSep}LocalLMDB"; WithPackagesSep=" "
fi
if test "$with_lmdb" != no -a -f "$LMDB_PATH/lib/liblmdb-static.a"; then
    LMDB_STATIC_LIBS="-L$LMDB_PATH/lib -llmdb-static"
    if test "x$with_bin_release" = "xyes"; then
       LMDB_LIBS=$LMDB_STATIC_LIBS
    fi
else
    LMDB_STATIC_LIBS=$LMDB_LIBS
fi

# libuv
case "$with_libuv" in
   yes | no | '' ) ;;
   *             ) LIBUV_PATH=$with_libuv ;;
esac
if test -d "$LIBUV_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LIBUV_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBUV_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBUV_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBUV_PATH" in
               /*) ;;
               * ) LIBUV_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBUV_PATH=$ncbi_fix_dir_tmp ;;
 esac
   for d in "$LIBUV_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx/lib" \
            "$LIBUV_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx/lib" \
            "$LIBUV_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx/lib" \
            "$LIBUV_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx/lib" \
            "$LIBUV_PATH/lib$bit64_sfx" "$LIBUV_PATH/lib"; do
      if test -d "$d"; then
         LIBUV_LIBDIR=$d
         ncbi_fix_dir_tmp=`if cd $LIBUV_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBUV_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBUV_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$LIBUV_LIBDIR" in
               /*) ;;
               * ) LIBUV_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBUV_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
         break
      fi
   done
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 $LIBUV_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBUV_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBUV_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBUV_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_libuv" != "no"; then
    case "$LIBUV_PATH:$with_libuv" in
       *:yes | *: | $with_libuv* ) ;;
       * ) LIBUV_PATH=$with_libuv ;;
    esac
    if test "$LIBUV_PATH" != /usr -a -d "$LIBUV_PATH"; then
       in_path=" in $LIBUV_PATH"
       if test -z "$LIBUV_INCLUDE" -a -d "$LIBUV_PATH/include"; then
          LIBUV_INCLUDE="-I$LIBUV_PATH/include"
       fi
       if test -n "$LIBUV_LIBPATH"; then
          :
       elif test -d "$LIBUV_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 $LIBUV_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBUV_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBUV_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBUV_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBUV_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 $LIBUV_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBUV_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBUV_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBUV_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBUV_LIBS="$LIBUV_LIBPATH -luv "
    else
       LIBUV_INCLUDE=""
       LIBUV_LIBS="-luv "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuv$in_path" >&5
$as_echo_n "checking for libuv$in_path... " >&6; }
if ${ncbi_cv_lib_libuv+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBUV_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBUV_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <uv.h>
int
main ()
{
uv_mutex_t m; return uv_mutex_init(&m);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libuv=yes
else
  ncbi_cv_lib_libuv=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libuv" >&5
$as_echo "$ncbi_cv_lib_libuv" >&6; }
    if test "$ncbi_cv_lib_libuv" = "no"; then
       if test "${with_libuv:=no}" != no; then
       as_fn_error $? "--with-libuv explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libuv" = "no"; then
    LIBUV_PATH="No_LIBUV"
    LIBUV_INCLUDE=
    LIBUV_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBUV"; WithPackagesSep=" "
    LIBUV_INCLUDE=" $LIBUV_INCLUDE"

$as_echo "#define HAVE_LIBUV 1" >>confdefs.h

 fi



if test "$with_libuv" != no -a -f "$LIBUV_LIBDIR/libuv-static.a"; then
    LIBUV_STATIC_LIBS="-L$LIBUV_LIBDIR -luv-static"
    if test "x$with_bin_release" = "xyes"; then
       LIBUV_LIBS=$LIBUV_STATIC_LIBS
    fi
else
    LIBUV_STATIC_LIBS=$LIBUV_LIBS
fi

# libssh
case "$with_libssh" in
   yes | no | '' ) ;;
   *             ) LIBSSH_PATH=$with_libssh ;;
esac
if test -d "$LIBSSH_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LIBSSH_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBSSH_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBSSH_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBSSH_PATH" in
               /*) ;;
               * ) LIBSSH_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBSSH_PATH=$ncbi_fix_dir_tmp ;;
 esac
   for d in "$LIBSSH_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx/lib" \
            "$LIBSSH_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx/lib" \
            "$LIBSSH_PATH/$compiler_vpfx$DEBUG_SFX/lib" \
            "$LIBSSH_PATH/$compiler_pfx$DEBUG_SFX/lib" \
            "$LIBSSH_PATH/lib$bit64_sfx" "$LIBSSH_PATH/lib"; do
      if test -d "$d"; then
         LIBSSH_LIBDIR=$d
         ncbi_fix_dir_tmp=`if cd $LIBSSH_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBSSH_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBSSH_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$LIBSSH_LIBDIR" in
               /*) ;;
               * ) LIBSSH_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBSSH_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
         break
      fi
   done
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 $LIBSSH_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_libssh" != "no"; then
    case "$LIBSSH_PATH:$with_libssh" in
       *:yes | *: | $with_libssh* ) ;;
       * ) LIBSSH_PATH=$with_libssh ;;
    esac
    if test "$LIBSSH_PATH" != /usr -a -d "$LIBSSH_PATH"; then
       in_path=" in $LIBSSH_PATH"
       if test -z "$LIBSSH_INCLUDE" -a -d "$LIBSSH_PATH/include"; then
          LIBSSH_INCLUDE="-I$LIBSSH_PATH/include"
       fi
       if test -n "$LIBSSH_LIBPATH"; then
          :
       elif test -d "$LIBSSH_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 $LIBSSH_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBSSH_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 $LIBSSH_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBSSH_LIBS="$LIBSSH_LIBPATH -lssh $OPENSSL_LIBS"
    else
       LIBSSH_INCLUDE=""
       LIBSSH_LIBS="-lssh $OPENSSL_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh$in_path" >&5
$as_echo_n "checking for libssh$in_path... " >&6; }
if ${ncbi_cv_lib_libssh+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBSSH_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBSSH_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libssh/libssh.h>
int
main ()
{
return ssh_init();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libssh=yes
else
  ncbi_cv_lib_libssh=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libssh" >&5
$as_echo "$ncbi_cv_lib_libssh" >&6; }
    if test "$ncbi_cv_lib_libssh" = "no"; then
       if test "${with_libssh:=no}" != no; then
       as_fn_error $? "--with-libssh explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libssh" = "no"; then
    LIBSSH_PATH="No_LIBSSH"
    LIBSSH_INCLUDE=
    LIBSSH_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBSSH"; WithPackagesSep=" "
    LIBSSH_INCLUDE=" $LIBSSH_INCLUDE"

$as_echo "#define HAVE_LIBSSH 1" >>confdefs.h

 fi



if test "$with_libssh" != no -a -f "$LIBSSH_LIBDIR/libssh-static.a"; then
    LIBSSH_STATIC_LIBS="-L$LIBSSH_LIBDIR -lssh-static $OPENSSL_LIBS"
else
    LIBSSH_STATIC_LIBS=$LIBSSH_LIBS
fi

# libssh2
case "$with_libssh2" in
   yes | no | '' ) ;;
   *             ) LIBSSH2_PATH=$with_libssh2 ;;
esac
if test -d "$LIBSSH2_PATH"; then
   ncbi_fix_dir_tmp=`if cd $LIBSSH2_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBSSH2_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBSSH2_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBSSH2_PATH" in
               /*) ;;
               * ) LIBSSH2_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBSSH2_PATH=$ncbi_fix_dir_tmp ;;
 esac
   for d in "$LIBSSH2_PATH/$compiler_vpfx$DEBUG_SFX$bit64_sfx/lib" \
            "$LIBSSH2_PATH/$compiler_pfx$DEBUG_SFX$bit64_sfx/lib" \
            "$LIBSSH2_PATH/$compiler_vpfx$DEBUG_SFX/lib" \
            "$LIBSSH2_PATH/$compiler_pfx$DEBUG_SFX/lib" \
            "$LIBSSH2_PATH/lib$bit64_sfx" "$LIBSSH2_PATH/lib"; do
      if test -d "$d"; then
         LIBSSH2_LIBDIR=$d
         ncbi_fix_dir_tmp=`if cd $LIBSSH2_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBSSH2_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBSSH2_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$LIBSSH2_LIBDIR" in
               /*) ;;
               * ) LIBSSH2_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBSSH2_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
         break
      fi
   done
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 $LIBSSH2_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH2_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_libssh2" != "no"; then
    case "$LIBSSH2_PATH:$with_libssh2" in
       *:yes | *: | $with_libssh2* ) ;;
       * ) LIBSSH2_PATH=$with_libssh2 ;;
    esac
    if test "$LIBSSH2_PATH" != /usr -a -d "$LIBSSH2_PATH"; then
       in_path=" in $LIBSSH2_PATH"
       if test -z "$LIBSSH2_INCLUDE" -a -d "$LIBSSH2_PATH/include"; then
          LIBSSH2_INCLUDE="-I$LIBSSH2_PATH/include"
       fi
       if test -n "$LIBSSH2_LIBPATH"; then
          :
       elif test -d "$LIBSSH2_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 $LIBSSH2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBSSH2_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 $LIBSSH2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBSSH2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBSSH2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBSSH2_LIBS="$LIBSSH2_LIBPATH -lssh2 $OPENSSL_LIBS"
    else
       LIBSSH2_INCLUDE=""
       LIBSSH2_LIBS="-lssh2 $OPENSSL_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2$in_path" >&5
$as_echo_n "checking for libssh2$in_path... " >&6; }
if ${ncbi_cv_lib_libssh2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBSSH2_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBSSH2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libssh2.h>
int
main ()
{
return libssh2_init(LIBSSH2_INIT_NO_CRYPTO);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libssh2=yes
else
  ncbi_cv_lib_libssh2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libssh2" >&5
$as_echo "$ncbi_cv_lib_libssh2" >&6; }
    if test "$ncbi_cv_lib_libssh2" = "no"; then
       if test "${with_libssh2:=no}" != no; then
       as_fn_error $? "--with-libssh2 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libssh2" = "no"; then
    LIBSSH2_PATH="No_LIBSSH2"
    LIBSSH2_INCLUDE=
    LIBSSH2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBSSH2"; WithPackagesSep=" "
    LIBSSH2_INCLUDE=" $LIBSSH2_INCLUDE"

$as_echo "#define HAVE_LIBSSH2 1" >>confdefs.h

 fi



if test "$with_libssh2" != no -a -f "$LIBSSH2_LIBDIR/libssh2-static.a"; then
    LIBSSH2_STATIC_LIBS="-L$LIBSSH2_LIBDIR -lssh2-static $OPENSSL_LIBS"
else
    LIBSSH2_STATIC_LIBS=$LIBSSH2_LIBS
fi

# Datastax Cassandra driver
case "$with_cassandra" in
   yes | no | '' ) ;;
   *             ) CASSANDRA_PATH=$with_cassandra ;;
esac
if test -d "$CASSANDRA_PATH"; then
   CASSANDRA_ARCH_PATH=$CASSANDRA_PATH
for d in "$CASSANDRA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CASSANDRA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CASSANDRA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$CASSANDRA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      CASSANDRA_ARCH_PATH=$d
      break
   fi
done
   CASSANDRA_PATH=$CASSANDRA_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $CASSANDRA_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CASSANDRA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CASSANDRA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CASSANDRA_PATH" in
               /*) ;;
               * ) CASSANDRA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CASSANDRA_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_cassandra" != "no"; then
    case "$CASSANDRA_PATH:$with_cassandra" in
       *:yes | *: | $with_cassandra* ) ;;
       * ) CASSANDRA_PATH=$with_cassandra ;;
    esac
    if test "$CASSANDRA_PATH" != /usr -a -d "$CASSANDRA_PATH"; then
       in_path=" in $CASSANDRA_PATH"
       if test -z "$CASSANDRA_INCLUDE" -a -d "$CASSANDRA_PATH/include"; then
          CASSANDRA_INCLUDE="-I$CASSANDRA_PATH/include"
       fi
       if test -n "$CASSANDRA_LIBPATH"; then
          :
       elif test -d "$CASSANDRA_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 $CASSANDRA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CASSANDRA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CASSANDRA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CASSANDRA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$CASSANDRA_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 $CASSANDRA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CASSANDRA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CASSANDRA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CASSANDRA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       CASSANDRA_LIBS="$CASSANDRA_LIBPATH -lcassandra $LIBUV_LIBS $KRB5_LIBS"
    else
       CASSANDRA_INCLUDE=""
       CASSANDRA_LIBS="-lcassandra $LIBUV_LIBS $KRB5_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcassandra$in_path" >&5
$as_echo_n "checking for libcassandra$in_path... " >&6; }
if ${ncbi_cv_lib_cassandra+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $CASSANDRA_INCLUDE $orig_CPPFLAGS"
       LIBS="$CASSANDRA_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cassandra.h>
int
main ()
{
CassCluster* c = cass_cluster_new();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_cassandra=yes
else
  ncbi_cv_lib_cassandra=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_cassandra" >&5
$as_echo "$ncbi_cv_lib_cassandra" >&6; }
    if test "$ncbi_cv_lib_cassandra" = "no"; then
       if test "${with_cassandra:=no}" != no; then
       as_fn_error $? "--with-cassandra explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_cassandra" = "no"; then
    CASSANDRA_PATH="No_CASSANDRA"
    CASSANDRA_INCLUDE=
    CASSANDRA_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}CASSANDRA"; WithPackagesSep=" "
    CASSANDRA_INCLUDE=" $CASSANDRA_INCLUDE"

$as_echo "#define HAVE_LIBCASSANDRA 1" >>confdefs.h

 fi



if test "$with_cassandra" != no -a \
     -f "$CASSANDRA_PATH/lib/libcassandra_static.a"; then
    CASSANDRA_STATIC_LIBS="-L$CASSANDRA_PATH/lib -lcassandra_static $LIBUV_STATIC_LIBS $KRB5_LIBS"
else
    CASSANDRA_STATIC_LIBS=$CASSANDRA_LIBS
fi

# HTTP/2 libraries
case "$with_nghttp2" in
   yes | no | '' ) ;;
   *             ) NGHTTP2_PATH=$with_nghttp2 ;;
esac
if test -d "$NGHTTP2_PATH"; then
   ncbi_fix_dir_tmp=`if cd $NGHTTP2_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NGHTTP2_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NGHTTP2_PATH=$ncbi_fix_dir_tmp2
         else
            case "$NGHTTP2_PATH" in
               /*) ;;
               * ) NGHTTP2_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NGHTTP2_PATH=$ncbi_fix_dir_tmp ;;
 esac
   NGHTTP2_ARCH_PATH=$NGHTTP2_PATH
for d in "$NGHTTP2_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$NGHTTP2_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$NGHTTP2_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$NGHTTP2_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      NGHTTP2_ARCH_PATH=$d
      break
   fi
done
   NGHTTP2_LIBDIR=$NGHTTP2_ARCH_PATH/lib
   ncbi_fix_dir_tmp=`if cd $NGHTTP2_LIBDIR; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NGHTTP2_LIBDIR && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NGHTTP2_LIBDIR=$ncbi_fix_dir_tmp2
         else
            case "$NGHTTP2_LIBDIR" in
               /*) ;;
               * ) NGHTTP2_LIBDIR=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NGHTTP2_LIBDIR=$ncbi_fix_dir_tmp ;;
 esac
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 $NGHTTP2_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGHTTP2_LIBDIR; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
if test "$with_nghttp2" != "no"; then
    case "$NGHTTP2_PATH:$with_nghttp2" in
       *:yes | *: | $with_nghttp2* ) ;;
       * ) NGHTTP2_PATH=$with_nghttp2 ;;
    esac
    if test "$NGHTTP2_PATH" != /usr -a -d "$NGHTTP2_PATH"; then
       in_path=" in $NGHTTP2_PATH"
       if test -z "$NGHTTP2_INCLUDE" -a -d "$NGHTTP2_PATH/include"; then
          NGHTTP2_INCLUDE="-I$NGHTTP2_PATH/include"
       fi
       if test -n "$NGHTTP2_LIBPATH"; then
          :
       elif test -d "$NGHTTP2_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 $NGHTTP2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGHTTP2_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$NGHTTP2_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 $NGHTTP2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $NGHTTP2_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    NGHTTP2_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       NGHTTP2_LIBS="$NGHTTP2_LIBPATH -lnghttp2 "
    else
       NGHTTP2_INCLUDE=""
       NGHTTP2_LIBS="-lnghttp2 "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2$in_path" >&5
$as_echo_n "checking for libnghttp2$in_path... " >&6; }
if ${ncbi_cv_lib_nghttp2+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $NGHTTP2_INCLUDE $orig_CPPFLAGS"
       LIBS="$NGHTTP2_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nghttp2/nghttp2.h>
int
main ()
{
nghttp2_error_callback cb;
         const char* s = nghttp2_http2_strerror(NGHTTP2_ERR_EOF);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_nghttp2=yes
else
  ncbi_cv_lib_nghttp2=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_nghttp2" >&5
$as_echo "$ncbi_cv_lib_nghttp2" >&6; }
    if test "$ncbi_cv_lib_nghttp2" = "no"; then
       if test "${with_nghttp2:=no}" != no; then
       as_fn_error $? "--with-nghttp2 explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_nghttp2" = "no"; then
    NGHTTP2_PATH="No_NGHTTP2"
    NGHTTP2_INCLUDE=
    NGHTTP2_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}NGHTTP2"; WithPackagesSep=" "
    NGHTTP2_INCLUDE=" $NGHTTP2_INCLUDE"

$as_echo "#define HAVE_LIBNGHTTP2 1" >>confdefs.h

 fi



if test "$with_nghttp2" != no -a \
     -f "$NGHTTP2_LIBDIR/libnghttp2-static.a"; then
   NGHTTP2_STATIC_LIBS="-L$NGHTTP2_LIBDIR -lnghttp2-static"
   if test "x$with_bin_release" = "xyes"; then
      NGHTTP2_LIBS=$NGHTTP2_STATIC_LIBS
   fi
else
   NGHTTP2_STATIC_LIBS=$NGHTTP2_LIBS
fi

case "$with_h2o" in
   yes | no | '' ) ;;
   *             ) H2O_PATH=$with_h2o ;;
esac
if test -d "$H2O_PATH"; then
   H2O_ARCH_PATH=$H2O_PATH
for d in "$H2O_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$H2O_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$H2O_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$H2O_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      H2O_ARCH_PATH=$d
      break
   fi
done
   H2O_PATH=$H2O_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $H2O_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $H2O_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            H2O_PATH=$ncbi_fix_dir_tmp2
         else
            case "$H2O_PATH" in
               /*) ;;
               * ) H2O_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) H2O_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_h2o" != "no"; then
    case "$H2O_PATH:$with_h2o" in
       *:yes | *: | $with_h2o* ) ;;
       * ) H2O_PATH=$with_h2o ;;
    esac
    if test "$H2O_PATH" != /usr -a -d "$H2O_PATH"; then
       in_path=" in $H2O_PATH"
       if test -z "$H2O_INCLUDE" -a -d "$H2O_PATH/include"; then
          H2O_INCLUDE="-I$H2O_PATH/include"
       fi
       if test -n "$H2O_LIBPATH"; then
          :
       elif test -d "$H2O_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 $H2O_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    H2O_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $H2O_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    H2O_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$H2O_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 $H2O_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    H2O_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $H2O_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    H2O_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       H2O_LIBS="$H2O_LIBPATH -lh2o $LIBUV_LIBS $OPENSSL_LIBS $Z_LIBS"
    else
       H2O_INCLUDE=""
       H2O_LIBS="-lh2o $LIBUV_LIBS $OPENSSL_LIBS $Z_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libh2o$in_path" >&5
$as_echo_n "checking for libh2o$in_path... " >&6; }
if ${ncbi_cv_lib_h2o+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$LIBUV_INCLUDE $H2O_INCLUDE $orig_CPPFLAGS"
       LIBS="$H2O_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <h2o.h>>
int
main ()
{
h2o_init_request(NULL, NULL, NULL);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_h2o=yes
else
  ncbi_cv_lib_h2o=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_h2o" >&5
$as_echo "$ncbi_cv_lib_h2o" >&6; }
    if test "$ncbi_cv_lib_h2o" = "no"; then
       if test "${with_h2o:=no}" != no; then
       as_fn_error $? "--with-h2o explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_h2o" = "no"; then
    H2O_PATH="No_H2O"
    H2O_INCLUDE=
    H2O_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}H2O"; WithPackagesSep=" "
    H2O_INCLUDE="$LIBUV_INCLUDE $H2O_INCLUDE"

$as_echo "#define HAVE_LIBH2O 1" >>confdefs.h

 fi



if test "$with_h2o" != no -a \
     -f "$H2O_PATH/lib/libh2o-static.a"; then
    H2O_STATIC_LIBS="-L$H2O_PATH/lib -lh2o-static $LIBUV_STATIC_LIBS $OPENSSL_LIBS $Z_LIBS"
else
    H2O_STATIC_LIBS=$H2O_LIBS
fi

case "$with_influxdb" in
   yes | '' ) ;;
   no       ) ncbi_cv_lib_influxdb=no ;;
   *        ) INFLUXDB_PATH=$with_influxdb ;;
esac
if test -d "$INFLUXDB_PATH"; then
   INFLUXDB_INCLUDE=-I$INFLUXDB_PATH/include
   in_path=" in $INFLUXDB_PATH"
else
   in_path=
fi
CPPFLAGS="$orig_CPPFLAGS $INFLUXDB_INCLUDE"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for influxdb-cpp$in_path" >&5
$as_echo_n "checking for influxdb-cpp$in_path... " >&6; }
if ${ncbi_cv_lib_influxdb+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <influxdb.hpp>
int
main ()
{
auto& b = influxdb_cpp::builder().meas("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_lib_influxdb=yes
else
  ncbi_cv_lib_influxdb=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_influxdb" >&5
$as_echo "$ncbi_cv_lib_influxdb" >&6; }
if test $ncbi_cv_lib_influxdb = yes; then
             WithPackages="$WithPackages${WithPackagesSep}INFLUXDB"; WithPackagesSep=" "
else
   INFLUXDB_INCLUDE=
   if test "${with_influxdb:=no}" != no; then
       as_fn_error $? "--with-influxdb explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi


if test "$with_libxlsxwriter" != "no"; then
    case "$LIBXLSXWRITER_PATH:$with_libxlsxwriter" in
       *:yes | *: | $with_libxlsxwriter* ) ;;
       * ) LIBXLSXWRITER_PATH=$with_libxlsxwriter ;;
    esac
    if test "$LIBXLSXWRITER_PATH" != /usr -a -d "$LIBXLSXWRITER_PATH"; then
       in_path=" in $LIBXLSXWRITER_PATH"
       if test -z "$LIBXLSXWRITER_INCLUDE" -a -d "$LIBXLSXWRITER_PATH/include"; then
          LIBXLSXWRITER_INCLUDE="-I$LIBXLSXWRITER_PATH/include"
       fi
       if test -n "$LIBXLSXWRITER_LIBPATH"; then
          :
       elif test -d "$LIBXLSXWRITER_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 $LIBXLSXWRITER_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBXLSXWRITER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBXLSXWRITER_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBXLSXWRITER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBXLSXWRITER_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 $LIBXLSXWRITER_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBXLSXWRITER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBXLSXWRITER_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBXLSXWRITER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBXLSXWRITER_LIBS="$LIBXLSXWRITER_LIBPATH -lxlsxwriter "
    else
       LIBXLSXWRITER_INCLUDE=""
       LIBXLSXWRITER_LIBS="-lxlsxwriter "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxlsxwriter$in_path" >&5
$as_echo_n "checking for libxlsxwriter$in_path... " >&6; }
if ${ncbi_cv_lib_libxlsxwriter+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBXLSXWRITER_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBXLSXWRITER_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <xlsxwriter.h>
int
main ()
{
lxw_workbook* wb = workbook_new("conftest.xlsx");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_libxlsxwriter=yes
else
  ncbi_cv_lib_libxlsxwriter=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_libxlsxwriter" >&5
$as_echo "$ncbi_cv_lib_libxlsxwriter" >&6; }
    if test "$ncbi_cv_lib_libxlsxwriter" = "no"; then
       if test "${with_libxlsxwriter:=no}" != no; then
       as_fn_error $? "--with-libxlsxwriter explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_libxlsxwriter" = "no"; then
    LIBXLSXWRITER_PATH="No_LIBXLSXWRITER"
    LIBXLSXWRITER_INCLUDE=
    LIBXLSXWRITER_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBXLSXWRITER"; WithPackagesSep=" "
    LIBXLSXWRITER_INCLUDE=" $LIBXLSXWRITER_INCLUDE"

$as_echo "#define HAVE_LIBXLSXWRITER 1" >>confdefs.h

 fi



if test "$with_libxlsxwriter" != no -a \
     -f "$LIBXLSXWRITER_PATH/lib/libxlsxwriter-static.a"; then
    LIBXLSXWRITER_STATIC_LIBS="-L$LIBXLSXWRITER_PATH/lib -lxlsxwriter-static"
else
    LIBXLSXWRITER_STATIC_LIBS=$LIBXLSXWRITER_LIBS
fi

case "$with_grpc" in
   yes | no | '' ) ;;
   *             ) GRPC_PATH=$with_grpc ;;
esac
if test -d "$GRPC_PATH"; then
   ncbi_fix_dir_tmp=`if cd $GRPC_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GRPC_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GRPC_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GRPC_PATH" in
               /*) ;;
               * ) GRPC_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GRPC_PATH=$ncbi_fix_dir_tmp ;;
 esac
   for d in "$GRPC_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx$asan_sfx" \
            "$GRPC_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx$asan_sfx" \
            "$GRPC_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$asan_sfx" \
            "$GRPC_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$asan_sfx" \
            "$GRPC_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
            "$GRPC_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
            "$GRPC_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
            "$GRPC_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
      if test -d "$d"; then
         GRPC_PATH=$d
         ncbi_fix_dir_tmp=`if cd $GRPC_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GRPC_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GRPC_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GRPC_PATH" in
               /*) ;;
               * ) GRPC_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GRPC_PATH=$ncbi_fix_dir_tmp ;;
 esac
         break
      fi
   done
fi

: ${PROTOBUF_PATH=$GRPC_PATH}

PROTOBUF_SFX=
if test -n "$D_SFX"; then
   if ls $PROTOBUF_PATH/lib*/libprotobuf$D_SFX.* >/dev/null 2>&1; then
      PROTOBUF_SFX=$D_SFX
   else
      for ext in a so dylib; do
         path=`$CXX -B$PROTOBUF_PATH/ -print-file-name=libprotobuf$D_SFX.$ext \
               2>/dev/null`
         case "$path" in
            */* ) PROTOBUF_SFX=$D_SFX; break ;;
         esac
      done
   fi
fi
pb_pc=pkg-config
if test -n "$PROTOBUF_PATH"; then
   for d in "$PROTOBUF_PATH/lib$bit64_sfx" "$PROTOBUF_PATH/lib"; do
      if test -d "$d/pkgconfig"; then
         pb_pc="env PKG_CONFIG_PATH=$d/pkgconfig pkg-config"
         break
      fi
   done
fi
xpb_pc=$pb_pc
if $pb_pc protobuf --modversion 2>/dev/null; then
   # Avoid a hang observed with pkg-config 0.27.1 (as on CentOS 7)
   # and post-2022 Abseil versions.
   case "`$pb_pc --version`:`$pb_pc protobuf --modversion`" in
      0.2[89]* | 0.[3-9][0-9]* | 0.[1-9][0-9][0-9]* | [1-9]* \
      | *:20[01]* | *:202[0-2]* )
         pb_sed="s/\$/ /; s/\(-lprotobuf\) /\1$PROTOBUF_SFX /; s/ \$//"
         PROTOBUF_CONFIG_LIBS="`$pb_pc protobuf --libs | sed -e \"$pb_sed\"`"
         ;;
      * )
         pb_pc=
         ;;
   esac
else
   pb_pc=
fi
if test -z "$pb_pc"; then
   PROTOBUF_CONFIG_LIBS=-lprotobuf$PROTOBUF_SFX
   for l in absl_log_internal_check_op absl_leak_check absl_die_if_null \
            absl_log_internal_conditions absl_log_internal_message \
            absl_examine_stack absl_log_internal_format \
            absl_log_internal_proto absl_log_internal_nullguard \
            absl_log_internal_log_sink_set absl_log_sink absl_log_entry \
            absl_flags absl_flags_internal absl_flags_marshalling \
            absl_flags_reflection absl_flags_private_handle_accessor \
            absl_flags_commandlineflag absl_flags_commandlineflag_internal \
            absl_flags_config absl_flags_program_name absl_log_initialize \
            absl_log_globals absl_log_internal_globals absl_raw_hash_set \
            absl_hash absl_city absl_low_level_hash absl_hashtablez_sampler \
            absl_statusor absl_status absl_cord absl_cordz_info \
            absl_cord_internal absl_cordz_functions absl_exponential_biased \
            absl_cordz_handle absl_crc_cord_state absl_crc32c \
            absl_crc_internal absl_crc_cpu_detect absl_bad_optional_access \
            absl_str_format_internal absl_strerror absl_synchronization \
            absl_graphcycles_internal absl_kernel_timeout_internal \
            absl_stacktrace absl_symbolize absl_debugging_internal \
            absl_demangle_internal absl_malloc_internal absl_time \
            absl_civil_time absl_time_zone absl_bad_variant_access \
            utf8_validity utf8_range absl_strings absl_string_view \
            absl_strings_internal absl_base absl_spinlock_wait absl_int128 \
            absl_throw_delegate absl_raw_logging_internal absl_log_severity
   do
      if test -f $PROTOBUF_PATH/lib${bit64_sfx}/lib$l.a \
           -o -f $PROTOBUF_PATH/lib/lib$l.a; then
         PROTOBUF_CONFIG_LIBS="$PROTOBUF_CONFIG_LIBS -l$l"
      fi
   done
fi

if test "$with_protobuf" != "no"; then
    case "$PROTOBUF_PATH:$with_protobuf" in
       *:yes | *: | $with_protobuf* ) ;;
       * ) PROTOBUF_PATH=$with_protobuf ;;
    esac
    if test "$PROTOBUF_PATH" != /usr -a -d "$PROTOBUF_PATH"; then
       in_path=" in $PROTOBUF_PATH"
       if test -z "$PROTOBUF_INCLUDE" -a -d "$PROTOBUF_PATH/include"; then
          PROTOBUF_INCLUDE="-I$PROTOBUF_PATH/include"
       fi
       if test -n "$PROTOBUF_LIBPATH"; then
          :
       elif test -d "$PROTOBUF_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 $PROTOBUF_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PROTOBUF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PROTOBUF_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PROTOBUF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$PROTOBUF_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 $PROTOBUF_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    PROTOBUF_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $PROTOBUF_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    PROTOBUF_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       PROTOBUF_LIBS="$PROTOBUF_LIBPATH -lprotobuf$PROTOBUF_SFX $PROTOBUF_CONFIG_LIBS"
    else
       PROTOBUF_INCLUDE=""
       PROTOBUF_LIBS="-lprotobuf$PROTOBUF_SFX $PROTOBUF_CONFIG_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libprotobuf$PROTOBUF_SFX$in_path" >&5
$as_echo_n "checking for libprotobuf$PROTOBUF_SFX$in_path... " >&6; }
if ${ncbi_cv_lib_protobuf+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $PROTOBUF_INCLUDE $orig_CPPFLAGS"
       LIBS="$PROTOBUF_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <google/protobuf/type.pb.h>
int
main ()
{
google::protobuf::Type t;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_protobuf=yes
else
  ncbi_cv_lib_protobuf=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_protobuf" >&5
$as_echo "$ncbi_cv_lib_protobuf" >&6; }
    if test "$ncbi_cv_lib_protobuf" = "no"; then
       if test "${with_protobuf:=no}" != no; then
       as_fn_error $? "--with-protobuf explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_protobuf" = "no"; then
    PROTOBUF_PATH="No_PROTOBUF"
    PROTOBUF_INCLUDE=
    PROTOBUF_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}PROTOBUF"; WithPackagesSep=" "
    PROTOBUF_INCLUDE=" $PROTOBUF_INCLUDE"

$as_echo "#define HAVE_LIBPROTOBUF 1" >>confdefs.h

 fi



if test -n "$PROTOBUF_LIBS"; then
   # Extract the first word of "protoc", so it can be a program name with args.
set dummy protoc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PROTOC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PROTOC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PROTOBUF_PATH/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PROTOC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PROTOC=$ac_cv_path_PROTOC
if test -n "$PROTOC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5
$as_echo "$PROTOC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   if test ! -x "$PROTOC"; then
      if test "${with_grpc:=no}" != no; then
       as_fn_error $? "--with-grpc explicitly specified, but no usable version found." "$LINENO" 5
    fi
      if test "${with_protobuf:=no}" != no; then
       as_fn_error $? "--with-protobuf explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
   PROTOBUF_BIN=`dirname $PROTOC`
else
   if test "${with_grpc:=no}" != no; then
       as_fn_error $? "--with-grpc explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi

grpc_pc=pkg-config
if test -n "$GRPC_PATH"; then
   for d in "$GRPC_PATH/lib$bit64_sfx" "$GRPC_PATH/lib"; do
      if test -d "$d/pkgconfig"; then
         if test -n "$xpb_pc" -a "$GRPC_PATH" != "$PROTOBUF_PATH"; then
            grpc_pc="`echo $xpb_pc | sed -e \"s,=,=$d/pkgconfig:,\"`"
         else
            grpc_pc="env PKG_CONFIG_PATH=$d/pkgconfig pkg-config"
         fi
         break
      fi
   done
fi
xgrpc_pc=$grpc_pc
if test -n "$pb_pc"  &&  $grpc_pc grpc++ --exists 2>/dev/null; then
   grpc_b_flags=`$grpc_pc grpc++ --libs-only-L | sed -e 's/^/ /; s/ -L/ -B/'`
   if test \! -f "`$CXX $grpc_b_flags -print-file-name=libgrpc++.so \
                   2>/dev/null`" \
      -a \! -f "`$CXX $grpc_b_flags -print-file-name=libgrpc++.dylib \
                 2>/dev/null`"; then
      grpc_pc="$grpc_pc --static"
   fi
   GRPC_SED="sed -e \"$pb_sed\""
   if test -f "$GRPC_PATH/lib/libboringssl.a"; then
      GRPC_SED="$GRPC_SED -e s/-lssl/-lboringssl/g"
      GRPC_SED="$GRPC_SED -e s/-lcrypto/-lboringcrypto/g"
   fi
   if test -f /usr/lib/libssl.dylib -a \
             x"`$grpc_pc grpc++ --variable=prefix`" != x/sw; then
      GRPC_SED="$GRPC_SED -e s,-L/sw/lib,,"
   fi
   GRPC_CONFIG_LIBS="`$grpc_pc grpc++ grpc protobuf --libs | eval $GRPC_SED`"
else
   grpc_pc=
   GRPC_CONFIG_LIBS="-lgrpc -lgpr"
   if test "$PROTOBUF_PATH" != "$GRPC_PATH"; then
      GRPC_CONFIG_LIBS="$GRPC_CONFIG_LIBS $PROTOBUF_LIBPATH"
   fi
   for l in address_sorting upb upb_textformat_lib upb_json_lib \
            upb_collections_lib utf8_range_lib absl_random_distributions \
            absl_random_seed_sequences absl_random_internal_pool_urbg \
            absl_random_internal_randen absl_random_internal_randen_hwaes \
            absl_random_internal_randen_hwaes_impl \
            absl_random_internal_randen_slow absl_random_internal_platform \
            absl_random_internal_seed_material absl_random_seed_gen_exception
   do
      if test -f $GRPC_PATH/lib${bit64_sfx}/lib$l.a \
           -o -f $GRPC_PATH/lib/lib$l.a \
           -o -f $PROTOBUF_PATH/lib${bit64_sfx}/lib$l.a \
           -o -f $PROTOBUF_PATH/lib/lib$l.a; then
         GRPC_CONFIG_LIBS="$GRPC_CONFIG_LIBS -l$l"
      fi
   done
   GRPC_CONFIG_LIBS="$GRPC_CONFIG_LIBS $PROTOBUF_CONFIG_LIBS"

   if test -n "$GRPC_PATH"; then
      in_path=" in $GRPC_PATH"
      CPPFLAGS="-I$GRPC_PATH/include $orig_CPPFLAGS"
      LIBS="$PROTOBUF_LIBPATH -L$GRPC_PATH/lib$bit64_sfx -L$GRPC_PATH/lib -lcares"
      LIBS="$LIBS $orig_LIBS"
   else
      LIBS="-lcares $orig_LIBS"
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcares$in_path" >&5
$as_echo_n "checking for libcares$in_path... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ares.h>
int
main ()
{
ares_library_init(0);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  CARES_LIBS=-lcares; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  CARES_LIBS=; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

   if test -n "$GRPC_PATH"; then
      LIBS="$PROTOBUF_LIBPATH -L$GRPC_PATH/lib$bit64_sfx -L$GRPC_PATH/lib -lre2"
      LIBS="$LIBS $orig_LIBS"
   else
      LIBS="-lre2 $orig_LIBS"
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libre2$in_path" >&5
$as_echo_n "checking for libre2$in_path... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <re2/re2.h>
int
main ()
{
re2::RE2 rx("foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  RE2_LIBS=-lre2; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  RE2_LIBS=; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

   GRPC_CONFIG_LIBS="$GRPC_CONFIG_LIBS $CARES_LIBS $RE2_LIBS"

   if test -f "$GRPC_PATH/lib/libboringssl.a"; then
      GRPC_LDEP="-lboringssl -lboringcrypto"
   else
      GRPC_LDEP=$OPENSSL_LIBS
   fi
fi
# In MT builds, ORIG_LIBS already contains THREAD_LIBS.  However,
# GRPC is always threaded, and may need explicit THREAD_LIBS when
# used statically.
if test "$with_mt" = no; then
   GRPC_LDEP="$GRPC_LDEP $THREAD_LIBS"
fi

if test "$with_grpc" != "no"; then
    case "$GRPC_PATH:$with_grpc" in
       *:yes | *: | $with_grpc* ) ;;
       * ) GRPC_PATH=$with_grpc ;;
    esac
    if test "$GRPC_PATH" != /usr -a -d "$GRPC_PATH"; then
       in_path=" in $GRPC_PATH"
       if test -z "$GRPC_INCLUDE" -a -d "$GRPC_PATH/include"; then
          GRPC_INCLUDE="-I$GRPC_PATH/include"
       fi
       if test -n "$GRPC_LIBPATH"; then
          :
       elif test -d "$GRPC_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 $GRPC_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GRPC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GRPC_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GRPC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GRPC_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 $GRPC_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GRPC_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GRPC_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GRPC_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GRPC_LIBS="$GRPC_LIBPATH -lgrpc++ ${GRPC_CONFIG_LIBS--lgrpc -lgpr $CARES_LIBS $GRPC_LDEP}"
    else
       GRPC_INCLUDE=""
       GRPC_LIBS="-lgrpc++ ${GRPC_CONFIG_LIBS--lgrpc -lgpr $CARES_LIBS $GRPC_LDEP}"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgrpc++$in_path" >&5
$as_echo_n "checking for libgrpc++$in_path... " >&6; }
if ${ncbi_cv_lib_grpc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$PROTOBUF_INCLUDE $GRPC_INCLUDE $orig_CPPFLAGS"
       LIBS="$GRPC_LIBS $PROTOBUF_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <grpc++/grpc++.h>
int
main ()
{
return grpc::Version().size();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_grpc=yes
else
  ncbi_cv_lib_grpc=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_grpc" >&5
$as_echo "$ncbi_cv_lib_grpc" >&6; }
    if test "$ncbi_cv_lib_grpc" = "no"; then
       if test "${with_grpc:=no}" != no; then
       as_fn_error $? "--with-grpc explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_grpc" = "no"; then
    GRPC_PATH="No_GRPC"
    GRPC_INCLUDE=
    GRPC_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GRPC"; WithPackagesSep=" "
    GRPC_INCLUDE="$PROTOBUF_INCLUDE $GRPC_INCLUDE"

$as_echo "#define HAVE_LIBGRPC 1" >>confdefs.h

 fi



if test -n "$GRPC_LIBS"; then
   if test -n "$grpc_pc"; then
      GRPC_UNSECURE_LIBS="`$grpc_pc grpc++_unsecure grpc_unsecure protobuf \
                           --libs`"
   else
      GRPC_LIBS="$GRPC_LIBPATH -lgrpc++ $GRPC_CONFIG_LIBS $GRPC_LDEP"
      GRPC_UNSECURE_LIBS=
      sep=
      for x in $GRPC_LIBS; do
         case "$x" in
            -lgrpc* )
                GRPC_UNSECURE_LIBS="$GRPC_UNSECURE_LIBS$sep${x}_unsecure"
                sep=' '
                ;;
            -lboring* | -lssl | -lcrypto )
                ;;
             * )
                GRPC_UNSECURE_LIBS="$GRPC_UNSECURE_LIBS $x"
                sep=' '
                ;;
         esac
      done
   fi
   GRPC_REFLECTION_LIBS="$WHOLE_ARCHIVE $NO_AS_NEEDED $GRPC_LIBPATH"
   GRPC_REFLECTION_LIBS="$GRPC_REFLECTION_LIBS -lgrpc++_reflection"
   GRPC_REFLECTION_LIBS="$GRPC_REFLECTION_LIBS $NO_WHOLE_ARCHIVE $AS_NEEDED"
   # Extract the first word of "grpc_cpp_plugin", so it can be a program name with args.
set dummy grpc_cpp_plugin; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GRPC_CPP_PLUGIN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GRPC_CPP_PLUGIN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GRPC_CPP_PLUGIN="$GRPC_CPP_PLUGIN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$GRPC_PATH/bin:$PROTOBUF_PATH/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GRPC_CPP_PLUGIN="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
GRPC_CPP_PLUGIN=$ac_cv_path_GRPC_CPP_PLUGIN
if test -n "$GRPC_CPP_PLUGIN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRPC_CPP_PLUGIN" >&5
$as_echo "$GRPC_CPP_PLUGIN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   if test ! -x "$GRPC_CPP_PLUGIN"; then
      if test "${with_grpc:=no}" != no; then
       as_fn_error $? "--with-grpc explicitly specified, but no usable version found." "$LINENO" 5
    fi
   fi
   GRPC_BIN=`dirname $GRPC_CPP_PLUGIN`
fi

case "$with_msgsl" in
   yes | '' ) ;;
   no       ) ncbi_cv_lib_msgsl=no ;;
   *        ) MSGSL_PATH=$with_msgsl ;;
esac
if test -d "$MSGSL_PATH"; then
   MSGSL_INCLUDE=-I$MSGSL_PATH/include
   in_path=" in $MSGSL_PATH"
else
   in_path=
fi
CPPFLAGS="$orig_CPPFLAGS $MSGSL_INCLUDE"
for ac_header in gsl/gsl
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "gsl/gsl" "ac_cv_header_gsl_gsl" "$ac_includes_default"
if test "x$ac_cv_header_gsl_gsl" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GSL_GSL 1
_ACEOF
           WithPackages="$WithPackages${WithPackagesSep}MSGSL"; WithPackagesSep=" "
else
  MSGSL_INCLUDE=; if test "${with_msgsl:=no}" != no; then
       as_fn_error $? "--with-msgsl explicitly specified, but no usable version found." "$LINENO" 5
    fi
fi

done


case "$with_aws_sdk" in
   yes | no | '' ) ;;
   *             ) AWS_SDK_PATH=$with_aws_sdk ;;
esac
if test -d "$AWS_SDK_PATH"; then
   AWS_SDK_ARCH_PATH=$AWS_SDK_PATH
for d in "$AWS_SDK_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$AWS_SDK_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$AWS_SDK_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$AWS_SDK_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      AWS_SDK_ARCH_PATH=$d
      break
   fi
done
   AWS_SDK_PATH=$AWS_SDK_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $AWS_SDK_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $AWS_SDK_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            AWS_SDK_PATH=$ncbi_fix_dir_tmp2
         else
            case "$AWS_SDK_PATH" in
               /*) ;;
               * ) AWS_SDK_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) AWS_SDK_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
AWS_SDK_LDEP=
AWS_SDK_STATIC_LDEP=
for d in "$AWS_SDK_PATH/lib$bit64_sfx" "$AWS_SDK_PATH/lib" \
         /usr/lib/$multiarch /usr/lib$bit64_sfx /usr/lib \
         /usr/local/lib$bit64_sfx /usr/local/lib; do
    if test -f "$d/libaws-cpp-sdk-s3.a"; then
       AWS_SDK_LIBDIR=$d
       AWS_SDK_LDEP=
       AWS_SDK_STATIC_LDEP=
       sep=
       for x in aws-crt-cpp aws-c-s3 aws-c-mqtt aws-c-event-stream aws-c-auth \
          aws-checksums aws-c-sdkutils aws-c-http aws-c-compression aws-c-io \
          aws-c-cal s2n aws-c-common; do
          if test -f "$AWS_SDK_LIBDIR/lib$x.a"; then
             AWS_SDK_LDEP="$AWS_SDK_LDEP$sep-l$x"
             AWS_SDK_STATIC_LDEP="$AWS_SDK_STATIC_LDEP$sep-l$x-static"
             sep=' '
          fi
       done
       break
    fi
done
if test "$with_aws_sdk" != "no"; then
    case "$AWS_SDK_PATH:$with_aws_sdk" in
       *:yes | *: | $with_aws_sdk* ) ;;
       * ) AWS_SDK_PATH=$with_aws_sdk ;;
    esac
    if test "$AWS_SDK_PATH" != /usr -a -d "$AWS_SDK_PATH"; then
       in_path=" in $AWS_SDK_PATH"
       if test -z "$AWS_SDK_INCLUDE" -a -d "$AWS_SDK_PATH/include"; then
          AWS_SDK_INCLUDE="-I$AWS_SDK_PATH/include"
       fi
       if test -n "$AWS_SDK_LIBPATH"; then
          :
       elif test -d "$AWS_SDK_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 $AWS_SDK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    AWS_SDK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $AWS_SDK_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    AWS_SDK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$AWS_SDK_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 $AWS_SDK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    AWS_SDK_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $AWS_SDK_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    AWS_SDK_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       AWS_SDK_LIBS="$AWS_SDK_LIBPATH -laws-cpp-sdk-s3 -laws-cpp-sdk-ec2 -laws-cpp-sdk-core $AWS_SDK_LDEP"
    else
       AWS_SDK_INCLUDE=""
       AWS_SDK_LIBS="-laws-cpp-sdk-s3 -laws-cpp-sdk-ec2 -laws-cpp-sdk-core $AWS_SDK_LDEP"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libaws-cpp-sdk-s3$in_path" >&5
$as_echo_n "checking for libaws-cpp-sdk-s3$in_path... " >&6; }
if ${ncbi_cv_lib_aws_sdk+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $AWS_SDK_INCLUDE $orig_CPPFLAGS"
       LIBS="$AWS_SDK_LIBS $CURL_LIBS $OPENSSL_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <aws/s3/S3Client.h>
                      #include <aws/ec2/EC2Client.h>
int
main ()
{
Aws::S3::S3Client s3cli;
         Aws::EC2::EC2Client ec2cli;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_aws_sdk=yes
else
  ncbi_cv_lib_aws_sdk=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_aws_sdk" >&5
$as_echo "$ncbi_cv_lib_aws_sdk" >&6; }
    if test "$ncbi_cv_lib_aws_sdk" = "no"; then
       if test "${with_aws_sdk:=no}" != no; then
       as_fn_error $? "--with-aws_sdk explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_aws_sdk" = "no"; then
    AWS_SDK_PATH="No_AWS_SDK"
    AWS_SDK_INCLUDE=
    AWS_SDK_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}AWS_SDK"; WithPackagesSep=" "
    AWS_SDK_INCLUDE=" $AWS_SDK_INCLUDE"

$as_echo "#define HAVE_LIBAWS_SDK 1" >>confdefs.h

 fi



if test "$with_aws_sdk" != no -a \
     -f "$AWS_SDK_LIBDIR/libaws-cpp-sdk-s3-static.a"; then
    AWS_SDK_STATIC_LIBS="-L$AWS_SDK_LIBDIR -laws-cpp-sdk-s3-static -laws-cpp-sdk-ec2-static -laws-cpp-sdk-core-static $AWS_SDK_STATIC_LDEP"
else
    AWS_SDK_STATIC_LIBS=$AWS_SDK_LIBS
fi

case "$with_crc32c" in
   no       ) ;;
   yes | "" ) ;;
   *        ) CRC32C_PATH=$with_crc32c ;;
esac
if test -d "$CRC32C_PATH"; then
   CRC32C_ARCH_PATH=$CRC32C_PATH
for d in "$CRC32C_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CRC32C_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CRC32C_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$CRC32C_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      CRC32C_ARCH_PATH=$d
      break
   fi
done
   CRC32C_PATH=$CRC32C_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $CRC32C_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CRC32C_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CRC32C_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CRC32C_PATH" in
               /*) ;;
               * ) CRC32C_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CRC32C_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_crc32c" != "no"; then
    case "$CRC32C_PATH:$with_crc32c" in
       *:yes | *: | $with_crc32c* ) ;;
       * ) CRC32C_PATH=$with_crc32c ;;
    esac
    if test "$CRC32C_PATH" != /usr -a -d "$CRC32C_PATH"; then
       in_path=" in $CRC32C_PATH"
       if test -z "$CRC32C_INCLUDE" -a -d "$CRC32C_PATH/include"; then
          CRC32C_INCLUDE="-I$CRC32C_PATH/include"
       fi
       if test -n "$CRC32C_LIBPATH"; then
          :
       elif test -d "$CRC32C_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 $CRC32C_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CRC32C_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CRC32C_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CRC32C_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$CRC32C_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 $CRC32C_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CRC32C_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CRC32C_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CRC32C_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       CRC32C_LIBS="$CRC32C_LIBPATH -lcrc32c "
    else
       CRC32C_INCLUDE=""
       CRC32C_LIBS="-lcrc32c "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrc32c$in_path" >&5
$as_echo_n "checking for libcrc32c$in_path... " >&6; }
if ${ncbi_cv_lib_crc32c+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $CRC32C_INCLUDE $orig_CPPFLAGS"
       LIBS="$CRC32C_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <crc32c/crc32c.h>
int
main ()
{
crc32c_value((const uint8_t*)"foo", 3);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_crc32c=yes
else
  ncbi_cv_lib_crc32c=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_crc32c" >&5
$as_echo "$ncbi_cv_lib_crc32c" >&6; }
    if test "$ncbi_cv_lib_crc32c" = "no"; then
       if test "${with_crc32c:=no}" != no; then
       as_fn_error $? "--with-crc32c explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_crc32c" = "no"; then
    CRC32C_PATH="No_CRC32C"
    CRC32C_INCLUDE=
    CRC32C_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}CRC32C"; WithPackagesSep=" "
    CRC32C_INCLUDE=" $CRC32C_INCLUDE"

$as_echo "#define HAVE_LIBCRC32C 1" >>confdefs.h

 fi



if test "$with_crc32c" != no \
   -a -f "$CRC32C_PATH/lib/libcrc32c-static.a"; then
   CRC32C_STATIC_LIBS="-L$CRC32C_PATH/lib -lcrc32c-static"
fi

case "$with_google_cloud" in
   no       ) ;;
   yes | "" ) ;;
   *        ) GOOGLE_CLOUD_PATH=$with_google_cloud ;;
esac
if test -d "$GOOGLE_CLOUD_PATH"; then
   GOOGLE_CLOUD_ARCH_PATH=$GOOGLE_CLOUD_PATH
for d in "$GOOGLE_CLOUD_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$GOOGLE_CLOUD_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$GOOGLE_CLOUD_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$GOOGLE_CLOUD_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      GOOGLE_CLOUD_ARCH_PATH=$d
      break
   fi
done
   GOOGLE_CLOUD_PATH=$GOOGLE_CLOUD_ARCH_PATH
   if test -d "$GOOGLE_CLOUD_PATH$asan_sfx"; then
      GOOGLE_CLOUD_PATH="$GOOGLE_CLOUD_PATH$asan_sfx"
   fi
   ncbi_fix_dir_tmp=`if cd $GOOGLE_CLOUD_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $GOOGLE_CLOUD_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            GOOGLE_CLOUD_PATH=$ncbi_fix_dir_tmp2
         else
            case "$GOOGLE_CLOUD_PATH" in
               /*) ;;
               * ) GOOGLE_CLOUD_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) GOOGLE_CLOUD_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d $GOOGLE_CLOUD_PATH/lib${bit64_sfx}; then
   GOOGLE_CLOUD_LIBDIR=$GOOGLE_CLOUD_PATH/lib${bit64_sfx}
else
   GOOGLE_CLOUD_LIBDIR=$GOOGLE_CLOUD_PATH/lib
fi
if test "$with_google_cloud" != "no"; then
    case "$GOOGLE_CLOUD_PATH:$with_google_cloud" in
       *:yes | *: | $with_google_cloud* ) ;;
       * ) GOOGLE_CLOUD_PATH=$with_google_cloud ;;
    esac
    if test "$GOOGLE_CLOUD_PATH" != /usr -a -d "$GOOGLE_CLOUD_PATH"; then
       in_path=" in $GOOGLE_CLOUD_PATH"
       if test -z "$GOOGLE_CLOUD_INCLUDE" -a -d "$GOOGLE_CLOUD_PATH/include"; then
          GOOGLE_CLOUD_INCLUDE="-I$GOOGLE_CLOUD_PATH/include"
       fi
       if test -n "$GOOGLE_CLOUD_LIBPATH"; then
          :
       elif test -d "$GOOGLE_CLOUD_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 $GOOGLE_CLOUD_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GOOGLE_CLOUD_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GOOGLE_CLOUD_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GOOGLE_CLOUD_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$GOOGLE_CLOUD_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 $GOOGLE_CLOUD_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    GOOGLE_CLOUD_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $GOOGLE_CLOUD_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    GOOGLE_CLOUD_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       GOOGLE_CLOUD_LIBS="$GOOGLE_CLOUD_LIBPATH -lgoogle_cloud_cpp_storage -lgoogle_cloud_cpp_common"
    else
       GOOGLE_CLOUD_INCLUDE=""
       GOOGLE_CLOUD_LIBS="-lgoogle_cloud_cpp_storage -lgoogle_cloud_cpp_common"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgoogle_cloud_cpp_storage$in_path" >&5
$as_echo_n "checking for libgoogle_cloud_cpp_storage$in_path... " >&6; }
if ${ncbi_cv_lib_google_cloud+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$GRPC_INCLUDE $GOOGLE_CLOUD_INCLUDE $orig_CPPFLAGS"
       LIBS="$GOOGLE_CLOUD_LIBS $CRC32C_LIBS $GRPC_LIBS $CURL_LIBS $OPENSSL_LIBS $Z_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <google/cloud/storage/client.h>
int
main ()
{
google::cloud::storage::Client client
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_google_cloud=yes
else
  ncbi_cv_lib_google_cloud=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_google_cloud" >&5
$as_echo "$ncbi_cv_lib_google_cloud" >&6; }
    if test "$ncbi_cv_lib_google_cloud" = "no"; then
       if test "${with_google_cloud:=no}" != no; then
       as_fn_error $? "--with-google_cloud explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_google_cloud" = "no"; then
    GOOGLE_CLOUD_PATH="No_GOOGLE_CLOUD"
    GOOGLE_CLOUD_INCLUDE=
    GOOGLE_CLOUD_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}GOOGLE_CLOUD"; WithPackagesSep=" "
    GOOGLE_CLOUD_INCLUDE="$GRPC_INCLUDE $GOOGLE_CLOUD_INCLUDE"

$as_echo "#define HAVE_LIBGOOGLE_CLOUD 1" >>confdefs.h

 fi




if test "$with_hiredis" != "no"; then
    case "$HIREDIS_PATH:$with_hiredis" in
       *:yes | *: | $with_hiredis* ) ;;
       * ) HIREDIS_PATH=$with_hiredis ;;
    esac
    if test "$HIREDIS_PATH" != /usr -a -d "$HIREDIS_PATH"; then
       in_path=" in $HIREDIS_PATH"
       if test -z "$HIREDIS_INCLUDE" -a -d "$HIREDIS_PATH/include"; then
          HIREDIS_INCLUDE="-I$HIREDIS_PATH/include"
       fi
       if test -n "$HIREDIS_LIBPATH"; then
          :
       elif test -d "$HIREDIS_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 $HIREDIS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    HIREDIS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $HIREDIS_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    HIREDIS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$HIREDIS_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 $HIREDIS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    HIREDIS_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $HIREDIS_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    HIREDIS_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       HIREDIS_LIBS="$HIREDIS_LIBPATH -lhiredis "
    else
       HIREDIS_INCLUDE=""
       HIREDIS_LIBS="-lhiredis "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis$in_path" >&5
$as_echo_n "checking for libhiredis$in_path... " >&6; }
if ${ncbi_cv_lib_hiredis+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $HIREDIS_INCLUDE $orig_CPPFLAGS"
       LIBS="$HIREDIS_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <hiredis/hiredis.h>
int
main ()
{
redisReader* r = redisReaderCreate();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_hiredis=yes
else
  ncbi_cv_lib_hiredis=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_hiredis" >&5
$as_echo "$ncbi_cv_lib_hiredis" >&6; }
    if test "$ncbi_cv_lib_hiredis" = "no"; then
       if test "${with_hiredis:=no}" != no; then
       as_fn_error $? "--with-hiredis explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_hiredis" = "no"; then
    HIREDIS_PATH="No_HIREDIS"
    HIREDIS_INCLUDE=
    HIREDIS_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}HIREDIS"; WithPackagesSep=" "
    HIREDIS_INCLUDE=" $HIREDIS_INCLUDE"

$as_echo "#define HAVE_LIBHIREDIS 1" >>confdefs.h

 fi



if test "$with_hiredis" != no \
      -a -f "$HIREDIS_PATH/lib/libhiredis-static.a"; then
    HIREDIS_STATIC_LIBS="-L$HIREDIS_PATH/lib -lhiredis-static"
else
    HIREDIS_STATIC_LIBS=$HIREDIS_LIBS
fi

case "$with_apache_arrow" in
   yes | no | '' ) ;;
   *             ) APACHE_ARROW_PATH=$with_apache_arrow ;;
esac
if test -d "$APACHE_ARROW_PATH"; then
   ncbi_fix_dir_tmp=`if cd $APACHE_ARROW_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $APACHE_ARROW_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            APACHE_ARROW_PATH=$ncbi_fix_dir_tmp2
         else
            case "$APACHE_ARROW_PATH" in
               /*) ;;
               * ) APACHE_ARROW_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) APACHE_ARROW_PATH=$ncbi_fix_dir_tmp ;;
 esac
   for d in "$APACHE_ARROW_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx$asan_sfx" \
            "$APACHE_ARROW_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx$asan_sfx" \
            "$APACHE_ARROW_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$asan_sfx" \
            "$APACHE_ARROW_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$asan_sfx" \
            "$APACHE_ARROW_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
            "$APACHE_ARROW_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
            "$APACHE_ARROW_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
            "$APACHE_ARROW_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
      if test -d "$d"; then
         APACHE_ARROW_PATH=$d
         ncbi_fix_dir_tmp=`if cd $APACHE_ARROW_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $APACHE_ARROW_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            APACHE_ARROW_PATH=$ncbi_fix_dir_tmp2
         else
            case "$APACHE_ARROW_PATH" in
               /*) ;;
               * ) APACHE_ARROW_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) APACHE_ARROW_PATH=$ncbi_fix_dir_tmp ;;
 esac
         break
      fi
   done
fi

if test "$with_apache_arrow" != "no"; then
    case "$APACHE_ARROW_PATH:$with_apache_arrow" in
       *:yes | *: | $with_apache_arrow* ) ;;
       * ) APACHE_ARROW_PATH=$with_apache_arrow ;;
    esac
    if test "$APACHE_ARROW_PATH" != /usr -a -d "$APACHE_ARROW_PATH"; then
       in_path=" in $APACHE_ARROW_PATH"
       if test -z "$APACHE_ARROW_INCLUDE" -a -d "$APACHE_ARROW_PATH/include"; then
          APACHE_ARROW_INCLUDE="-I$APACHE_ARROW_PATH/include"
       fi
       if test -n "$APACHE_ARROW_LIBPATH"; then
          :
       elif test -d "$APACHE_ARROW_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 $APACHE_ARROW_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    APACHE_ARROW_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $APACHE_ARROW_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    APACHE_ARROW_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$APACHE_ARROW_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 $APACHE_ARROW_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    APACHE_ARROW_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $APACHE_ARROW_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    APACHE_ARROW_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       APACHE_ARROW_LIBS="$APACHE_ARROW_LIBPATH -lparquet -larrow"
    else
       APACHE_ARROW_INCLUDE=""
       APACHE_ARROW_LIBS="-lparquet -larrow"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libparquet$in_path" >&5
$as_echo_n "checking for libparquet$in_path... " >&6; }
if ${ncbi_cv_lib_apache_arrow+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $APACHE_ARROW_INCLUDE $orig_CPPFLAGS"
       LIBS="$APACHE_ARROW_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <parquet/api/reader.h>
int
main ()
{
parquet::ParquetFileReader pfr;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_apache_arrow=yes
else
  ncbi_cv_lib_apache_arrow=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_apache_arrow" >&5
$as_echo "$ncbi_cv_lib_apache_arrow" >&6; }
    if test "$ncbi_cv_lib_apache_arrow" = "no"; then
       if test "${with_apache_arrow:=no}" != no; then
       as_fn_error $? "--with-apache_arrow explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_apache_arrow" = "no"; then
    APACHE_ARROW_PATH="No_APACHE_ARROW"
    APACHE_ARROW_INCLUDE=
    APACHE_ARROW_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}APACHE_ARROW"; WithPackagesSep=" "
    APACHE_ARROW_INCLUDE=" $APACHE_ARROW_INCLUDE"

$as_echo "#define HAVE_LIBAPACHE_ARROW 1" >>confdefs.h

 fi



if test "$with_apache_arrow" != no -a \
     -f "$APACHE_ARROW_LIBDIR/libparquet-static.a"; then
    APACHE_ARROW_STATIC_LIBS="-L$APACHE_ARROW_LIBDIR -lparquet-static -larrow-static -larrow_bundled_dependencies-static $BZ2_LIBS $Z_LIBS -lzstd"
else
    APACHE_ARROW_STATIC_LIBS=$APACHE_ARROW_LIBS
fi

case "$with_librdkafka" in
   yes | no | '' ) ;;
   *             ) LIBRDKAFKA_PATH=$with_librdkafka ;;
esac
if test -d "$LIBRDKAFKA_PATH"; then
   LIBRDKAFKA_ARCH_PATH=$LIBRDKAFKA_PATH
for d in "$LIBRDKAFKA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LIBRDKAFKA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$LIBRDKAFKA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$LIBRDKAFKA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      LIBRDKAFKA_ARCH_PATH=$d
      break
   fi
done
   LIBRDKAFKA_PATH=$LIBRDKAFKA_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $LIBRDKAFKA_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $LIBRDKAFKA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            LIBRDKAFKA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$LIBRDKAFKA_PATH" in
               /*) ;;
               * ) LIBRDKAFKA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) LIBRDKAFKA_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi

if test "$with_librdkafka" != "no"; then
    case "$LIBRDKAFKA_PATH:$with_librdkafka" in
       *:yes | *: | $with_librdkafka* ) ;;
       * ) LIBRDKAFKA_PATH=$with_librdkafka ;;
    esac
    if test "$LIBRDKAFKA_PATH" != /usr -a -d "$LIBRDKAFKA_PATH"; then
       in_path=" in $LIBRDKAFKA_PATH"
       if test -z "$LIBRDKAFKA_INCLUDE" -a -d "$LIBRDKAFKA_PATH/include"; then
          LIBRDKAFKA_INCLUDE="-I$LIBRDKAFKA_PATH/include"
       fi
       if test -n "$LIBRDKAFKA_LIBPATH"; then
          :
       elif test -d "$LIBRDKAFKA_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 $LIBRDKAFKA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBRDKAFKA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBRDKAFKA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBRDKAFKA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$LIBRDKAFKA_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 $LIBRDKAFKA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    LIBRDKAFKA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $LIBRDKAFKA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    LIBRDKAFKA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       LIBRDKAFKA_LIBS="$LIBRDKAFKA_LIBPATH -lrdkafka "
    else
       LIBRDKAFKA_INCLUDE=""
       LIBRDKAFKA_LIBS="-lrdkafka "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librdkafka$in_path" >&5
$as_echo_n "checking for librdkafka$in_path... " >&6; }
if ${ncbi_cv_lib_librdkafka+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $LIBRDKAFKA_INCLUDE $orig_CPPFLAGS"
       LIBS="$LIBRDKAFKA_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <librdkafka/rdkafka.h>
int
main ()
{
rd_kafka_conf_t *conf = rd_kafka_conf_new();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_librdkafka=yes
else
  ncbi_cv_lib_librdkafka=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_librdkafka" >&5
$as_echo "$ncbi_cv_lib_librdkafka" >&6; }
    if test "$ncbi_cv_lib_librdkafka" = "no"; then
       if test "${with_librdkafka:=no}" != no; then
       as_fn_error $? "--with-librdkafka explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_librdkafka" = "no"; then
    LIBRDKAFKA_PATH="No_LIBRDKAFKA"
    LIBRDKAFKA_INCLUDE=
    LIBRDKAFKA_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}LIBRDKAFKA"; WithPackagesSep=" "
    LIBRDKAFKA_INCLUDE=" $LIBRDKAFKA_INCLUDE"

$as_echo "#define HAVE_LIBRDKAFKA 1" >>confdefs.h

 fi



if test "$with_librdkafka" != no -a \
     -f "$LIBRDKAFKA_PATH/lib$bit64_sfx/librdkafka-static.a"; then
   LIBRDKAFKA_STATIC_LIBS="-L$LIBRDKAFKA_PATH/lib$bit64_sfx -lrdkafka-static"
else
   LIBRDKAFKA_STATIC_LIBS=$LIBRDKAFKA_LIBS
fi

case "$with_cppkafka" in
   yes | no | '' ) ;;
   *             ) CPPKAFKA_PATH=$with_cppkafka ;;
esac
if test -d "$CPPKAFKA_PATH"; then
   CPPKAFKA_ARCH_PATH=$CPPKAFKA_PATH
for d in "$CPPKAFKA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CPPKAFKA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$CPPKAFKA_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$CPPKAFKA_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      CPPKAFKA_ARCH_PATH=$d
      break
   fi
done
   CPPKAFKA_PATH=$CPPKAFKA_ARCH_PATH
   if test -d "$CPPKAFKA_PATH$asan_sfx"; then
      CPPKAFKA_PATH="$CPPKAFKA_PATH$asan_sfx"
   fi
   ncbi_fix_dir_tmp=`if cd $CPPKAFKA_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $CPPKAFKA_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            CPPKAFKA_PATH=$ncbi_fix_dir_tmp2
         else
            case "$CPPKAFKA_PATH" in
               /*) ;;
               * ) CPPKAFKA_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) CPPKAFKA_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi

if test "$with_cppkafka" != "no"; then
    case "$CPPKAFKA_PATH:$with_cppkafka" in
       *:yes | *: | $with_cppkafka* ) ;;
       * ) CPPKAFKA_PATH=$with_cppkafka ;;
    esac
    if test "$CPPKAFKA_PATH" != /usr -a -d "$CPPKAFKA_PATH"; then
       in_path=" in $CPPKAFKA_PATH"
       if test -z "$CPPKAFKA_INCLUDE" -a -d "$CPPKAFKA_PATH/include"; then
          CPPKAFKA_INCLUDE="-I$CPPKAFKA_PATH/include"
       fi
       if test -n "$CPPKAFKA_LIBPATH"; then
          :
       elif test -d "$CPPKAFKA_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 $CPPKAFKA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CPPKAFKA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CPPKAFKA_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CPPKAFKA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$CPPKAFKA_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 $CPPKAFKA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    CPPKAFKA_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $CPPKAFKA_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    CPPKAFKA_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       CPPKAFKA_LIBS="$CPPKAFKA_LIBPATH -lcppkafka $LIBRDKAFKA_LIBS"
    else
       CPPKAFKA_INCLUDE=""
       CPPKAFKA_LIBS="-lcppkafka $LIBRDKAFKA_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcppkafka$in_path" >&5
$as_echo_n "checking for libcppkafka$in_path... " >&6; }
if ${ncbi_cv_lib_cppkafka+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $LIBRDKAFKA_INCLUDE $CPPKAFKA_INCLUDE $orig_CPPFLAGS"
       LIBS="$CPPKAFKA_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <cppkafka/configuration.h>
int
main ()
{
cppkafka::Configuration cfg; cfg.set("foo", "bar");
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_cppkafka=yes
else
  ncbi_cv_lib_cppkafka=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_cppkafka" >&5
$as_echo "$ncbi_cv_lib_cppkafka" >&6; }
    if test "$ncbi_cv_lib_cppkafka" = "no"; then
       if test "${with_cppkafka:=no}" != no; then
       as_fn_error $? "--with-cppkafka explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_cppkafka" = "no"; then
    CPPKAFKA_PATH="No_CPPKAFKA"
    CPPKAFKA_INCLUDE=
    CPPKAFKA_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}CPPKAFKA"; WithPackagesSep=" "
    CPPKAFKA_INCLUDE="$BOOST_INCLUDE $LIBRDKAFKA_INCLUDE $CPPKAFKA_INCLUDE"

$as_echo "#define HAVE_LIBCPPKAFKA 1" >>confdefs.h

 fi



if test "$with_cppkafka" != no -a \
     -f "$CPPKAFKA_PATH/lib$bit64_sfx/libcppkafka-static.a"; then
   CPPKAFKA_STATIC_LIBS="-L$CPPKAFKA_PATH/lib$bit64_sfx -lcppkafka-static $LIBRDKAFKA_STATIC_LIBS"
else
   CPPKAFKA_STATIC_LIBS=$CPPKAFKA_LIBS
fi


case "$with_thrift" in
   yes | no | '' ) ;;
   *             ) THRIFT_PATH=$with_thrift ;;
esac
if test -d "$THRIFT_PATH"; then
   THRIFT_ARCH_PATH=$THRIFT_PATH
for d in "$THRIFT_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$THRIFT_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$THRIFT_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$THRIFT_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      THRIFT_ARCH_PATH=$d
      break
   fi
done
   THRIFT_PATH=$THRIFT_ARCH_PATH
   if test -d "$THRIFT_PATH$asan_sfx"; then
      THRIFT_PATH="$THRIFT_PATH$asan_sfx"
   fi
   ncbi_fix_dir_tmp=`if cd $THRIFT_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $THRIFT_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            THRIFT_PATH=$ncbi_fix_dir_tmp2
         else
            case "$THRIFT_PATH" in
               /*) ;;
               * ) THRIFT_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) THRIFT_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi

if test -n "$D_SFX"; then
   if ls $THRIFT_PATH/lib*/libthrift$D_SFX.* >/dev/null 2>&1; then
      THRIFT_SFX=$D_SFX
   else
      for ext in .a .so .dylib; do
         path=`$CXX -B$THRIFT_PATH/ -print-file-name=libthrift$D_SFX.$ext \
               2>/dev/null`
         case "$path" in
            */* ) THRIFT_SFX=$D_SFX; break ;;
         esac
      done
   fi
fi
if test "$with_thrift" != "no"; then
    case "$THRIFT_PATH:$with_thrift" in
       *:yes | *: | $with_thrift* ) ;;
       * ) THRIFT_PATH=$with_thrift ;;
    esac
    if test "$THRIFT_PATH" != /usr -a -d "$THRIFT_PATH"; then
       in_path=" in $THRIFT_PATH"
       if test -z "$THRIFT_INCLUDE" -a -d "$THRIFT_PATH/include"; then
          THRIFT_INCLUDE="-I$THRIFT_PATH/include"
       fi
       if test -n "$THRIFT_LIBPATH"; then
          :
       elif test -d "$THRIFT_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 $THRIFT_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    THRIFT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $THRIFT_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    THRIFT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$THRIFT_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 $THRIFT_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    THRIFT_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $THRIFT_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    THRIFT_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       THRIFT_LIBS="$THRIFT_LIBPATH -lthrift$THRIFT_SFX "
    else
       THRIFT_INCLUDE=""
       THRIFT_LIBS="-lthrift$THRIFT_SFX "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libthrift$THRIFT_SFX$in_path" >&5
$as_echo_n "checking for libthrift$THRIFT_SFX$in_path... " >&6; }
if ${ncbi_cv_lib_thrift+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$BOOST_INCLUDE $THRIFT_INCLUDE $orig_CPPFLAGS"
       LIBS="$THRIFT_LIBS $OPENSSL_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <thrift/TApplicationException.h>
int
main ()
{
apache::thrift::TApplicationException().read(nullptr);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_thrift=yes
else
  ncbi_cv_lib_thrift=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_thrift" >&5
$as_echo "$ncbi_cv_lib_thrift" >&6; }
    if test "$ncbi_cv_lib_thrift" = "no"; then
       if test "${with_thrift:=no}" != no; then
       as_fn_error $? "--with-thrift explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_thrift" = "no"; then
    THRIFT_PATH="No_THRIFT"
    THRIFT_INCLUDE=
    THRIFT_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}THRIFT"; WithPackagesSep=" "
    THRIFT_INCLUDE="$BOOST_INCLUDE $THRIFT_INCLUDE"

$as_echo "#define HAVE_LIBTHRIFT 1" >>confdefs.h

 fi



if test "$with_thrift" != no; then
   if test -f "$THRIFT_PATH/lib/libthrift${THRIFT_SFX}_static.a"; then
      THRIFT_STATIC_LIBS="-L$THRIFT_PATH/lib -lthrift${THRIFT_SFX}_static"
   elif test -f "$THRIFT_PATH/lib/libthrift_static$THRIFT_SFX.a"; then
      THRIFT_STATIC_LIBS="-L$THRIFT_PATH/lib -lthrift_static$THRIFT_SFX"
   else
      THRIFT_STATIC_LIBS=$THRIFT_LIBS
   fi
fi


case "$with_nlohmann_json" in
   yes | no | '' ) ;;
   *             ) NLOHMANN_JSON_PATH=$with_nlohmann_json ;;
esac
if test "$with_nlohmann_json" != no; then
   in_nlohmann_json=
   if test -d "$NLOHMANN_JSON_PATH"; then
      ncbi_fix_dir_tmp=`if cd $NLOHMANN_JSON_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $NLOHMANN_JSON_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            NLOHMANN_JSON_PATH=$ncbi_fix_dir_tmp2
         else
            case "$NLOHMANN_JSON_PATH" in
               /*) ;;
               * ) NLOHMANN_JSON_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) NLOHMANN_JSON_PATH=$ncbi_fix_dir_tmp ;;
 esac
      in_nlohmann_json=" in $NLOHMANN_JSON_PATH"
   fi
   NLOHMANN_JSON_INCLUDE=-I$NLOHMANN_JSON_PATH/include
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JSON for Modern C++$in_nlohmann_json" >&5
$as_echo_n "checking for JSON for Modern C++$in_nlohmann_json... " >&6; }
if ${ncbi_cv_lib_nlohmann_json+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$NLOHMANN_JSON_INCLUDE $orig_CPPFLAGS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nlohmann/json.hpp>
int
main ()
{
nlohmann::json j; j["foo"] = "bar";
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ncbi_cv_lib_nlohmann_json=yes
else
  ncbi_cv_lib_nlohmann_json=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_nlohmann_json" >&5
$as_echo "$ncbi_cv_lib_nlohmann_json" >&6; }
    if test "$ncbi_cv_lib_nlohmann_json" = yes; then
                 WithPackages="$WithPackages${WithPackagesSep}NLohmann_JSON"; WithPackagesSep=" "
    else
       if test "${with_nlohmann_json:=no}" != no; then
       as_fn_error $? "--with-nlohmann-json explicitly specified, but no usable version found." "$LINENO" 5
    fi
       NLOHMANN_JSON_INCLUDE=
    fi
fi


case "$with_yaml_cpp" in
   yes | no | '' ) ;;
   *             ) YAML_CPP_PATH=$with_yaml_cpp ;;
esac
if test -d "$YAML_CPP_PATH"; then
   YAML_CPP_ARCH_PATH=$YAML_CPP_PATH
for d in "$YAML_CPP_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$YAML_CPP_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$YAML_CPP_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$YAML_CPP_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      YAML_CPP_ARCH_PATH=$d
      break
   fi
done
   YAML_CPP_PATH=$YAML_CPP_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $YAML_CPP_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $YAML_CPP_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            YAML_CPP_PATH=$ncbi_fix_dir_tmp2
         else
            case "$YAML_CPP_PATH" in
               /*) ;;
               * ) YAML_CPP_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) YAML_CPP_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_yaml_cpp" != "no"; then
    case "$YAML_CPP_PATH:$with_yaml_cpp" in
       *:yes | *: | $with_yaml_cpp* ) ;;
       * ) YAML_CPP_PATH=$with_yaml_cpp ;;
    esac
    if test "$YAML_CPP_PATH" != /usr -a -d "$YAML_CPP_PATH"; then
       in_path=" in $YAML_CPP_PATH"
       if test -z "$YAML_CPP_INCLUDE" -a -d "$YAML_CPP_PATH/include"; then
          YAML_CPP_INCLUDE="-I$YAML_CPP_PATH/include"
       fi
       if test -n "$YAML_CPP_LIBPATH"; then
          :
       elif test -d "$YAML_CPP_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 $YAML_CPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    YAML_CPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $YAML_CPP_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    YAML_CPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$YAML_CPP_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 $YAML_CPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    YAML_CPP_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $YAML_CPP_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    YAML_CPP_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       YAML_CPP_LIBS="$YAML_CPP_LIBPATH -lyaml-cpp "
    else
       YAML_CPP_INCLUDE=""
       YAML_CPP_LIBS="-lyaml-cpp "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libyaml-cpp$in_path" >&5
$as_echo_n "checking for libyaml-cpp$in_path... " >&6; }
if ${ncbi_cv_lib_yaml_cpp+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $YAML_CPP_INCLUDE $orig_CPPFLAGS"
       LIBS="$YAML_CPP_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <yaml-cpp/yaml.h>
int
main ()
{
YAML::Node n; YAML::Dump(n);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_yaml_cpp=yes
else
  ncbi_cv_lib_yaml_cpp=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_yaml_cpp" >&5
$as_echo "$ncbi_cv_lib_yaml_cpp" >&6; }
    if test "$ncbi_cv_lib_yaml_cpp" = "no"; then
       if test "${with_yaml_cpp:=no}" != no; then
       as_fn_error $? "--with-yaml_cpp explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_yaml_cpp" = "no"; then
    YAML_CPP_PATH="No_YAML_CPP"
    YAML_CPP_INCLUDE=
    YAML_CPP_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}YAML_CPP"; WithPackagesSep=" "
    YAML_CPP_INCLUDE=" $YAML_CPP_INCLUDE"

$as_echo "#define HAVE_LIBYAML_CPP 1" >>confdefs.h

 fi



if test "$with_yaml_cpp" != no -a -f "$YAML_CPP_PATH/lib/libyaml-cpp-static.a"
then
   YAML_CPP_STATIC_LIBS="-L$YAML_CPP_PATH/lib -lyaml-cpp-static"
else
   YAML_CPP_STATIC_LIBS=$YAML_CPP_LIBS
fi


case "$with_opentracing" in
   yes | no | '' ) ;;
   *             ) OPENTRACING_PATH=$with_opentracing ;;
esac
if test -d "$OPENTRACING_PATH"; then
   OPENTRACING_ARCH_PATH=$OPENTRACING_PATH
for d in "$OPENTRACING_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$OPENTRACING_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$OPENTRACING_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$OPENTRACING_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      OPENTRACING_ARCH_PATH=$d
      break
   fi
done
   OPENTRACING_PATH=$OPENTRACING_ARCH_PATH
   ncbi_fix_dir_tmp=`if cd $OPENTRACING_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $OPENTRACING_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            OPENTRACING_PATH=$ncbi_fix_dir_tmp2
         else
            case "$OPENTRACING_PATH" in
               /*) ;;
               * ) OPENTRACING_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) OPENTRACING_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test "$with_opentracing" != "no"; then
    case "$OPENTRACING_PATH:$with_opentracing" in
       *:yes | *: | $with_opentracing* ) ;;
       * ) OPENTRACING_PATH=$with_opentracing ;;
    esac
    if test "$OPENTRACING_PATH" != /usr -a -d "$OPENTRACING_PATH"; then
       in_path=" in $OPENTRACING_PATH"
       if test -z "$OPENTRACING_INCLUDE" -a -d "$OPENTRACING_PATH/include"; then
          OPENTRACING_INCLUDE="-I$OPENTRACING_PATH/include"
       fi
       if test -n "$OPENTRACING_LIBPATH"; then
          :
       elif test -d "$OPENTRACING_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 $OPENTRACING_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENTRACING_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENTRACING_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    OPENTRACING_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$OPENTRACING_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 $OPENTRACING_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENTRACING_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENTRACING_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    OPENTRACING_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       OPENTRACING_LIBS="$OPENTRACING_LIBPATH -lopentracing "
    else
       OPENTRACING_INCLUDE=""
       OPENTRACING_LIBS="-lopentracing "
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libopentracing$in_path" >&5
$as_echo_n "checking for libopentracing$in_path... " >&6; }
if ${ncbi_cv_lib_opentracing+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS=" $OPENTRACING_INCLUDE $orig_CPPFLAGS"
       LIBS="$OPENTRACING_LIBS  $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <opentracing/tracer_factory.h>
int
main ()
{
opentracing::tracer_factory_error_category();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_opentracing=yes
else
  ncbi_cv_lib_opentracing=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_opentracing" >&5
$as_echo "$ncbi_cv_lib_opentracing" >&6; }
    if test "$ncbi_cv_lib_opentracing" = "no"; then
       if test "${with_opentracing:=no}" != no; then
       as_fn_error $? "--with-opentracing explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_opentracing" = "no"; then
    OPENTRACING_PATH="No_OPENTRACING"
    OPENTRACING_INCLUDE=
    OPENTRACING_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}OPENTRACING"; WithPackagesSep=" "
    OPENTRACING_INCLUDE=" $OPENTRACING_INCLUDE"

$as_echo "#define HAVE_LIBOPENTRACING 1" >>confdefs.h

 fi



if test "$with_opentracing" != no \
   -a -f "$OPENTRACING_PATH/lib/libopentracing-static.a"; then
   OPENTRACING_STATIC_LIBS="-L$OPENTRACING_PATH/lib -lopentracing-static"
else
   OPENTRACING_STATIC_LIBS=$OPENTRACING_LIBS
fi


case "$with_jaeger" in
   yes | no | '' ) ;;
   *             ) JAEGER_PATH=$with_jaeger ;;
esac
if test -d "$JAEGER_PATH"; then
   JAEGER_ARCH_PATH=$JAEGER_PATH
for d in "$JAEGER_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$JAEGER_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$JAEGER_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$JAEGER_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      JAEGER_ARCH_PATH=$d
      break
   fi
done
   JAEGER_PATH=$JAEGER_ARCH_PATH
   if test -d "$JAEGER_PATH$asan_sfx"; then
      JAEGER_PATH="$JAEGER_PATH$asan_sfx"
   fi
   ncbi_fix_dir_tmp=`if cd $JAEGER_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $JAEGER_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            JAEGER_PATH=$ncbi_fix_dir_tmp2
         else
            case "$JAEGER_PATH" in
               /*) ;;
               * ) JAEGER_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) JAEGER_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
if test -d $JAEGER_PATH/lib${bit64_sfx}; then
   JAEGER_LIBDIR=$JAEGER_PATH/lib${bit64_sfx}
else
   JAEGER_LIBDIR=$JAEGER_PATH/lib
fi
if test "$with_jaeger" != "no"; then
    case "$JAEGER_PATH:$with_jaeger" in
       *:yes | *: | $with_jaeger* ) ;;
       * ) JAEGER_PATH=$with_jaeger ;;
    esac
    if test "$JAEGER_PATH" != /usr -a -d "$JAEGER_PATH"; then
       in_path=" in $JAEGER_PATH"
       if test -z "$JAEGER_INCLUDE" -a -d "$JAEGER_PATH/include"; then
          JAEGER_INCLUDE="-I$JAEGER_PATH/include"
       fi
       if test -n "$JAEGER_LIBPATH"; then
          :
       elif test -d "$JAEGER_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 $JAEGER_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    JAEGER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $JAEGER_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    JAEGER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$JAEGER_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 $JAEGER_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    JAEGER_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $JAEGER_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    JAEGER_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       JAEGER_LIBS="$JAEGER_LIBPATH -ljaegertracing $OPENTRACING_LIBS $YAML_CPP_LIBS $THRIFT_LIBS"
    else
       JAEGER_INCLUDE=""
       JAEGER_LIBS="-ljaegertracing $OPENTRACING_LIBS $YAML_CPP_LIBS $THRIFT_LIBS"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjaegertracing$in_path" >&5
$as_echo_n "checking for libjaegertracing$in_path... " >&6; }
if ${ncbi_cv_lib_jaeger+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$OPENTRACING_INCLUDE $YAML_CPP_INCLUDE $NLOHMANN_JSON_INCLUDE $THRIFT_INCLUDE $JAEGER_INCLUDE $orig_CPPFLAGS"
       LIBS="$JAEGER_LIBS $OPENSSL_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <jaegertracing/Tracer.h>
int
main ()
{
jaegertracing::SelfRef(nullptr);
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_jaeger=yes
else
  ncbi_cv_lib_jaeger=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_jaeger" >&5
$as_echo "$ncbi_cv_lib_jaeger" >&6; }
    if test "$ncbi_cv_lib_jaeger" = "no"; then
       if test "${with_jaeger:=no}" != no; then
       as_fn_error $? "--with-jaeger explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_jaeger" = "no"; then
    JAEGER_PATH="No_JAEGER"
    JAEGER_INCLUDE=
    JAEGER_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}JAEGER"; WithPackagesSep=" "
    JAEGER_INCLUDE="$OPENTRACING_INCLUDE $YAML_CPP_INCLUDE $NLOHMANN_JSON_INCLUDE $THRIFT_INCLUDE $JAEGER_INCLUDE"

$as_echo "#define HAVE_LIBJAEGER 1" >>confdefs.h

 fi



if test "$with_jaeger" != no \
   -a -f "$JAEGER_PATH/lib/libjaegertracing-static.a"; then
   JAEGER_STATIC_LIBS="-L$JAEGER_PATH/lib -ljaegertracing-static"
   JAEGER_STATIC_LIBS="$JAEGER_STATIC_LIBS $OPENTRACING_STATIC_LIBS"
   JAEGER_STATIC_LIBS="$JAEGER_STATIC_LIBS $YAML_CPP_STATIC_LIBS"
   JAEGER_STATIC_LIBS="$JAEGER_STATIC_LIBS $THRIFT_STATIC_LIBS"
else
   JAEGER_STATIC_LIBS=$JAEGER_LIBS
fi


case "$with_opentelemetry" in
   yes | no | '' ) ;;
   *             ) OPENTELEMETRY_PATH=$with_opentelemetry ;;
esac
if test -d "$OPENTELEMETRY_PATH"; then
   OPENTELEMETRY_ARCH_PATH=$OPENTELEMETRY_PATH
for d in "$OPENTELEMETRY_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$OPENTELEMETRY_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx$bit64_sfx" \
         "$OPENTELEMETRY_PATH/$compiler_vpfx$DEBUG_SFX$mt_sfx" \
         "$OPENTELEMETRY_PATH/$compiler_pfx$DEBUG_SFX$mt_sfx"; do
   if test -d "$d"; then
      OPENTELEMETRY_ARCH_PATH=$d
      break
   fi
done
   OPENTELEMETRY_PATH=$OPENTELEMETRY_ARCH_PATH
   if test -d "$OPENTELEMETRY_PATH$asan_sfx"; then
      OPENTELEMETRY_PATH="$OPENTELEMETRY_PATH$asan_sfx"
   fi
   ncbi_fix_dir_tmp=`if cd $OPENTELEMETRY_PATH; then { PWD=; unset PWD;}; /bin/pwd; fi`
 case "$ncbi_fix_dir_tmp" in
    /.*) ncbi_fix_dir_tmp2=`cd $OPENTELEMETRY_PATH && $smart_pwd 2>/dev/null`
         if test -n "$ncbi_fix_dir_tmp2" -a -d "$ncbi_fix_dir_tmp2"; then
            OPENTELEMETRY_PATH=$ncbi_fix_dir_tmp2
         else
            case "$OPENTELEMETRY_PATH" in
               /*) ;;
               * ) OPENTELEMETRY_PATH=$ncbi_fix_dir_tmp ;;
            esac
         fi
         ;;
    /*) OPENTELEMETRY_PATH=$ncbi_fix_dir_tmp ;;
 esac
fi
# pkg-config covers only a few of these libraries, but still helps
# supply proper compilation flags; in particular, the presence or
# absence of HAVE_ABSEIL needs to agree with how OT was built.
# However, the tool might have been unusable for gRPC or Protobuf due
# to a bug that thankfully doesn't come into play here (since OT's API
# depends on a much smaller subset of Abseil).
if test -n "$OPENTELEMETRY_PATH"; then
   for d in "$OPENTELEMETRY_PATH/lib$bit64_sfx" "$OPENTELEMETRY_PATH/lib"; do
      if test -d "$d/pkgconfig"; then
         if test -n "$xgrpc_pc" \
            -a \( "$OPENTELEMETRY_PATH" != "$PROTOBUF_PATH" \
               -o "$OPENTELEMETRY_PATH" != "$GRPC_PATH" \); then
            otel_pc="`echo $xgrpc_pc | sed -e \"s,=,=$d/pkgconfig:,\"`"
         else
            otel_pc="env PKG_CONFIG_PATH=$d/pkgconfig pkg-config"
         fi
         break
      fi
   done
fi
if test -n "$otel_pc"; then
   OPENTELEMETRY_CFLAGS=`$otel_pc opentelemetry_api --cflags`
fi
if test "$with_opentelemetry" != "no"; then
    case "$OPENTELEMETRY_PATH:$with_opentelemetry" in
       *:yes | *: | $with_opentelemetry* ) ;;
       * ) OPENTELEMETRY_PATH=$with_opentelemetry ;;
    esac
    if test "$OPENTELEMETRY_PATH" != /usr -a -d "$OPENTELEMETRY_PATH"; then
       in_path=" in $OPENTELEMETRY_PATH"
       if test -z "$OPENTELEMETRY_INCLUDE" -a -d "$OPENTELEMETRY_PATH/include"; then
          OPENTELEMETRY_INCLUDE="-I$OPENTELEMETRY_PATH/include"
       fi
       if test -n "$OPENTELEMETRY_LIBPATH"; then
          :
       elif test -d "$OPENTELEMETRY_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 $OPENTELEMETRY_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENTELEMETRY_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENTELEMETRY_PATH/lib${bit64_sfx}; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    OPENTELEMETRY_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       elif test -d "$OPENTELEMETRY_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 $OPENTELEMETRY_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       ncbi_rp_L_flags="${ncbi_rp_L_flags}${ncbi_rp_L_sep}$x"
       ncbi_rp_L_sep=" $CONF_f_libpath"
    done
    OPENTELEMETRY_LIBPATH="${ncbi_rp_L_flags}"
 else
    ncbi_rp_R_flags=
    ncbi_rp_R_sep=" $CONF_f_runpath"
    for x in $OPENTELEMETRY_PATH/lib; do
       case "$x" in
          /lib | /usr/lib | /usr/lib32 | /usr/lib64 | /usr/lib/$multiarch )
             continue
             ;;
       esac
       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
    OPENTELEMETRY_LIBPATH="${ncbi_rp_L_flags}${ncbi_rp_R_flags}"
 fi
       fi
       OPENTELEMETRY_LIBS="$OPENTELEMETRY_LIBPATH -lopentelemetry_exporter_otlp_grpc -lopentelemetry_exporter_otlp_grpc_client -lopentelemetry_proto_grpc \
   -lopentelemetry_exporter_otlp_http \
   -lopentelemetry_exporter_otlp_http_client -lopentelemetry_otlp_recordable \
   -lopentelemetry_exporter_ostream_span -lopentelemetry_trace \
   -lopentelemetry_proto -lopentelemetry_http_client_curl \
   -lopentelemetry_logs -lopentelemetry_metrics \
   -lopentelemetry_resources -lopentelemetry_common"
    else
       OPENTELEMETRY_INCLUDE=""
       OPENTELEMETRY_LIBS="-lopentelemetry_exporter_otlp_grpc -lopentelemetry_exporter_otlp_grpc_client -lopentelemetry_proto_grpc \
   -lopentelemetry_exporter_otlp_http \
   -lopentelemetry_exporter_otlp_http_client -lopentelemetry_otlp_recordable \
   -lopentelemetry_exporter_ostream_span -lopentelemetry_trace \
   -lopentelemetry_proto -lopentelemetry_http_client_curl \
   -lopentelemetry_logs -lopentelemetry_metrics \
   -lopentelemetry_resources -lopentelemetry_common"
       in_path=
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libopentelemetry_exporter_otlp_grpc$in_path" >&5
$as_echo_n "checking for libopentelemetry_exporter_otlp_grpc$in_path... " >&6; }
if ${ncbi_cv_lib_opentelemetry+:} false; then :
  $as_echo_n "(cached) " >&6
else
  CPPFLAGS="$GRPC_INCLUDE $OPENTELEMETRY_CFLAGS $OPENTELEMETRY_INCLUDE $orig_CPPFLAGS"
       LIBS="$OPENTELEMETRY_LIBS $GRPC_LIBS $PROTOBUF_LIBS $CURL_LIBS $orig_LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <opentelemetry/exporters/otlp/otlp_grpc_exporter.h>
int
main ()
{
opentelemetry::exporter::otlp::OtlpGrpcExporter exporter;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ncbi_cv_lib_opentelemetry=yes
else
  ncbi_cv_lib_opentelemetry=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ncbi_cv_lib_opentelemetry" >&5
$as_echo "$ncbi_cv_lib_opentelemetry" >&6; }
    if test "$ncbi_cv_lib_opentelemetry" = "no"; then
       if test "${with_opentelemetry:=no}" != no; then
       as_fn_error $? "--with-opentelemetry explicitly specified, but no usable version found." "$LINENO" 5
    fi
    fi
 fi
 if test "$with_opentelemetry" = "no"; then
    OPENTELEMETRY_PATH="No_OPENTELEMETRY"
    OPENTELEMETRY_INCLUDE=
    OPENTELEMETRY_LIBS=
 else
              WithPackages="$WithPackages${WithPackagesSep}OPENTELEMETRY"; WithPackagesSep=" "
    OPENTELEMETRY_INCLUDE="$GRPC_INCLUDE $OPENTELEMETRY_CFLAGS $OPENTELEMETRY_INCLUDE"

$as_echo "#define HAVE_LIBOPENTELEMETRY 1" >>confdefs.h

 fi



OPENTELEMETRY_LIBS=`echo "$OPENTELEMETRY_LIBS" | sed -e 's/  */ /g'`
if test "$with_opentelemetry" != no \
   -a -f "$OPENTELEMETRY_PATH/lib/libopentelemetry_common-static.a"; then
   test -f "$OPENTELEMETRY_PATH/lib/libopentelemetry_proto-static.a"  ||  \
     	ot_extra_sed='; s/\(-lopentelemetry_proto[^ ]*\)-static/\1/g'
   OPENTELEMETRY_STATIC_LIBS=`echo "$OPENTELEMETRY_LIBS" \
       | sed -e "s/ -l[^ ]*/&-static/g$ot_extra_sed"`
else
   OPENTELEMETRY_STATIC_LIBS=$OPENTELEMETRY_LIBS
fi


### Restore original compiler/linker flags
LIBS="$orig_LIBS"
CPPFLAGS="$orig_CPPFLAGS"


### Optional projects
### --------------------------------------------


## `connext' support


$as_echo "#define HAVE_LIBCONNEXT 1" >>confdefs.h



## direct PubSeqOS data loaders

if test "$with_dbapi" != no -a \
   -f ${real_srcdir}/src/objtools/data_loaders/genbank/pubseq/Makefile.ncbi_xreader_pubseqos.lib ; then

$as_echo "#define HAVE_PUBSEQ_OS 1" >>confdefs.h

             WithFeatures="$WithFeatures${WithFeaturesSep}PubSeqOS"; WithFeaturesSep=" "
   ncbi_xreader_pubseqos=ncbi_xreader_pubseqos
   ncbi_xreader_pubseqos2=ncbi_xreader_pubseqos2
   UNLESS_PUBSEQOS=\#
else
   ncbi_xreader_pubseqos=
   ncbi_xreader_pubseqos2=
   UNLESS_PUBSEQOS=
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


## PSG loader

reason=
sep=
if test "$with_mt" = no; then
   reason=MT
   sep=", "
fi
if test "$with_libuv" = no; then
   reason="${reason}${sep}LIBUV"
   sep=", "
fi
if test "$with_nghttp2" = no; then
   reason="${reason}${sep}NGHTTP2"
   sep=", "
fi
if test -z "$reason"; then

$as_echo "#define HAVE_PSG_LOADER 1" >>confdefs.h

             WithFeatures="$WithFeatures${WithFeaturesSep}PSGLoader"; WithFeaturesSep=" "
else
   case " $with_experimental " in
      *\ PSGLoader\ * )
         as_fn_error $? "--with-experimental=$with_experimental: Cannot build PSG loader: missing $missing" "$LINENO" 5
         ;;
   esac
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
      as_fn_error $? "--with-bdb:  BDB sources are missing" "$LINENO" 5
   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"

$as_echo "#define HAVE_BDB 1" >>confdefs.h

   bdb_cache="ncbi_xcache_bdb"
   BDB_CACHE_LIB="ncbi_xcache_bdb"

$as_echo "#define HAVE_BDB_CACHE 1" >>confdefs.h

fi


## `dbapi' projects

DBAPI_DRIVER=
DBAPI_CTLIB=
DBAPI_FTDS=
DBAPI_FTDS100=
DBAPI_MYSQL=
DBAPI_ODBC=
if test "$with_dbapi" = "no" ; then
   dbapi=
else
             WithProjects="$WithProjects${WithProjectsSep}dbapi"; WithProjectsSep=" "
   dbapi="dbapi"
   DBAPI_DRIVER=dbapi_driver
   DBAPI_FTDS=ncbi_xdbapi_ftds
   DBAPI_FTDS100=ncbi_xdbapi_ftds100
   DBAPI_FTDS14=ncbi_xdbapi_ftds14
   test -n "$SYBASE_LIBS"    &&  DBAPI_CTLIB=ncbi_xdbapi_ctlib
   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
         as_fn_error $? "--with-internal:  Cannot build INTERNAL projects: missing $reason" "$LINENO" 5
      else
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-internal:  Cannot build some INTERNAL projects: missing $reason" >&5
$as_echo "$as_me: WARNING: --with-internal:  Cannot build some INTERNAL projects: missing $reason" >&2;}
         OPT_GROUPS="$OPT_GROUPS internal"
         internal="internal"
      fi
   elif test -n "$reason" -a -z "$with_projects"; 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_glew" = "no"; then
     reason="$reason${sep}GLEW"
     sep=", "
   fi
   if test "$with_ftgl" = "no"; then
     reason="$reason${sep}FTGL"
     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 "$ncbi_cv_lib_boost_spirit" != "yes"; then
     reason=Boost.Spirit
     sep=", "
   fi
   if test "$with_libxslt" = "no"; then
     reason="$reason${sep}libxslt"
     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
      as_fn_error $? "--with-gbench:  Cannot build Genome Workbench: missing $reason" "$LINENO" 5
   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=" " ;;
   *[Hh][Ee][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

if test "${with_skew_guard-$with_ncbi_public}" = "yes"; then

$as_echo "#define HAVE_NCBI_SKEW_GUARD 1" >>confdefs.h

fi

FEATURES="$WithFeatures $WithPackages $WithProjects"

### Compute Without{Features,Packages,Projects}.  Takes quadratic time,
### but that's life.
for x in ChaosMonkey Int4GI Int8GI StrictGI StrictEntrezID StrictTaxID BM64 GCC KCC ICC AppleClang LLVMClang Clang VisualAge CompaqCompiler Cray WorkShop MIPSpro MSVC MT Cxx2020_format_api LFS DLL DLL_BUILD MaxDebug MSWin unix WinMain AIX BSD Cygwin CygwinMT Darwin XCODE IRIX Linux OSF Solaris MacOS in-house-resources full-test-data full-blastdb JDK Ncbi-JNI PubSeqOS PSGLoader check Valgrind LimitedLinker; do
      case " $WithFeatures " in
         *" $x "*) ;;
         *) WithoutFeatures="$WithoutFeatures$WithoutFeaturesSep$x"
            WithoutFeaturesSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done
  for x in UUID FUSE Iconv LIBUNWIND LIBDW BACKWARD_CPP Z LocalZ BZ2 LocalBZ2 LZO ZSTD PCRE PCRE2 LocalPCRE MBEDTLS GMP GCRYPT NETTLE GNUTLS OPENSSL KRB5 CURL Sybase DBLib FreeTDS MySQL BerkeleyDB BerkeleyDB++ ODBC PYTHON PYTHON25 PYTHON26 PYTHON27 PYTHON3 PERL Boost.Chrono Boost.Filesystem Boost.Iostreams Boost.Program-Options Boost.Regex Boost.Serialization Boost.Spirit Boost.System Boost.Test Boost.Test.Included Boost.Thread C-Toolkit NCBICRYPT OpenGL MESA GLUT GLEW wxWidgets wx2.8 Fast-CGI FASTCGIPP LocalSSS LocalMSGMAIL2 SSSUTILS LocalNCBILS NCBILS2 SSSDB SP ORBacus ICU EXPAT SABLOT LIBXML LIBXSLT LIBEXSLT Xerces Xalan Zorba SQLITE3 SQLITE3ASYNC VDB NGS OECHEM SGE DRMAA2 MUPARSER HDF5 JPEG PNG TIFF GIF UNGIF XPM GL2PS FreeType FTGL MAGIC MIMETIC GSOAP AVRO Cereal SASL2 MONGODB MONGODB3 LEVELDB LIBURING ROCKSDB GMOCK LAPACK LMDB LocalLMDB LIBUV LIBSSH LIBSSH2 CASSANDRA NGHTTP2 H2O INFLUXDB LIBXLSXWRITER PROTOBUF GRPC MSGSL AWS_SDK CRC32C GOOGLE_CLOUD HIREDIS APACHE_ARROW LIBRDKAFKA CPPKAFKA THRIFT NLohmann_JSON YAML_CPP OPENTRACING JAEGER OPENTELEMETRY; do
      case " $WithPackages " in
         *" $x "*) ;;
         *) WithoutPackages="$WithoutPackages$WithoutPackagesSep$x"
            WithoutPackagesSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done
  for x in cgi serial objects bdb dbapi app ctools gui algo gbench; do
      case " $WithProjects " in
         *" $x "*) ;;
         *) WithoutProjects="$WithoutProjects$WithoutProjectsSep$x"
            WithoutProjectsSep=" "
            FEATURES="$FEATURES -$x"
          ;;
      esac
   done

# Sort, then consolidate back to a single line
FEATURES=`echo $FEATURES | fmt -w1 | sort -dfu`
FEATURES=`echo $FEATURES`


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

### Avoid spurious warnings when using Clang (or Clang-based ICC) in
### conjunction with distcc (and quite possibly also ccache).
case "$gccdir:$CC_WRAPPER" in
   /*:*distcc*ccache* )
      CPPFLAGS="$CPPFLAGS --ccache-skip -frewrite-includes"
      ;;
   /*:*distcc* )
      CPPFLAGS="$CPPFLAGS -frewrite-includes"
      ;;
esac


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

{ $as_echo "$as_me:${as_lineno-$LINENO}: looking for configurables below $real_srcdir..." >&5
$as_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
  as_fn_error $? "cannot find any configurables below \"${real_srcdir}\"!" "$LINENO" 5
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: ...done" >&5
$as_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 $build_root/inc/common/ncbi_build_ver.h:include/common/ncbi_build_ver.h.in $srcdir/include/common/ncbi_revision.h:include/common/ncbi_revision.h.in"


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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; 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
    if test "x$cache_file" != "x/dev/null"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
      if test ! -f "$cache_file" || test -h "$cache_file"; then
	cat confcache >"$cache_file"
      else
        case $cache_file in #(
        */* | ?:*)
	  mv -f confcache "$cache_file"$$ &&
	  mv -f "$cache_file"$$ "$cache_file" ;; #(
        *)
	  mv -f confcache "$cache_file" ;;
	esac
      fi
    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_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=
U=
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=`$as_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.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs




: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $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}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do 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


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
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.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
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
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


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

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

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

# 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

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

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 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  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 -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_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 ||
$as_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" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# 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
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.69.  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

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac

case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac


cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# 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_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
      --config     print configuration, then exit
  -q, --quiet, --silent
                   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 <cpp-core@ncbi.nlm.nih.gov>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ncbi-tools++ config.status 0.0
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 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'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
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=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    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 )
    $as_echo "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    $as_echo "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    '') as_fn_error $? "missing file argument" ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
  --help | --hel | -h )
    $as_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.
  -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

  *) as_fn_append 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 || ac_write_fail=1
if \$ac_cs_recheck; then
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

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

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#

PATH="$HOME/bin:/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'
MAKE='$MAKE'
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_Q='$EGREP_Q'
export MAKE PATH


_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1

# 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" ;;
    "$build_root/inc/common/ncbi_build_ver.h") CONFIG_FILES="$CONFIG_FILES $build_root/inc/common/ncbi_build_ver.h:include/common/ncbi_build_ver.h.in" ;;
    "$srcdir/include/common/ncbi_revision.h") CONFIG_FILES="$CONFIG_FILES $srcdir/include/common/ncbi_revision.h:include/common/ncbi_revision.h.in" ;;
    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  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= ac_tmp=
  trap 'exit_status=$?
  : "${ac_tmp:=$tmp}"
  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF

# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries 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[	 ]*=[	 ]*/{
h
s///
s/^/:/
s/[	 ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[	 ]*\).*/\1/
G
s/\n//
s/^[^=]*=[	 ]*$//
}'
fi

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF

# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.

# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  if test -z "$ac_tt"; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any.  Preserve backslash
# newline sequences.

ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  for (key in D) D_is_set[key] = 1
  FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  line = \$ 0
  split(line, arg, " ")
  if (arg[1] == "#") {
    defundef = arg[2]
    mac1 = arg[3]
  } else {
    defundef = substr(arg[1], 2)
    mac1 = arg[2]
  }
  split(mac1, mac2, "(") #)
  macro = mac2[1]
  prefix = substr(line, 1, index(line, defundef) - 1)
  if (D_is_set[macro]) {
    # Preserve the white space surrounding the "#".
    print prefix "define", macro P[macro] D[macro]
    next
  } else {
    # 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.
    if (defundef == "undef") {
      print "/*", prefix defundef, macro, "*/"
      next
    }
  }
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"


eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  :[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="$ac_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 ||
	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append 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 '`
	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`$as_echo "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$ac_tmp/stdin" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    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 ||
$as_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"; as_fn_mkdir_p
  # Base source directories on path to *input* file.
if test -n "$ac_f"; then
   ac_f_rel=`echo "$ac_f" | sed -e 's,^/.*/\./,,'`
   ac_dir_in=`$as_dirname -- "$ac_f_rel" ||
$as_expr X"$ac_f_rel" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_f_rel" : 'X\(//\)[^/]' \| \
	 X"$ac_f_rel" : 'X\(//\)$' \| \
	 X"$ac_f_rel" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_f_rel" |
    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=/`$as_echo "$ac_dir_in" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_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 || ac_write_fail=1
# 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=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  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 || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;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
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
      "$ac_tmp/out"`; test -z "$ac_out"; } &&
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&5
$as_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 "$ac_tmp/stdin"
  case $ac_file in
  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
  if test x"$ac_file" != x-; then
    {
      $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
    } >"$ac_tmp/config.h" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
    else
      rm -f "$ac_file"
      mv "$ac_tmp/config.h" "$ac_file" \
	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
    fi
  else
    $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error $? "could not create -" "$LINENO" 5
  fi
 ;;

  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_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
chmod a+x "$build_root/build/run_with_cd_reporter.py"

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

"$srcdir"/scripts/common/impl/supplement_makefile_mk.sh "$real_srcdir" \
   "$builddir"
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

for f in "$builddir/corelib/ncbicfg.c" \
         "$build_root/inc/common/ncbi_build_ver.h"; do
   if test -f "$f.last" && cmp -s "$f.last" "$f"; then
      echo "$f" is unchanged
      touch -r "$f.last" "$f"
   elif test -f "$f"; then
      echo "$f" is updated
      rm -f "$f.last"
      cp -p "$f" "$f.last"
   else
      echo "$f" is not present
   fi
done

(cd $builddir/build-system/helpers && $MAKE -k)

random_macro="$build_root/inc/ncbi_random_macro.h"
rm -f $random_macro

if test "$with_configure_dialog" = yes; then
   if test "$with_flat_makefile" = no; then
      as_fn_error $? "incompatible options: --without-flat-makefile but --with-configure-dialog." "$LINENO" 5
   fi
   with_flat_makefile=yes
elif test "${with_saved_settings:-no}" != no; then
   if test "$with_flat_makefile" = no; then
      as_fn_error $? "incompatible options: --without-flat-makefile but --with-saved-settings." "$LINENO" 5
   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" \
      -o "$with_flat_makefile" = yes; then
      $EGREP_Q 'Error:|already defined' "$builddir/Flat.configuration_log"
      as_fn_error $? "flat makefile generation failed." "$LINENO" 5
   fi
fi

if test ! -f "$random_macro"; then
   $real_srcdir/scripts/common/impl/define_random_macros.sh >$random_macro
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
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: non-zero exit code ($exit_code):  $with_extra_action" >&5
$as_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:   https://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


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5


# 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 || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi

